layered networking

joe armstrong joe.armstrong@REDACTED
Mon Feb 11 19:49:48 CET 2002

Vlad Dumitrescu wrote:

> Hello,
> I am looking at an application where we want to implement a networked 
> platform at various levels (core, services, applications). My first 
> idea was to let those layers be implemented by it's own Erlang 
> process, and the communication be message based. This will provide a 
> clean separation and it should be easy to understand. The alternative 
> would be using behaviour-likes, funs and applys - which might get 
> messy, I think.
> I wonder if there might be something talking against my solution (like 
> for example the performance penalty). Any ideas, suggestions, pointers?

No - if your code struture is isomorphic to the problem then the thing 
should "write itself" and will have a much higher chance of being correct.

Given the choice you should always choose beauty over efficiency - It 
will probably turn out the that the beautiful solution will be fast 
enough anyway.

It is, after all, easy to make an incorrect program run arbitrarly fast

If, and it can happen, the final beautiful program is too slow then you 
will be
in a good position to optimise the algorithm since it should at least be 
clear what the thing is supposed to do and you will have a good set of 
test cases to test you efficient version on.


> thanks. best regards,
> Vlad
> _________________________________________________________________
> Kom med i världens största e-posttjänst; MSN Hotmail. 

More information about the erlang-questions mailing list