Or you could use something similar to this too: if you are slow to collect, you loose things (and you know how many samples), but you won't slow down too much the producer...https://github.com/real-logic/agrona/pull/119
Il giorno martedì 16 ottobre 2018 10:47:31 UTC+2, Wojciech Kudla ha scritto: > > 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, <radhakris...@gmail.com > <javascript:>> 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 mechanical-sympathy+unsubscr...@googlegroups.com <javascript:>. >> 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 mechanical-sympathy+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.