Skip to content

eishay/protobuf-object-competability-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

No packages published