-
Notifications
You must be signed in to change notification settings - Fork 872
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
DB Sharding #1522
Comments
Do you consider #db as database on the same server or remote database as well? |
Both: you provide an URL and OrientDB will make the rest. |
Cool! Questions in bulk :) |
|
Great. Thanks for info. I look forward to test first workable commits. |
Exactly. It will be a responsibility of the application to find the best way to cluster data. |
Hi, I will add my five cents. |
Hey guys, I don't like this solution anymore, because obliges us to migrate (=update) all the RIDs when you move records between nodes. I prefer manual sharding support in current configuration, by specifying that some record clusters haven't to be replicated but rather it's the owner of the data. |
Hi Luca, In what case do you expect moving a record between nodes? Rebalancing nodes in sharding? |
Yes, rebalancing. This will be done manually through a new command but there can be pluggable strategies. |
This is interesting view on sharding and repartitions in SQL Azure |
Postponed. |
Renamed as "DB Sharding" has been planned for 1.6 |
For cross-links I've just created a new issue as federated databases #1597 planned for 2.0 |
This will allow to span database portions across multiple servers using the record cluster granularity. This works pretty well with OrientDB Object Orientation concepts. Example. This is the default: Class Customer -> Cluster Customer But if you assign: Class Customer -> Clusters [ Customer_USA, Customer_Europe ] OrientDB will use both clusters when you refer to the class "Customer". Well, with the new sharding feature if you assign Customer_USA to the server 1 and Customer_Europe to the server 2 you can work against the generic "Customer" class or single clusters. You could also work only at class level by creating sub classes: Customer <|--- Customer_USA, Customer_Europe In this case OrientDB already creates 3 different clusters. So this query: select from customer -> will retrieve both customers from both servers So this isn't auto-sharding because you've to design how to split the database in efficient way but this is the best solution even when auto-sharding will be ready because it's very hard to create a generic algorithm that shard the database in all the different use cases. Take a look at this tutorial https://github.com/orientechnologies/orientdb/wiki/Tutorial%3A-Clusters, but think that the cluster can reside only on certain servers. |
Ok, probably we need to review the replication to address a simple configuration and again big power. I was thinking to change default cfg in this way:
synchReplicas.total means 2 nodes must have the database in synch. So the master will be chosen from the list in synchReplicas.nodes. This is the list of node names populated as soon as the server nodes connect. So After the first node "europe0" starts up the cfg will change in:
When the 2nd "usa1" node joins:
This is because until all the synch nodes aren't filled the server assumes the right role. The 3rd server that joins, europe2, changes the cfg in:
Because the synch node list is full and asynch is $all that means all the others. |
This is the definitive format:
|
…eouts based on number of nodes and command types. working to issue #1522 about sharding. Fixed problem on triggers: now are executed on master and remote nodes depending by trigger
Even though auto-sharding is not available yet (will be in 2.0) by using a cross-database RID. So the classic RID is:
cluster-id:cluster-position, example #12:433
And the cross-db will be:
db:cluster-id:cluster-position, example #demo3:12:433
Now what to store as ? The db name? It could be a waste of space. It could be an id as 1 byte (0-127 databases or even 0-255 by playing with the unsigned bit) but where to map the database list?
The text was updated successfully, but these errors were encountered: