Yesterday, a friend started a war about programming language for Real-Time API. He did a little mistake because I’m always… I remeber the very long war about Emacs vs Vim (Vim wins).
The subject was about RT (Real-Time) webservice/microservice.
We consider RT a latency less than or equal to 30ms.
I let you imagine 2 microservices:
- service 1 sent a request to service 2
- service 2 received the request from service 1: process and send the reply
- service 1 received the reply from service 2
Time between point 1 and point 3 ≤ 30ms
Tools used for this quick RT webservice
To test and obtain the graph, I used rtapi (from nginx)
Nothing more… KISS > all
Code and online test
- code: https://github.com/sycured/streaming-calc-haskell-yesod
- container ready to use: ghcr.io/sycured/schy:latest
- test server: https://schy.sycured.com
Will I use Haskell for real world app?
Absolutely, I love Haskell because we don’t have side effect.
Performance + no side effect = 💓