You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These is sample code to create a same DB from different client. but If ran many threadsd node on different server machine.
1, how to make sure they open the same DB? the below step is ok?
A, client C1 connect threadsd N1 on server machine S1:
db1, err := client.NewClient("/ip4/127.0.0.1/tcp/6006", grpc.WithInsecure())
threadID := thread.NewIDV1(thread.Raw, 32)
err := db1.NewDB(context.Background(), threadID)
dbInfo1, err := db1.GetDBInfo(context.Background(), threadID) // copy dbInfo1 to server S2
B, client C2 connect threadsd N2 on server machine S2:
db2, err := client.NewClient("/ip4/127.0.0.1/tcp/6006", grpc.WithInsecure())
err := db2.NewDBFromAddr(context.Background(), dbInfo1.Addrs[0], dbInfo1.Key) // dbInfo1 is copy from server S1
2, If db2 can open the same DB from db1, db1 can sync all history record to db2, or db2 pull all history from db1?
3, If insert new record to db1 and db2, then can sync new record each other in real time?
4, is there a benchmark to test how many nodes to join the same DB?
The text was updated successfully, but these errors were encountered:
These is sample code to create a same DB from different client. but If ran many threadsd node on different server machine.
1, how to make sure they open the same DB? the below step is ok?
A, client C1 connect threadsd N1 on server machine S1:
db1, err := client.NewClient("/ip4/127.0.0.1/tcp/6006", grpc.WithInsecure())
threadID := thread.NewIDV1(thread.Raw, 32)
err := db1.NewDB(context.Background(), threadID)
dbInfo1, err := db1.GetDBInfo(context.Background(), threadID) // copy dbInfo1 to server S2
B, client C2 connect threadsd N2 on server machine S2:
db2, err := client.NewClient("/ip4/127.0.0.1/tcp/6006", grpc.WithInsecure())
err := db2.NewDBFromAddr(context.Background(), dbInfo1.Addrs[0], dbInfo1.Key) // dbInfo1 is copy from server S1
2, If db2 can open the same DB from db1, db1 can sync all history record to db2, or db2 pull all history from db1?
3, If insert new record to db1 and db2, then can sync new record each other in real time?
4, is there a benchmark to test how many nodes to join the same DB?
The text was updated successfully, but these errors were encountered: