java java分布式缓存,低延迟,高可用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/649398/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 13:13:04  来源:igfitidea点击:

java distributed cache for low latency, high availability

javacachingdhttrading

提问by Shahbaz

I've never used distributed caches/DHTs like memcached, jboss cache, ehcache, etc. I'm wondering which, if any, is appropriate for my use.

我从未使用过分布式缓存/DHT,如 memcached、jboss 缓存、ehcache 等。我想知道哪个(如果有)适合我的使用。

First, I'm not doing web applications (as most of these project seem to be geared towards web apps). I write servers (Order Management Systems actually) for financial trading firms. The servers themselves are not too complicated. They need to receive information (market data, orders, executions, etc.) rout them to their destination while possibly transforming some of these messages.

首先,我不是在做 Web 应用程序(因为这些项目中的大多数似乎都是面向 Web 应用程序的)。我为金融交易公司编写服务器(实际上是订单管理系统)。服务器本身并不太复杂。他们需要接收信息(市场数据、订单、执行等)将他们路由到目的地,同时可能转换其中一些消息。

I am looking at these products to solve the following problems:

我正在研究这些产品以解决以下问题:

  • Safe repository of the state of the server. I'd rather build the logic of my application as a bunch of transformers (similar to Apache Camel) and store the state in a 'safe' place

  • This repository should be distributed: in case one of these data stores crashes, one or two more should be up and I should be able to switch to them seamlessly

  • This repository should be fast. Single digits milliseconds count here, in other words, systems which consume/process this data are automated systems, not humans clicking on links. This system needs to have high-throughput andlow latency. By sending my data outside the process, I am necessarily slowing performance, but I am trying to balance absolute raw speed and absolute protection of data.

  • This repository should be safe. Similar to the point about several on-line backups, this system needs to write data to disk (potentially more than one disk).

  • 服务器状态的安全存储库。我宁愿将我的应用程序的逻辑构建为一堆转换器(类似于 Apache Camel)并将状态存储在“安全”的地方

  • 这个存储库应该是分布式的:如果这些数据存储之一崩溃,另外一两个应该启动,我应该能够无缝切换到它们

  • 这个存储库应该很快。这里以个位数毫秒计,换句话说,使用/处理这些数据的系统是自动化系统,而不是人类点击链接。该系统需要具有高吞吐量低延迟。通过在进程之外发送我的数据,我必然会降低性能,但我正在尝试平衡绝对原始速度和绝对数据保护。

  • 这个存储库应该是安全的。与多次在线备份的观点类似,该系统需要将数据写入磁盘(可能是多个磁盘)。

I'd really like to stop writing my own 'transaction servers.' Am I correct to be looking into projects such as jboss cache, ehcache, etc.?

我真的很想停止编写自己的“事务服务器”。我正在研究 jboss 缓存、ehcache 等项目是否正确?

Thanks

谢谢

回答by Talip Ozturk

Hazelcastis an open source, transactional, distributed caching solution for Java. Good fit for financial applications. It is released under Apache license.

Hazelcast是一个开源的、事务性的、分布式 Java 缓存解决方案。非常适合金融应用。它是在 Apache 许可下发布的。

Hazelcast is actually a little more than a distributed cache; it is distributed implementation of queue, topic, map, multimap, lock, executor service for Java.

Hazelcast 实际上只是一个分布式缓存;它是 Java 的 queue、topic、map、multimap、lock、executor 服务的分布式实现。

回答by Fortyrunner

A lot of financial institutions are using Oracle Coherence for this.

许多金融机构正在为此使用 Oracle Coherence。

It won't match all the points on your list though.

但它不会匹配您列表中的所有点。

回答by Andrey Vityuk

I believe, JBoss Cacheis a good enough for your purposes:

我相信,JBoss Cache足以满足您的目的:

  • fast
  • distributed
  • transactional with MVCC implementation (no read locking)
  • supports JTA
  • supports asynchronous mode
  • eviction data to persistent storage (jdbc, bdb, etc)
  • 快速地
  • 分散式
  • 与 MVCC 实现的事务性(无读锁定)
  • 支持 JTA
  • 支持异步模式
  • 将数据驱逐到持久存储(jdbc、bdb 等)

回答by Peter Lawrey

You have some good free solutions here. However if you need a faster solution, you could try 29 Westor Solacewhich have sub-100 micro-second latency reliable/guaranteed messaging solutions.

你在这里有一些很好的免费解决方案。但是,如果您需要更快的解决方案,您可以尝试29 WestSolace,它们具有低于 100 微秒的延迟可靠/有保证的消息传递解决方案。

回答by Kirils Mensikovs

Look at Gemfireit's high-performance in memory data grid. It provide distributed cache, object querieng and event notifications.

看看Gemfire它在内存数据网格中的高性能。它提供分布式缓存、对象查询和事件通知。

回答by Slava Imeshev

Take a look at Cacheonix Distributed Cache and Data Grid. It satisfies your requirements for low latency and reliability by providing a coherent local cache and by distributing the cached data to multiple servers and by replicating the cached data. Full disclosure: I work for Cacheonix.

看看Cacheonix 分布式缓存和数据网格。它通过提供一致的本地缓存以及将缓存数据分发到多个服务器以及复制缓存数据来满足您对低延迟和可靠性的要求。完全披露:我为 Cacheonix 工作。

回答by Timmy

I'll suggest NCachebecause of the following reasons,

由于以下原因,我会建议使用NCache

  • Support .NET and java
  • Wide range of topologies
  • No code change required
  • Highly distributed and scalable
  • Absolutely Free (NCache Express)
  • 支持.NET和java
  • 广泛的拓扑
  • 无需更改代码
  • 高度分布式和可扩展
  • 完全免费(NCache Express)