empiricaly / empirica

Open source project to tackle the problem of long development cycles required to produce software to conduct multi-participant and real-time human experiments online.
https://empirica.ly/
Apache License 2.0
45 stars 8 forks source link

Non-persistent attributes #529

Closed npaton closed 6 months ago

npaton commented 6 months ago

Is there an existing issue for this?

Is your feature request related to a problem?

For synchronizing high-throughput data, such as mouse events, persistence can be a problem. Yet, it would be nice to have synchronization between players.

Describe the solution you'd like

Maybe an option on set() that would mark the change as non-persistent. E.g.:

player.set("mouse", xy, { ephemeral: true })
player.get("mouse")

This would not be persisted, so it would not find itself in the tajriba file, and the key would be null after a server restart. Otherwise it should work exactly the same as normal attributes. I don't know if we can/should support persistent and ephemeral updates on the same key.

Describe alternatives you've considered

No response

Teachability, Documentation, Adoption, Migration Strategy

No response

Code of Conduct