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

Vlad Dumitrescu vladdu55@REDACTED
Tue Sep 13 13:42:57 CEST 2011


Hi,

On Tue, Sep 13, 2011 at 13:19, Max Lapshin <max.lapshin@REDACTED> wrote:
> 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.

Do I understand correctly that you would like to have a module loader
that accepts registrations for file type handlers and whenever it
doesn't find a .beam file for a module, asks these handlers if they
can find a source file and compile+load it? That would be cool. The
only delicate issue I see right now is how to find these source files,
if the source directories aren't added to the code path.

regards,
Vlad



More information about the erlang-questions mailing list