
Erlang NOTP: a middle way - setra
http://blog.ikura.co/posts/notp-a-middle-way.html
======
fenollp
Still no explanation whatsoever of what this is doing.

Anyone knows what mystery "the final few pages in the Joe Armstrong 2nd
edition Erlang book" hold?

~~~
pselbert
The "final few pages" are entirely module reference for zlib so that probably
isn't what is referenced. Prior to that are miscellaneous bits about
debugging, tracing, code-reloading etc.

I have version P5.0 from 2011 though, so it could be wrong altogether.

~~~
ramchip
"Appendix 3: A Simple Execution Environment"

[https://www.safaribooksonline.com/library/view/programming-e...](https://www.safaribooksonline.com/library/view/programming-
erlang-2nd/9781941222454/f_0233.html)

[http://erlang.org/pipermail/erlang-
questions/2014-February/0...](http://erlang.org/pipermail/erlang-
questions/2014-February/077270.html)

In the book Joe explains that OTP loads 67 modules and starts 25 processes at
startup, which makes it slow to boot. Then he demonstrates how to create a
single module providing a very minimal subset of what these 67 modules do.
This single module can then be used to create scripts that start and run very
quickly, since they don't require the whole OTP machinery.

Some of the functionality the module provides are rpc, stdio, and very basic
process registration.

------
hosh
This might make Erlang practical for FAAS. I also wonder if this will work
with Elixir (since Elixir might have extra modules being loaded in too).

I'm not sure why one would do that as opposed to say, running things with
JavaScript (ubiquity) or Ruby/Python (library support). I like Elixir, though
I recognize that many of Erlang's advantages is in concurrency and control.

~~~
_asummers
Why wouldn't you just use Mix tasks in Elixir? Once I discovered mix tasks, I
have used them for all sorts of one off things.

~~~
hosh
I have not looked at mix tasks. It depends on its characteristics. FAAS isn't
exactly a one-off thing and falls under a "serverless" paradigm. (I am a bit
skeptical of FAAS myself). Mix tasks might have characteristics that makes it
suitable for FAAS, or it might not.

~~~
_asummers
Ah, for those sorts of things, they probably wouldn't work SUPER well, though
I can see them made to work. Spinning up the BEAM is much cheaper than
spinning up a JVM, though it is very much server-ey by design.

------
jkingsbery
This seems much simpler than what one would normally have to do, but still not
as simple as getting started in Ruby or Python or Node.js (or even Java).

~~~
liveoneggs
erlang (OTP) has a learning curve without a doubt, but this author seems to
gloss over using escript which _is_ simple to use, although it has three lines
of boilerplate

    
    
      #!/usr/bin/env escript
      %%!
      main(_) ->
        stuff.

------
Cieplak
In case you're like me and have no idea how to navigate bitbucket:

[https://bitbucket.org/nato/notp/src/efe882a3ff3eb2e6a00d7013...](https://bitbucket.org/nato/notp/src/efe882a3ff3eb2e6a00d7013b84f878063982fb6/src/notp.erl)

~~~
chx
[https://bitbucket.org/nato/notp/src](https://bitbucket.org/nato/notp/src) no
need to link to a specific revision.

