Skip to content
Discussion options

You must be logged in to vote

what will happen if the server for any reason closed between this two events?

I believe this depends on the order of the server shutdown, i.e. whether it is graceful or not.

If the server crashes/force-stops, then the session entry will remain there. For such cases, you should probably have a unique index on the identity, and remove any stale session for it before creating a new one in the client_connected reducer.

also what the schema of Session in the example?

This is left to your taste, as it depends on your own business logic requirements. An example is an example :)

P.S. I'm no Clockwork Labs guy, just a heavy SpacetimeDB user. Treat my response with a grain of salt.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by CorrM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants