I can only speak from my own experience. For data generated by latency critical threads you will probably want to have a simple SPSC buffer per thread meaning no competition between producers so fewer cycles lost on cache coherence. The consumer could just iterate over all known buffers and drain them in some housekeeping thread (preferably on the same numa node). Nitsan Wakart did some inspiring work on queues and there's plenty to learn from it, however for simple, well structured data you would probably be better off with something bespoke. I typically use an off-heap circular byte buffer with producer and consumer high watermarks cached for additional speed. I guess choosing the right data structure and the means of generally moving the data will depend on many factors but most of the time jdk components are not suitable for that.
On Tue, 16 Oct 2018, 09:33 Mohan Radhakrishnan, < [email protected]> wrote: > Hi, > There is streaming data everywhere like trading data , JVM > logs.etc. Retrieval of statistics of this data need fast data structures. > Where can I find the literature on such fast data structures to store and > retrieve timestamps and data in O(!) time ? Should this always be > low-level Java concurrent utilities ? > > Thanks, > Mohan > > -- > You received this message because you are subscribed to the Google Groups > "mechanical-sympathy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
