Hi guys,
I've been working on some experiments with different web application stacks to check their performances under a specific scenario: one in which I have to make several concurrent requests and then gather the results together (in order) and throw them out as JSON in the response body. (This project is only an experiment, but it's informing me for decisions that have to be made for a real-world project where we have a similar scenario.)
So, looking at the code here:
https://github.com/yougov/concurrency-tests/blob/master/stacks/goapp/main.go - does anybody see any problem in the implementation that could be hurting performance? I tried using a WaitGroup, tried sharing memory (nasty, I know, but just for the sake of experimentation), tried multiple JSON codecs, different web frameworks, and nothing worked so far. I have a feeling that I'm doing something fundamentally wrong and stupid, and that somehow I can make a small change to make the experiment much faster.
Thanks in advance, I'm sure this will help me learning more about the language! :-)
Cheers!