in reply to Re^3: RFC: OtoDB and rolling your own scalable datastore
in thread RFC: OtoDB and rolling your own scalable datastore
Because the data used by OtoDB is effectively flat you can stripe it between servers without very much effort. You just have to query that same set of servers to ensure that you are getting all the data back.
Inserts work incrementally. The library makes an insert, and moves the pointer to the next server in the list and the next insert is done there. Somewhere, you must track the current insert server. In the RubberWiki demo I simply write the current server index to a text file. You could use a database table, or a dedicated server.
Queries, updates, and deletes are done against all servers in the list. So instead of sending a SQL command to one RDBMS, you send it to n servers. (Again, it's only this easy because the data structure is simplified. Fully relational data is much harder to try and distribute this way.) OtoDB does this sequentially, which will be a bottleneck at some point, I think. But my other intuition is that these three are parallelizable.
Of these, querying is the only one that requires a re-consolidation of the data. Update and delete just ask the data servers to perform some maintenance, and don't return anything to the user. When a query is run, it asks each server in the list to return the set of data generated by the SQL command (each server should return total_records/n records since incremental inserts should spread data evenly). In some cases the data will need to be reduced, and if ordering is requested, then a merge-order operation happens. These add additional work on the app side of things, but a pretty minimal amount from what I can see.
That's it, coordination in a nutshell.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: RFC: OtoDB and rolling your own scalable datastore
by mr_mischief (Monsignor) on Jul 17, 2008 at 17:42 UTC | |
by arbingersys (Pilgrim) on Jul 20, 2008 at 05:42 UTC | |
by mr_mischief (Monsignor) on Jul 22, 2008 at 17:49 UTC | |
by arbingersys (Pilgrim) on Jul 23, 2008 at 21:23 UTC | |
by mr_mischief (Monsignor) on Jul 23, 2008 at 21:41 UTC |