[erlang-questions] how to break the problem. the erlang way?
Fri Jul 31 22:09:54 CEST 2009
On Fri, Jul 31, 2009 at 6:41 PM, Mihai Balea<> wrote:
> Your approach would be subject to flow mismatches between producers and
> consumers, which could lead to message accumulation somewhere in your chain.
> You can use synchronous calls (like in gen_server:call), but then you
> serialize your processing and in that case you might as well use just one
> Depending on how heavy is your message unpacking and deserializing, you
> might want to do something like:
> Receiver -> spawn a process for each packet that unpacks/deserializes it ->
> That, of course, assumes packets can be processed independently.
I totally agree that this approach is better then my initial one.
> One advantage of having transient processes is that you can tune them to
> never need garbage collection, which is not the case for long lived
Can you detail this part? I don't think I understand what you mean by
"tune them to never need garbage collection" but it sounds good :)
More information about the erlang-questions