B4J Question Cache mechanism for B4J webserver

avacondios

Active Member
Licensed User
Longtime User
Dear all,

I am building with b4j a web application for a high traffic site. I would like to propose me, a cache mechanism which it can hold around 2GB of json data format. (The transaction data will hold on nosql db)

This solution is for online gaming application, which I want to share data between thousands of users and on game completion, to write the transactions data to nosql database for persistence of the game history.

Any suggestion are welcome.

BR/Antonis
 

avacondios

Active Member
Licensed User
Longtime User
One option is to just store everything in memory with a simple Map (make it a thread safe map). 2gb sounds a lot. However you can easily build a server with 16gb of memory.
Make sure to use Java 64 bit.

Dear Erel,

Can I use the KeyValueStore class ? I need the ability to save and reload the map's objects. Also with KVS, can I have a thread safe map ? I am looking for a solution like distributed caching using Redis server on .Net/c#
 
Upvote 0

avacondios

Active Member
Licensed User
Longtime User
Hi Erel, do you have any idea how to distribute a concurrent hash map to many application instances?
 
Upvote 0

avacondios

Active Member
Licensed User
Longtime User
Yes, to share the map to other processes on different computers ( the same b4j webapp server app, it will run on multiple vps but to share the same hasp map - like a memcache functionality distributed on multiple processes)
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…