What's the replacement for Akka Actor Publisher and Subscriber?

746 views
Skip to first unread message

Dagny T

unread,
Sep 26, 2016, 3:07:55 AM9/26/16
to Akka User List
Hi there,

The latest info I have from a prior Akka Team response was that the Akka Actor Publisher/Subscriber APIs are now deprecated; 
and one should be looking at the Graph DSL instead.

i.e. Latest Akka Docs state:
ActorPublisher and ActorSubscriber
 cannot be used with remote actors, 
because if signals of the Reactive Streams protocol (e.g. request) are lost the the stream may deadlock.

So, now I'm not clear on what the replacement APIs we're supposed to be using; as far as connecting State-Holding Akka Actors to Graph DSL Event-Streams.

Is there an Akka Team Blog with a GitHub link to a small focused example which demonstrates this?

THANKS in advance for any help with finding the latest APIs to use for this!
Dagny


Dagny T

unread,
Sep 28, 2016, 11:50:41 PM9/28/16
to Akka User List
 I have a JS Websocket streaming into an Akka Http Server; but I want to keep in-memory the latest aggregate state in an Akka Actor. 

i.e. Is that just using CQRS on the datastore, so I wouldn't be connecting the Akka Actor (Query Read Response-side) directly to the Akka Http Server (Command) writer. 
Rather, the writer writes events; and the Akka Actor reads events to 'rollup' to the aggregate state? 

I looked up Actor Publisher and Actor Subscriber, but their use with Streams is deprecated in the latest docs -- 'deadlock' risk (see my prior message).

THANKS!
Dagny

Justin du coeur

unread,
Sep 29, 2016, 8:27:31 PM9/29/16
to akka...@googlegroups.com
I think you're missing the important word here: they can't be used with remote actors.  As I understand it, the point is that you can't just connect it to any old Actor, which might be on some other node -- you can only do it with local Actors...

--
>>>>>>>>>> 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 akka-user+unsubscribe@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Dagny T

unread,
Oct 10, 2016, 7:27:35 PM10/10/16
to Akka User List

Right; can you provide a Blog URL or something to explain further?  

What is the recommended architecture when you want to stream data between remote Actor-based services?
i.e. the implementations of Actor Publisher/Subscriber which actually work across remote boundaries 
(location transparency, I thought was the whole point of Akka's awesomeness).

Thanks in advance!
D

On Monday, September 26, 2016 at 12:07:55 AM UTC-7, Dagny T wrote:

Justin du coeur

unread,
Oct 11, 2016, 3:08:03 PM10/11/16
to akka...@googlegroups.com
One of the team will have to answer this -- AFAIK, streams just plain don't work cross-node yet.  (Which is why I'm not using them myself yet.)

Rafał Krzewski

unread,
Oct 11, 2016, 4:52:52 PM10/11/16
to Akka User List
You can use Akka HTTP with WebSockets for streaming data over a network link between nodes. This way you could attach a reactive stream in one node with a remote reactive stream, preserving backpressure semantics.
If you are concerned with the overhead, you could use akka.streams.scaladsl.Tcp to stream data over a raw TCP socket, but of course you'd need to work out your custom protocol details.
This may look like a lot of work, but that's just another example of Akka being honest with you: network is unreliable in general, and "exactly once" semantics of message delivery come at a cost.

Cheers,
Rafał
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com.

Patrik Nordwall

unread,
Oct 12, 2016, 2:35:07 AM10/12/16
to akka...@googlegroups.com
In addition to what has already been said there will be a few more options:
  • Gearpump is implementing distributed streaming with Akka Streams
  • We will evaluate if it's suitable to make an Akka Streams API on top of ReactiveSocket 
Regards,
Patrik


To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscribe@googlegroups.com.

To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.



--

Patrik Nordwall
Akka Tech Lead
Lightbend -  Reactive apps on the JVM
Twitter: @patriknw

Justin du coeur

unread,
Oct 12, 2016, 8:25:29 AM10/12/16
to akka...@googlegroups.com
+1, especially if either would enable using Akka Streams idiomatically with clustered Actors.  That would make Streams *vastly* more useful for those of us who want to use WebSockets and other HTTP streaming input in cluster-sharded applications.  I've had to instead build my own (fairly naive and crappy) streaming layer for this, and would love to replace it with something cleaner and more standard...

Dagny T

unread,
Oct 13, 2016, 5:26:51 PM10/13/16
to Akka User List

HOLD ON .. SERIOUSLY?!  

So, do I understand correctly that the 'Reactive Manifesto' industry coalition among leading thought leaders at Netflix, Pivotal, and Lightbend; is for all intents and purposes -- still under construction?

Sorry; I'm just seeking straight answers on this to gauge if this is even worthwhile for me to pursue.  Since, my prior interest in this area was based on the (mis?)understanding that the Reactive Streams API would essentially enable seamless interoperability between Actor-controlled Services across a distributed cluster.
And, that different platform Vendors had agreed to comply with this API to permit that interoperability.

If this is not the case -- then at least for me; I don't have bandwidth or depth of knowledge for constructing a bleeding-edge proprietary layer above TCP to make this happen.

Any authoritative insight on the current state of this inter op situation would be VERY much appreciated!  THANKS in advance!
 


On Monday, September 26, 2016 at 12:07:55 AM UTC-7, Dagny T wrote:

Viktor Klang

unread,
Oct 13, 2016, 5:32:27 PM10/13/16
to Akka User List
RS Backpressure can piggyback on top of TCP, which means HTTP, WebSocket and HTTP/2 support.
Besides that there's *tons* of integrations (Sources and Sinks) for networked components.

As if that wasn't enough there's both the ReactiveSocket initiative (http://reactivesocket.io/) as well as Apache Gearpump (for distributed Akka Stream materialization support)

--
>>>>>>>>>> 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 akka-user+unsubscribe@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.



--
Cheers,
Reply all
Reply to author
Forward
0 new messages