-
Notifications
You must be signed in to change notification settings - Fork 66
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
Handling object references #33
Comments
It Would Be Easy™ to add this functionality on top of scuttlebutt, but I'm curious if this already exists. |
No, this doesn't already exist. Although,my replicated data store that predated (although, this required that each branch had and scuttlebutt was my 3rd attempt at a data replication system, I don't mean to be discouraging, but I think it's unwise to try to pave over distribution and make it feel like a single system. I think the bible has a section on distributed programming which says something like "God, grant me the serenity to accept the things I cannot change, The courage to change the things I can, And wisdom to know the difference" I think distributed systems is one of these things you cannot change. That is not to say that a scuttlebutt that replicates a tree structure - What do you want to use it for? |
Ah hah yes, wise words. As for why and what for, its really just an experiment. Mad science. Anyways I'll throw it together and see what its like to work with. |
Okay, awesome! let me know if you have any questions! Just on thing though: //this pattern is better
duplex.pipe(sb.createStream()).pipe(duplex)
//than:
sb.handle(duplex) Because you know that your thing is using streams by the correct api and not doing anything weird. |
+1 to that. Also frees your module consumer to pipe things in ways you didn't expect (like a throughput benchmarking transform). |
Heh, here it is: https://github.com/kumavis/synced-object-store Unfortunately it doesn't work out of the box for things like handing a voxel.js game object, because of a reference to While I can't imagine using this in a real project, 'twas a fun hack. Curious what your thoughts are. |
@kumavis looks interesting. can you put a simple example of how to use it in the readme? |
I'm looking to do something like this:
Notice how object references are maintained. I think this would go a long way to making a distributed system feel like a single machine.
This might require automatically registering normal objects into the SyncedObjectStore
The text was updated successfully, but these errors were encountered: