Hello all,
Hope you are doing well.
let me describe how its going on my server. We use SQL to get all data from database so, if you want to get leaderboard players you have to call the sql statement of leaderboard. We was thinking about an approach to keep loaded data be saved into something like object to be sent to users instead of re-call the sql statement again and again. Our problem is, when leaderboard is updated, saved object ( loaded object ) how can be updated or up to date ?? is it possible ?
I took a look on Redis, is it can be implemented in smartfox ? or something like this approach ??
Thanks guys,
SmartFox and Redis can be implemented ?
Re: SmartFox and Redis can be implemented ?
Hi,
Generally speaking your use case would benefit from a cache service for your DB. A cache would significantly improve the access to frequently read data and offload your DB, without changing your DB.
Redis is just a different type of database that could help as well but you would need to migrate part (or all) of your DB which is a huge time investment.
If you're currently working with a SQL database I think you should stick with it and look into a caching service such as memcache and similar.
As regards Redis they provide Java API so it should be easy to integrate in SFS2X
Cheers
Generally speaking your use case would benefit from a cache service for your DB. A cache would significantly improve the access to frequently read data and offload your DB, without changing your DB.
Redis is just a different type of database that could help as well but you would need to migrate part (or all) of your DB which is a huge time investment.
If you're currently working with a SQL database I think you should stick with it and look into a caching service such as memcache and similar.
As regards Redis they provide Java API so it should be easy to integrate in SFS2X
Cheers
Re: SmartFox and Redis can be implemented ?
Great Thanks Lapo, and sorry for post duplicating
I got your point. But i afraid that cached data may not be updated when database table updated ..
Thanks again for your help,
I got your point. But i afraid that cached data may not be updated when database table updated ..
Thanks again for your help,
Re: SmartFox and Redis can be implemented ?
Of course they do.
The caching mechanism works by keeping track of which data was changed and read that from DB. Once the data is in cache it will stay there for all the next reads until a new update is done to the database.
cheers
The caching mechanism works by keeping track of which data was changed and read that from DB. Once the data is in cache it will stay there for all the next reads until a new update is done to the database.
cheers
Who is online
Users browsing this forum: No registered users and 134 guests