Skip to content

This contains the sample thrift client and server for rpc communication. For writing the thrift client and server in scala, I have used scrooge and for c++ apache thrift.

Notifications You must be signed in to change notification settings

VishvendraRana/scala-cpp-thrift-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

scala-cpp-thrift-example

CPP

-> generate files by using the below command

thrift --gen cpp calculator.thrift

-> Replace the skeleton file (generated by above step in the gen-cpp directory) by "calculator_server.cpp" added here (cpp directory)

-> build the cpp files

g++ -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H -Wall -I/usr/local/include/thrift *.cpp -L/usr/local/lib -lthrift -o calc_server

-> Run the server

./calc_server

Scala

-> create build.sbt file and add scrooge and finagle dependencies

-> add the source thrift file location and destination folder for generated files in the build file

-> add the scrooge sbt plugin in the plugins.sbt file

-> for generating the code run the below command

sbt scrooge-gen

About

This contains the sample thrift client and server for rpc communication. For writing the thrift client and server in scala, I have used scrooge and for c++ apache thrift.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published