These are chat archives for akkadotnet/akka.net

19th
Jul 2016
Aaron Stannard
@Aaronontheweb
Jul 19 2016 02:22
@ronnyek Akka.Cluster is solid now
1.1
haven't updated lighthouse at all
@maxcherednik I've nuked a ton of those errors
honestly they're benevolent
it's just the remoting system turning itself off; uses sup hierarchy to clean up
Ricky Blankenaufulland
@ZoolWay
Jul 19 2016 08:18
Has anyone build an Akka.DI for Microsoft.Extensions.DependencyInjection (DI framework provided by .NET Core)?
Bart de Boer
@boekabart
Jul 19 2016 08:30
@ZoolWay check out akkadotnet/akka.net#2153
Vagif Abilov
@object
Jul 19 2016 09:53
Hi, I am revising restart scenario for an actor that encapsulates MQ connections and need to restore its subscribers (also actors) on restart. Originally I thought of having a collection of IActorRef representing subscriber references that would be used to re-establish subscriptions on publisher restart. But these actors may also be restarted (or stopped) at some point. Would it be more robust to use actor paths instead of IActorRef? Or does IActorRef has ability to point to a new instance of an actor in case it's been restarted?
Marc Piechura
@marcpiechura
Jul 19 2016 09:56
@object the IActorRef is valid even if the underling actor is restarted
Vagif Abilov
@object
Jul 19 2016 09:57
@Silv3rcircl3 Oh I see, then I guess this the one to hold on.
Ricky Blankenaufulland
@ZoolWay
Jul 19 2016 11:52
Not sure from the docs. Is it best practice to create child actors/routers in the constructor or in PreStart()? Having Context.ActorOf in PreStart will create new childs on every start/restart - the inherited PreRestart() stops all children so this seem the right way as normally they would not be re-created when the creation is done in the constructor, right?
Bart de Boer
@boekabart
Jul 19 2016 12:16
Yes they would, on restart the actor is re-instantiated. Only the ActorRef survives, not the class instance
Ricky Blankenaufulland
@ZoolWay
Jul 19 2016 13:18
Do you believe there is a benefit in setting the child references to ActorRefs.Nobody in PostStop()?
Bartosz Sypytkowski
@Horusiath
Jul 19 2016 13:57
@ZoolWay minimal
Arjen Smits
@Danthar
Jul 19 2016 14:50
Porting some of my build process to Fake. I dare say, its beginning to grow on me :P
Valeriy Reutskiy
@vvreutskiy
Jul 19 2016 15:10
Hi there! How can I disable ipv6 in akka? When i set akka.remote.helios.tcp.hostname = "0.0.0.0", akka.remote.helios.tcp.port = 18091 and akka.remote.helios.tcp.dns-use-ipv6 = false in config, akka opens port 0.0.0.0:18091, but in tcp6 protocol, as i see it with "netstat -natp" on my docker container.
masteryee
@masteryee
Jul 19 2016 15:59
Hi, with no persistence configuration I can use a PersistentFSM to save events and replay the events to recover my data when I kill then restart my actor. However I have no idea how to get snapshots to load correctly. I can save the snapshot and I get the SaveSnapshotSuccess message, but during recovery it just says "Error loading snapshot". I've tried leaving events alone and also calling DeleteMessages when I save the snapshot. I also never see a SnapshotOffer message come through to the ReceiveRecover method even though the docs state it should come through. Any ideas what I'm missing here? Using Akka 1.1.1.
Ivan R. Perez
@irperez
Jul 19 2016 16:17
To anyone, should I use the latest version of the WIRE serializer for the akka.cluster? 0.7.1? Or stick with the default 0.0.6?
Arjen Smits
@Danthar
Jul 19 2016 16:18
There is an issue with Wire atm. Its being worked on. I would advise to stick with 0.0.6 for now. (right @rogeralsing ?)
Roger Johansson
@rogeralsing
Jul 19 2016 16:20
Yes. Or recompile the Akka.wire adapter from the repo. Wire 0.7.1 is out and fixed
The Akka adapter is not republished
Ivan R. Perez
@irperez
Jul 19 2016 16:32
Ok, thats what i needed, thanks!
Aaron Stannard
@Aaronontheweb
Jul 19 2016 16:48
@vvreutskiy read the 1.1.1 release notes
or even better, upgrade to 1.1.1
we disabled IPV6 as the default
and reverted back to IPV4
released that on Friday
Akka.NET still supports IPV6
but the DNS now uses IPV4 by default again
for backwards compatibility purposes
and also because there's a lot of hardware out there, particularly on-prem stuff, that doesn't fully support IPV6 still
including some ISPs, believe it or not
Aaron Stannard
@Aaronontheweb
Jul 19 2016 17:05
@wdspider actually I think IWithBoundedStash should work now... need a spec to verify. Pretty sure our mailbox changes in 1.1 added correct support for that
wdspider
@wdspider
Jul 19 2016 17:08
It's currently marked with [Obsolete("Bounded stashing is not yet implemented. Unbounded stashing will be used instead")] which was the source of my confusion (mostly cause I thought the obsolete tag was new in 1.1 but now that I've had time to reflect on it, I'm not sure that's actually true)
Ivan R. Perez
@irperez
Jul 19 2016 17:09
@wdspider I looked into bounded stashing last year, but I ran into a wall because the mailbox system was not setup for it.
Aaron Stannard
@Aaronontheweb
Jul 19 2016 17:09
the obsolete tag has been there since 1.0
we redid the mailbox configuration system in 1.1
Ivan R. Perez
@irperez
Jul 19 2016 17:09
If the mailbox is setup, it shouldn't be hard to setup bounded stashing.
Aaron Stannard
@Aaronontheweb
Jul 19 2016 17:09
should be able to support it now
wdspider
@wdspider
Jul 19 2016 17:10
cool.... I don't like the idea of eating all my memory in the Stash, so that's why I was planning on just using the Interface and picking up the implementation if you fully fleshed it out
as a bit of future proofing
Aaron Stannard
@Aaronontheweb
Jul 19 2016 17:11
best thing to do would be to send in a pull request
along with a bounded stash spec
to verify that the stash blocks or throws an exception or purges an old message
when it reaches its capacity
I don't remember what it's supposed to do anymore
lol
Arsene T. Gandote
@Tochemey
Jul 19 2016 17:14
Hello Gentlemen I would like to know how can I use the Akka Persistence feature to store some data into a redis db. So far I have seen some implementations that are labelled beta. I think I can use the Akka Persistence API to do it. However I do not have any tutorial to start with. Can anyone advice me on that?
wdspider
@wdspider
Jul 19 2016 17:18
sounds good.... I'm def. looking to getting my feet wet with small contribs like that "soon-ish" when rl is scheduled to calm down some..... I'm deeply appreciative of the people that have make the framework possible so far as rl doesn't always play nice :)
@Tochemey This article is a little old, but it helped me understand the persistence concepts a bit better myself: http://bartoszsypytkowski.com/how-akka-net-persistence-works/
Arsene T. Gandote
@Tochemey
Jul 19 2016 17:27
Does the Akka.Persistence is meant to store any data into a DataStore like RDMS and so or only for the use of storing Actors state?
masteryee
@masteryee
Jul 19 2016 17:34
Ignore my previous question about Snapshots: user error. My state data was immutable and had no parameterless constructor so it couldn't deserialize the object. Would have been nice to see a deserialization exception in the log instead of just "Error loading snapshot"
ilhadad
@ilhadad
Jul 19 2016 17:39
Guys what do you use to track bugs that is integrated with Visual Studio? Any suggestions?
Bartosz Sypytkowski
@Horusiath
Jul 19 2016 17:41
@Tochemey Akka.Persistence is build around concept of Eventsourcing, which is a little more advanced way to working with data. If you want to "just" store your actor's state, you can do that simply by yourself
Arsene T. Gandote
@Tochemey
Jul 19 2016 18:02
@All Can someone have a good starting point on Event Sourcing. I have seen the EventSourcing page on Github. However I need a tutorial that help those of us from RDMS background.
masteryee
@masteryee
Jul 19 2016 18:04
anyone know how to correctly apply a Snapshot in a PersistentFSM so that the data is fully recovered AND the state machine is in the correct state? When I saved the domain events and applied them, they recovered the data and ended up on the correct state, but I don't see how to do that with a Snapshot.
Bartosz Sypytkowski
@Horusiath
Jul 19 2016 18:05
@Tochemey
  1. There is a bunch of Greg Young talks about eventsourcing (he was somewhat the inventor and evangelist of that concept) - example.
  2. There is a series on MSDN introducing Eventsourcing pattern 1 and 2
@yeejuto Akka.Persistence is not meant to be used with snapshotting alone - snapshotting is only optimization for event journal replays
masteryee
@masteryee
Jul 19 2016 18:09
@Horusiath To clarify, do you mean I need to implement my own way to restore the correct state? That snapshotting optimizes event journal replays but takes out the part about what state the machine was on during the last replay?
Bartosz Sypytkowski
@Horusiath
Jul 19 2016 18:12
@yeejuto are you saying, that after recovering from snapshot and events, your PersistentFSM is in wrong state?
Arsene T. Gandote
@Tochemey
Jul 19 2016 18:13
@Horusiath I have not asked such question.
I think it is @yeejuto
Bartosz Sypytkowski
@Horusiath
Jul 19 2016 18:14
yes, sorry
Arsene T. Gandote
@Tochemey
Jul 19 2016 18:14
Never mind
masteryee
@masteryee
Jul 19 2016 18:21
@Horusiath Well first off, I'm not applying the snapshot correctly; I get the SnapshotOffer message, but don't know what to do with it. I assumed I would do something like ApplyState(new State()), but I don't know how to determine what the correct state is based on the snapshot. The events are gone because I called DeleteMessages when I saved the snapshot, so I only have the snapshot to go off of. So my question is, what would you do with the SnapshotOffer? I'm going to test and see what happens if I just apply it to the state that I know it should be in and see if it works.
Bartosz Sypytkowski
@Horusiath
Jul 19 2016 18:40
ok, I see that this part is missing. I'll set an issue for tha
actually, Alex has already did that: akkadotnet/akka.net#2204
Peter Bergman
@peter-bannerflow
Jul 19 2016 18:44
Reading the UnboundedPriorityMailbox, what does it mean that this mailbox is blocking? http://getakka.net/docs/working-with-actors/Mailbox#unboundedprioritymailbox
Maxim Cherednik
@maxcherednik
Jul 19 2016 18:55
@maxcherednik I've nuked a ton of those errors
@Aaronontheweb even though I guess usual shutdown should be clean if everything went ok. For instance, we do have a monitoring system, which tracks ERROR level, so every time we stop the service, our operations will be false positively notified.
masteryee
@masteryee
Jul 19 2016 19:03
Thanks @Horusiath
Aaron Stannard
@Aaronontheweb
Jul 19 2016 20:19
@maxcherednik filter those out on your end then. Look for the "shutdownassociation" term
I don't know where all of that stuff is getting logged. Caught most of the places inside Helios and the remoting actors themselves
might be something lower inside Akka core that catches thrown exceptions and logs them
which is what I think is logging it
and we're not going to rewrite that to solve a DevOps problem for one edge case
even if it's one that occurs regularly
Maxim Cherednik
@maxcherednik
Jul 19 2016 20:27
got it
thank you
qwoz
@qwoz
Jul 19 2016 20:49
is Self.Tell(PoisonPill.Instance) deprecated in favor of Self.GracefulStop(...)?
Weston
@ronnyek
Jul 19 2016 21:01
is lighthouse required for Akka.Cluster?
wdspider
@wdspider
Jul 19 2016 21:03
no, I am currently using my own implementation of a seed node. Having at least 2 seed nodes is generally recommended though.
Weston
@ronnyek
Jul 19 2016 21:04
meaning you built your own version of a lighthouse, or Akka.Cluster has stuff that helps fascilitate that
wdspider
@wdspider
Jul 19 2016 21:05
I built my own version of a lighthouse as I didn't need things it was doing, but also needed some custom stuff for my project
Weston
@ronnyek
Jul 19 2016 21:06
comemnts about it not being developed made me wonder if its no longer necessary and there are other out of box things that do the same thing
wdspider
@wdspider
Jul 19 2016 21:08
I think @Aaronontheweb (the lighthouse creator) is just busy...... but, the seed node concept is technically not required for Akka.Cluster.... it's just a recommended future-proofing for when your cluster grows and starts to have several roles
Arjen Smits
@Danthar
Jul 19 2016 21:08
The reason its not being developed is because it does not need to, besides being updated to reference the latest akka version
wdspider
@wdspider
Jul 19 2016 21:09
the seed nodes help ensure that you always have at least 2 well-known (i.e. the addresses to them are known by the other nodes) nodes within your cluster
Arjen Smits
@Danthar
Jul 19 2016 21:10
@ronnyek Lighthouse does what it was envisioned to do. So in that regards its "done". Unless there are Akka.net public api changes or something, it does not need any updates anymore, besides referencing the latest akka.net version.
Aaron Stannard
@Aaronontheweb
Jul 19 2016 21:20
@ronnyek I got a PR upgrading lighthouse to 1.1.1 today
merged it in
but yeah, @wdspider is right - I need a reactive stream to manage my workload in real life so I can start sending some backoff messages to the producers :p
Bart de Boer
@boekabart
Jul 19 2016 21:25
Neh, you need to stop that reactive stream, and start polling again when you have time and energy :)
Weston
@ronnyek
Jul 19 2016 21:51
the problem was that I'd pull my lighthouse nodes for a moment, and the nodes would never reconnect back to one another (I seem to recall something about nodes specifically marking the other nodes bad on purpose)
to11mtm
@to11mtm
Jul 19 2016 23:45

Hey Folks! Have a question for probably @Horusiath and @Aaronontheweb primarily. I'm working on getting the Oracle persistence provider up to 1.1.1 level, finding that I'm going to have to do some substantial reworking.

So uhh, I guess the tl;dr is I figure my best shot is to do some borrowing from the SQLite implementation in contrib, but I'm not sure how to properly attribute that, doubly so since I'd rather not re-fork.