if you have a yaws worker process handling a http request that crashes I think Yaws will respond will some http error code. It doesn't matter if you use appmod or yapps. The point Steve makes (i think) is that you can have independent application backends that works like services for your web applications and that the backend may have supervised processes, although they do not need to.
Consider a Yapp as an erlang OTP application bundled with web resources (.html .yaws files) and some support to hook it into a URL path. The closest parallell you get from the Java world, if come from that side, is a "servlet".
The thing with Yapps is that you can administrate and deploy web applications independently of each other - you do not need to update the yaws.conf (as with appmods) to add or remove applications to a running server, instead you update a "registry" that by default is implemented with mnesia. The precondition is that your Erlang OTP application that makes up the Yapp is in the load path of the Erlang VM and have the yapp handler application called yapp (a bit confusing I know...) started. Once this is set you can add your application to the registry of the running Yaws server using the "Web GUI" at http://lyourhost:port/yapp .

2009/6/22 Praveen Ray <praveenray@gmail.com>
If you didn't figure out from the subject line - I'm an Erlang and Yaws newbie and have a basic question on the concept of Yapps.
As I understand, a Yapp is an Erlang OTP Application which hooks into yaws.conf via appmodes:
appmods = <foo, foo_module>
So, Yaws calls foo_module when it sees /foo. At this point, foo_module is executing inside Yaws process (Am I right?). So, if it crashes, Yaws supervisor will recreate the process.
So, what's the point of having a supervisor (and an app controller) for foo_module and packaging it as an app? It never listens for messages from Yaws, does it? Why extra complexity? Obviously, I'm missing something.
thanks in advance for your replies.

Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
Erlyaws-list mailing list