akkadotnet / akka.net

Canonical actor model implementation for .NET with local + distributed actors in C# and F#.
http://getakka.net
Other
4.73k stars 1.04k forks source link

Allow Akka.Streams to utilize an IObservable<T> as a source and sink #2354

Open SeanFarrow opened 8 years ago

SeanFarrow commented 8 years ago

It would be nice to allow Akka.Streams to use an IObservable as both a source and a Sink.

I'm happy to do this, but the only question I have is whilst IObservable is in the core framework assemblies there are no implementations available. Given this, do we want to take a dependency on RX, which would make it easier to implement the IObservable interface as they provide base classes rather than implementing it ourselves?

Thoughts appreciated. Cheers Sean.

marcpiechura commented 8 years ago

I wouldn't like to add a RX dependency to Akka.Streams directly but instead create another library that only has a dependency to RX and Reactive.Streams. This way any other library that implements Reactive.Streams can use your library to interop with RX.

SeanFarrow commented 8 years ago

Would you add a dependency to Akka.streams as well, there is a contrib project on the jvm, I wonder whether we should do something similar? So have a separate akka.streams.contrib?

From: Marc Piechura [mailto:notifications@github.com] Sent: Thursday, October 27, 2016 07:49 To: akkadotnet/akka.net akka.net@noreply.github.com Cc: Sean Farrow sean.farrow@seanfarrow.co.uk; Author author@noreply.github.com Subject: Re: [akkadotnet/akka.net] Allow Akka.Streams to utilize an IObservable as a source and sink (#2354)

I wouldn't like to add a RX dependency to Akka.Streams directly but instead create another library that only has a dependency to RX and Reactive.Streams. This way any other library that implements Reactive.Streams can use your library to interop with RX.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/akkadotnet/akka.net/issues/2354#issuecomment-256560531, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABY1flovo6xTw6BjSJwIGus_4qsKKD9Rks5q4Ek_gaJpZM4KhShs.

marcpiechura commented 8 years ago

We don't need a reference to Akka.Streams because we already have overloads to create a source from a publisher, it would kinda look like this

var pub = rx.ToPublisher(Strategy.DropHead);
var src = Source.FromPublisher(pub);

same for the other way.

So the library would be independent from streams.

Yup we have already planed to create a similar repository, so this could be the first contribution ;-) I'll talk to the rest of the team and let you know once the repository is ready.

marcpiechura commented 8 years ago

@SeanFarrow we now have a repository for akka streams connectors, see https://github.com/akkadotnet/Alpakka .

So if you are working on it please submit a PR there, if not, please tell us and I set it as up for grabs

SeanFarrow commented 8 years ago

@silv3rcircl3, I will be working on this in the next few weeks, so hopefully there will be a pr early December. Cheers From: Marc Piechura [mailto:notifications@github.com] Sent: Sunday, November 13, 2016 19:03 To: akkadotnet/akka.net akka.net@noreply.github.com Cc: Sean Farrow sean.farrow@seanfarrow.co.uk; Mention mention@noreply.github.com Subject: Re: [akkadotnet/akka.net] Allow Akka.Streams to utilize an IObservable as a source and sink (#2354)

@SeanFarrowhttps://github.com/SeanFarrow we now have a repository for akka streams connectors, see https://github.com/akkadotnet/Alpakka .

So if you are working on it please submit a PR there, if not, please tell us and I set it as up for grabs

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/akkadotnet/akka.net/issues/2354#issuecomment-260204909, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABY1ftPTC38ZDXfJbdyNLruDatza-ub7ks5q917wgaJpZM4KhShs.