Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Nov 16 16:14
    IgorFedchenko commented #4032
  • Nov 16 13:19
    ismaelhamed synchronize #4042
  • Nov 16 13:17
    ismaelhamed commented #3863
  • Nov 16 11:47
    IgorFedchenko synchronize #4032
  • Nov 16 11:47
    IgorFedchenko commented #4032
  • Nov 16 11:21
    ismaelhamed synchronize #3863
  • Nov 16 11:17
    ismaelhamed edited #3863
  • Nov 16 11:17
    ismaelhamed synchronize #4042
  • Nov 16 09:58
    IgorFedchenko synchronize #4032
  • Nov 16 09:49
    IgorFedchenko synchronize #4032
  • Nov 16 09:45
    IgorFedchenko commented #4032
  • Nov 16 09:17
    ismaelhamed opened #4043
  • Nov 16 09:03
    ismaelhamed opened #4042
  • Nov 16 09:03
    IgorFedchenko commented #4032
  • Nov 16 08:59
    IgorFedchenko synchronize #4032
  • Nov 16 08:57
    IgorFedchenko synchronize #4032
  • Nov 15 22:35
    Aaronontheweb commented #4032
  • Nov 15 20:26
    IgorFedchenko synchronize #4032
  • Nov 15 20:24
    IgorFedchenko commented #4032
  • Nov 15 20:06
    IgorFedchenko synchronize #4032
Bartosz Sypytkowski
@Horusiath
ok, this is a bug
Vagif Abilov
@object
I have configured Wire as serializer, and as you can see that it casts to Newtonsoft.Json
Bartosz Sypytkowski
@Horusiath
I thought, we removed that line some time ago
Vagif Abilov
@object
So the workaround is to get rid of this line and compile from sources?
Zetanova
@Zetanova
This GC Collections test of PerfUtil for Gen0-2 looks interesting
Bartosz Sypytkowski
@Horusiath
@object yes, cause this line was part of workaround, we've made for json.net not being able to properly deserialize some of the f# types
Vagif Abilov
@object
I see. Should I create an issue for that or you will take care of this?
Bartosz Sypytkowski
@Horusiath
please set an issue, I have a limited time for last few months and I could forget that
Vagif Abilov
@object
OK. Should I submit a PR if this is only about removing the line? (If the fix requires a bigger effort, I am afraid I am too new to internals to handle it quickly).
Bartosz Sypytkowski
@Horusiath
as you'll see this is not only a single line
but you could play with it anyway
Vagif Abilov
@object
Yes I already see it's not a single line. But I'll see what I can do.
Bartosz Sypytkowski
@Horusiath
Akka.FSharp API is small, and part of responsible for serialization hack is even smaller
Vagif Abilov
@object
Further investigating F#/Wire persistence problem. It's not only Akka.Persistence.FSharp but also Akka.FSharp that has expectations about JSON.NET as the serializer.
And there is tryDeserializeJObject that is dependent on Newtonsoft.Json.Linq.JObject etc.
But I am not able to provoke an error if I get rid of this stuff and replace with general Akka.Serializer type and FromBinary method call.
So if you are aware of some test that shows necessity for tryDeserializeJObject let me know. As for now, I got rid of this function and its calls and my persistent actors seem to work (I also tested them with the F# persistence example included in Akka solution).
to11mtm
@to11mtm

Hey folks, I have a question about the Simple.Cluster.Transformation sample. I Attempted to set it up such that I have the 'backends' and the frontend running on a second computer (server) , and the client computer is just running a frontend. If I shut down the client, I get some complaints that it is unreachable on the server, but eventually the auto-down-unreachable downs them. If I bring the client back up, everything's back to normal.

However, if I shut the SERVER down, The client can never talk to the server again, even if I bring the server back up... Any ideas as to what I'm doing wrong?

My HOCON looks like this:

akka {
            actor {
              provider = "Akka.Cluster.ClusterActorRefProvider, Akka.Cluster"
            }

            remote {
              log-remote-lifecycle-events = DEBUG
              helios.tcp {
                hostname = "NODE" //CLIENT, or SERVER, depending on where it is run
                port = 65530
              }
            }

            cluster {
              seed-nodes = [
                "akka.tcp://ClusterSystem@SERVER:2551",
                "akka.tcp://ClusterSystem@SERVER:2552"]

              auto-down-unreachable-after = 2s
            }
          }
Bartosz Sypytkowski
@Horusiath
@to11mtm in order to join the cluster, node must know at least one other node being part of it already. Quite probably in your example, server is the node which establishes a cluster, while client is the one which tries to join it. Since node cannot join to cluster, because it's connection is unreachable (server if down), it's marking it as a failing endpoint
Kamil Wojciechowski
@aph5nt
huston... I decided to create new project and use akka1.0.7 + F#. I have created a dummy persistance actor ( https://gist.github.com/aph5nt/8616368185202fcc58808faa82e0fb41) and I got the following error
System.MissingMethodException : Method not found: 'Void Aggregate3..ctor(!2, Microsoft.FSharp.Core.FSharpFunc2<Eventsourced`3<!0,!1,!2>,Microsoft.FSharp.Core.FSharpFunc2<!2,Microsoft.FSharp.Core.FSharpFunc2<!1,!2>>>, Microsoft.FSharp.Core.FSharpFunc2<Eventsourced3<!0,!1,!2>,Microsoft.FSharp.Core.FSharpFunc2<!2,Microsoft.FSharp.Core.FSharpFunc2<!0,Microsoft.FSharp.Core.Unit>>>)'.
at CryptoGames.Game.Mines.Actors.Runa
I have also tried with 'normal' functions declarations ( eg. let execute mailbox state command = () )
did anyone have the same problem ???
Bartosz Sypytkowski
@Horusiath
@aph5nt this sounds like some versioning problem on the F# side (like most of the F# MissingMethodException do)
Kamil Wojciechowski
@aph5nt
@Horusiath runtime is set to 4.4.0.0 and im targeting framework 4.5.2 + referenced fsharp.core from packages (instead of program files)
ok, i will create new standalone console proj
and check it again
to11mtm
@to11mtm
@Horusiath Is there a way to attempt to 're-join' without restarting the entire actorsystem?
Bartosz Sypytkowski
@Horusiath
you need to know the list of nodes, that will be used to join/create the cluster
Kamil Wojciechowski
@aph5nt
@Horusiath ok, in f# console app it works
Bartosz Sypytkowski
@Horusiath
one of the common patterns is to have at least single node that is serves only as connection endpoint with well known address. It doesn't need to perform any work out there, it just needs to be present (see lighthouse project)
to11mtm
@to11mtm
@Horusiath : I will give that a try. As I'm learning the clustering pieces and moving forward, I'm continually reminded of your blog post comment about monads =)
to11mtm
@to11mtm
@Horusiath : THANK YOU! Lighthouse as the middleman does the trick like a charm
Kamil Wojciechowski
@aph5nt
@Horusiath it was R# issue :(
ilhadad
@ilhadad

Guys I am having an issue with with an ask. This is the code making the ask. This code resides in one node:

SupervisorRegistryGetListRequest request = new SupervisorRegistryGetListRequest(Self);
            //Make the ask
            _SupervisorRegistry.Ask<SupervisorRegistryGetListResponse>(request).ContinueWith<SupervisorRegistryGetListEvent>(taskResponse =>
            {
                SupervisorRegistryGetListResponse r = taskResponse.Result as SupervisorRegistryGetListResponse;
                if (taskResponse.IsFaulted)
                {
                    return new SupervisorRegistryGetListEvent(request, r, false);
                }
                return new SupervisorRegistryGetListEvent(request, r, true);
            }).PipeTo(Self);

and the config is:

akka {
                    # here we are configuring log levels
                    log-config-on-start = off
                    stdout-loglevel = DEBUG
                    loglevel = DEBUG

          // Define an Nlog logger for the Akka system
          loggers = ["Akka.Logger.NLog.NLogLogger, Akka.Logger.NLog"]

            actor {
              provider = "Akka.Cluster.ClusterActorRefProvider, Akka.Cluster"
            }

            remote {
                            log-remote-lifecycle-events = DEBUG
                            log-received-messages = on

            helios.tcp {
                                transport-class = "Akka.Remote.Transport.Helios.HeliosTcpTransport, Akka.Remote"
                                applied-adapters = []
                                transport-protocol = tcp
                                #will be populated with a dynamic host-name at runtime if left uncommented
                                #public-hostname = "POPULATE STATIC IP HERE"
                                hostname = "127.0.0.1"
                                port = 8777
              }
            }
}

and this is the code replying to the ask resides on a different node:

            Receive<SupervisorRegistryGetListRequest>(r => HandleGetListRequest(r));
... more code here...
 private void HandleGetListRequest(SupervisorRegistryGetListRequest r)
        {
            ImmutableDictionary<MicroServices.Area,IActorRef> immutableDictOfSupervisorsActors = 
                _KnownSupervisorsActors.ToImmutableDictionary(kvp => kvp.Key, kvp => kvp.Value.SupervisorActorReference);

            r.Requestor.Tell(new SupervisorRegistryGetListResponse(r.Requestor,immutableDictOfSupervisorsActors,r));

        }

and it's config is:

akka {
                    # here we are configuring log levels
                    log-config-on-start = off
                    stdout-loglevel = DEBUG
                    loglevel = DEBUG

          // Define an Nlog logger for the Akka system
          loggers = ["Akka.Logger.NLog.NLogLogger, Akka.Logger.NLog"]

          // Enables connectivity to the remote ActorSystemBridge
          actor {
            provider = "Akka.Cluster.ClusterActorRefProvider, Akka.Cluster"
            debug {
              receive = on
              autoreceive = on
              lifecycle = on
              event-stream = on
              unhandled = on
            }

          }

          remote {
            log-remote-lifecycle-events = DEBUG
            helios.tcp {
                transport-class = "Akka.Remote.Transport.Helios.HeliosTcpTransport, Akka.Remote"
                transport-protocol = tcp
                port = 8888
                hostname = "127.0.0.1"
            }
          }
}

The receive is being triggered, however, the message never gets back to the ask. Not sure what's wrong. How can I check what is happening with the reply?

ilhadad
@ilhadad
One more additional piece of info. The following code defines the _SupervisorRegistry IActorRef:
                        _ActorSystem.ActorSelection("akka.tcp://" + SSAActorSystem.ActorSystemName + "@127.0.0.1:8888/user/SupervisorRegistry")
                            .ResolveOne(TimeSpan.FromSeconds(3))
                            .Result;
Bartosz Sypytkowski
@Horusiath
@ilhadad
  1. If the message has been send but not received, you should be able to see it in DeadLetters.
  2. In the config you've specified, you're using cluster actor ref provider, but there is no cluster seed nodes section specified.
  3. I don't get, why are you using Ask pattern here - it looks like a book example for publish/subscribe model.
Vagif Abilov
@object

@Horusiath do you think FsApi still needs JSON.NET hack or it can be replaced with generic code. In particular I mean replacing the code:

            let serializer = context.System.Serialization.FindSerializerForType typeof<'Message> :?> Akka.Serialization.NewtonSoftJsonSerializer
            match Serialization.tryDeserializeJObject serializer.Serializer o with
            | Some m -> m
            | None -> raise (InvalidCastException("Tried to cast JObject to " + typeof<'Message>.ToString()))

with code:

            match o with
            | :? (byte[]) as bytes -> 
                let serializer = context.System.Serialization.FindSerializerForType typeof<'Message>
                serializer.FromBinary(bytes, typeof<'Message>) :?> 'Message
            | _ -> raise (InvalidCastException("Tried to cast object to " + typeof<'Message>.ToString()))
I replaced such JSON.NET-specific code with more generic and my persistent actors work. But I wonder if I missed some special case.
Bartosz Sypytkowski
@Horusiath
push the PR, I'll review it later today
Vagif Abilov
@object
OK
Bartosz Sypytkowski
@Horusiath
it will be easier to spot the possible problems this way
Vagif Abilov
@object
Sure, will push it ASAP.
Jari Pennanen
@Ciantic
Is the typed actors structurally typed? I mean I can just define my dummy class in another app without referencing some single source of types?
Zetanova
@Zetanova
@Ciantic The akka asm's need to be linked and the base classes used.
Jari Pennanen
@Ciantic
okay, so they need single source of types
Zetanova
@Zetanova
The typed actor is utializing the named methods by reflection for message handling
Jari Pennanen
@Ciantic
I imagine some structurally typed listener would be useful, one wouldn't need to agree on anything but the fields and the connection string
Zetanova
@Zetanova
but i think u can easly make an actorbase type that will use an unlinked type to handle messages
i think the feature to handle messages by reflection is now in some kind of helper class