Jaws - coming soon - testers and advice wanted

Joe Armstrong (AL/EAB) joe.armstrong@REDACTED
Mon Feb 20 11:39:37 CET 2006


 



> From: Matthias Lang
> Sent: den 20 februari 2006 11:08
> To: erlang-questions@REDACTED
> Subject: Re: Jaws - coming soon - testers and advice wanted
> 
> Joe Armstrong (AL/EAB) writes:
> 
>  > Here's a simple example, assumed to be in the file foo.jaws
> 
>  > 	<form method="post" action="./foo.jaws?page=posted">
>  >        <input name="fac" size="20">
>  > 	</form>
> ...
>  > 	<p>Fac <? N ?> is <? red(fac(N)) ?>
> ...
>  > << computationally <? fac(N) ?> is about 10-20 times 
> faster than PHP  > and it works for bignums :-) >>
> 
> What happens if someone enters N=123456789?
> 
> Does the whole erlang node crash and burn, dumping out _all_ 
> users on the site?

Yes :-) -- but I have also made a version which wraps all functions
in a safety wrapper. ie M:F(A) gets compiled as safe:apply(N, F, A)
safe:apply is a restrictive safety wrapper where I am extremely
restrictive in what you can do. Here you can call your own stuff
but calling external modules and BIFs is restricted, the safety
wrapper allow spawning processes (but not to many)
and restricts the maximum number of reductions that a process
may perform in delivering a web page.

Hopefully this can be used to make a "enterprise yaws" - where
many different users can safely run their code within one yaws server.

Approved applications (ie without the safety wrappers compiled in) 
could be run
in the same system with no performance degradation.

/Joe

BTW - does Microsoft dislike Erlang? - the spelling checker
in Microsoft Outlook suggest that M:F(A) is a typo 
and suggests the replacement text "MAFIA"



> Matthias
> 



More information about the erlang-questions mailing list