Erlang killer app?,

Shawn Pearce <>
Tue Jul 23 05:21:40 CEST 2002


Joe Armstrong <> scrawled:
> On Sun, 21 Jul 2002, Shawn Pearce wrote:
> > 	1) I don't know the state of SAE on Windows.  Tcl
> > 		can be built to a stand alone Windows .exe,
> > 		perfect for my application.  No DLLs are required.
> >
> 
>   This  is  in  the  (near)  pipeline  :-) You  *will*  need  one  DLL
> (erlang.dll) thereafter you will be  able to pack all application code
> into a single .exe file (or use shared libraries). You'll also be able to make
> windows .exe files inside Linux and build linux executables from windows.

Good to hear!  Lets see if I can talk my boss into it.

* checks *

Nope.

I think SAE is a good thing.  ;-)  Even if I can't use it at work.

> > 	2) Erlang doesn't have XSLT and FOP->PDF available.
> > 		(But JInterface would work well enough here with
> > 		 only minimal Java code that I could use the
> > 		 Java based processors.)
> > 
> 
>  ?? - I don't understand - do you meant you'd like an implementation of
> XSLT in Erlang???? Also, are their any good (free) FOP->PDF convertors?

No, I don't think an implementation of XSLT is the issue.  I was simply
stating that since it doesn't have one, I'd have to use another one
externally.  But JInterface is pretty solid at communiating back and
forth, making it relatively trivial.  An Erlang based XSLT would be cool,
but I think its one of those things that right now nobody really has a
big desire for, so its not worth expending resources into.

Would I find use for an Erlang based XSLT if we had one?  Maybe.  Do I
have that many uses for the existing Java based ones?  Nope.  C++?  Nope.

The Apache Jakarta Project has a tool available called FOP to translate
XSL:FO (which is what I meant to say) to PDF.  Does a pretty slick job too.
Some XSL:FO features are not yet supported. but version 0.23 is pretty stable.
I've got an internal tool at work based entirely around XSLT->XSLT->XSL:FO->PDF.

So even if we had XSLT in Erlang, I'd still be doing the last pass in Java.

> > 	3) Programming web interfaces in Erlang still isn't
> > 		a strong suite of mine, despite that I do it
> > 		in nearly every other language.  Perhaps its
> > 		because I still think yaws,inets,etc are weaker
> > 		than the other offerings... not that I really
> > 		like Java servlets and JSP that much.
> 
>  I disagee - Erlang programs are a lot shorter than the equivalent Java
> stuff so the embedded code is much shorter and easier to write and maintain.

Excellent point.  I didn't think of it that way.  I was thinking about the fact
that I'm not a big fan of embedding code within the HTML.  Haven't been since
we were using the latest and greatest Pentium 90 to serve up web pages in Perl and
used Berkely db as our database.

>   I  think I  mentioned erarier  that we  were going  to  benchmark an
> yaws against Apache under condition of medium to high overload.
>
>   We have some *very* preliminary figures.
> 
>   At low load yaws and Apache have very similar performance.
> 
>   At 100% overload yaws is about 4 - 7 times faster than Apache.
> 
>   At 1000% overload yaws is about 4 times better than Apache.
> 
>   In other words if your web site has nasty peaks when suddenly everybody
> wants to access it Apache almost falls over, yews ticks along nicely.
> Even at 1000% overload yaws was servicing all requests (albeit slowly)
> but Apache was rejecting 40% of all traffic.
> 
>   Also  bear in  mind  Klackes  figures -  yaws  was generating  2,000
> dynamic pages/sec - a high performance PHP will manage a few hundred.
> 
>   So we have:
> 
> 	1) shorter code
> 	2) better performance under heavy overload
>         3) very fast dynamic page generation
> 
>   That's why you will like it :-)

And that's why I'm wondering how much better the Apache Servlet container
might run when stuck behind a yaws like server rather than the real Apache
HTTPd.  We build Java servlet applications at work, and our customers deploy
in Apache Tomcat.  We've got a major telcom equipment vendor who is having
lots of trouble with the front end Apache web server we're using when its
under high load (about 100 concurrent connections, 26 views/sec).  Apache
itself is falling apart, but the Tomcat's seem fine.

I'm quite tempted to write a plugin for yaws (or just plain hack yaws) to
create a proof of concept of this.  Problem is, my boss won't approve my
expending time/resources on anything isoteric like Tcl, Erlang, etc.  (He
just pulled the plug today on a Tcl/Tk GUI we were building, opting instead
for it to be done in Java/JSP, for no reason other than that its JSP.)

*sigh*

> > 	4) My coworkers don't know Erlang and don't want to
> > 		bother with the "chore" of learning a language
> > 		other than the One-True-Language-Called-Java(tm).
> > 		Its just too much of an inconvience for them.  Too
> > 		much effort, too much thinking and studying required.
> 
>   If you can learn Java you  can learn anything - Java is ridicolously
> complicated. If you're going argue that "lazyness rules" then take the
> easy way out and program in  Erlang - believe me much less thinking is
> involved programming in Erlang than programming in Java.

This I have to agree whole heartedly with.  Unfortunately, I work for
an organization that only jumps on the bandwagon that Sun and Microsoft
are on.  Any other isn't a valid bandwagon, and there are no other
technologies available for use.  Since Tcl isn't a big Sun technology,
at least not like Java, coworkers refuse to expend any effort into
learning it to any extent.  Consequently, we can't do rapid GUI development
in Tcl/Tk for internal projects.

I'm having a hard enough time getting coworkers to learn shell scripting,
let alone a new-to-them language like Erlang.

Now a slightly off topic question:  Has anyone had success at getting
Erlang (or any other isoteric-to-them language/environment) into an
environment like I'm describing?

--
Shawn.

Why do I like Perl?  Because ``in accordance with Unix tradition Perl
gives you enough rope to hang yourself with.''

Why do I dislike Java? Because ``the class ROPE that should contain the
method HANG to do the hanging doesn't exist because there is too much
'security' built into the base language.''



More information about the erlang-questions mailing list