These are chat archives for akkadotnet/akka.net

27th
Jun 2016
Arsene T. Gandote
@Tochemey
Jun 27 2016 08:17
Hello, I am very new to Akka. However I have read a lot about it and I have tried few samples and I can see very cool and interesting. I would like to have some advices if possible design patterns to implement a kind of pub/sub and message bus architecture where my actors will subscribe to listen to message. So far I have not seen any good tutorial on it for the .NET framework.
Bartosz Sypytkowski
@Horusiath
Jun 27 2016 08:33
@bobanco I'm not an expert so I may be missing something, but given this tutorial I'd say it looks weird at least. Also I haven't found the example, where some of the constructor arguments are supposed to be defined directly and some of them are supposed to be injected by DI container.
@Tochemey I think, that once Akka.Streams will be released (at the end of this month), a lot of patterns could change.
Bartosz Sypytkowski
@Horusiath
Jun 27 2016 08:45
@bobanco if you have some ideas or feedback, please add a comment in akkadotnet/akka.net#1675.
Arsene T. Gandote
@Tochemey
Jun 27 2016 09:54
@Horusiath Thank you. So I will wait for that.
Aaron Stannard
@Aaronontheweb
Jun 27 2016 18:43
@alexvaluyskiy going to revisit some of those breaking Router API changes
and put some hacks in-place to make them backwards compatible
well, not hacks
Bart de Boer
@boekabart
Jun 27 2016 18:44
that's subjective ;)
Aaron Stannard
@Aaronontheweb
Jun 27 2016 18:44
I think we can stay current with the Scala API and not blow up existing code in those areas with a little elbow grease
going to update the PR to do that
Aaron Stannard
@Aaronontheweb
Jun 27 2016 19:13
does anyone know if this is actually true or not? https://twitter.com/dot_NET_Junkie/status/747506179425837058
I'd be surprised if that was
Stanley Goldman
@StanleyGoldman
Jun 27 2016 19:14
sigh... i was so happy about the "idea" of .net core when i first heard of it
and then the idea went and got ruined
over and over again
Aaron Stannard
@Aaronontheweb
Jun 27 2016 19:15
I'm pretty sure that's a joke
but on the offchance that it's not
Bart de Boer
@boekabart
Jun 27 2016 19:16
Is that even possible?
Aaron Stannard
@Aaronontheweb
Jun 27 2016 19:16
yeah, mentally speaking I can't even comprehend how that'd be possible
basic things like Dictionary wouldn't work
Bart de Boer
@boekabart
Jun 27 2016 19:16
I mean, is that even part of the .net framework, not something deeper?
Aaron Stannard
@Aaronontheweb
Jun 27 2016 19:18
gotta be a joke
Aaron Stannard
@Aaronontheweb
Jun 27 2016 19:23
good
Bartosz Sypytkowski
@Horusiath
Jun 27 2016 19:29
I general this is a good idea (i.e. Haskel solves this right)... when you're creating a new runtime from scratch
Stanley Goldman
@StanleyGoldman
Jun 27 2016 19:39
good to hear that was a joke
Bartosz Sypytkowski
@Horusiath
Jun 27 2016 19:40
if community is in the state, when someone is able to believe in such things, .NET Core team have some serious trust issues
Stanley Goldman
@StanleyGoldman
Jun 27 2016 19:41

/quote
“There's an old saying in Tennessee — I know it's in Texas, probably in Tennessee — that says, fool me once, shame on — shame on you. Fool me — you can't get fooled again.”

― George W. Bush

Jordan S. Jones
@jordansjones
Jun 27 2016 20:21
Cluster Client question. Should the ActorSystemName be different on the client end than it is on the cluster end? Also, does the cluster client use RemoteActorRefProvider instead of ClusterActorRefProvider?
Aaron Stannard
@Aaronontheweb
Jun 27 2016 20:28
@alexvaluyskiy I figured out the issue with the NodeChurnSpec
issue is that we're not respecting the expectedTestDuration setting in the MNTR
Bartosz Sypytkowski
@Horusiath
Jun 27 2016 20:30
@jordansjones 1. yes 2. yes - cluster client is not part of the cluster itself, so cluster rules does not apply here
Aaron Stannard
@Aaronontheweb
Jun 27 2016 20:30
due to XUnit hijinks I don't have an easy way of implementing that correctly
so I'm just going to up the maximum time limit
Jordan S. Jones
@jordansjones
Jun 27 2016 20:30
@Horusiath Thank you
Aaron Stannard
@Aaronontheweb
Jun 27 2016 21:18
looks like #1666 may have exposed a nasty bug with remoting
running it locally with full logs now
fouimette
@fouimette
Jun 27 2016 21:31
Can receive process primitive types? like: Receive<int>(message => HandleInt(message));
Marc Piechura
@marcpiechura
Jun 27 2016 21:35
@fouimette sure
fouimette
@fouimette
Jun 27 2016 21:36
Not working for me. I have a very basic demo console project that works with a class object but not with string or int. What might I look for to make sure im not missing something?
Marc Piechura
@marcpiechura
Jun 27 2016 21:37
Could you share some code?
fouimette
@fouimette
Jun 27 2016 21:39
code public class PlaybackActor : ReceiveActor
{
public PlaybackActor()
{
Console.WriteLine("Creating PlaybackActor");
Receive<int>(message => HandleInt(message));
Receive<PlayMovieMessage>(message => HandlePlayMovieMessage(message));
Receive<string>(message => HandleString(message));
}
    private void HandleInt(int message)
    {
        Console.WriteLine(message.ToString());
    }
}
Bartosz Sypytkowski
@Horusiath
Jun 27 2016 21:40
@fouimette do you have any error?
fouimette
@fouimette
Jun 27 2016 21:41
no errors. it just executes and nothing happens. i even put a throw new NotImplementedException() in that HandleInt() and it doesnt throw.
ignore the PlayMoviesMessage and string lines....
Bartosz Sypytkowski
@Horusiath
Jun 27 2016 21:41
it's because your message never reaches an actor. Can you show us the initialization code?
fouimette
@fouimette
Jun 27 2016 21:42

using System;
using Akka.Actor;
using MovieStreaming.Actors;
using MovieStreaming.Messages;

namespace MovieStreaming
{
class Program
{
private static ActorSystem MovieStreamingActorSystem;

    static void Main(string[] args)
    {
        MovieStreamingActorSystem = ActorSystem.Create("MovieStreamingActorSystem");
        Console.WriteLine("Actor System Created");

        Console.WriteLine("=====Behaviors=====");

        Props userActorProps = Props.Create<UserActor>();
        IActorRef userActorRef = MovieStreamingActorSystem.ActorOf(userActorProps, "UserActor");

        Console.ReadKey();
        Console.WriteLine("processing int");
        userActorRef.Tell(3);

        Console.ReadKey();
        Console.WriteLine("Sending a PlayMovieMessage (Akka.NET: The Movie)");
        userActorRef.Tell(new PlayMovieMessage("Akka.NET: The Movie", 42));

        Console.ReadKey();
        Console.WriteLine("Sending another PlayMovieMessage (Star Wars)");
        userActorRef.Tell(new PlayMovieMessage("Star Wars", 39));

        Console.ReadKey();
        Console.WriteLine("Sending a StopMovieMessage");
        userActorRef.Tell(new StopMovieMessage());

        Console.ReadKey();
        Console.WriteLine("Sending another StopMovieMessage");
        userActorRef.Tell(new StopMovieMessage());

        Console.ReadKey();

        //Tell actor system (and all child actors) to shutdown
        MovieStreamingActorSystem.Terminate();

        //Wait for actor system to finish shutting down
        var terminatedSystem = MovieStreamingActorSystem.WhenTerminated;
        Console.WriteLine("Actor system shutdown.");

        Console.ReadKey();
    }
}

}

everything works in this code except the userActorRef.Tell(3); does not write out to the console as expeceted.
Bartosz Sypytkowski
@Horusiath
Jun 27 2016 21:44
Why have you show us the PlaybackActor internals, while you're creating UserActor?
fouimette
@fouimette
Jun 27 2016 21:45
Crap, that is the problem! **puts on dunce cap and returns to the corner
Thank you @Horusiath
Bartosz Sypytkowski
@Horusiath
Jun 27 2016 21:45
no, problem ;) it's easy to miss something with only one pair of eyes :D
Aaron Stannard
@Aaronontheweb
Jun 27 2016 22:24
Nope, nevermind - not a bug with Akka.Remote
bug with the test