Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Dec 07 11:49
    IgorFedchenko commented #4085
  • Dec 07 10:31
    IgorFedchenko commented #4085
  • Dec 07 08:36
    IgorFedchenko commented #4085
  • Dec 06 20:57
    IgorFedchenko commented #4085
  • Dec 06 20:32
    IgorFedchenko commented #4085
  • Dec 06 20:01
    IgorFedchenko commented #4085
  • Dec 06 19:55
    IgorFedchenko commented #4085
  • Dec 06 16:22
    Aaronontheweb labeled #3997
  • Dec 06 16:22
    Aaronontheweb closed #3997
  • Dec 06 16:20
    IgorFedchenko commented #3997
  • Dec 06 16:08
    IgorFedchenko commented #4085
  • Dec 06 15:50
    Aaronontheweb assigned #4085
  • Dec 06 15:50
    Aaronontheweb labeled #4085
  • Dec 06 15:50
    Aaronontheweb labeled #4085
  • Dec 06 15:49
    Aaronontheweb closed #4032
  • Dec 06 14:58
    IgorFedchenko commented #4032
  • Dec 06 14:57
    IgorFedchenko opened #4085
  • Dec 05 17:21
    Aaronontheweb synchronize #4079
  • Dec 05 17:20
    Aaronontheweb labeled #4084
  • Dec 05 17:20
    Aaronontheweb labeled #4084
Aaron Stannard
@Aaronontheweb
looks like all of those updated Akka.Remote and Cluster docs are starting to pay off: http://stackoverflow.com/questions/32094660/how-to-detect-remote-actor-disconnection-dissociation#comment52104082_32094660
able to use the new docs to answer their own question
Mike Johnson
@softwaremike

@bruinbrown (or anyone else who can answer): Related to a question about spray and the ability to hook up a REST interface to an actor system (e.g. so we could provide a way to query some property stored within some actor), you said the following:

Akka-Http is an existing Akka project by the developers of Spray and Tyrpesafe designed to make a HTTP API interface which works directly with actors themselves http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-M2/scala/http/. If you're not wanting to wait for the release of Aka.Http then it's possible to use any of the existing HTTP API libraries (ASP.Net WebAPI, Nancy, WCF etc) and there's a couple of options on getting your API endpoints connected to your actor system

Can someone elaborate on the currently available "options of getting your API endpoints connected to your actor system"? I'm loving the possibilities with akka.net, just not sure how to "get data out of" it. For example, let's say I'm building an actor system that does something like keep a multiplayer game's player attributes up to date. Then I'm building a web site where I can show current stats on a set of users. I'm thinking the website needs to somehow "look into" the actor system to grab some set of stats from one or more actors. (So it's basically making queries against the actor system from outside the actor system itself.) Are there any examples/patterns to do something like this?
Wolfgang Loder
@kujua
@softwaremike I use an actor in the API implementation to communicate with the actor system.
In your case there is either the option to push messages with the player attributes to the actor in the API or the API actor asks the actor system for the data.
The latter would use async communication (Tell), or have an Ask with async/await in a thread.
Communication to the client can be done via web sockets (SignalR or similar) to push data to the web client and update when data is available. The Web Crawler example is using this approach: Samples.
tstojecki
@tstojecki
@Horusiath et all, are there any java/c# samples out there for you work with persistent actors? i have read through the http://getakka.net/docs/Persistence docs, but i am still pretty consufed about how to work with this api... for example, do i need to handle Receive, ReceiveCommand, ReceiveRecovery, etc...
i would like to start with something simple that can persist a few events and rebuild its state on failure
Bartosz Sypytkowski
@Horusiath
@tstojecki there is no Receive in persistent actors, you have ReceiveCommand instead. ReceiveRecovery is used only, when persistent actors has been resurrected and is trying to recover from the set of events it persisted before
you can look at my example, I'll finish it some day probably :P
I want to change some of the patterns presented, but some basic concepts are already there
tstojecki
@tstojecki
so this.Receive appears to be available on PersistentActor, but you're saying i should leave it alone
and handle ReceiveCommand instead
i am looking at the example too
tstojecki
@tstojecki
@Horusiath really nice job with the sample, my head is spinning a little bit, but i think i am getting the gist of it
once i get to a good stopping point i would like to help with docs for this, i think using code snippets from the sample might serve us better the the current persistent docs
Anthony Brown
@bruinbrown
@softwaremike you can hook up Akka.Net to any of the existing Web frameworks, essentially all you need to do is look up an actor in your actor system typically by doing something like system.ActorSelection("/user/MyActorA/MyActorB") and then once you've got that reference you can easily send data into the system by just using Tell on that address to pass it a message, if you want to then get data out, you can use Ask, which async sends a message and awaits a response from the target (it's up to the target to remember to send back a response, there's no RPC in Akka.Net). Alternatively you can use SignalR and push data down to the clients (this fits in more with the reactive nature of Akka.Net).
Anthony Brown
@bruinbrown
@softwaremike Here's a simple example of how using ASP.Net Web API 2, you can get data out of the actor system https://gist.github.com/bruinbrown/14a8fc8cfa30ef667135
Suhas Chatekar
@schatekar
@bruinbrown on SignalR, how well does it scale in a true web scenario if you have got thousands of concurrent users using your webiste?
Roger Johansson
@rogeralsing
nugot.png
boom!
Suhas Chatekar
@schatekar
Is this a real website?
Graeme Bradbury
@GraemeBradbury
Appears to be (google finds it) Now if only they could fix the api rather than just the website
Anthony Brown
@bruinbrown
@schatekar I've only had experience up to a couple of thousand connections at once but that was on relatively low end VMs, you've then got either signalr backplanes for scale out or multiple servers with consistent hashing if you need really low latency
Roger Johansson
@rogeralsing
Nugot.net (With an o)
Mike Johnson
@softwaremike
@bruinbrown and @kujua : Thanks!! Yep, looks like "Ask" is the miracle method I was missing :) Now off to go start prototyping... the potential here is very exciting!
Tomas Vana
@creepone
@Aaronontheweb Today I upgraded to 1.0.4 and the DI was behaving very strangely, sometimes failing to resolve dependencies. I tracked it down to your akkadotnet/akka.net@5fd1c04 and wanted to ask: what was the motivation to use the Ninject activation blocks ?
Anthony Brown
@bruinbrown
Anybody got any tips on debugging MultiNodeTests? I've got the child process debugging power tools but it doesn't seem to attach the debugger on child processes. Any tips on running them as well? I've tried launching the multinode test runner with my tests assembly and calling start external program from the tests project
Suhas Chatekar
@schatekar
Same problem here. Could help if you raise an issue with the steps your are following. I wanted to do that but could not till weekend now. stuck in a place without access to my development box
Graeme Bradbury
@GraemeBradbury
I've not managed to get a break point to hit yet. (using Start external program) Basically limited myself to running individual dlls and reading the output.
Suhas Chatekar
@schatekar
@GraemeBradbury that is still a lot of output to read, isn't it?
Graeme Bradbury
@GraemeBradbury
@schatekar oh yes, even more when you turn on verbose mode :-)
Suhas Chatekar
@schatekar
with the 7 PRs you submitted, was that 7 times the usual reading of logs? ;)
Graeme Bradbury
@GraemeBradbury
I've only done 3 pr's for tests :-)
Christian Palmstierna
@cpx86
@GraemeBradbury One option is to drop a Debugger.Break() where you want the breakpoint. Will force attachment of debugger.
Suhas Chatekar
@schatekar
@cpx Is that not what VS does internally when you set a breakpoint?
Aaron Stannard
@Aaronontheweb
@creepone we decided on a standard set of expectations for how DI is supposed to behave in Akka.NET, since it was chaotic and unpredictable from one framework to the next
@stefansedich is publishing a list of all of the settings you should have on your containers for working with actors, but the TL;DR; of it is that we expect the container to manage the lifecycle of the objects
and to automatically dispose those objects on restart / termination
Ninject and others were not doing this before
leaking memory, essentially
Christian Palmstierna
@cpx86
@schatekar No, those breakpoints are only set when VSHost executes. My guess is that the VSHost exe injects the breakpoints at runtime using internal CLR methods.
Aaron Stannard
@Aaronontheweb
@creepone but if this is causing some unintended side effects, please file an issue!
I think @stefansedich recommended for Ninject that you bind things .InScope()
@bruinbrown > I've got the child process debugging power tools but it doesn't seem to attach the debugger on child processes. Any tips on running them as well?
there's a little trick to this that isn't very straightforward
blob
Aaron Stannard
@Aaronontheweb
so you want to open that menu, Debug --> Other Debug Targets --> Child Process Debugging Settings
and then configure it like this
blob
make sure Enable child process debugging is checked