Open dyoder opened 9 years ago
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.
In the following code ,messages is a Mutual event-emitter.
messages
go [ events "update", messages map (counter) -> data.counter = counter ]
go [ observe data.counter map ({counter}) -> messages.emit "update", counter ]
Work has begun in examples/messaging branch.
examples/messaging
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.Server