On Thu, Feb 27, 2014 at 10:43 PM, delasoul <michael.ham...@gmx.at> wrote:
> > > On Thursday, 27 February 2014 08:47:09 UTC+1, rkuhn wrote: > >> Very interesting discussion, thanks for bringing it up, Michael! >> >> [more below] >> >> 26 feb 2014 kl. 16:47 skrev Martin Krasser <kras...@googlemail.com>: >> >> On 26.02.14 14:09, delasoul wrote: >> >> >>> But I really like the idea to also keep the view in memory when >>> needed, update it, shut it down when not used and bring it back easily by >>> replaying the corresponding processor or snapshotting the view. >>> >>> >>> This is possible with all options 1-3 described above. >>> >> >> The combination of an eventsourced processor and a view would be my >> preference, but as i said here I am struggling with the update policy. In >> certain use cases it will be completely sufficient to create and replay the >> view just on demand, but if keeping it in memory it has to get updated >> >> >> Depends on what inconsistency window your application is willing to >> accept. You still can read any time from the view with eventual consistency >> guarantees. Update(await = true) is only needed to achieve strong read >> consistency. Furthermore, view updates are only incremental updates (not >> full replays) so it may well be that in many cases they're not too >> expensive. >> >> A later useful extension to akka-persistence could be push-based views >> (in addition to the current pull-based views). They are harder to implement >> as they require distributed pub/sub that preserves message order. >> >> >> Yes, push-based views would indeed be a very natural extension of the >> current capabilities. I assume that it is most efficiently implemented with >> the help of the underlying journal, because otherwise it would just be a >> shim on top which maybe amortizes some of the polling cost by bundling >> calls together but which fundamentally is not "push". >> > Yes, pushing from the journal is most efficient, but a feature that most data stores don't support. A variant is to combine push and pull, which is probably what Roland was thinking of as "shim on top". Publish Update messages to the view using pub/sub (or similar). The published Update will only trigger a normal replay in the view. Use pull with rather low update frequency to ensure that the view is eventually updated even in case of loss of published Update messages. /Patrik > > > absolutely - I guess that's the advantage of Greg Young's eventstore - > they only have to use their own store which is able to push to streams. > Just thinking - as the Akka team is also working on "reactive streams" > do you see a possible use within akka-persistence? > As you said, the best solution would be on journal level but maybe one > also could ask processors/views(as they hold state in memory) to create > streams, combine them, query them, create projections.... > > cu, michael > > >> >> Regards, >> >> >> *Dr. Roland Kuhn* >> *Akka Tech Lead* >> Typesafe <http://typesafe.com/> - Reactive apps on the JVM. >> twitter: @rolandkuhn >> <http://twitter.com/#!/rolandkuhn> >> >> -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: http://akka.io/faq/ > >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com. > To post to this group, send email to akka-user@googlegroups.com. > Visit this group at http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/groups/opt_out. > -- Patrik Nordwall Typesafe <http://typesafe.com/> - Reactive apps on the JVM Twitter: @patriknw -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: http://akka.io/faq/ >>>>>>>>>> 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 akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/groups/opt_out.