These are chat archives for akkadotnet/akka.net

30th
Nov 2015
Chris Martin
@trbngr
Nov 30 2015 04:57
Man...I'm like the thread killer around these parts. ;)
Bartosz Sypytkowski
@Horusiath
Nov 30 2015 08:51
@trbngr I'd say, it's probable to have -pre of Akka.Cluster.Tools and Akka.Cluster.Sharding around new year, but it will be probably quite bleeding edge - from the other side, the sooner people will start using them, the sooner we'll find and fix the most critical bugs.
Marc Piechura
@marcpiechura
Nov 30 2015 09:16
Hi, I have a design question. I have a service with an akka system which imports some data into a azure table storage and now my plans are to build a client which receives push notifications when the service has imported a new item. Furthermore, the service should keep the last x imported items and send them to every "new" client. So my question is, is that a use case where clustering would work? I thought maybe every client would be a node and if a new item was imported, the service sends a message to every other node and on "node joins" send the last x items to only this node.
TonyLo1
@TonyLo1
Nov 30 2015 09:55
Hi, is there any way of using Akka.Monitoring with F# actors?
Bartosz Sypytkowski
@Horusiath
Nov 30 2015 10:01
@Silv3rcircl3 I don't know how big your cluster will grow as you will cover it over all clients, but each new client introduces a little overhead on the cluster itself. But your case seems, that it's solvable using direct datastore access or (if you really need to use akka) as combination of Akka.Persistence for storing events with persistent views or direct journal reads
@TonyLo1 you can basically join monitoring events on start/stop of an actor. Optionally if you use Akkling, you can have direct access to all actor's lifecycle events and invoke monitoring counters from there.
Marc Piechura
@marcpiechura
Nov 30 2015 10:08
@Horusiath maybe around 10 clients ;-) furthermore the service as well as the clients are in the same network. The main reason is, that I don't want to handle network or other connectivity issues by myself. Of course the client's could poll the service or a database, but I want to try a more "reactive" way ;)
Bartosz Sypytkowski
@Horusiath
Nov 30 2015 10:18
@Silv3rcircl3 you will need to pull that data anyway ;) you may i.e.. just build facade actor working as publisher, that will be used for storing all the events and buffering last of them X inside itself. Other parties are simply represented by other actors, that subscribe to it and receive buffered messages once subscribed. The problem itself is not associated with clustering ;)
Marc Piechura
@marcpiechura
Nov 30 2015 10:23
You mean something like, client sends subscribe message to pub sub actor from the service, receives last 10 buffered items and further imported items?
Bartosz Sypytkowski
@Horusiath
Nov 30 2015 10:24
yep, basically
Marc Piechura
@marcpiechura
Nov 30 2015 10:27
But then I need some sort of connectivity management if the client loses the connection to the service and therefore misses some updates
ping pong mybe ;)
Bartosz Sypytkowski
@Horusiath
Nov 30 2015 10:30
depending on how are you connecting the client, long running connections like akka.remote/cluster or websockets always expose some way to discover disconnected events
Marc Piechura
@marcpiechura
Nov 30 2015 10:32
that's exactly what I need, thanks a lot!
Bartosz Sypytkowski
@Horusiath
Nov 30 2015 10:33
yes, this is very atomic and works for the pair of two actors, one watching for another
TonyLo1
@TonyLo1
Nov 30 2015 13:06
@Horusiath, thanks, Akkling LifecycleEvents was what I needed - one problem I have not yet resolved is how to access NumberOfMessages in ActorCell, e.g. in C# this would be ((ActorCell)Context).NumberOfMessages but the ActorCell interface does not appear to be exposed in F# Actor. Any suggestions?
Marc Piechura
@marcpiechura
Nov 30 2015 14:24
@Horusiath if I restart the server, the client receives the following exception ( https://gist.github.com/Silv3rcircl3/d63be628b412aaebc5fb ) and never get's notified about the termination. Is this a expected behavior? If I stop the server and wait until the client receives the termination message, everything works fine.
LukePearce-agent3
@LukePearce-agent3
Nov 30 2015 15:05
Hi guys, I'm getting an error when I try and add a node to a cluster "error unable to cast object of type jobject", any ideas?
I think its just during the handshake, could be wrong though
blob
TonyLo1
@TonyLo1
Nov 30 2015 15:30
@Aaronontheweb, Akka.Monitoring.PerformanceCounters.ActorPerformanceCountersMonitor.Init(), if the performanceCounterCategory exists then new performance counters are not added. So adding a new custom metric does not appear in Perfmon unless you delete the entire category (in regedit, for example) - this was a little frustrating for a while!
Aaron Stannard
@Aaronontheweb
Nov 30 2015 16:16
handshake has already gone through at that point
so not sure what the issue is
@TonyLo1 I didn't write performance counter support - that was added via a contributor. But that sounds frustrating! Would you mind sending a pull request to update the README.md ?
Milan Jaric
@mjaric
Nov 30 2015 17:18
Hi. When akka.cluster stable release will take place?
TonyLo1
@TonyLo1
Nov 30 2015 17:30
@Aaronontheweb, pull request done.
Hakan Lindestaf
@HakanL
Nov 30 2015 17:51
Morning! I have a client/server set up with akka.net and I'd like to send messages to clients (from the server) without knowing their ip/port. Each client has a unique path, like this /user/client_1234. Is there a way to do that? I can send messages fine if I do the full akka.tcp://abc@ip:8081/user/client_1234. What am I missing?
Damian Reeves
@DamianReeves
Nov 30 2015 18:54
Hey. I have a quick question on Persistence. When I persist an event should I be doing the action represented by the event before or after persisting it. For example if my event is 'TransactionSaved' should I be saving before or after receiving this event?
I mean an event like TransactionCteated as TransactionSaved is not a good domain event
Bartosz Sypytkowski
@Horusiath
Nov 30 2015 19:26
@TonyLo1 Context is static property of an actor, so if you really need, you may try to access it inside behavior function using UntypedActor.Context
@Silv3rcircl3 can you share with your code?
@DamianReeves do you mean to update persistent actor state before or after persisting an event?
if so, always after, you cannot guarantee that something wrong will happen when persisting an event, therefore all logic based on that event need to be executed after it has been confirmed to be persisted (using callback inside persist)
Damian Reeves
@DamianReeves
Nov 30 2015 19:34
@Horusiath so if the act of creating a transaction for example requires me to call a web service in order to actually save state, I should call that web service in the persist callback?
(Just realized transaction is a poor choice as it confuse the domain, replace Foo for transaction)
Marc Piechura
@marcpiechura
Nov 30 2015 19:43
@Horusiath Sure, will build a demo tomorrow and send you the repo limk
Damian Reeves
@DamianReeves
Nov 30 2015 20:16
Does the current stable release of Akka.Net allow me to change my serializer for specific message types. I'm considering moving to protobuf serialization using protobuf-net
Bartosz Sypytkowski
@Horusiath
Nov 30 2015 20:26
@DamianReeves
  1. In that case it's better to persist split this operation into more events - first when calling a web service, and at least second one to confirm the operation completed. Sometimes you need a long running set of complex transactions like sagas. Then you can create a dedicated persistent actor, that will be responsible for managing a single invocation and save each step as an event.
  2. Custom serializers for choosen message types are ready from day one - they are crucial for most of the work concerning remoting, clustering and persistence.
Aaron Stannard
@Aaronontheweb
Nov 30 2015 20:39
@onatm yeah, I forgot to clean up some Paket stuff there because it "worked on my machine" and the build server
but Paket left some stuff behind
@rogeralsing cleaned that up over the weekend - should work now if you pull the latest
Damian Reeves
@DamianReeves
Nov 30 2015 20:41
@Horusiath thanks.
Aaron Stannard
@Aaronontheweb
Nov 30 2015 21:05
thanks @TonyLo1 - will review now