User tests: Successful: Unsuccessful:
This pr add a Redis session handler
Selectable from Global configuration -> Session settings
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)
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
Status | New | ⇒ | Pending |
Labels |
Added:
?
?
|
Labels |
Added:
?
?
|
Milestone |
Added: |
Labels |
Added:
?
|
Category | ⇒ | Cache Libraries |
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?
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
I assume that getListFromFromRedis should be named getListFromRedis, right?
Yes. @alikon @waader fixed with: zero-24@53bfa24
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.
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.
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?
Redis selectable only when available should be fixed now
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
@alikon In your code you have variable names like utenti or elm. Can you change that to somewhat more descriptive.
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
Milestone |
Added: |
Milestone |
Removed: |
Milestone |
Removed: |
@alikon is this still on your todo list or has it been abandoned and should be closed?
Status | Pending | ⇒ | Information Required |
Labels |
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
Category | Cache Libraries | ⇒ | Cache Language & Strings Libraries |
Labels |
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).
You can suggest anything :D
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-05-08 15:24:18 |
Closed_By | ⇒ | brianteeman | |
Labels |
Labels |
Based on the comment above I am closing this at this moment in time
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:
@mbabker @wilsonge This one is touching framework files factory and sessions.