@Konrad: Thanks for the great answer! Disagreement on failure can indeed be a pain.
What I'm trying to do is essentially one of the first exercises one would do with akka: a chat app with online/offline notification. For passing messages around, one option is to use akka's distributed pubsub. The list of online people (and their friends) can be implemented using akka's distributed data. But now, there's one thing that I'm not too happy about: both distributed pubsub and distributed data seem to replicate all data onto all nodes instead of spreading out to the cluster. And this was the reason why I was thinking of Hazelcast. What would a pure akka implementation of this be? Thanks! Alex On Sunday, December 27, 2015 at 9:44:50 AM UTC-6, Konrad Malawski wrote: > > Just @Konrad or @ktoso is fine ;-) > > In order to properly answer we'd have to sit down together and think about > your requirements, > deployment strategy etc. The short story is: you'll hazlecast maintains > it's own cluster, it has some > kind of failure detection. Akka is a cluster, it has some kind of failure > detection. Both are *in process*, > in the same JVM. > > Now: what happens if Hazlecast decides there's a partition, but Akka does > still see the other node just fine? > I've seen real deployments where this, or similar situations, caused all > kinds of chaos and inconsistent state. > Sure, one can blame it on the dev team that "well, of course one has to > take into account these things!", but that's > not a helpful stance as it simply gets exponentially more hard. It depends > what for you'd use hazlecast though. > > Since your question was on – I need to sum a counter from different nodes, > that's trivial to implement using Akka, > so I would not add such additional heavy dependency. If you need CRDTs, > you can try Distribtued Data. > > The gist of that message is: think twice before adding another in process > cluster to your project because you need > a small part of functionality (which you could implement using Akka > easily) – it comes with a large deployment > and understandability cost. > > > -- > Cheers, > Konrad 'ktoso’ Malawski > Akka <http://akka.io> @ Typesafe <http://typesafe.com> > > On 27 December 2015 at 16:38:18, [email protected] <javascript:> ( > [email protected] <javascript:>) wrote: > > Just realized that due to confusion, I added the "I see. Thanks a lot!" > (which was supposed to be for a different thread). I'm still curious to > hear more about the comment on Hazelcast. > > @Konrad 'ktoso’ Malawski: I'm curious about your comment on Hazelcast > (because I'm actually thinking of using it). Suppose I need to maintain > distributed data what should I use instead? akka surely provides > distributed data, but it's still experimental. Moreover, it doesn't seem to > provide functionalities like locking or queries. The data is also > replicated on all nodes which can be too much redundancies (or is it > configurable?). > > Thanks! > > On Friday, December 25, 2015 at 10:47:22 AM UTC-6, Alex Reisberg wrote: >> >> I see. Thanks a lot! >> >> On Fri, Dec 25, 2015 at 9:43 AM, <alex <javascript:>> wrote: >> >>> Exactly, I wouldn't want to add another piece to get those counters for >>> the test. So I'm definitely gonna use akka's distributed data for this. >>> >>> @Konrad 'ktoso’ Malawski: I'm curious about your comment on Hazelcast >>> (because I'm actually thinking of using it). Suppose I need to maintain >>> distributed data what should I use instead? akka surely provides >>> distributed data, but it's still experimental. Moreover, it doesn't seem to >>> provide functionalities like locking or queries. The data is also >>> replicated on all nodes which can be too much redundancies (or is it >>> configurable?). >>> >>> On Friday, December 25, 2015 at 8:13:18 AM UTC-6, Konrad Malawski wrote: >>>> >>>> After having consulted a number of customers who included or >>>> previously-had hazlecast clusters along with >>>> Akka apps I remain unconvienced what hazlecast added to the table >>>> (other than - "yet another cluster, with different >>>> and detached lifecycle to manage"). I'd avoid adding more separate >>>> independent clusters if possible. >>>> >>>> -- >>>> Cheers, >>>> Konrad 'ktoso’ Malawski >>>> Akka <http://akka.io> @ Typesafe <http://typesafe.com> >>>> >>>> On 25 December 2015 at 14:59:28, Guido Medina ([email protected]) wrote: >>>> >>>> I will need distributed data for my project in the future so it was >>>> good you mentioned it cause I didn't know akka had it. >>>> >>>> -- >>>> >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>> >>>>>>>>>> Check the FAQ: >>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>> >>>>>>>>>> Search the archives: >>>> https://groups.google.com/group/akka-user >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "Akka User List" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> Visit this group at https://groups.google.com/group/akka-user. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>>> -- >>> >>>>>>>>>> Read the docs: http://akka.io/docs/ >>> >>>>>>>>>> Check the FAQ: >>> http://doc.akka.io/docs/akka/current/additional/faq.html >>> >>>>>>>>>> Search the archives: >>> https://groups.google.com/group/akka-user >>> --- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "Akka User List" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/akka-user/3LbOxIXkfTA/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> [email protected] <javascript:>. >>> To post to this group, send email to [email protected] >>> <javascript:>. >>> Visit this group at https://groups.google.com/group/akka-user. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: > http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > To post to this group, send email to [email protected] > <javascript:>. > Visit this group at https://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > > -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
