|
|
| Author |
Message |
< Yaws mailing list ~ Store state between requests without cookies |
| Guest |
Posted: Tue Feb 20, 2007 11:51 pm |
|
|
|
Guest
|
|
| Back to top |
|
| rsaccon |
Posted: Wed Feb 21, 2007 12:34 am |
|
|
|
User
Joined: 09 Aug 2006
Posts: 144
|
>From how I understand things, cookies are just for transportation (inside HTPP header) and have nothing to do with persistence of sessions. If you don't wont to use cookies, and are not afraid of getting your sessions hijacked , you can put your session ID into the URL.
Take a look at yaws_session_server.erl, which is responsible for sessions. You could write your own version with the persistent storage of your preference (e.g. mnesia) instead of ets tables. I actually started to do that myself for my specific needs.
regards
--
Roberto Saccon
Post recived from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Wed Feb 21, 2007 1:56 pm |
|
|
|
Guest
|
Thanks for your reply. I'm using yaws as a front-end to a game server
and need to track the number of client requests made on the same
persistent connection as well as other state info pertaining to the
connection. The protocol I'm attempting does not trust the web
client, so I can not rely on any session info sent by the client. All
I really need to do is to be able to store some state data each time
a request is handled by the same worker process - I attempted to do
this using the process dictionary but unfortunately yaws appears to
clear it between requests (I have verified that the same worker
process pid is handling the connection). Is there some way to do the
above?
Cheers,
Jason.
On 21 Feb 2007, at 00:33, Roberto Saccon wrote:
> >From how I understand things, cookies are just for transportation
> (inside HTPP header) and have nothing to do with persistence of
> sessions. If you don't wont to use cookies, and are not afraid of
> getting your sessions hijacked , you can put your session ID into
> the URL.
>
> Take a look at yaws_session_server.erl, which is responsible for
> sessions. You could write your own version with the persistent
> storage of your preference (e.g. mnesia) instead of ets tables. I
> actually started to do that myself for my specific needs.
>
> regards
> --
> Roberto Saccon
> ----------------------------------------------------------------------
> ---
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to
> share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?
> page=join.php&p=sourceforge&CID=DEVDEV________________________________
> _______________
> Erlyaws-list mailing list
> Erlyaws-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/erlyaws-list
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist |
|
|
| Back to top |
|
| noss |
Posted: Wed Feb 21, 2007 3:15 pm |
|
|
|
User
Joined: 09 Oct 2005
Posts: 290
|
The same socket would be used no? The arg contains a socket ref.
On 2/21/07, Jason Swaine <jmswaine@mac.com> wrote:
> Thanks for your reply. I'm using yaws as a front-end to a game server
> and need to track the number of client requests made on the same
> persistent connection as well as other state info pertaining to the
> connection. The protocol I'm attempting does not trust the web
> client, so I can not rely on any session info sent by the client. All
> I really need to do is to be able to store some state data each time
> a request is handled by the same worker process - I attempted to do
> this using the process dictionary but unfortunately yaws appears to
> clear it between requests (I have verified that the same worker
> process pid is handling the connection). Is there some way to do the
> above?
>
> Cheers,
> Jason.
>
>
> On 21 Feb 2007, at 00:33, Roberto Saccon wrote:
>
> > >From how I understand things, cookies are just for transportation
> > (inside HTPP header) and have nothing to do with persistence of
> > sessions. If you don't wont to use cookies, and are not afraid of
> > getting your sessions hijacked , you can put your session ID into
> > the URL.
> >
> > Take a look at yaws_session_server.erl, which is responsible for
> > sessions. You could write your own version with the persistent
> > storage of your preference (e.g. mnesia) instead of ets tables. I
> > actually started to do that myself for my specific needs.
> >
> > regards
> > --
> > Roberto Saccon
> > ----------------------------------------------------------------------
> > ---
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to
> > share your
> > opinions on IT & business topics through brief surveys-and earn cash
> > http://www.techsay.com/default.php?
> > page=join.php&p=sourceforge&CID=DEVDEV________________________________
> > _______________
> > Erlyaws-list mailing list
> > Erlyaws-list@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/erlyaws-list
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Erlyaws-list mailing list
> Erlyaws-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/erlyaws-list
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
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
|
|
|