Finding better way of handling user session based data in angular/nodeJS

  angular, javascript, mysql, node.js, redis

I have a stored procedure that take too much time to run as it internally does multiple joins on different tables, does group by, order by and then returns response to nodeJS server. The server than passes on this data received from mysql db to angular/client.

Because the client has to wait for too long to let http request complete. I was thinking of better approaches that will shorten the http request completion time.

Need suggestions on how can i handle or make the data in advance that a user will need later.Like adding a small cache database on server that will store user based data and clears out when user session is destroyed.If i go with this approach than which db will be best?

Or instead of having cache Db can i have a json file on server to store users data and use it?

Source: Angular Questions

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.