Closed redmie closed 2 years ago
Thanks for the suggestion! It's possible to implement while seeing the anki lib where that there is no database ops .
I'll take this,I
I think I am wrong.Unfortunately there are still some conditions in which we have to rely on session on server restart.
We have to determine which user we are serving and that is only can be retrived from session database.And we query username from session database by k
or sk
from clent request (After authentication success,client send k or sk instead of username).
Once we get username,then we can determine the corresponding collcection path.
Add:#45
Sessions do not need to survive server restart. As such there is no need to keep them on disk (it's actually bad for both security and performance).
We should investigate the use of an in memory database for sessions.
Maybe something as simple as a rust
HashMap
would be sufficient, maybe we need something more powerful like sled.What are your thoughts on the subject @dobefore ?