Giter Site home page Giter Site logo

thrift-demo's Introduction

Thrift-demo

Thrift-demo is written so other engineers could understand how to use Thrift, and how to make Thrift RPC calls. It supports PHP and Go, with Scala to be added soon. By default, all binary protocol is used together with HTTP transport. You can easily change protocol - just use different protocol class. Remember you have to change both server and client code. Changing transport is slightly more difficult and it isn't covered by this demo.

You need to start only one server and then use any client to make Thrift RPC calls. All calls to be made from root directory.

make

Thrift generated files are already included in this repository (under gen-go and gen-php). If you want to rebuild, you can run make (the output should be the same if Thrift version is 0.9.3).

Servers

PHP

To start a PHP server, run:

php -S localhost:8080 php/server.php

Go

To start Go server, symlink this repo to $GOHOME/src/. Then, run

go run go/server.go

Scala

TODO

Clients

When running client, make sure server is up and running. Otherwise, you will get Thrift exception connection refused.

PHP

To run a PHP client, run following:

php php/client.php

Go

To run a Go client script, symlink this repo to $GOHOME/src (if already not done), and execute:

go run go/client.go

Scala

TODO

thrift-demo's People

Contributors

sokac avatar

Watchers

Erik Goens avatar John Berry avatar Brandon Zacharie avatar Ian Leitch avatar Scott Southerland avatar Noam Lovinsky avatar Marc Bollinger avatar Dylan Trotter avatar Jeremy Stanley avatar Flavius Popescu avatar Alan D. Cabrera avatar Michael Papper avatar Oleksandr Pryimak avatar Tommy avatar Alex Karp avatar Venkatesh Iyer avatar Andreas Sekine avatar Richard Whalen avatar Kazu Omatsu avatar Nick Jones avatar Sreenidhi Sreesha avatar Tracy avatar Nate Kupp avatar  avatar Xin Liu avatar Seth Kingsley avatar Tim Carter avatar James Cloos avatar Daniel Capo avatar Oliver Zhou avatar Xiaoyu Suzanne Fei avatar Ambles Kwok avatar  avatar Jeff Wong avatar David Morton avatar Jeff Schmitz avatar Jay Wang avatar George Pantazis avatar Stanley Lin avatar Peter Xiao avatar Glen Oakley avatar Marco Almeida avatar Sai avatar Ben Anderson avatar Wei Li avatar Lucas Smith avatar Chris Cornelis avatar Purusoth Mahendran avatar Rajath B.R avatar Thomas Nourse avatar Evan Noon avatar Charles Liao avatar  avatar Kirisanth avatar Jackson Poulos avatar pc avatar Evan Vaughn avatar Cameron Askew avatar Abhimanyu Singhal avatar  avatar Adam Hollock avatar Devin Turner avatar Linpeng Lyu avatar Jin Zhang avatar Anna Selonick avatar Ravi Raghavan avatar Anuj Varma avatar Vincent Le Quang avatar Alex Cheston avatar Lucas Boyer avatar Niranjan S avatar Ruishi Tao avatar  avatar Alok Irde avatar Eugene Tsai avatar Yifei avatar Rich Parrish avatar Anurag Bhatt avatar Vineet Baldwa avatar Jeffrey Liu avatar Crystal Hoyer avatar Abhay Shankar avatar Joanna Chen avatar David Boctor avatar Navneet Rao avatar Alex Wice avatar Manuel Olmedo avatar Noah Han avatar William Tsay avatar  avatar Alec Rodgers avatar Brian Terczynski avatar Abraham Sturman avatar Eric Lee avatar Nathan Pucheril avatar Carolina Galleguillos avatar Unzi Park avatar Xing Chen avatar Ankit Soni avatar Shishir Dash avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.