The current implementation is tightly linked with the default DB-based session handling. It would be good if the module could define an API it expects to allow it to work with alternate implementations like MongoDB sessions, where there is a feature request about this #1190620: Include something like session_limit.

Comments

crea’s picture

Subscribing

johnennew’s picture

This has been around for about 2 years now with little direct support.

I can see how this could be achieved from the session_limit end. Practically this would be the same as the way the Drupal mail handler works;

1. an interface defining get/count/disconnect session functions.
2. An implementing class for SQL style functions
3. A variable which defines the class that should be instantiated at run time, the default value would be the SQL class
4. Other session handlers could then define their own concrete implementation of the interface and tell Drupal to use it by setting the variable specified in 3.

I'd be happy to look at the session_limit implementation of this in a new branch but would want some help with testing, ideally with someone else producing the mongo_session implementation at the same time to prove the API.

If you're interested, let me know!

johnennew’s picture

Version: 6.x-2.2 » 7.x-2.x-dev

Should probably use the session_api module for basic api functionality ...

https://drupal.org/project/session_api

fgm’s picture

Version: 7.x-2.x-dev » 8.x-1.x-dev
Issue summary: View changes

Bumping to 8.x since 7.x is now legacy.