SBE
Aeron
Our great sponsors
SBE | Aeron | |
---|---|---|
7 | 20 | |
3,013 | 7,020 | |
1.3% | 1.0% | |
8.5 | 9.8 | |
6 days ago | about 21 hours ago | |
Java | Java | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
SBE
-
Possibly stupid question, is java the right language for low latency and high throughput web servers?
I was about to suggest Chronicle, but it looks like they have gone closed-source. The older version is still interesting to look through though. Aeron / Disruptor / SBE are good projects for inspiration as well.
-
GitHub - realtimetech-solution/opack: Fast object or data serialize and deserialize library
Could you evaluate how it compares with SBE?
-
I made an NBT-based data format, but a little more general purpose
SBE
-
Parsing Protobuf at 2+GB/S: How I Learned to Love Tail Calls in C
Consider a valid protobuf message with such a field. If you can locate the field value bytes, you can write a new value to the same location without breaking the message. It's obviously possible to the same with the varint type too, as long as you don't change the number of bytes - not so practical, but useful for enum field which has a limited set of useful values (usually less than 128).
Pregenerating protobuf messages you want to send and then modifying the bytes in-place before sending is going to give you a nice performance boost over "normal" protobuf serialization. It can be useful if you need to be protobuf compatible, but it's obviously better to use something like SBE - https://github.com/real-logic/simple-binary-encoding
Aeron
-
LMAX Disruptor – High Performance Inter-Thread Messaging Library
Semi-related is the Aeron project: https://github.com/real-logic/aeron
-
How do you do UDP Flow control?
Look into Aeron for examples of high performance UDP message sending. We use it for high performance audio messaging, and I previously used it in high frequency trading https://github.com/real-logic/aeron. It is written in Java/C, but the general concepts of back pressure and reliable delivery over UDP are well documented.
-
Low Latency C++ programs for High Frequency Trading (HFT)
Yup the Disruptor paper actually shocked the industry a bit, b/c it was so out of place. BTW, Martin Thompson went on improving the Disruptor, and the result is the Aeron Protocol: https://github.com/real-logic/aeron
- What network messaging library do you recommend?
-
Possibly stupid question, is java the right language for low latency and high throughput web servers?
I was about to suggest Chronicle, but it looks like they have gone closed-source. The older version is still interesting to look through though. Aeron / Disruptor / SBE are good projects for inspiration as well.
-
if you had to restart at 0 knowledge what would you do?
Java: In the past years C++ in finance has been rapidly supplanted by Java thanks to breakthrough technologies in the past decade like LMAX Disruptor, Chronicle Queue, Azul JVM, and Aeron (not the ergonomic chair, but this one, the transport protocol that breaks kafka performance records out of the park - not really a full kafka replacement, as Kafka enforces subscriber GD and aeron is more of an OSI layer 4 better than TCP; google "Best-effort delivery vs reliable delivery"). There's plenty more but thanks to these technologies, they allowed a Java based stack to perform the latency and throughput requirements needed for high frequency trading/HFT. From top trading firms like Two Sigma to the New York Stock Exchange, they're in Java. For banks, large modern western banks worth their salt and have modernized their systems are dominated by Java, especially thanks to Azul. To list a few banks, ING, Wells Fargo, Credit Suisse, and Barclays are all in Azul. Even at work Java still dominates.
- A Tale of Yak Shaving: Accidentally Making a Language, for an Engine, for a Game
-
What are some candidate libraries for inter-thread communication like message boxes or event systems?
https://github.com/real-logic/Aeron/wiki/Performance-Testing https://github.com/real-logic/benchmarks
If low latency / performance is important then something like aeron: https://github.com/real-logic/aeron or the disruptor pattern: https://github.com/Abc-Arbitrage/Disruptor-cpp are good options. Aeron supports network message but requires a driver to be running on the system even for IPC. Disruptor is thread to thread messaging only and doesn't need drivers etc - just a normal library.
-
Non Spring users what are you using ??
Oh boy, if that's really what you're going for, you're talking low microseconds, anything slower and you'll be losing money. Also, you have to make sure the GC never triggers. Maybe look at something like Aeron
What are some alternatives?
Protobuf - Protocol Buffers - Google's data interchange format
Apache Kafka - Mirror of Apache Kafka
FlatBuffers - FlatBuffers: Memory Efficient Serialization Library
Apache Avro - Apache Avro is a data serialization system.
Embedded RabbitMQ - A JVM library to use RabbitMQ as an embedded service
Apache Pulsar - Apache Pulsar - distributed pub-sub messaging system
Apache ActiveMQ - Mirror of Apache ActiveMQ
MessagePack - MessagePack implementation for C and C++ / msgpack.org[C/C++]
JeroMQ - Pure Java ZeroMQ
Apache Camel - Apache Camel is an open source integration framework that empowers you to quickly and easily integrate various systems consuming or producing data.
Disruptor-cpp - Port of LMAX Disruptor to C++
Boost.Serialization - Boost.org serialization module