|» Metadata||» Status|
What is HTTP_SessionServer
HTTP_SessionServer is a simple PHP based daemon that helps you maintaining state between physically different hosts.
What is it good for?
It helps you doing several things:
How does it work?
HTTP_SessionServer implements a very simple protocol to store and retrieve data on the server. The storage backend is driver based, currently only a storage for the filesystem has been implemented, but you may easily change this.
How to build a client?
HTTP_SessionServer comes with a matching client implementation using Net_Socket. It should'nt be too hard to integrate this in you own session management.
ExamplesStarting the server is easy, you only need to specify host, port and storage backend:
Using the client isn't much harder:
Can I replace the session save handler for the built-in session management?Yes, this is easily possible. All you have to do is add the following code prior to calling session_start().
You may now use the $_SESSION variable or session_register() as you used to. session_save_path() allows you to specify the host and port of the session server.
How does the communication look like?HTTP_SessionServer uses a very simple protocol:
Which commands does the server understand?
The server already knows the most important commands that are needed to store and retrieve session data:
Implementing you commands is really easy, you may extend HTTP_SessionServer and implement the function in PHP. HTTP_SessionServer will automatically call your new function.
What happens, when two applications try to access the same session?
HTTP_SessionServer supports different modes to open a session. When opening a session in write mode, only one client may access a session, all other applications will be blocked automatically.
When using readonly mode, any number of clients may access the same session.
Is it finished, yet?
There are still a lot of things left to do:
|» Dependencies||» Links|
|» Timeline||» Changelog|