[erlang-questions] Implement parallel sessions

Frans Schneider schneider@REDACTED
Wed Jan 28 19:11:14 CET 2015


On 01/28/2015 06:47 PM, Jesper Louis Andersen wrote:
>
> On Tue, Jan 27, 2015 at 12:50 PM, Frans Schneider <schneider@REDACTED 
> <mailto:schneider@REDACTED>> wrote:
>
>     I am implementing a kind of IM proxy which currently handles one
>     single session for one user. The session is implemented as a stack
>     of processes with from top to bottom the session control process,
>     a stanza encoder / decoder process, an en- / decrypt process and
>     finally a process which handles the tcp connection. Each process
>     is a FSM and holds state such as RC4 encryption state, tcp data
>     etc. The session is controlled by a supervisor which is part of a
>     overall supervisor structure. A session will be open for a long
>     period.
>
>
> Two immediate hunches from this:
>
> * Do you actually need a process chain? You can still write code in 
> modules and chain them together, keeping state separate. But without 
> spawning new processes. Unless you can a distinct advantage where the 
> processes need to do things on their own, it is probably easier to 
> keep them together.
What do you mean by chaining?
I want to keep stuff in separate modules since the code would get too 
complicated to manage, but I guess it would do no harm if it is only one 
process.
> * RC4 is broken. Do never ever use it for anything, please. Pick 
> xsalsa20 or chacha20, both derived from the Salsa20 cipher. Or 
> something else. The cryptographic community is widely believing 
> adversaries are able to break RC4, which means it is a ticking bomb 
> for anyone using it.
>
Yep, RC4 is broken, but that's what some HUGE parties are using... Say What?
>
> -- 
> J.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150128/fe4b1eeb/attachment.htm>


More information about the erlang-questions mailing list