Extending session data

#1

Is this possible?
For example: i implementing simple chat for auth. users and want store some profile data from slow database. When user come i get profile data in authenticator and serialize it to session only one time.
After that i cat got it anywhere via wamp.session.get rpc.

0 Likes

#2

Hi Sergey!

What you want to do is to use Crossbar.io to store custom application data in the session information. I see the use case of caching data from a slow database. However, I wonder why you don’t just have component which caches this and registers a procedure which other components can call to retrieve the information. The only real difference that I can see between this and having Crossbar provide the information is that using Crossbar could be a bit faster. I do not think this makes for a valid argument for extending Crossbar.io’s functionality. Generally speaking, application-level things should be handled within the application, and Crossbar.io should remain as a generic black box.

Regards,

Alex

···

Am Montag, 7. September 2015 21:46:54 UTC+2 schrieb Sergey Maranchuk:

Is this possible?
For example: i implementing simple chat for auth. users and want store some profile data from slow database. When user come i get profile data in authenticator and serialize it to session only one time.
After that i cat got it anywhere via wamp.session.get rpc.

0 Likes

#3

Tnx for reply
Now i have same solution and store all user info from db in redis

···

четверг, 10 сентября 2015 г., 13:17:56 UTC+3 пользователь Alexander Gödde написал:

Hi Sergey!

What you want to do is to use Crossbar.io to store custom application data in the session information. I see the use case of caching data from a slow database. However, I wonder why you don’t just have component which caches this and registers a procedure which other components can call to retrieve the information. The only real difference that I can see between this and having Crossbar provide the information is that using Crossbar could be a bit faster. I do not think this makes for a valid argument for extending Crossbar.io’s functionality. Generally speaking, application-level things should be handled within the application, and Crossbar.io should remain as a generic black box.

Regards,

Alex

Am Montag, 7. September 2015 21:46:54 UTC+2 schrieb Sergey Maranchuk:

Is this possible?
For example: i implementing simple chat for auth. users and want store some profile data from slow database. When user come i get profile data in authenticator and serialize it to session only one time.
After that i cat got it anywhere via wamp.session.get rpc.

0 Likes