-
Notifications
You must be signed in to change notification settings - Fork 233
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
add client proxy and proxy server example #11
Conversation
Signed-off-by: disksing <[email protected]>
Signed-off-by: disksing <[email protected]>
Signed-off-by: disksing <[email protected]>
Signed-off-by: disksing <[email protected]>
Signed-off-by: disksing <[email protected]>
Signed-off-by: disksing <[email protected]>
router := mux.NewRouter() | ||
rawkv := rawkvHandler{p: proxy.NewRaw()} | ||
|
||
router.HandleFunc("/rawkv/client/new", rawkv.handlerFunc(rawkv.New)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
em, I prefer using raw and txn directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
em, /txn/txn/{id}/get
will be strange then, txnkv
seems to still be the better option. @siddontang
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, why not providing a gRPC support instead of Restful. For Restful, we have to care how to manage transaction ID, if the client forgets to rollback the transaction, we have to rollback it soon.
But in gRPC, we can manage the transaction in a session, it is more simple.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite familiar with grpc session you mentioned. But I think HTTP is a better idea than gRPC because it is supported by almost all modern languages. In general the developer of the client can introduce it with less effort.
Signed-off-by: disksing <[email protected]>
* add proxy Signed-off-by: disksing <[email protected]>
No description provided.