Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do virtual properties work with state tracking #17

Open
wolfsage opened this issue Aug 29, 2016 · 0 comments
Open

How do virtual properties work with state tracking #17

wolfsage opened this issue Aug 29, 2016 · 0 comments

Comments

@wolfsage
Copy link
Contributor

wolfsage commented Aug 29, 2016

Right now, virtual properties can be anything. For example, a virtual property could be "is_recent" that compares the creation time of an entity against now() and returns true if created in the last hour or false otherwise.

The problem here is that apparent data on the objects can change value but not change the 'state' of the class of objects.

Say our current state is 0, and we call setFoos/create. Our state becomes 1, and our object has a is_recent of true.

In 2 hours, is_recent is now false, but state is still 0. Now our client and server are out of sync, and if the client says getFooUpdates sinceState => 1, the server will say nothing has changed.

Is this something we can defend against consumers mistakenly doing, or should we minimize these types of issues through the documentation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant