-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
31 lines (23 loc) · 969 Bytes
/
README
1
2
3
4
5
6
7
8
This project is an example of how protobuf forward and backward compatibility works.
The following is the example script script.
Check out my blog for more info at http://www.eishay.com
import voldemort._import test.UserPBO._val vclient = new VClient[String, User] ("proto-store", "tcp://localhost:6666")val user = User.newBuilder.setId(1).setName("Joe Smith").addEmail("[email protected]").addEmail("[email protected]").buildvclient put (user getId toString, user)-----do remote...-----val user2 = vclient get "1" remote:import voldemort._import test.UserPBO._val vclient = new VClient[String, User] ("proto-store", "tcp://localhost:6666")val user = vclient get "1"val newUser = User.newBuilder(user).setMembership(Membership.newBuilder.setActive(true).setType(Membership.Type.PRO).build).buildvclient put (newUser.getId.toString, newUser) ===============================================
By Eishay Smith
http://www.eishay.com