Page 1 of 1

Erlang-like OTP in newlisp??

Posted: Thu Nov 17, 2011 9:48 am
by unixtechie
Hello, newlispers. Have a question to you.

I remember how much impressed I was after reading books by Armstrong and some other on the concepts implemented in Erlang. And even more impressive (than pure Erlang) is the idea of OTP, a generic framework for fail-proof distributed computing.

Today with the new messaging capability btw parent and spawned children enabled in newlisp, it seems possible to implement the same OTP logic purely in newlisp.

It's reasonable to take a primitive example - e.g. downloading in parallel from some web-based repository - and then implement a "generic tcp server" with callbacks, that make it possible to "program linearly" from the parent, then implement "supervisors" which (like the unix inetd) spawn, rip, restart childred which do the actual work (downloading in our example) in parallel.
Then make it the same for spawing local children or starting remote newlisp workers.
At this point I can imagine how the previous could be approached; I'm less sure - but maybe even the on-the-fly code updates might be possible who knows.

Of course, real processes spawned by newlisp will be heavier that pseudo-processes generated by an erlang virtual machine, but still this approach may make full sense, I think.

Would it be worth it to try this example - with the view of creating a more generic framework (a pure newlisp lib file) if it works OK? Would this be interesting?