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

MongoStorage ? #43

Open
temsa opened this issue Jan 23, 2015 · 3 comments
Open

MongoStorage ? #43

temsa opened this issue Jan 23, 2015 · 3 comments

Comments

@temsa
Copy link

temsa commented Jan 23, 2015

ReadMe references https://github.com/gritzko/swarm/blob/master/lib/MongoStorage.js , yet it does not exist :(

BTW an ElasticsearchStorage using official client would be great too ! I may do it by myself if I really understand either the LevelDB one or the FileSystem one

@gritzko
Copy link
Owner

gritzko commented Jan 23, 2015

That would be a valuable contribution.
Storage is the base class. Implementations override writeState, readState, writeOp, readOps.
Former two methods deal with state snapshots. The latter two append ops to the log and read it, respectively.
Storage is totally agnostic about CRDT/logic; it deals with plain key-value pairs.
In MongoDB, we used arrays to keep the log. But (1) that was an ugly hack, (2) that code is not open source and (3) arrays are not actually necessary (key-value is OK as the order can be derived from the keys).

@garethdown44
Copy link

Do you have any plans to make the Mongo Storage driver available?

@gritzko
Copy link
Owner

gritzko commented Jul 16, 2015

0.4 works differently.
It is backed by an ordered key-value engine (everything levelup).
So, it is possible to export data to MongoDB in real-time.
@garethdown44, is such an option suitable for you?
What is your scenario?

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

3 participants