<div dir="ltr">Hello,<div><br></div><div>I am looking for an advice on how to architect my system. I am just a beginner...</div><div><br></div><div>I have a process that receives messages and this process needs to parse each message, extract some information from the parsed message, and then send this information to the subscribers.</div>
<div><br></div><div>As I read somewhere, in a situation like this, people usually spawn a worker process per message, and let this worker do the work, and then send the results to the publishers.</div><div><br></div><div>
I have an overwhelming amount of incoming messages (these are tweets that I get from a twitter stream), and I am not experienced enough to be able to tell whether this worker-per-task approach is the right way to do it. I am afraid that my application will be flooded with workers and eventually can collapse.</div>
<div><br></div><div>I was thinking that maybe I can use a worker process pool? A process pool seems unusual in an Erlang application, does it not? Although the "Learn yourself Erlang..." does have a chapter on building a pool like this.</div>
<div><br></div><div>Or maybe rate-limit the number of incoming messages?</div><div><br></div><div>I would really appreciate an advice or two.</div><div><br></div><div>Thank you</div><div>Konstantin</div><div><br></div></div>