Showing posts from August, 2015

What does Chronicle Software do?

Overview Chronicle Software is about simplifying fast data.  It is a suite of libraries to make it easier to write, monitor and tune data processing systems where performance and scalability are concerned. But its free, how do you make money, through support? We offer premium support . However, we often hear from users for the first time about a year after they have it in production.  Most users find they can support the software themselves.  It is only after a year or so, they have questions or concerns about where to take the product next.  In many cases, it is to a problem we have already solved and they just need to upgrade their software or use a new module we have added. As we don't know who is using most of our software, we can't advise them on how best to use our software and what updates or enhancements they would benefit from. We need users to contact us and ask questions.  We have a free forum , and we respond to 50% of questions in 2 hours. What we do

Managing your application as a file system

Overview "A database is a smart file system" -- Anonymous "Your database/application is a file system" -- Chronicle Software. Why mount your application as a file system? The main benefits of using a file system are; It can give you another way to access your data which works in for any language. There is a lot of existing tools which work on files. It is a familiar way to arrange data. What is Chronicle Engine? Chronicle Engine lets you set up subscriptions and get notified of when things change, such as new maps or entries being added/deleted or changed. These subscriptions are also defined via the namespace.  You can think of the namespace much like a file path, where the file sits inside a directory. And the directory sits inside another directory. Typically you access a chronicle map via a Java programming interface. In chronicle-engine you could say something like Map<String, String> map = tree1.acquireMap(“/root/data/mymap&

What do AIs have to talk about?

Overview An interesting test for a chat AI is to see what it says to it's self. Bring up two instances and copy the conversation back and forth. A conversation between AIs What I tried today is two different AIs, talking to each other. This is a conversation between  Eviebot and Cleverbot Eviebot: Hi. Cleverbot: Hello. Eviebot: Hello. Cleverbot: Who are you? Eviebot: Why so serious son, why so serious? Let's put a smile on this face. Cleverbot: You want to chat with my brother? Eviebot: So raise your glass! Cleverbot: It's not funny. Eviebot: It's funny, come on! Cleverbot: Really? Eviebot: I think so. Cleverbot: Do you like sushi? Eviebot: I love sushi! Cleverbot: Sushi is delicious. Eviebot: Yes it is, very much so. Cleverbot: *hits with fish*. Eviebot: *Hits with Moon*. Cleverbot: Hits with a spoon made from a baboon that lived on the moon. Eviebot: *Hits with the black hole from the center of the galaxy*. Cleverbot: *teleport to another

Comparing Hashing strategies

Overview Chronicle has a number of implementations for hashing, including City and Murmur.  It also has it's own Vanilla Hash, but how was this tested? What is Vanilla Hash? Vanilla Hash is designed to be as simple as possible and be optimised for the Orthogonal Bits test (See below)  This was compared with City 1.1 and Murmur 3 hashing strategies. This is the 99%tile latencies for filling the 64 byte/256 byte buffer with new data and generating a 64-bit hash. JMH was used to perform the measurements. See Main64bytes  and Main256bytes Hashing Strategy 64 byte 99%tile 256 byte 99%tile Vanilla 67 ns 112 ns City 1.1 90 ns 182 ns Murmur 3 104 ns 211 ns The full test of results are here. What tests can you do to check a hashing strategy is good? There is a number of simple tests you can do. The tests cannot identify a good hash, but they can show a hash to be a

Upcoming presentations

I have quite a few presentations coming up. If you are interested in attending (I know I am) here is a list. Low Latency in Java 8 JavaZone 2015 - Wednesday, September 9th 2015 at 12:00-13:00 Dublin Java User's Group - Monday, September 28, 2015 at 6:30 - 7:30 PM How can new features in Java 8 be used to make writing Low Latency application easier? How do you tune garbage creation in the use of Lambdas? Writing Low Latency applications means using the subset of a language which performs consistently.  Can Streams and Lambdas be used in this context? What are some of the practical performance considerations? When does it make sense to use parallelStream()? For the talk in Dublin at AOL , there will be a short workshop on using Chronicle after the talk. The Future of Unsafe and Chronicle. JavaSIG - Possible date in September or October. Chicago JUG - Thursday, September 24th 2015 at 6:30, Peak 6 offices. What will happen to Unsafe in Java 9? What does the deprec

Using JSON in a low latency environment

Overview In this post I am including the performance of our JSON parser.  Given a choice I suggest YAML for a host of reasons, however if you have to use JSON, how does the performance compare? The message The message is simple and contains a number of data typoes. " price " : 1234 , " longInt " : 1234567890 , " smallInt " : 123 , " flag " : true , " text " : " Hello World! " , " side " : " Sell "  The actual message doesn't have a new line in it The performance This is the time to write and then read the message. These timings are in micro-seconds (0.001 milli-seconds) Wire Format Bytes 99.9 %tile 99.99 %tile 99.999 %tile worst JSONWire 100* 3.11 5.56 10.6 36.9 Jackson 100 4.95 8.3 1,400 1,500 Jackson + C-Bytes 100* 2.87 1

Wiring YAML to a file or network with Chronicle Wire.

Overview Chronicle Wire is designed to get the benefits of a text protocol in terms of ease of development and faster debugging, but be able to switch to a more performant and smaller binary protocol without having to change your code. In this post , I looked at the performance you might achieve using a YAML based text format for serialization, deserialization.  One of the nice features is that you can use YAML for testing, debugging but switch to Binary YAML where it makes sense. It is even possible to mix and match in a single stream. e.g. use YAML for the handshake and switch to Binary YAML or even some other format when you determine both ends are compatible. What does the code look like? First you need to have a buffer to write to. This can be a byte[], a ByteBuffer, off heap memory, or even an address and length you have obtained from some other library. // Bytes which wraps a ByteBuffer which is resized as needed. Bytes< ByteBuffer > bytes = Bytes . el

Using YAML over the network.

Overview There is a number of popular text based protocols for exchanging data over the network. These include XML, FIX, and JSON.  Chronicle Engine uses YAML which has some advantages and disadvantages. Isn't text slower than binary? Text protocols are slower than binary protocols.  The cost of encoding numbers and even unicode strings adds an overhead for the CPU. While text is slower it has one major advantage over binary which is human readability. This makes it much easier to describe the protocol and implement a solution for the interface without using a framework. While binary is faster than text, you may find that text is fast enough, in which case you want a format with is as easy to work with as possible. The following lists the latency for serializing and deserializing an object with 6 field of different types.  The TextWire is in YAML format, the BinaryWire is a binary form and RawWire and SBE are other binary formats. For more details see Chronicle-W