I want to use ruby on rails entirely as an xml-rpc web service server.
I.e. it will only be called by clients making xml-rpc requests. What I
want to to is be able to use something like the session[] functionality
for storing session information. However, storing information in the
session[] construct requires that the client be a web browser with
cookies enabled. Does anyone know of a simple way to impliment sessions
across xml-rpc requests?
Many thanks
On Aug 4, 2006, at 8:33 AM, Peter Aszkenasy wrote:
I want to use ruby on rails entirely as an xml-rpc web service server.
I.e. it will only be called by clients making xml-rpc requests. What I
want to to is be able to use something like the session[]
functionality
for storing session information. However, storing information in the
session[] construct requires that the client be a web browser with
cookies enabled. Does anyone know of a simple way to impliment
sessions
across xml-rpc requests?
Many thanks
I created a model that stores my web service sessions. When a user
invokes the login method on the web service, they are assigned a
token that is saved into the session model. When they log off, the
token is deleted. In the meantime, they have to provide the token
for every web service method invocation. I should write a program to
scan through the sessions table to clean up stale ones, but the code
never went into serious production so I haven’t needed to.
–
~akk
Adam K. wrote:
On Aug 4, 2006, at 8:33 AM, Peter Aszkenasy wrote:
I want to use ruby on rails entirely as an xml-rpc web service server.
I.e. it will only be called by clients making xml-rpc requests. What I
want to to is be able to use something like the session[]
functionality
for storing session information. However, storing information in the
session[] construct requires that the client be a web browser with
cookies enabled. Does anyone know of a simple way to impliment
sessions
across xml-rpc requests?
Many thanks
I created a model that stores my web service sessions. When a user
invokes the login method on the web service, they are assigned a
token that is saved into the session model. When they log off, the
token is deleted. In the meantime, they have to provide the token
for every web service method invocation. I should write a program to
scan through the sessions table to clean up stale ones, but the code
never went into serious production so I haven’t needed to.
–
~akk
http://therealadam.com
Yep that’s kind of what I was thinking. I just wondered if there was a
simple way of creating a persistant class without models and databases
On Aug 4, 2006, at 10:41 AM, Peter Aszkenasy wrote:
Yep that’s kind of what I was thinking. I just wondered if there was a
simple way of creating a persistant class without models and databases
If you don’t need sessions to survive application restarts or if they
don’t need to be shared across a cluster of application servers, you
could create some object in your environment file and update just
like you would the model. But if you want to share that session, you
need it to live in some sort of shared store, like a database.
–
Adam K.
[email protected]