[erlang-questions] Erlang beginner questions

Mode7James James@REDACTED
Wed Apr 13 18:26:05 CEST 2011


Hey thanks guys, these are great responses!  After reading and researching
this language a couple months on my own, it's nice to finally meet a few
people that know Erlang and are nice enough to answer my questions!  I half
expected a bunch of "google it" answers. :)

Yes, I agree and completely understand "re-learning" what I have already
learned.  Flash (Java) is completely different from Erlang, however learning
Erlang it's really amazing what you can do with it with just a few lines of
code.  Pattern-matching is the shit, I'm surprised it isn't used more for
search algorithms.  Regular Expressions are a pain compared to Erlang!  And
don't get me started on the bit syntax.

There's quite a bit that I still need to learn about servers in general, ie
how they actually work.  It wasn't until a few days ago that I learned that
an HTTP server essentially is a TCP server, receiving requests, and then
sending the data over the TCP connection. :)

I will need UDP so that I can send fast unreliable packets for user input
and the state of the game.

A couple people have asked what my goal is:

To start, my goal is to create a server that allows secure authentication
from a client written in another language, and then my erlang server
receives UDP packets which have the x, y, radius coordinates of a "ball" on
the client, written in Objective-C.  Essentially my first test will be the
ability to open up the program on my iPad, log in, and then be able to move
a red 2d circle around the screen, simply sending the position coordinates
via unreliable UDP, and receiving the current state of all on screen objects
on an interval.  It's pretty straightforward from there - adding limited 2d
physics, which I would like to implement as a linked-in driver, and the
ability to add users with a load bearing algorithm.

Speaking of load bearing, is there a way for Erlang to read the cpu load of
a machine or machine that a node is run on?

Also, regarding linked-in drivers:  I hear that if they crash, then it
brings the entire VM down.  Is this just in case there is a bad piece of
code?  If they are this unstable, then why are they used in production
environments?  For something like an MMO server, I'll want extremely low
latency between the Erlang side and my math & physics side - but I also need
it to be stable so if something messes up or crashes, it doesn't bring the
entire system down.

Thanks again - I just want to make sure I'm developing proper habits, and
building this thing the right way ;)

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



More information about the erlang-questions mailing list