Some 2 and a half months later, I've finally got to seeing great results with #rustlang
I've got the identity-processor built in #rust. It deals with user registration, logging etc.
It's both a #rabbitmq client and a #warp server, so it can consume requests coming from 2 different realms.
Registration of a user fails if there already exists a user with the specified username/handle or email address.
So I tested how it works with thousands of requests that all specify a different handle but the same email address.
After resolving all the problems (there was quite a bit to learn), now I see that the following cycle:
1. client publishes a request to #rabbitmq
2. identity-processor picks up the request, tries to register the user and fails because of DB checks (on #postgres)
3. the failure is sent via a corresponding reply queue on #rabbitmq
4. client consumes the request from #rabbitmq
takes 2.5 ms on average.
I'm more than satisfied, I'm thrilled with the results. Thousands of test cycles are being processed, originating from different processes.
At this point, in my former #JavaScript world, I would start considering possible memory leaks and all the possible Error processing paths that I may have missed (and some are always missed in #JavaScript ).
Now, with #rust, I can rest assured that everything is just as fine and safe as it should be. And the whole identity-processor takes just 37MB of RAM, steaming with message processing all the time. I'd refrain from estimations of how much RAM this would cost me in the #JavaScript world.