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

Add a reactive systems example? #50

Open
dyoder opened this issue Aug 22, 2015 · 1 comment
Open

Add a reactive systems example? #50

dyoder opened this issue Aug 22, 2015 · 1 comment

Comments

@dyoder
Copy link
Member

dyoder commented Aug 22, 2015

Since Mutual/ng provides a simple event emitter interface for Redis-based messaging, we can set up a flow to implement a synchronized counter quite trivially.

Client

In the following code ,messages is a Mutual event-emitter.

go [
  events "update", messages
  map (counter) -> data.counter = counter
]
Server
go [
  observe data.counter
  map ({counter}) -> messages.emit "update", counter
]
@dyoder
Copy link
Member Author

dyoder commented Aug 23, 2015

Work has begun in examples/messaging branch.

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