-
Notifications
You must be signed in to change notification settings - Fork 1
Protocol Buffers forward + backward competability demo using Scala and Voldemort
License
eishay/protobuf-object-competability-example
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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]").build vclient 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).build vclient put (newUser.getId.toString, newUser) =============================================== By Eishay Smith [email protected] http://www.eishay.com
About
Protocol Buffers forward + backward competability demo using Scala and Voldemort
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published