Comments (6)
Attempted to move to simple-scuttle
over the weekend. The set up was three peers, (two browsers and a server) —
- updates were not automatically forwarded along to secondary peers (when A->B, B didnt always forward updates to C)
- Since there's not multiple streams for a single
Gossip
instance, it seems like any broadcasted updates will go to all connected peers. Newly connected peers' updates (i.e. all of them on cold start) will be sent to all peers. - Had to call
.gossip()
to sometimes get updates from peers. Seems like the vector clocks weren't updating correctly for all/current peers? many version numbers were in the past and therefore not re-sent.
Anyway, I couldn't get it to work reliably in my tests. I've saved my progress but in meantime have forked dominictarr/scuttlebutt
, have implemented vector-clock-class
, and will implement a few improvements (such as always replaying updates in timestamp order) and start stripping out irrelevant code.
from redux-scuttlebutt.
Preparing for a relatively major 0.2.0
release
- Added support for
options.isGossipType
- Uses logical timestamps, not wall-clock timestamps (finally)
- We're currently depending on
github:grrowl/scuttlebutt#logical-timestamps
.- Haven't made any PRs for
dominictarr/scuttlebutt
as we're making a few breaking changes to the project and I'd like to have a more solid case for doing so before we do. - I suppose we'll stick with this forked implementation for now. No other library is as small and quick and reliable with such direct access to low-level Ops.
- Haven't made any PRs for
- The user-land signing I mentioned before can be found here
- Will likely release properly in a more consumable form in the future. This works well for my use-case for now. Let me know if you need example usage code.
from redux-scuttlebutt.
is simple-scuttle
an option? what are your thoughts on it in comparison to dominic's implementation?
from redux-scuttlebutt.
it would be great to also have the option to hook into dispatcher.js#wrapDispatch
to filter explicit action types. for example, my state tree has a browserInfo piece of state that needs to be updated locally, but not dispatched to peers like actions that are prepended with @
. my workaround has been to open a PR with some third-party store enhancers and middlewares that dispatch actions that don't follow the format of @@vendor/action-type
, and update them to include it, so i don't have to worry about propagating unnecessary messages.
from redux-scuttlebutt.
simple-scuttle
looks really nice, I failed to flesh out this public list as it ended up pretty critical of these excellent projects and didn't want to appear to be sledging. Initially I hesitated on using simple-scuttle
as it exposes a state-based, versioned-keys datatype, whereas I wanted to implement a more pure op-based stream as it maps perfectly to redux actions, leaving state wholly to the reducers. It exposes .history
but I'd rather remove/reimplement the state itself.
That said, redux-scuttlebutt priorities have changed somewhat. I have a userland crypto/action-signing solution and I think userland implementation is the way to go for this. Subscriptions can be multiple, parallel Scuttlebutt streams (and should be treated as distinct data streams anyway). I'll take a deeper look today.
Also, I pushed the latest branch memory
here to github, which is published on npm as [email protected]
which I'm using for my own projects. It doesn't enable overriding isGossipType
but I would certainly accept a PR or look at adding this as an option in future.
from redux-scuttlebutt.
it makes sense that you went with the approach that you ended up going. regarding .history
, it's a good to have. I wouldn't remove it. the idea of reimplementing would be interesting perhaps as a separate module; redux-scuttlebutt-history
mayhaps.
I have a userland crypto/action-signing solution and I think userland implementation is the way to go for this
yessss!
—i'm currently using this library for a personal react/redux project and I must say, it's incredible how simple it was to implement. I was previously aware of scuttlebutt and gossip protocol. Also a big fan of Dominic and his mad science. It was only natural that this library provided me the best of both worlds.
i'd be more than happy to open a PR :) i'll take care of that this weekend.
from redux-scuttlebutt.
Related Issues (14)
- [Discussion] Why syncing actions instead of data model? HOT 6
- Synchronization on the state diff level HOT 1
- Action log compaction
- Scopes (sharding/subscriptions) HOT 1
- Chat demo errors HOT 2
- Don't gossip actions which don't change state
- Usage with create-react-app
- Using with existing socket connection? HOT 1
- Missing action.timestamps HOT 6
- using with connect() HOT 5
- Some actions aren't replayed or replayed out of order (visible in examples/counter) HOT 1
- Action signature hashes (anti-tampering) HOT 3
- Replay scuttlebutt updates from orderedHistory HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redux-scuttlebutt.