Aura.Session
Aura.Session copied to clipboard
More efficient Redis session handler
Hi guys,
I've been using this lib for years now and just read the "Flexible session management" part of this Redis official post:
- https://redis.io/blog/redis-8-0-m01-released-one-redis-for-every-use-case/
This is totally true:
Sessions are traditionally modeled as strings or hashes. While string serialization and deserialization offer a naive instant solution, session managers must extract and store the entire session from the database, causing extraneous data processing that leads to suboptimal performance and data transfer costs.
Storing session data as hashes represents a logical evolution.
Do you think a Performant Redis session handler could be inside the scope of this library?
Currently, this is what it looks like the most basic AuraSession value (userId: asd1234):
Aura\Session\Flash\Next|a:1:{s:8:"identity";a:0:{}}Aura\Session\Flash\Now|a:1:{s:8:"identity";a:0:{}}identity|a:1:{s:6:"userId";s:7:"asd1234";}
Thanks!
Hey @filisko ,
Happy to hear, you have been using the library for years.
Regarding your question :
Do you think a Performant Redis session handler could be inside the scope of this library?
When we add redis, that will become a dependency and aura follows the principle of no deps from day 1. So I am sorry this is out of scope.
But that does not limit you from creating a package and host yourself or can host at https://github.com/friendsofaura .
Let me know if you want me to give access to https://github.com/friendsofaura . Happy to add you there.
Hi @harikt ! sorry for the late reply. I read it a bit late and I wanted to think about it. Yes! lets do it, I can join friendsofaura and give it a try.
I like the idea of keeping dependencies to the minimum btw ;)
Thanks for the good work!
@harikt just thinking about it, it could only be an optional dependency. And only required in dev for testing.
Just saying because If we do it here it well get much more support.
@filisko I do get your point, but that is not the way we have been following.