Member-only story

Is 10000 Messages in 2.15 seconds with Python and gRPC Impossible?

Sean Bradley
2 min readApr 1, 2019

In this article I will demonstrate a gRPC server, a client and a multi-process client using python3.
I manage to process 10000 messages from the gRPC clients on the gRPC server in 2.15 seconds on an Intel Core i7–8550U 1.8GHz

The code I used in the article is hosted at https://github.com/Sean-Bradley/Seans-gRPC

The steps to set this up yourself

  1. git clone https://github.com/Sean-Bradley/Seans-gRPC.git
  2. $ virtualenv venv
  3. $ source venv/Scripts/activate
  4. $ pip install -r requirements.txt

Once the pip install has finished,

  1. Start the server
    $ python -m server
  2. Run the single process client, start many if you like.
    $ python -m client
  3. or start the 1 or more multiprocessing clients with
    $ python -m multiprocess
The eagle eyed of you will notice the 1.86 seconds result.

--

--

Sean Bradley
Sean Bradley

Written by Sean Bradley

Developer of real time, low latency, high availability, asynchronous, multi threaded, remotely managed, fully automated and monitored solutions.

No responses yet