Object store in PHP.

1 view
Skip to first unread message

Ed Howland

unread,
Dec 18, 2009, 7:35:58 PM12/18/09
to spec...@googlegroups.com
Since PHP is request based, there is no real server running, well
except for Apache. When we create an object with POST /class/<Class
Name>, we are returned an object ID. Later, when we want to send that
object a message, we use PUT /object/<object id>/msg/<massage>.
without an object store, that object id expired at the end of the POST
call. In the ruby reference server, it is just stored in a class
variable hash. It is maintained throught the life of the Sinatra
process.

I plan on using session variables for an object store. I can't see why
that should not work. Do they depend on a sesion cookie gettn written
to the user agent. In this case it is rest_client gem. I haven't
reseached this.

My plan is to write some more specs that test out the low-level object
methods (GET /object/<object_id> => which just returns the same handle
as a POST). If the object id's are the same, the server must be
storing them.

This may work with other servers too. Python, C# etc. Not too sure
about the C++ one.

Cheers,
Ed
--
Ed Howland
http://greenprogrammer.wordpress.com
http://twitter.com/ed_howland

Reply all
Reply to author
Forward
0 new messages