These are chat archives for akkadotnet/akka.net

19th
Feb 2018
Hyungho Ko
@hhko
Feb 19 2018 11:58
@Aaronontheweb @vasily-kirichenko thank you for your consideration about Spark.
https://www.nuget.org/packages/Akka.Quartz.Actor/ depends on .NET Framework 4.5.2.
do you have any plans to support Akka.Quartz.Actor based on .NET Framework 4.5?
Vasily Kirichenko
@vasily-kirichenko
Feb 19 2018 12:04
@hhko there were issues on production with Akka.Quartz.Actor
Hyungho Ko
@hhko
Feb 19 2018 12:04
I think there's no reason to depend on .NET Framework 4.5.2.
Onur Gumus
@OnurGumus
Feb 19 2018 12:08
I am seeing a weird behavior .Each time I create an actor My serialization settings are reset. Actually Serializer Object is being Set again
Does anyone know why?
Onur Gumus
@OnurGumus
Feb 19 2018 12:15
I hate Akka's internal methods and interfaces
Onur Gumus
@OnurGumus
Feb 19 2018 12:47
OMG! loading event journal causes all serializers to be reloaded in actor system
I mean the read journal
Onur Gumus
@OnurGumus
Feb 19 2018 13:03
When ever a persistence actor is created
it forces the serialization settings to be reloaded
this doesn't sound right
Ondrej Pialek
@ondrejpialek
Feb 19 2018 13:11
@OnurGumus probably best to submit an isssue to the GitHub repo page with steps to reproduce?
Bartosz Sypytkowski
@Horusiath
Feb 19 2018 16:07
@OnurGumus this sounds like a serious issue
Onur Gumus
@OnurGumus
Feb 19 2018 16:39
@Horusiath I think this is by design.
There is an internal interface : ISupportSerializationConfigReload
Bartosz Sypytkowski
@Horusiath
Feb 19 2018 16:40
"broken by design" ;)
Onur Gumus
@OnurGumus
Feb 19 2018 16:41
When ever you create a new persistence actor instance (not sure if always perhaps once per type), that ctor triggers this.
this in turn calls the private method of ActorSystemImpl
private void ConfigureSerialization()
{
    this._serialization = new Serialization(this);
}
so if somehow you customized your serializer programmatically , you lose the changes.
this is not an oversight and done deliberately but not sure if I understand the motivation
Bartosz Sypytkowski
@Horusiath
Feb 19 2018 16:45
if I remember correctly, the problem was that in the past a Persistence plugin might have not been created (+ actor system not configured to use persistence) when you were creating a persistent actor for the first time
nonetheless config reload on every new actor sounds like serious issue
Onur Gumus
@OnurGumus
Feb 19 2018 16:46
it has to do with persistence extensions. I have collected the full stack trace but not with me now
zbynek001
@zbynek001
Feb 19 2018 17:28
@OnurGumus I've added that ISupportSerializationConfigReload interface. It's called only inside InjectTopLevelFallback, so is something maybe calling that too often?
Onur Gumus
@OnurGumus
Feb 19 2018 17:31
@zbynek001 I think it is called first from this.<Extension>k__BackingField = Persistence.Instance.Apply(ActorBase.Context.System); in EventSourced.ctor
that in turn calls .RegisterExtension(this));
And that calls extension.CreateExtension(this)));
and that calls public PersistenceExtension(ExtendedActorSystem system)
{
this._system = system;
this._system.Settings.InjectTopLevelFallback(Persistence.DefaultConfig());
So it is triggered from EventSource.ctor
Bartosz Sypytkowski
@Horusiath
Feb 19 2018 17:36
@OnurGumus I've checked calling multiple persistent actors of multiple different types - serializers are created twice: once on actor system creation, then when Persistence plugin applies for first time. This works as designed, since plugins can introduce their own serializers at runtime and trigger actor system to recreate them
you can poke actor system to explicitly initialize all requested plugins right on the start from configuration
Onur Gumus
@OnurGumus
Feb 19 2018 17:38
how do I do that
zbynek001
@zbynek001
Feb 19 2018 17:40
@OnurGumus .RegisterExtension is caching the extensions, so CreateExtension will be called only once per type
Onur Gumus
@OnurGumus
Feb 19 2018 17:40
@zbynek001 I concur
but I find this behavior surprising
Bartosz Sypytkowski
@Horusiath
Feb 19 2018 17:41
akka {
  extensions = [ "Akka.Persistence.Persistence, Akka.Persistence" ]
}
Tbh I'll definitelly want to change this part in the future, once we'll introduce native dependency injection support
Onur Gumus
@OnurGumus
Feb 19 2018 17:41
Come to think of it, after actor creation you change your serializer settings and boom, it's gone suddently
took me few hours to find it out.
Bartosz Sypytkowski
@Horusiath
Feb 19 2018 17:43
@OnurGumus in most of the new frameworks you can encounter runtime configuration reloads - even Microsoft.Extensions.Configuration has reload tokens defined as part of the API
Onur Gumus
@OnurGumus
Feb 19 2018 17:45
Perhaps...
goti2
@goti2
Feb 19 2018 19:31
Hi everyone, how to use ask method in xamarin.forms
Maciek Misztal
@mmisztal1980
Feb 19 2018 19:32
Hey all, is there a code sample or tutorial on Akka.Cluster.Sharding?
Ondrej Pialek
@ondrejpialek
Feb 19 2018 19:34
@Horusiath is writing one... :)
Maciek Misztal
@mmisztal1980
Feb 19 2018 20:03
cheers
Kento
@robinsondotnet
Feb 19 2018 20:07
Is it possible to use Cluster or distributedData using Akka.TestKit?
I always get "Object reference not set to an instance of an object" when "DistributedPubSub.Get(Context.System).Mediator;" or "Cluster.Get(Context.System);" is being executed inside Actor's behavior.
Bartosz Sypytkowski
@Horusiath
Feb 19 2018 20:23
@robinsondotnet have you configured your test to work with cluster? (akka.actor.provider = cluster)
also, for cluster/ddata you probably should use multi node test kit
Kento
@robinsondotnet
Feb 19 2018 20:25
@Horusiath Should I use the app.config file for testkit or configure it with this.Sys.Settings.Config.WithFallback()?
The ActorSystem is provided by the TestKit, right?
Bartosz Sypytkowski
@Horusiath
Feb 19 2018 20:35
you can pass config into TestKit constructor
Kento
@robinsondotnet
Feb 19 2018 20:35
nice. thank you @Horusiath
goti2
@goti2
Feb 19 2018 20:40
Guys, tell me please how to use akka.net remote in Xamarin forms, and does it have a sense?
Maciek Misztal
@mmisztal1980
Feb 19 2018 21:42
Another question: can anyone explain how should I work with the PersistentFSM ? this example: https://github.com/akkadotnet/akka.net/blob/a478c5e8c8d5de97dcf7bcea7e2a80fbaa5e6cc8/docs/examples/DocsExamples/Persistence/WebStoreCustomerFSMActor.cs suggests that I do not need to call Persist, nor do I need to call Recover, does this mean that PersistentFSM is capable of recovering its state on its own?