macchiato-core
macchiato-core copied to clipboard
Make the session interface asynchronous.
The current implementation mimics the ring session middleware, that does not fits very well in nodejs environent. A great exampe can be, how I can implement a session store that uses redis. Many redis clients in node are asynchronous...
The session stores should be rethought and new, asynchronous interface should be defined in my opinion.
Ideas? Thoughts?
I have done something similar to this on catacumba, that can be used as start point maybe: https://github.com/funcool/catacumba/blob/master/src/clojure/catacumba/handlers/session.clj
I'd like to take a crack at this. I have a need to use redis
as a session store, so I'd need an async interface.
@yogthos Any preferences on how I would extend the SessionStore
protocol? Simply overload the existing methods to accept a callback? Then people can use promises/core.async as they see fit?
Yeah that sounds reasonable to me, and thanks for taking a look.