Hi Endre, one issue here is that conflate does not allow you to keep state for the “next round”, so scanWithin is indeed a different kind of operation; or did you mean to .scan(...).conflate(...).zip(TickSource)?
Regards, Roland > 17 jun 2015 kl. 12:53 skrev Endre Varga <[email protected]>: > > Hi Elmar, > > You can try the "conflate" operator, and then use a ZipWith junction in a > graph to wire it together with a tick source. You should read this section of > the documentation for more (and important) details: > http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC3/scala/stream-rate.html > > <http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC3/scala/stream-rate.html> > > -Endre > > On Tue, Jun 16, 2015 at 11:00 PM, Elmar Weber <[email protected] > <mailto:[email protected]>> wrote: > Hello, > > I'm currently testing to migrate a larger and complex actor system, one > pattern we have is an aggregate and flush kind of operation. An actor > receives a set of updates that is applied incrementally to a state. Every n > seconds or x updates that state is flushed to the database. > > The updates are easy: just a scan operation that aggregates the changes. > > For the flush I have two (one not feasible) ideas so far: > - a groupedWithin that just takes the last element from the list (not > possible when there are thousand of updates per second) > - a custom actor (seems like a lot of overhead) > > Are there any easier / better solutions? > > Thanks, > Elmar > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ <http://akka.io/docs/> > >>>>>>>>>> Check the FAQ: > >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> <http://doc.akka.io/docs/akka/current/additional/faq.html> > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > >>>>>>>>>> <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] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at http://groups.google.com/group/akka-user > <http://groups.google.com/group/akka-user>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. > > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ <http://akka.io/docs/> > >>>>>>>>>> Check the FAQ: > >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> <http://doc.akka.io/docs/akka/current/additional/faq.html> > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > >>>>>>>>>> <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] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at http://groups.google.com/group/akka-user > <http://groups.google.com/group/akka-user>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. 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://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 http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
