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
- Install chocolatey package manager. Follow the instructions from here: https://chocolatey.org/docs/installation
- Then, if you are on Windows, do
choco install thrift
. If you are on a Mac, do:brew install thrift
- Clone the source code
- Go into the project's root directory
- Visual Studio 2017
- Windows 10 x64
- Execute:
thrift -r --gen csharp tutorial.thrift
- Open Thriftsharp.sln
- Use NuGet to install ApacheThrift v0.9.3
- Build the solution
- Run ThriftsharpServer first
- Then, run ThriftsharpClient
- Study the code and adapt to RING + POS (.NET 3.5. C# 5) and PISS (.NET 4.5.1 C#7)
- PostgreSQL 10 on macOS
- Timescale (follow the instructions from here: http://docs.timescale.com/v0.10/getting-started/installation/mac/installation-homebrew)
- Target OS is Windows 10 x64, but during development, use macOS first for speed and convenience
- Execute:
thrift -r --gen python tutorial.thrift
- Use
pyenv
to install Python v3.7.0, and ensure you are using this version pip install -r requirements.txt
- Run server first:
python server.py
- Then, open another Terminal tab, run:
python client.py
- Study the code and adapt to PIDB project
- Visual Studio 2017
- Windows 10 x64
- Execute:
thrift -r --gen cpp tutorial.thrift
- Open ThriftCpp.sln
- Use
vcpkg
to install thrift.vcpkg install thrift
- Make sure your Visual Studio already has Qt 5.10.1 installed
- Build the solution
- Study the code and adapt to PIC project