These are chat archives for akkadotnet/akka.net

7th
Sep 2017
eyantiful
@eyantiful
Sep 07 2017 07:38
Hi everyone,
Is it mandatory in Akka.Net cluster to have a Seed Node/s?
Or is it possible to join via any node pro grammatically ("You can join to any node in the cluster. It does not have to be configured as a seed node" Akka docs)?
Nick Cuthbert
@ncthbrt
Sep 07 2017 08:09
@eyantiful You need at the very minimum one seed node (though at least three is preferred). The seed node allows discovery of the other node in the cluster
A seed node can also have other roles as well however
Alex Michel
@amichel
Sep 07 2017 08:20
After upgrading to 1.3.1 and switching serializer from wire to Hyperion, I get this exception at ClusterSharding.Get(system) :
Attempt by method 'Akka.Cluster.Sharding.Serialization.ClusterShardingMessageSerializer..ctor(Akka.Actor.ExtendedActorSystem)' to access method 'Akka.Serialization.SerializerIdentifierHelper.GetSerializerIdentifierFromConfig(System.Type, Akka.Actor.ExtendedActorSystem)' failed.
My config looks like:
provider = "Akka.Cluster.ClusterActorRefProvider, Akka.Cluster"
serializers {
wire = "Akka.Serialization.HyperionSerializer, Akka.Serialization.Hyperion"
}
serialization-bindings {
"System.Object" = wire
}
no special entries or custom fallbacks for sharding
eyantiful
@eyantiful
Sep 07 2017 08:35
@ncthbrt , i understand, wanted to know if i can remove this dependency ( having extra process, handle first in list of seed started prior to others etc.) . as far as i understand Akka (java) docs seed is not mandatory to establish a cluster, wanted to know if the same behavior was ported as well....
Joshua Garnett
@joshgarnett
Sep 07 2017 11:11
@eyantiful you always need one seed node, but the seed node can be the application itself.
        # Configure Akka.Remote module
        remote {
          dot-netty.tcp {
              port = 8091
              hostname = "127.0.0.1"
          }
          log-remote-lifecycle-events = INFO
        }

        # Configure Akka.Cluster module
        cluster {
          seed-nodes = ["akka.tcp://Cluster@127.0.0.1:8091"]
        }
That’s how my setup looks like
Just make sure the ports and actor system name matches
vicosoft4real
@vicosoft4real
Sep 07 2017 11:26
I don't know what i am doing wrong. My system could not connect to seed node.
here is my configuration:
[12:16:50 INF] akka : {
loglevel : DEBUG
loggers : ["Akka.Logger.Serilog.SerilogLogger, Akka.Logger.Serilog"]
log-config-on-start : on
stdout-loglevel : DEBUG
actor : {
serializers : {
wire : "Akka.Serialization.HyperionSerializer, Akka.Serialization.Hyperi
on"
}
serialization-bindings : {
System.Object : wire
}
provider : "Akka.Cluster.ClusterActorRefProvider, Akka.Cluster"
}
remote : {
helios : {
tcp : {
transport-class : "Akka.Remote.Transport.Helios.HeliosTcpTransport, Ak
ka.Remote"
applied-adapters : []
transport-protocol : tcp
port : 0
hostname : 127.0.0.1
}
}
}
cluster : {
seed-nodes : ["akka.tcp://EduSaaSSystem@127.0.0.1:4053"]
}
Joshua Garnett
@joshgarnett
Sep 07 2017 11:30
You have port specified as 0 for remoting
That should probably be 4053, to match up what is trying to be connected to by the seed node
Alex Valuyskiy
@alexvaluyskiy
Sep 07 2017 11:41
@amichel It is a bug which was introduced in 1.3.0. Could you create an issue please?
vicosoft4real
@vicosoft4real
Sep 07 2017 11:49
@joshgarnett Thanks. It's up now. I now have these messages : [12:40:28 INF] Node [akka.tcp://EduSaaSSystem@127.0.0.1:4053] is JOINING, roles
[]
[12:40:28 INF] Leader is moving node [akka.tcp://EduSaaSSystem@127.0.0.1:4053] t
o [Up]
But my system wasn't welcome into the cluster. i am following Simon Anderson tutorial in pluralsight.
Joshua Garnett
@joshgarnett
Sep 07 2017 11:54
I’m not sure I follow the last comment, those logs make it sound like the cluster is up and running with a single node cluster
vicosoft4real
@vicosoft4real
Sep 07 2017 11:55
this is lighthouse configuration: lighthouse{
actorsystem: "EduSaaSSystem" #POPULATE NAME OF YOUR ACTOR SYSTEM HERE
}
                akka {
                    actor { 
                        provider = "Akka.Cluster.ClusterActorRefProvider, Akka.Cluster"
                    }

                    remote {
                        log-remote-lifecycle-events = DEBUG
                        dot-netty.tcp {
                            transport-class = "Akka.Remote.Transport.DotNetty.TcpTransport, 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 = "0.0.0.0"
                            port = 4053
                        }
                    }            

                    loggers = ["Akka.Logger.NLog.NLogLogger,Akka.Logger.NLog"]

                    cluster {
                        #will inject this node as a self-seed node at run-time
                        seed-nodes = ["akka.tcp://EduSaaSSystem@127.0.0.1:4053"] #manually populate other seed nodes here, i.e. "akka.tcp://lighthouse@127.0.0.1:4053", "akka.tcp://lighthouse@127.0.0.1:4044"
                        roles = [lighthouse]
                    }
                }
Weston
@ronnyek
Sep 07 2017 14:23
ok... more questions about streams
Weston
@ronnyek
Sep 07 2017 14:31
I guess execution strategy, is the model always that you use materializer to materialize a graph, and that returns a ActorRef?
Seems like I've seen examples of runnablegraphs where I have no idea where the graph itself gets executed (they were just partial references)
the website scraper seems to materialize and store a ref to the actor on another actor, and feeds the graph input with .tell()
the twitter thingy seems to just kinda run it inline.. .no idea what the sttream from the twitter api looks like
Weston
@ronnyek
Sep 07 2017 14:37
and per my question yesterday if I was looking ot build something like red node (I realize the materializer and graphdsl stuff still do things via fluent builders) would the components themselves just be graph stages where I might have a GraphStage<SourceShape<int>> for a source component
Bartosz Sypytkowski
@Horusiath
Sep 07 2017 15:20
@ronnyek all execution is essentially done when a runnableGraph.Run(materializer) is called - this is the point when the graph it's actually constructed and started
also GraphStage is quite a low level API - it allow to build a custom logic using ideas of picking data from inputs and putting them in outputs
you may need it eventually, but it's not a must in most cases
Michal Dabrowski
@defrag2_twitter
Sep 07 2017 15:35
Hey guys, i have some questions regarding handling and restoring of persistent actors.
Lets say i have 10k of persistent actors, P1...P1000. They are all under the supervision
of actor S. Now in other part of system, im retrieving some data from one of Px actors based on some inputs.
Is the best practice selecting them by selection or should supervisor S store somehow the map
of those child actors and reference them? Additionally when deploying new version of application and stopping all
of the P actors first, what are the best practices of bringing them back to life? All at once or
only if they are requested? If all at once i should store some data in order to recreate them. Cant find any resources on that. Thanks :)
Joshua Garnett
@joshgarnett
Sep 07 2017 15:37
If you can, only load the persistent actors on demand, if only because that can put significant strain on your database loading a large number of persistent actors at once
Cluster Sharding abstracts a lot of what you are trying to do here
Michal Dabrowski
@defrag2_twitter
Sep 07 2017 15:42
thanks, havent dig into cluster yet, probably will have to soon, so i'll dig
Andrew Young
@ayoung
Sep 07 2017 17:17
if a node unexpectedly terminates on a cluster and another node spins up in its place on the same port, will the previous node still be considered unreachable?
i'm 85% sure that's a yes...
Joshua Garnett
@joshgarnett
Sep 07 2017 17:18
I need to follow up on the akka.net impl, but each instance should have a unique id when it spins up
So even though its on the same host/port its considered a new node in the cluster
Andrew Young
@ayoung
Sep 07 2017 17:19
right...
Weston
@ronnyek
Sep 07 2017 17:30
@Horusiath well I want to effectively publish those components with metadata, ultimately allowing you to drag drop them and chain them together, save the layout and load later. Seems like the GraphStage lets you do exactly that... describe the shape of the component and its inputs and outputs and what to do on data in/out
Marc Piechura
@marcpiechura
Sep 07 2017 17:43
@ronnyek you can do this with normal source / flows / sinks / graphs as well, they are all only blueprints until you call Run

var someChainedFlowActions = Flow.Create<Input>().Where().SelectAsync().....

At some point you can than do something like mySource.Where().Select( Input ).Via(someChainedFlowActions).RunWith(someSelectedSink, materializer)

GraphStages are useful if you want to implement something like Where, Select or custom sources/sinks for third party services, i.e. Azure, Kafka, files...
Anders Storhaug
@andersstorhaug
Sep 07 2017 21:10
Anyone have success with cluster sharding on 1.3.1? Reincarnation isn't working for me, using SQLite and single seed node. Have checked configs several times, though I may try from scratch to make sure configs are correct
Aaron Stannard
@Aaronontheweb
Sep 07 2017 21:10
@andersstorhaug it should all be working on 1.3.1
file an issue
with details if you think you've run into a bug
Anders Storhaug
@andersstorhaug
Sep 07 2017 21:11
Ok, will try a few more things first
Thanks for the confirmation though. It may very well be a config issue on my side
Anders Storhaug
@andersstorhaug
Sep 07 2017 22:06
Yep, with fresh sandbox project on 1.3.1 everything worked as expected
Arsene T. Gandote
@Tochemey
Sep 07 2017 22:37

Hello I am getting the following exception and it is the first time:

MissingMethodException: Method not found: 'Void Hyperion.SerializerOptions..ctor(Boolean, Boolean, System.Collections.Generic.IEnumerable`1<Hyperion.Surrogate>, System.Collections.Generic.IEnumerable`1<Hyperion.SerializerFactories.ValueSerializerFactory>, System.Collections.Generic.IEnumerable`1<System.Type>)'.

Please any idea abt it?

I got during the creation of the ActorSystem
Arsene T. Gandote
@Tochemey
Sep 07 2017 22:55
This exception stack:
System.Reflection.TargetInvocationException occurred
  HResult=0x80131604
  Message=Exception has been thrown by the target of an invocation.
  Source=mscorlib
  StackTrace:
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, Object[] args)
   at Akka.Serialization.Serialization..ctor(ExtendedActorSystem system)
   at Akka.Actor.Internal.ActorSystemImpl..ctor(String name, Config config)
   at Akka.Actor.ActorSystem.Create(String name)


Inner Exception 1:
MissingMethodException: Method not found: 'Void Hyperion.SerializerOptions..ctor(Boolean, Boolean, System.Collections.Generic.IEnumerable`1<Hyperion.Surrogate>, System.Collections.Generic.IEnumerable`1<Hyperion.SerializerFactories.ValueSerializerFactory>, System.Collections.Generic.IEnumerable`1<System.Type>)'.
Arsene T. Gandote
@Tochemey
Sep 07 2017 23:09
Oops I discovered the issue. It was package versioning while I was doing nuget update without enable pre-releasing for Hyperion. So I was referencing a wrong version.