[erlang-questions] Beginner Question: Spring-like IOC in erlang

Mode7James James@REDACTED
Thu Apr 14 04:39:01 CEST 2011

I must be missing something.  But it all sounds interesting I guess. 

Thanks guys for your input.  Tonight I have a couple hours, I'll try to
create a secure login for my first test, to get my feet wet.  Just to make
sure I understand the correct steps to take:

1) client (NOT Erlang) calls the IP address of my server
2) my server is listening for incoming TCP requests, and sends the client a
reply with a login
3) server upgrades the TCP connection to SSL (is there a way to just start
with SSL??)
4) client sends username & password over SSL
5) server authenticates
6) client is happy

next step tomorrow (or tonight)->

1) client selects the "game"
2) server sets up an open UDP port, sends client UDP packet for sync
3) client places red circle on stage based on coordinates received from
4) pass movements back & forth
5) client closes connection.

Is all this secure?  Am I correct in my flow here?  gen_nb_server was a
module suggested that I use, so I'll be trying to set something up with that
first this evening.

I would think this is something that has been done a few times before, but I
haven't found any solid examples of what I would think is a very simple and
common process.

Thanks again for all your help, I really have learned so much the last
couple days!


Steve Davis wrote:
> To put it as cleanly as I can state it, and IMHO, "dependency
> injection" is a solution to a problem that Erlang/OTP does not have.
> Best regards,
> /s
> On Apr 13, 2:44 pm, Todd Greenwood-Geer <t.greenwoodg...@REDACTED>
> wrote:
>> 1. Is there an idiomatic way to use dependency injection in erlang?
>> Most of my use of Spring DI has been to facilitate injection of test
>> classes into a stack for functional testing. Is this sort of thing done
>> in erlang?
>> 2. How about AOP style join-points for before and after execution around
>> a method?
>> As an example, wouldn't it be cool to dynamically enable debug or trace
>> level logging for an application when a certain error threshold is
>> reached? Then, when the system returns to a normal state, the error
>> logging could be turned back down... I think I might start doing this in
>> the Java stacks I'm currently working with (log4j).
>> 3. Is there a way to intercept messages to a process? This is the real
>> question... Say a process dies unexpectedly and OTP restarts it... it
>> would be cool to be able to dynamically proxy messages to a process that
>> has exceeded some error threshold. The proxy could log them, or perform
>> more intensive error analysis... Then, once the system is back in a
>> normal state, the proxy could be removed from the message loop chain.
>> -Todd
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questi...@REDACTED://erlang.org/mailman/listinfo/erlang-questions
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

View this message in context: http://erlang.2086793.n4.nabble.com/Erlang-beginner-questions-tp3446106p3448637.html
Sent from the Erlang Questions mailing list archive at Nabble.com.

More information about the erlang-questions mailing list