-1

I am using ConcurrentHashMap as cache DB. Every 3 minutes I get objects from my real db and update ConcurrentHashMap values with new one. I have only 100 objects in map and user who came from web only read ConcurrentHashMap objects not insert or update. Let total system users is 4000/second,ConcurentHashMap still good way or should I change it with HSQLDB or any other in-memory cache DB.

maskapsiz
  • 244
  • 5
  • 23

1 Answers1

0

If you have only 100 objects to insert into the map, then it will be a lot faster to access than in-memory HSQLDB. It is possible to use HSQLDB for larger data sets and it can easily handle 4000 read queries a second.

fredt
  • 24,044
  • 3
  • 40
  • 61