我们正在考虑在我们的应用程序中使用缓存系统来进行数据查找.这些数据很少会发生变化.我发现用出来了Redis
,GemFire
/ Geode
,VoltDB
,Aerospike
,Hazlecast
和其他几个.我入围了Geode和Redis.两者都是key-value
内存商店.
Redis(基于C语言)似乎更容易使用并支持数据类型,如列表,散列,集合,排序集等.它还有一些很好的客户端,可用Java,NodeJS,C#等.它支持多个节点(master -奴隶).
Geode(基于Java)似乎有更多的功能,因为它的存在可以追溯到很久以前.它具有存储数据的区域概念.它有Java,C#,C++等客户端.它具有制作系统的定位器和服务器.它支持分布式服务器/节点(非共享/无单点故障).
我搜索互联网,但在读/写速度,内存使用,磁盘I/O转储,扩展,安全性方面找不到这两者之间的任何比较.有没有人遇到过这样的情况?
我正在做一些研究,我需要 Apache Geode 的基准测试,可能与 Redis 或 Hazelcast 进行比较。如果有人能指点我,我将不胜感激。
在 Pivotal 的一次演示中,我看到了一些基准测试,但它们只是在某些未知方面表明“Geode 比 Cassandra 更快”,并且他们承诺发布基准测试,但我找不到它们。
为了能够使用 spring-geode,我需要排除 starter-logging,否则我会遇到:
Caused by: java.lang.ClassCastException: org.apache.logging.slf4j.SLF4JLogger cannot be cast to org.apache.logging.log4j.core.Logger
at org.apache.geode.internal.logging.LogService.init(LogService.java:81) ~[geode-core-1.2.1.jar:na]
at org.apache.geode.internal.logging.LogService.<clinit>(LogService.java:72) ~[geode-core-1.2.1.jar:na]
... 41 common frames omitted
Run Code Online (Sandbox Code Playgroud)
我的 POM 现在看起来像这样:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.geode</groupId>
<artifactId>spring-geode-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-geode</artifactId>
<version>2.0.10.RELEASE</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
我该怎么办?
我正在尝试使用Spring Data Gemfire建立一个Gemfire集群.
我可以通过gfsh启动定位器,我可以通过Spring 启动服务器.
问题是,我找不到通过Spring 启动定位器的方法.
我尝试了主分支和开发分支,以及Pivotal的gemfire rpm.相同的结果:
start locator --name=test
Starting a GemFire Locator in /root/incubator-geode/gemfire-assembly/build/install/test...
.....Locator in /root/incubator-geode/gemfire-assembly/build/install/test on CentOS-72-64-minimal[10334] as test is currently online.
Process ID: 786
Uptime: 2 seconds
GemFire Version: 1.0.0-incubating-SNAPSHOT
Java Version: 1.8.0_72
Log File: /root/incubator-geode/gemfire-assembly/build/install/test/test.log
JVM Arguments: -Dgemfire.enable-cluster-configuration=true -Dgemfire.load-cluster-configuration-from-dir=false -Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true -Dsun.rmi.dgc.server.gcInterval=9223372036854775806
Class-Path: /root/incubator-geode/gemfire-assembly/build/install/apache-geode/lib/gemfire-core-1.0.0-incubating-SNAPSHOT.jar:/root/incubator-geode/gemfire-assembly/build/install/apache-geode/lib/gemfire-core-dependencies.jar
Please use "connect --locator=CentOS-72-64-minimal[10334]" to connect Gfsh to the locator.
Cluster configuration service is up and running.
gfsh>connect --locator=CentOS-72-64-minimal[10334]
Connecting to Locator at [host=CentOS-72-64-minimal, port=10334] ..
Exception caused JMX Manager startup to fail because: 'HTTP …
Run Code Online (Sandbox Code Playgroud) 我们正在尝试找到一个具有索引支持的内存数据库,我们可以将它用于我们的应用程序.我们正在研究Aerospike,Apache Ignite,Geode,Voltdb.没有太多区别,每个人都声称速度快,并且有很好的社区支持.
其中,Aerospike和VoltDB是基于C/C++的,Apache Ignite和Geode是基于Java的.
考虑到数据库在性能方面几乎没有什么选择,而且很难测试哪个数据库对我们的生产有更好的作用,试图找出内存数据库的性能是否也取决于它是否是基于java或基于c/c ++的.考虑垃圾收集问题是非常频繁的,并且很难根据您的用例(可能会在一段时间后改变)正确调整它,基于java的dbs是否会处于劣势.
谢谢