Saving off and restoring Key/Value pairs

So I’m looking into creating a simulator that has the main purpose right now of saving off and restoring key/value pairs. I have some questions around that:

When the simulator starts, is that a unique, container, I assume. That would be used for each world/room? (I wasn’t planning on supporting multi-rooms at the moment)

Is the simulator able to read and write out to a file? If so is that maintained between runs?

I understand that you need to be on a paid plan to have the simulator be able to access the internet, what more needs to be done besides having a credit card on file?

Or is there a more correct way to handle this? Basically I need to be able to have some logic on the simulation side and be able to save off state when rooms are shutdown and restored.

Rooms: when you start a room each simulator is unique to that room.
Worlds: a world’s simulator is unique to that world

In both cases the simulator does not persist any state by default - it’s up to your gameplay code to persiste state.

Yes, in order to reach the wider internet, you will need to upgrade your plan to a paid plan, or contact us at devrel@coherence.io to discuss an enterprise plan. I know yall have been in contact with us previously, so if you’re interested, please let Jonathan know and we can talk about internet access for your sim.

Without opening simulator access to the wider internet, an option is to have a client send that data to 3rd party.

And to clarify on the filesystem: in both rooms and worlds the simulator writing to the file system is not guaranteed to persist, so yes and external storage is recommended

Okay, so looking at the documentation what does the command line option do?

--coherence-region             // region where the simulator is started
--coherence-world-id           // unique world id (in world mode)
--coherence-http-server-port   // REST access for starting / stopping rooms
--coherence-auth-token         // token to authorize access
--coherence-simulation-server  // identify as simulation server
--coherence-simulator-type     // Room or World

// the following should be used also when starting a local simulation server to 
// successfully connect to the local replication server

--coherence-ip                 // address of the replication server (eg 127.0.0.1)
--coherence-port               // port of the replication server
--coherence-room-id            // room id when connecting to a room
--coherence-unique-room-id     // unique room id to connect to in room mode
--coherence-room-tags          // tags used when creating the room
--coherence-room-kv            // key values supplied when creating the room

That -room-kv? Command line isn’t really an option for this just a bit confused as to what that means.

RoomCreationOptions has an option for creating a room providing K/V pairs to the room for your own game logic. Those same K/V pairs are passed to simulators automatically in the cloud through that command line flag:

https://unityapi.coherence.io/docs/v1.2.0/api/Coherence.Cloud.RoomCreationOptions.html#Coherence_Cloud_RoomCreationOptions_KeyValues