[erlang-questions] Erlang and beam-based scripting languages.

Jon Watte jwatte@REDACTED
Fri Sep 16 20:56:17 CEST 2011

If your main goal is to use erlang as an application server for web
requests, and you want a fast development iteration cycle, have you checked
out the "reloader" module? (I think it comes with mochiweb)
This module will re-load BEAM files as they are re-compiled, into a running
Erlang server. I find it's quite convenient for quick turn-around

Yes, you still need to type "make" after you save the changes, before you
actually hit the service on the web, but you can also just bind a macro to
"save and make" :-) The benefit of this is that, if you have a syntax error,
you don't have to poke at the application through a web browser to find it;
you will be told by the compiler immediately.

I wouldn't recommend using reloader for production use, though. Also, there
are some issues with code references hanging around past the "old code"
stage -- long-lived funs are the biggest culprit.



Americans might object: there is no way we would sacrifice our living
standards for the benefit of people in the rest of the world. Nevertheless,
whether we get there willingly or not, we shall soon have lower consumption
rates, because our present rates are unsustainable.

On Tue, Sep 13, 2011 at 4:19 AM, Max Lapshin <max.lapshin@REDACTED> wrote:

> Hi.
> I've written a letter several times to Santa Claus to have some easy
> Rails <-> erlang integration for my needs, but he seems to be too
> busy.
> So, my problem is: it is not convenient for me to write all customer
> logic in erlang, because it involves process of compiling and loading
> modules.
> Also, I would be very great to share the same file between web site
> and erlang daemon.
> It seems, that most developed beam-based language is elixir
> (https://github.com/josevalim/elixir ), but there are some erlang
> problems, that looks like blocking for
> have convenient scripting in erlang.
> I have erlyvideo server and it has config. There is option in config:
> {detectors, [rewrite, akamai, livestream]}.
> When user requests stream, media_provider takes this list of
> detectors, goes one by one and calls:
> case Module:check(Host, Name, Options) of
>   ..
> for each atom. Now we meet the problem. When I write  Module:check,
> code_server is loading module and it can load only .beam and .app
> files.
> If I have any way to hook inside with some code that will say: Hi, I
> know how to load this module, i think it will be easier to add simple
> non-compilable scripting to my app and have something like Java world
> have:  Ruby/Python classed mixed with "native" Java classes.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110916/451e95df/attachment.htm>

More information about the erlang-questions mailing list