GithubHelp home page GithubHelp logo

rohanverma94 / georgehotzchallenge.scala Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 18 KB

A POC for twitter's finagle backed RPC server with a python client

License: Creative Commons Zero v1.0 Universal

Scala 69.61% Python 23.88% Thrift 6.52%
finagle scala thrift twitter python3 rpc rpc-api

georgehotzchallenge.scala's Introduction

This is GeorgeHotzChallenge.scala

This is a polished implementation of twitter's finagle-thrift RPC server and Python 3 based client.

Some hours ago George Hotz has thrown an open challenge to comeup with python-finagle-thrift in 2 hours, so here it is.

This is a complete rewrite and yet still better than George Hotz's version. His stream can be found at - https://www.youtube.com/watch?v=nvtoOxNfDQo

Requirements

  • Scala 2.13.10
  • Python 3.8+
  • Apache Thrift 0.16.0 or 0.14.0+

Setup

  • For Thrift
    • INSTALL APACHE THRIFT via dnf or apt or other means.
cd python-thrift
pip install thrift
thrift -gen py multiply.service.thrift
  • For Scala
    • Install Scala 2.13.10 & sbt 1.8.0
sbt clean
sbt compile
sbt run

MAKE SURE ABOVE SERVER IS RUNNING

  • For Python
cd python-thrift
python client.py

Enter q to quit or any other key to continue: 454

 Enter first number: 45

 Enter second number: 452

Product:  20340

The server output after you call RPC/thrift interface

[info] running georgehotzsucksFinaglePOC.screamingServer 
Nov 28, 2022 8:37:03 AM com.twitter.jvm.Jvm$ liftedTree2$1
Nov 28, 2022 8:37:04 AM com.twitter.finagle.Init$ $anonfun$once$1
INFO: Finagle version 22.7.0 (rev=4d10525ef4fe89732bcfec6286fac7fe426e9082) built at 20220728-183850
Multiplying 45 and 452

georgehotzchallenge.scala's People

Contributors

rohanverma94 avatar

Watchers

 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.