哪种内存缓存实现需要花费最少的精力来构建
我正在开发一个网络应用程序,这将需要对可能非常大且不断变化的数据集进行一些内存缓存。我和我的合作伙伴开始讨论几种解决方案,但希望深入了解我们对几种不同解决方案的期望。我们的应用程序是用 Java 编写的,将在 glassfish 3.1
- redis 和 webdis
- hazelcast
- Apache JCS
- 下运行使用 java 创建我们自己的应用程序
我们还在考虑单独使用 apache solr 或可能的 lucene(如果我们使用 hazelcast)。我们是否应该将 solr 视为内存缓存解决方案,或者 solr 缓存实际上与上面列出的解决方案没有可比性。
预先感谢您的建议
I am working on a web application, that will require some memory caching of potentially very large and changing data sets. My partners and I are starting to debate several solutions, but would like to gain some insight into what we can expect for a couple of different solutions. Our app is written in Java and will run under glassfish 3.1
- redis and webdis
- hazelcast
- Apache JCS
- Create our own with java
We are also considering apache solr or possible lucene alone (if we use hazelcast). Should we count solr as a memory cache solution, or is the solr cache not really comparable with the solutions listed above.
Thanks in advance for your recommendations
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
显然,选项 4 绝对不是最省力的。
我使用 Hazelcast 取得了良好的效果。它以最小的努力提供良好的回报。配置简单/直接,并且整个库“正常工作”。
我对redis或webdis不熟悉。
您没有将其包含在列表中,但如果您真正需要的是缓存,请考虑使用 Ehcache /em>.
It should be obvious that option 4 is definitely not the least effort.
I have had good results with Hazelcast. It provides a good return from minimal effort. Configuration is simple/straightforward, and the library as a whole "just works."
I am not familiar with redis or webdis.
You didn't include it in your list, but consider using Ehcache if what you really need is a cache.
如果您想要简单性,那么使用 LinkedHashMap 作为缓存不会更简单。
主要缺点是它非常简单。
如果您希望它是线程安全的,请使用 Collections.synchronizedMap()
If you want simplicity, you won't much simpler than using a LinkedHashMap as a cache.
The main disadvantage is that its very simple.
If you want it to be thread safe, use a Collections.synchronizedMap()