phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

[RFC|Accepted] Session Backend Abstraction

These requests for comments have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.

[RFC|Accepted] Session Backend Abstraction

Postby naderman » Mon Jul 19, 2010 8:41 am

Motivation
High traffic websites can already make use of memcache for improved caching. However volatile session data is still handled by the database, occasionally causing load problems.

Proposal
First very complete test coverage of current session code should be achieved to be able to guarantee the continued correct functionality of the session mechanism, which is of critical importance to running a board. The session code should then be refactored to provide an abstraction of the storage mechanism used, to allow for faster backends like memcache to be implemented.

Tracker Ticket
http://tracker.phpbb.com/browse/PHPBB3-9731

Patch (Work in Progress)
https://github.com/phpbb/phpbb3/pull/1322
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1649
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: [RFC|Accepted] Session Backend Abstraction

Postby nall » Fri Oct 22, 2010 10:47 am

Since taking down the one and only memcache server would destroy all sessions (presumably -- unless you're planning to just cache what's in the DB), will memcache clusters be supported?
nall
Registered User
 
Posts: 6
Joined: Fri Oct 22, 2010 10:35 am

Re: [RFC|Accepted] Session Backend Abstraction

Postby naderman » Mon Oct 25, 2010 5:33 pm

Yes they will be, just like we currently support them for caching.
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1649
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: [RFC|Accepted] Session Backend Abstraction

Postby nall » Mon Oct 25, 2010 9:12 pm

naderman wrote:Yes they will be, just like we currently support them for caching.


Hmm. In includes/acm/acm_memcache.php, I see:
Code: Select all
                $this->memcache = new Memcache;
                $this->memcache->connect(PHPBB_ACM_MEMCACHE_HOST, PHPBB_ACM_MEMCACHE_PORT);


I believe connect() only supports a single server model. In order to support clustering, this needs to be changed to $this->memcache->addServer (called once per server).
nall
Registered User
 
Posts: 6
Joined: Fri Oct 22, 2010 10:35 am

Re: [RFC|Accepted] Session Backend Abstraction

Postby igorw » Tue Oct 26, 2010 7:22 am

A patch was submitted to fix this, and it will be included in phpBB 3.0.8.

For reference: http://github.com/phpbb/phpbb3/compare/ ... 81018b0915
User avatar
igorw
Registered User
 
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm


Return to [3.1/Ascraeus] Merged RFCs

Who is online

Users browsing this forum: No registered users and 8 guests