Is there a ChronicleList / ChronicleArray implementation?

98 views
Skip to first unread message

Martin Petzold

unread,
Nov 15, 2016, 3:52:05 AM11/15/16
to Chronicle
I am looking for an option to store a list / array collection with Chronicle. How could I do it?

Thanks!

Martin

Rob Austin

unread,
Nov 15, 2016, 3:55:42 AM11/15/16
to java-ch...@googlegroups.com
you could write each element into a chronicle-queue ? see https://github.com/OpenHFT/Chronicle-Queue/blob/master/README.adoc

--
You received this message because you are subscribed to the Google Groups "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.

Martin Petzold

unread,
Nov 15, 2016, 3:57:10 AM11/15/16
to java-ch...@googlegroups.com

Does ChronicleQueue support all java.util.List operations?


Am 15.11.16 um 09:55 schrieb Rob Austin:
You received this message because you are subscribed to a topic in the Google Groups "Chronicle" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/java-chronicle/m340ubzvmWc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to java-chronicl...@googlegroups.com.

Rob Austin

unread,
Nov 15, 2016, 3:58:25 AM11/15/16
to java-ch...@googlegroups.com
no, but Chronicle-Map supports the java.util.Set

Martin Petzold

unread,
Nov 15, 2016, 4:07:43 AM11/15/16
to java-ch...@googlegroups.com

Thanks! I have checked ChronicleSet, however, as far as I understand it is not ordered and does not have access by index position (i.e. java.util.List operations). It also does not allow duplicate elements. I need a java.util.List or at least a basic array with ordered elements. Maybe I could live with a java.util.SortedSet and handle no-duplicate elements on my own way.

An option would be to use ChronicleMap and link all operations somehow. This is not really clean. Maybe there is another option?


Am 15.11.16 um 09:58 schrieb Rob Austin:

Rob Austin

unread,
Nov 15, 2016, 4:13:45 AM11/15/16
to java-ch...@googlegroups.com
what do you want to do, do  you have many elements, maybe more than can fit into main memory, or do you want them all stored off heap and persisted ?

why does the collection have to implement java.util.List ?

chronicle queue, will give you most of the functionality of a List ( accept for element removal ), just through a different API. ?

Rob

Rob Austin

unread,
Nov 15, 2016, 4:19:38 AM11/15/16
to java-ch...@googlegroups.com
It's worth adding that chronicle queue gives you

-  ordering ( the elements are ordered in the order they are written )
-  index position on write
-  read access by index position

Rob

Martin Petzold

unread,
Nov 15, 2016, 4:41:34 AM11/15/16
to java-ch...@googlegroups.com

I do not have so many elements it is an embedded use case. However, I need very high performance and persistence to disk (potentially also snapshots). I also like the distribution approach of Chronicle. I already use ChronicleMap but for my data model I also need a java.util.List implementation or maybe not all operations but everything a typical array can do.


Am 15.11.16 um 10:13 schrieb Rob Austin:

Martin Petzold

unread,
Nov 15, 2016, 4:45:56 AM11/15/16
to java-ch...@googlegroups.com

For a typical array I need write access by index position. I don't need all java.util.List operations, but all basic array operations.

Just in general, it would make Chronicle really strong if they have all basic Java collections covered. At least also List maybe also SortedSet would make sense. It would be a really strong library then!


Am 15.11.16 um 10:19 schrieb Rob Austin:

Rob Austin

unread,
Nov 15, 2016, 5:45:36 AM11/15/16
to java-ch...@googlegroups.com
I suggest you use a chronicle-queue, you can then use chronicle-engine configured to read this queue, the IndexQueueView will give you snapshot of data written to the queue ( much like a map ), one downside with this approach is the IndexQueueView is relatively new and we don’t have much documentation on it.  If you want to take this approach, we can help you via paid consultancy and support.

Rob

Martin Petzold

unread,
Nov 19, 2016, 11:33:44 AM11/19/16
to java-ch...@googlegroups.com

Thanks. I decided for a List implementation based on ChronicleMap for now. Will see if it is good enough.


Am 15.11.16 um 11:45 schrieb Rob Austin:
Reply all
Reply to author
Forward
0 new messages