Erlang Mailing Lists

Author Message

<  Yaws mailing list  ~  Keeping state in web app

Guest
Posted: Thu Aug 24, 2006 9:02 am Reply with quote
Guest
Hi!

I'd like to build small web app (store). One of the to-do things is user
login/logout.

One solution would be with session cookies. Erlang being functional,
continuations come to my mind. Are they possible? Preferred?

How would you do it?


Thanks,
Damir

-------------------------------------------------------------------------
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
noss
Posted: Thu Aug 24, 2006 9:22 am Reply with quote
User Joined: 09 Oct 2005 Posts: 290
On 8/24/06, Damir Horvat <damir@x-si.org> wrote:
> One solution would be with session cookies. Erlang being functional,
> continuations come to my mind. Are they possible? Preferred?

I doubt things will become simpler if you adopt such a style.

Erlang's paradigm rewards you more if you start a process that awaits
messages from the user: your yaws pages would find this process and
send it messages about what request the user has issued.

An ecommerce store will probably not need that though, having your
yaws pages perform mnesia transactions for the user sounds sufficient.

> How would you do it?

There is a session server in yaws, yaws.hyber.org has the examples.
In the session's "Opaque" you can store information about the session,
perhaps the user's id, and then keep additional data in a mnesia
table: Such as the user's selected items in the store.

-------------------------------------------------------------------------
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
View user's profile Send private message

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