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

Aggregate objects #9

Open
ironfroggy opened this issue Dec 23, 2012 · 0 comments
Open

Aggregate objects #9

ironfroggy opened this issue Dec 23, 2012 · 0 comments

Comments

@ironfroggy
Copy link
Contributor

Provide helpers to implement aggregate objects safely updated from multiple devices

Use Cases:

  • Distributed Counters
  • Sets and Mappings
  • Distributed Flags
  • Distributed Sequences

These will be helpers built on top of persisted Views, to provide easy ways to modify device-data and sync with other devices, even if they're modifying the same structures. The devices will modify their local contributions, and the view will generate the aggregate.

These will be defined as stores, with an extension. The extension will

  • Inject the view into the schema, hidden
  • Add specific read and write methods

Examples

  • s.put("bob", {coffee: 0});
    s.incr("bob.coffee")
    s.get("bob") -> {coffee: 1}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant