? ? ? Pending

User tests: Successful: Unsuccessful:

avatar alikon
alikon
8 Aug 2015

This pr add a Redis session handler
Selectable from Global configuration -> Session settings

redis_session_settings

Test environment

Redis server. installed and setted http://redis.io/topics/quickstart
Redis PHP driver pecl installed https://github.com/phpredis/phpredis#installation
Redis webgui http://joeferner.github.io/redis-commander/ (require node,js)

Expected result

All works as expected with some performance gain
login & logout
session expiration
modules: whoisonline, logged, stats
When the Redis handler is selected the #__session table is not used

avatar alikon alikon - open - 8 Aug 2015
avatar alikon alikon - change - 8 Aug 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Aug 2015
Labels Added: ? ?
avatar joomla-cms-bot joomla-cms-bot - change - 8 Aug 2015
Labels Added: ? ?
avatar Bakual Bakual - change - 8 Aug 2015
Milestone Added:
avatar zero-24 zero-24 - change - 9 Aug 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 9 Aug 2015
Category Cache Libraries
avatar dgt41
dgt41 - comment - 9 Aug 2015

Thanks Nicola for this one, the ability to use redis for the sessions is a welcome feature.
The performance increase is obvious but still haven’t done some benchmarking.

I do get some notices tho:
screenshot 2015-08-09 20 01 20

@mbabker @wilsonge This one is touching framework files factory and sessions.

avatar alikon
alikon - comment - 10 Aug 2015

@dgt41 for avoid the mod_logged notice you should use the alternative module layout redis

i wish to listen a lot of comments, cause my code is not OO i'm afraid

avatar zero-24
zero-24 - comment - 10 Aug 2015

@alikon

I have just opend a new PR against yours to fix CS issues and do some simplifications ;) As well es public / private changes.

Can you have a look / review here: alikon#9

@dgt41 for avoid the mod_logged notice you should use the alternative module layout redis

Fixed with: alikon#9

There are also 2 @todo marks can you commet there so we can fix it?

avatar zero-24
zero-24 - comment - 10 Aug 2015

@alikon

@dgt41 for avoid the mod_logged notice you should use the alternative module layout redis

There is no alternative module layout redis for mod_logged. Only for mod_whoisonline (issue gets fixed with alikon#9)
Can you explain the changes that we need to do for the mod_logged layout?

avatar zero-24
zero-24 - comment - 10 Aug 2015

Just 2 things i don't fix. We have 2 new language strings the needs to be added to the language files:

JERROR_SESSION_REDIS_DESTROY
JERROR_SESSION_REDIS_READ
avatar waader
waader - comment - 10 Aug 2015

I assume that getListFromFromRedis should be named getListFromRedis, right?

avatar zero-24
zero-24 - comment - 10 Aug 2015

Yes. :smile: @alikon @waader fixed with: zero-24@53bfa24

avatar alikon
alikon - comment - 10 Aug 2015

i've confused the modules, sorry...
@zero-24 thx 1000 but i've made some others dirty bit ...
please add to the @todlist $ds->sadd('to-do-list',$task)
:smile:

avatar zero-24
zero-24 - comment - 11 Aug 2015

@alikon Hupfully the last PR series makes travis finaly happy ;)

avatar waader
waader - comment - 11 Aug 2015

Redis as a session handler can be selected even if it is not installed/present. So when you do that, after saving you get this message: "Fatal error: Class 'Redis' not found in joomla34\libraries\joomla\factory.php on line 846"

Ideally redis should not be an option to choose from if it is not installed.

avatar mbabker
mbabker - comment - 11 Aug 2015

The Redis session storage class needs an isSupported method (like the one for Memcache) to do this check. Otherwise the base class it extends from always returns true.

avatar waader
waader - comment - 11 Aug 2015

When changing the redis port there should be a check if the server is responding. Otherwise one gets this error message "Error displaying the error page: Application Instantiation Error: Error pinging REDIS database" after saving the settings.

I also had a look in configuration.php and there I found these settings:
public $redis_server_port = '6379'
public $session_server_port = '6378'

The port change is no reflected in $redis_server_port. Also I am wondering why $redis_server_port is needed at all?

avatar alikon
alikon - comment - 12 Aug 2015

Redis selectable only when available should be fixed now

avatar alikon
alikon - comment - 12 Aug 2015

For the check of connection

What should be the best approach ?
An ajax check triggered on change (port)....
The same check should be triggered on the db settings tab too ,cause if you change for example the dB nsme no check is triggered and you get an application error similar to the redis wrong port

avatar waader
waader - comment - 21 Aug 2015

@alikon In your code you have variable names like utenti or elm. Can you change that to somewhat more descriptive.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7659.

avatar alikon
alikon - comment - 21 Aug 2015

I'm planning to rewrite this pr a little bit to add a check on connection settings as per your previous comment and surely I'll translate to English the Italian variable names. Thx for all your precious comments

avatar roland-d roland-d - change - 17 Oct 2015
Milestone Added:
avatar roland-d roland-d - change - 17 Oct 2015
Milestone Removed:
avatar wilsonge wilsonge - change - 6 Nov 2015
Milestone Removed:
avatar brianteeman
brianteeman - comment - 13 Apr 2016

@alikon is this still on your todo list or has it been abandoned and should be closed?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7659.

avatar brianteeman brianteeman - change - 13 Apr 2016
Status Pending Information Required
Labels
avatar alikon
alikon - comment - 13 Apr 2016

absolutely yes, i hope with the help of a joomla gsoc 2016 student this task will be done, even better,
https://docs.joomla.org/GSOC_2016_Project_Ideas#Project_V:_NoSQL_Database_Driver_.28Redis.2C_MongoDB.29 , finger crossed

avatar brianteeman brianteeman - change - 27 Apr 2016
Category Cache Libraries Cache Language & Strings Libraries
avatar brianteeman brianteeman - change - 27 Apr 2016
Labels
avatar mbabker
mbabker - comment - 8 May 2016

Can I suggest this be closed pending the results of GSoC? At a quick glance at the current state of this PR, there are too many moving parts and too many possible B/C breaks for this implementation to be successful (for example, the changes to how the users are always stored in the database even if the database isn't the session store removes this tracking completely for any handler that isn't the database, "none" (filesystem), or Redis).

avatar brianteeman
brianteeman - comment - 8 May 2016

You can suggest anything :D

avatar brianteeman brianteeman - change - 8 May 2016
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2016-05-08 15:24:18
Closed_By brianteeman
Labels
avatar brianteeman brianteeman - change - 8 May 2016
Labels
avatar brianteeman brianteeman - close - 8 May 2016
avatar brianteeman
brianteeman - comment - 8 May 2016

Based on the comment above I am closing this at this moment in time


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7659.

Add a Comment

Login with GitHub to post a comment