Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any good known solution for a fast persistent cache? [closed]

I need really fast and persistent cache for my web crawler. It doesnt need to be as fast as ConcurrentSkipListSet in Java, but definitely it cannot be MySQL with hash-index based table, which i tried. After 1m+ of records it takes like 80% of processor time.

Does any one know or heard of something useful for this case?
Thanks for any hint.

like image 331
tomasb Avatar asked Aug 20 '11 15:08

tomasb


People also ask

Which AWS service can help caching objects?

AWS Greengrass is software that lets you run local compute, messaging & data caching for connected devices in a secure way.

What types of data do you think are most important to have cached for quick distribution?

In-memory data lookup: If you have a mobile / web app front end you might want to cache some information like user profile, some historical / static data, or some api response according to your use cases. Caching will help in storing such data.

Is it a good idea to use database as a cache?

In-memory data caching can be one of the most effective strategies to improve your overall application performance and to reduce your database costs. Caching can be applied to any type of database including relational databases such as Amazon RDS or NoSQL databases such as Amazon DynamoDB, MongoDB and Apache Cassandra.


2 Answers

Try EhCache. It's a primarily in-memory cache with options for overflow and persistence to disk backing store. Been around for years, still actively developed, and very mature.

like image 72
skaffman Avatar answered Sep 30 '22 15:09

skaffman


I am working on cache2k, and researching recent cache eviction policies to make it the fastest java cache around, see cache2k benchmarks.

Persistence is added right now and will be available for preview and testing in two weeks. I expect it to be very stable in five weeks. The cache2k implementation is, of course, not as mature as EHCache, however, everything released, is used in within our own applications and proves itself in production environments.

Update: The "two weeks" was very optimistic, since the whole locking concept needed finally a rewrite and careful inspection... You can track the persistence support currently emerging on github

like image 44
cruftex Avatar answered Sep 30 '22 13:09

cruftex