Skip to content

Playing around with Thrift using Python, C#, and C++

Notifications You must be signed in to change notification settings

sivabudh/thrifly

Repository files navigation

thrifly

Playing around with Apache Thrift using Python, C#, and C++

What's Thrift? Read the layman's explanation here: https://www.quora.com/In-simple-terms-what-is-Thrift-software-framework-and-what-does-it-do

Setting up your machine

  1. Install chocolatey package manager. Follow the instructions from here: https://chocolatey.org/docs/installation
  2. Then, if you are on Windows, do choco install thrift. If you are on a Mac, do: brew install thrift

Build instructions for each language

  1. Clone the source code
  2. Go into the project's root directory

C# / .NET

  1. Visual Studio 2017
  2. Windows 10 x64
  3. Execute: thrift -r --gen csharp tutorial.thrift
  4. Open Thriftsharp.sln
  5. Use NuGet to install ApacheThrift v0.9.3
  6. Build the solution
  7. Run ThriftsharpServer first
  8. Then, run ThriftsharpClient
  9. Study the code and adapt to RING + POS (.NET 3.5. C# 5) and PISS (.NET 4.5.1 C#7)

Python

  1. PostgreSQL 10 on macOS
  2. Timescale (follow the instructions from here: http://docs.timescale.com/v0.10/getting-started/installation/mac/installation-homebrew)
  3. Target OS is Windows 10 x64, but during development, use macOS first for speed and convenience
  4. Execute: thrift -r --gen python tutorial.thrift
  5. Use pyenv to install Python v3.7.0, and ensure you are using this version
  6. pip install -r requirements.txt
  7. Run server first: python server.py
  8. Then, open another Terminal tab, run: python client.py
  9. Study the code and adapt to PIDB project

C++

  1. Visual Studio 2017
  2. Windows 10 x64
  3. Execute: thrift -r --gen cpp tutorial.thrift
  4. Open ThriftCpp.sln
  5. Use vcpkg to install thrift. vcpkg install thrift
  6. Make sure your Visual Studio already has Qt 5.10.1 installed
  7. Build the solution
  8. Study the code and adapt to PIC project

About

Playing around with Thrift using Python, C#, and C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published