Hi Daniel, In your two-part analysis, I was referring to the first part, not the > second one. I'm wondering why Michał implemented Publishers from scratch, > how hard it was in practice, and what kind of library would help with that > (if any help was needed). >
I would also be interested in hearing about these experiences. As far as I know there are no small libraries out there to help with that. > > This library need not be akka-streams, because it's a heavy dependency to > introduce (running an ActorSystem if you don't have one already) and > because implementing your Publisher as an Actor, if the rest of your code > isn't Actor-based, is inconvenient. > Yes, this is completely understandable. My "holy grail" is to make the essence of Akka Streams operation logics (map/filter/etc.) to be independent of the execution environment -- that is you can define publishers, subscribers, processors and fan-in/out operations in a small DSL that can be executed in an Actor but can be executed in many other ways, too. I guess if I ever succeed then it can be extracted to a really tiny library, "akka-streams-core-nano" if you like (would depend on scala-lib though, unless someone ports it to pure Java) and be used to build more lightweight elements. But this is not an official plan, just my thoughts. > > As an example, my `future-streams` RS implementation (which I'm not > pushing for general adoption; I don't have the time to polish it enough, > and it really needs a second-gen rewrite) provides a model based on scala > Futures and ExecutionContexts. You can write a method that returns a > Future[T] producing each element in turn, and it's wrapped as a > Publisher[T], with the subscription management and back-pressure > implemented in the library. It's a good fit for me, but would it be good > for others? I don't know. > My personal experience is that writing Publishers and Subscribers, while not trivial are not that hard to implement. Where it gets really complicated is when you start writing Processors. -Endre > > Daniel Armak > > On Wed, Oct 29, 2014 at 12:29 PM, Akka Team <[email protected]> > wrote: > >> >> >> On Wed, Oct 29, 2014 at 11:17 AM, Roland Kuhn <[email protected]> wrote: >> >>> What Endre says is correct and answers part of the question, but an >>> interesting piece remains: would there be value in providing utilities >>> (i.e. abstract base classes) for implementations of the RS interfaces? >>> >> >> Currently there are ActorPublisher and ActorSubscriber which are a good >> start and enough in most of the cases. >> >> When (if?) I extend the fusing OP approach to be able to handle asynch >> external events it provides an alternative API to do low level >> Subscribers/Publishers (you can already "hack in" synchronous >> Publishers/Subscribers but not asynch ones). I guess that is another option. >> >> -Endre >> >> >>> This can only be answered from experience gained with different such >>> efforts, and I, too, would be interested in hearing Michał’s opinion. >>> >>> Regards, >>> >>> Roland >>> >>> 29 okt 2014 kl. 11:08 skrev Akka Team <[email protected]>: >>> >>> Hi Daniel, >>> >>> I'm interested in why you rolled your own RS implementation: was it >>>> because you didn't want a dependency on akka, or because akka-streams isn't >>>> stable enough yet, or for some other reason? >>>> >>> >>> I feel that this is an apple to oranges kind of comparison. To give you >>> a very imperfect analogy from DB world the reactive streams layer >>> (Publisher, Subscriber) is akin to a JDBC driver while Akka Streams is akin >>> to an ORM framework (very bad analogy, I know). So whenever you consider >>> building an application leveraging reactive streams you will usually pick >>> - external libs that give you Reactive Streams drivers (databases, JMS >>> or RabbitMQ connectors, network connectors, logging adapters, etc) >>> - external lib or libs that give you a framework to connect these >>> elements in a simple and safe way >>> >>> Akka Streams is mostly the second kind, but for example the TCP or >>> persistence adapters might be used in the first way, and integrating them >>> with something else than Akka Streams. >>> >>> While a connector might decide to use Akka Streams (or any other library >>> of the second kind) internally this is not necessary, and many times not >>> needed. >>> >>> -Endre >>> >>> >>>> >>>> If there was a different library, smaller/more lightweight than akka >>>> actors, that provided a generic implementation of RS, would you have used >>>> it? What would you want from such a library? >>>> >>>> Thanks, >>>> >>>> -- >>>> Daniel Armak >>>> >>>> -- >>>> >>>>>>>>>> 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. >>>> >>> >>> >>> >>> -- >>> Akka Team >>> Typesafe - The software stack for applications that scale >>> Blog: letitcrash.com >>> Twitter: @akkateam >>> >>> -- >>> >>>>>>>>>> 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. >>> >>> >>> >>> >>> *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. >>> >> >> >> >> -- >> Akka Team >> Typesafe - The software stack for applications that scale >> Blog: letitcrash.com >> Twitter: @akkateam >> >> -- >> >>>>>>>>>> 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. >> > > -- > >>>>>>>>>> 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. > -- Akka Team Typesafe - The software stack for applications that scale Blog: letitcrash.com Twitter: @akkateam -- >>>>>>>>>> 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.
