Hi Jakub, I see what you are saying, but that only makes sense for linear 1:1 transformations (and possibly filter()). If we were to add something like this then it would need to work with all stream combinators including custom stages etc., because otherwise it would just be a big pile of junk ;-) So, how would you propose to manage the per-element context in expand() or conflate()? BTW: I didn’t understand you point about “global” state, that would surely not be useful for tracing anything because you’d get all data munged together, or am I missing something?
This is a hard problem. That we don’t have a solution yet is neither due to laziness nor forgetfulness ;-) Regards, Roland > 15 maj 2015 kl. 12:14 skrev Jakub Liska <[email protected]>: > > I'm facing also this problem with passing a context through the stream. Let > say you have a stream like this : > > download resource -> back it up -> parse it -> store errors -> process data > -> ... -> persist data -> sink > > you kinda need some sort of context so that you know that if some latter > flows fails it was related to a particular resource from the first Flow and > you can log/handle it in Supervision.Decider. > > I'm using HList for the In&Out Flow types which is basically the context so > that instead of gluing flow parts together with many case classes for > instance I use a growing HList. But it turned out to be quite a maintenance > disaster and it is getting out of control because it lost flexibility. I > think that each stream should optionally have something like a > Context/GlobalState accessible to all Flows, even if it was a god damn > Map[String, Any] because it is impossible to implement it manually for it to > be maintainable. > > -- > >>>>>>>>>> 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.
