Erlang/OTP Forums

Author Message

<  Yaws mailing list  ~  Yapp - yaws applications updated to support ErlyWeb apps

Guest
Posted: Fri Feb 09, 2007 10:40 am Reply with quote
Guest
Added handling of opaques that are "private" to an application in order to
support ErlyWeb applications. So now it should be possible to make Yapps of
ErlyWeb apps. Checked into CVS.
Description of how to do it in the Yaws documentation (Yaws applications
link - yapp_intro.yaws).

/Mikael


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
rsaccon
Posted: Fri Feb 09, 2007 1:52 pm Reply with quote
User Joined: 09 Aug 2006 Posts: 144
Mikael, I was thinking about giving yapp a try, but then I read your other, few days old mailpost titled "yapp isue",
View user's profile Send private message
Guest
Posted: Fri Feb 09, 2007 2:42 pm Reply with quote
Guest
Fri 09 Feb 2007 14:52 Roberto Saccon wrote:
> Mikael, I was thinking about giving yapp a try, but then I read your other,
> few days old mailpost titled "yapp isue", where you say:
>
> "Boring bug as it actually makes yapp unusable on R11B"
>
> - has this bug also been corrected in this patch ?
> (If not, it shouldn't it be mentioned in the doc that yapp does not work
> with R11B ?)

Sorry if I have confused you.
The bug was due to be fixed in R11B-3, but I was not able to verify this until
a couple of days ago, after building the new erlang release. So the yapp
handler (and hup on Yaws) will work for R11B-3, but not earlier revisions of
Erlang/OTP R11B.

After verifying this I was able to add support for yapp "private" opaqes which
makes it possible to make yapps out of ErlyWeb apps. (yesterday actually).
Note that it may take some time before the CVS commits shows up on
the "anonymous" sourceforge.

> - Are URLs (of a yapped erlyweb application) without path (eg,:
> http://myserver.com/ ) possible ?

No, I just tested this, and it does not work for now, and
http://myserver.com// caused Yaws to go into spin, some more debugging
is needed here. But if you want to use no paths then using yaws.conf
might be your choice, since all accesses will be directed to the one and
same application. The point with yapps are that you can deploy several
ones independently, but then you need the extra path to point out which
one to access.

> And last question: in "yapp_intro.yaws" you say that yapp might in the
> future support clustered installations. Does that also include porting the
> ets session table to a distributed mnesia table and replacing
> yaws_session_server.erl with a version for distributed mode ?

No, just how to be able to add/remove yapps on several distributed Yaws
servers.
The yapp handler uses mnesia today, and I was just thinking of using
distributed mnesia and letting the yapp_server.erl subscribe on updates of
the yapp registry in mnesia in order to capture updates from other nodes and
not itself only. I guess starting doing this may raise other questions like
the one you asked, but it may be good to separate concerns and leave sessions
to Yaws. I have tried to make the yapp handler so independently as possible
from Yaws (and ErlyWeb) so that it does not interfere with them but support
them, and so it can be plugged in for those who likes it and also want to
have more "Enterprise" support but also can live with the extra complexity
that comes with mnesia and having to make real Erlang/OTP applications.

Actually I think the next step to go after (or before) adding distributed
support would be to add some kind of release handling so that one also can do
hot upgrade/downgrade/add/remove of yapps on running server(s). And also some
kind of packaging support (like javas servlet.war files ... maybe).

/Mikael


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
Guest
Posted: Fri Feb 09, 2007 4:30 pm Reply with quote
Guest
Mikael Karlsson <mikael@creado.com> writes:

> The bug was due to be fixed in R11B-3, but I was not able to verify
> this until a couple of days ago, after building the new erlang
> release. So the yapp handler (and hup on Yaws) will work for R11B-3,
> but not earlier revisions of Erlang/OTP R11B.
>
> After verifying this I was able to add support for yapp "private"
> opaqes which makes it possible to make yapps out of ErlyWeb
> apps. (yesterday actually). Note that it may take some time before
> the CVS commits shows up on the "anonymous" sourceforge.

The R11B-3 build worked fine for me also. No quirks to building it on
Debian unstable branch, which was good; the stable branch carries the
same Erlang packages, so reverting there would be more of a nuisance.

Tim


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
Guest
Posted: Mon Feb 12, 2007 7:52 am Reply with quote
Guest
> Fri 09 Feb 2007 14:52 Roberto Saccon wrote:
>> ...
> > - Are URLs (of a yapped erlyweb application) without path (eg,:
> > http://myserver.com/ ) possible ?
>
> No, I just tested this, and it does not work for now, and
> http://myserver.com// caused Yaws to go into spin, some more debugging
> is needed here. But if you want to use no paths then using yaws.conf
> might be your choice, since all accesses will be directed to the one and
> same application. The point with yapps are that you can deploy several
> ones independently, but then you need the extra path to point out which
> one to access.

Second thought:
I could try to implement the possibility to add a "no_path" root yapp, with
path "/" that will be checked for as a last try if none of the "real" path
yapps ("/path_to_yapp") are found.

Today one can configure the ErlyWeb app as "/" in the appname.app file, which
will be directed directly to the ErlyWeb app as soon as the yapp path
is found.
Example, myapp1.app:
{application, myapp1,
[{description,"myapp1 is an erlyweb yapp"},
{vsn,"0.1"},
{modules,[]},
{registered, []},
{env, [
{yapp_docroot,"www"},
{yapp_appmods,[{"/",erlyweb}]},
{yapp_opaque,[{"appname","myapp1"}]}
]},
{applications,[kernel,stdlib]}]}.

If the yapp path is {"/hello", myapp1}.
http://xxxxx/hello/comp1/index/1 will be directed directly to ErlyWeb
component comp1 index/1 controller function.

/Mikael



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum