Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the session interface asynchronous. #3

Open
niwinz opened this issue Dec 6, 2016 · 3 comments
Open

Make the session interface asynchronous. #3

niwinz opened this issue Dec 6, 2016 · 3 comments

Comments

@niwinz
Copy link

niwinz commented Dec 6, 2016

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?

@niwinz
Copy link
Author

niwinz commented Dec 6, 2016

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

@adamkl
Copy link

adamkl commented Jul 23, 2020

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?

@yogthos
Copy link
Member

yogthos commented Jul 23, 2020

Yeah that sounds reasonable to me, and thanks for taking a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants