These are chat archives for atomix/atomix

22nd
Apr 2016
belowm
@belowm
Apr 22 2016 12:29
Hey! First of all, I would like to thank you for providing such a great library. I have a question: Is there a convenient way to observe collections? I am aware that this is a feature that is not supported by the JDK collections as well, but imho, this would makes perfectly sense here to have events that are fired upon remove and add. I currently work around this by dispatching such events through via an atomix group.
Roman Pearah
@neverfox
Apr 22 2016 14:21
Speaking of collections, any plans to implement toArray on DistributedSet?
belowm
@belowm
Apr 22 2016 16:45
I think there is a small bug at the Direct Messaging example on http://atomix.io/atomix/: The options instance is not passed to member.messaging().producer("hello"); - this should be member.messaging().producer("hello", options);
Jordan Halterman
@kuujo
Apr 22 2016 16:46
That sounds familiar ;-) I think I may have seen that and forgotten about it too
belowm
@belowm
Apr 22 2016 16:47
hi! ah, ok. have you seen my first post about observing collections..?
Jordan Halterman
@kuujo
Apr 22 2016 16:47
@belowm events would be really easy to add and I can totally do that this weekend. You're right there's definitely a use case for it, and Atomix is really designed to optimize events so it should definitely be done.
belowm
@belowm
Apr 22 2016 16:48
cool! thanks!!!
Jordan Halterman
@kuujo
Apr 22 2016 16:53
@neverfox the only reason toArray and methods like that haven't been implemented yet is because of the potential issues that may be caused by pulling the entire map to the client. I did add some methods like keySet and entrySet to DistributedMap for compatibility with the Vert.x cluster manager API, but TBH they haven't been tested on any sizeable data structures. I could do the same for the other collections with toArray, but really have just delayed implementing methods that pull entire data structures until I can ensure they properly perform well. Because of Copycat's response ordering guarantees, just sending one large response can potentially block other responses. But we could probably just implement them with the documented caveat that large data structures may not behave well until that can really be tested/optimized.
Those sound like some nice weekend tasks
Thanks :-)
Richard Pijnenburg
@electrical
Apr 22 2016 17:01
we have to do something to keep you busy @kuujo :p
Roman Pearah
@neverfox
Apr 22 2016 17:08
@kuujo Thanks. I can see them being necessary for some applications, even if there are caveats to their use.
Jordan Halterman
@kuujo
Apr 22 2016 17:09
Indeed should be a quick add
Busy is good! This is the stuff that needs to be done now. Missing methods and bug fixes
Jonathan Halterman
@jhalterman
Apr 22 2016 20:32
adding methods is easy. it's removing them that's painful.