https://github.com/binarymuse/distributed-flux
Using a Flux-like architecture for distributed programs
https://github.com/binarymuse/distributed-flux
Last synced: 11 months ago
JSON representation
Using a Flux-like architecture for distributed programs
- Host: GitHub
- URL: https://github.com/binarymuse/distributed-flux
- Owner: BinaryMuse
- Created: 2014-09-22T06:27:14.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-09-22T17:15:14.000Z (almost 12 years ago)
- Last Synced: 2024-11-30T08:41:31.816Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 145 KB
- Stars: 5
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
:construction:
Initial tests in using a [Flux](http://facebook.github.io/flux/)-style architecture for realtime, multi-client programs.
npm install && npm start
Open `http://localhost:8081` in multiple browsers. Control the listening port with the `PORT` environment variable.
Overview
========
Flux is a software architecture where changes to local data comes only from events, called actions. Entities that manage data, called stores, watch for these actions and manipulate their internal state as appropriate.
This repository demonstrates a similar idea distributed among a server and *n* clients. When an action is performed on a client, it is also sent to the server. The server determines a canonical order for all incoming actions, and informs the clients of that order. Clients jump back in time (using immutable data structures) if necessary and reply all subsequent actions to bring themselves up to date with the server, re-applying any actions that haven't yet been confirmed by the server if necessary.
This example uses a "last-write-wins" approach. Conflict resolution mechanisms are an interesting topic warranting further exploration.