phpBB

Development Wiki

Difference between revisions of "PhpBB4/Session Component"

From phpBB Development Wiki

(Created page with ' Access to session information should be provided through an interface. The default storage implementations should include database (like phpBB3), memcached and maybe file based …')
 
Line 1: Line 1:
 +
== Interface ==
 +
Access to session information should be provided through an interface to be defined here.
  
Access to session information should be provided through an interface. The default storage implementations should include database (like phpBB3), memcached and maybe file based (like PHP by default).
+
Session information needs to be accessible by session id but it should also be available for displaying information such as a "who is online" list.
 +
 
 +
== Storage Implementations ==
 +
 
 +
=== Database ===
 +
This mechanism is used in phpBB3.
 +
 
 +
=== memcached ===
 +
Allows for better performance since the database session storage requires a database write on nearly every request. Also useful if you want to run phpBB on multiple servers. The servers can share a memcached instance containing the sessions so that the server can be selected with round robin.
 +
 
 +
=== Filesystem ===
 +
PHP uses the filesystem for its session management by default. Whether implementing this makes sense given that we have a database driven storage is questionnable.

Revision as of 23:58, 22 November 2009

Interface

Access to session information should be provided through an interface to be defined here.

Session information needs to be accessible by session id but it should also be available for displaying information such as a "who is online" list.

Storage Implementations

Database

This mechanism is used in phpBB3.

memcached

Allows for better performance since the database session storage requires a database write on nearly every request. Also useful if you want to run phpBB on multiple servers. The servers can share a memcached instance containing the sessions so that the server can be selected with round robin.

Filesystem

PHP uses the filesystem for its session management by default. Whether implementing this makes sense given that we have a database driven storage is questionnable.