Indexed Chronicle can have only one appender. Vanilla Chronicle supports multiple concurrent appenders. (Only one per thread)
The concurrent vanilla version supports rolling and is easier to use. You can get up to 3 million events per second. The latency between processes is about 300 ns.
The indexed chronicle is single threaded but gets up to 40 million per second. The latency between threads is about 100 ns.
The benchmarks are in the test area for chronicle.
3) yes. Use toEnd() before reading.
--
You received this message because you are subscribed to the Google Groups "Java Chronicle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-chronicl...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Your reasoning is fine. If you want to minimise latency you want to have a small number of dedicated cpus. Most applications only need a small number of these critical threads. In fact 6 is the most I have ever seen for a tuned system and you can easily buy a server with much more cores than this.
Part of the reason you don't need more cpus because by this point your bottleneck has moved somewhere else such as the memory bandwidth (in synthetic test) but more often its something on the network or an upstream/downstream services over which you have no control eg an exchange.
These critical threads can feed any number of non critical threads.
If you have multiple sources of data, does each one need it's own thread? Could you combine say 10 feeds in one thread and split out the ones which really need it?
If you only need the latest I would consider using a chronicle map. This only stores the latest. If you don't need persistence you can write it to a tmpfs file system so it doesn't actually touch a disk. (This trick works better for the map than the queue) doing so can save about 300 ns on a typical market update message.
You are right that chronicle queue isn't so easy to use if you don't need a copy of the data but many organisations find a copy of what market data you received with timestamps if useful in a latency sensitive environment.
You can use packet capture technology and get more accurate results however this is often far more complicated, often so complicated that many organisations I have seen don't use packet capture much past recording the data.
If you have more active feed handlers than cpus, getting the OS to do the scheduling is much easier but you will get delays of up to 5 ms as a result. For most applications this is not a issue and might only happen once an hour but if 5 ms is unacceptable you will want a busy waiting solution on isolated cpus.
The balance doesn't have to be perfect as you should be picking up data ASAP. Thus it should he rare that two pieces of data come in say the same microsecond or within say 10 microseconds. In any case a 10 micro-seconds delays is surprisingly common if you use the OS scheduler. See my vanilla java blog article on micro-jitter.
--
You received this message because you are subscribed to the Google Groups "Chronicle" group.
If you have two processes on the same machine, all you need is a chronicle eg VanillaChronicle.
If you need distribution between machines this requires replication. We only support TCP replication for chronicle.
When using replication you need to work with the wrapped source and sink as these implement the notification and receiving of changes in an efficient near sychronous manner. I.e. A background thread is notified when you append an entry to send it ASAP without slowing the appending thread.
At the moment, it is assumed that if you have a chronicle sink the thread won't be consuming another chronicle as well. Ie it is based on blocking io.
We could change this but we would need to understand the use case better.
P1 and p3 communicate via an indexed chronicle (for example) while p2 and p3 communicate via a source sink pair.
The use case is as follows: process p1 sits on host h1 and publishes messages. Process p2 sits on host h2 and publishes messages. Process p3 sits on h1 and listens to messages published by p1 and p2.
P1 and p3 communicate via an indexed chronicle (for example) while p2 and p3 communicate via a source sink pair.
To unsubscribe from this group and stop receiving emails from it, send an email to java-chronicle+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
lb