Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 14:40
    cptjazz synchronize #3974
  • 14:07
    cptjazz opened #3974
  • 08:30
    ismaelhamed commented #3937
  • Oct 12 15:50
    IrvinDominin opened #127
  • Oct 11 18:21
    Aaronontheweb commented #3973
  • Oct 11 18:20
    Aaronontheweb commented #3937
  • Oct 11 18:16
    Zetanova commented #3937
  • Oct 11 18:11
    Zetanova commented #3937
  • Oct 11 15:09
    Aaronontheweb commented #3937
  • Oct 11 15:08
    Aaronontheweb commented #3937
  • Oct 11 14:36
    Aaronontheweb commented #3973
  • Oct 11 01:00
    Horusiath commented #3057
  • Oct 10 20:02
    IgorFedchenko synchronize #3973
  • Oct 10 19:59
    IgorFedchenko synchronize #3973
  • Oct 10 19:58
    IgorFedchenko commented #3973
  • Oct 10 19:53
    IgorFedchenko opened #3973
  • Oct 10 14:04
    stijnherreman commented #3057
  • Oct 10 13:54
    Aaronontheweb commented #3970
  • Oct 10 13:54
    Aaronontheweb synchronize #3970
  • Oct 10 10:10
    Zetanova commented #3937
Raymen Scholten
@raymens
And is it correct that the F# API doesn't provide any F# specific stuff about creating an actor that has a constructor or any means of saving state?
Raymen Scholten
@raymens
There are probably better ways but
let actorOfCtor (state : 'a) (fn : 'a -> 'Message -> unit) (mailbox : Actor<'Message>) : Cont<'Message, 'Returned> =
let rec loop() =  
    actor {  
        let! msg = mailbox.Receive() 
        fn state msg 
        return! loop() 
    } 
loop()
allows the creation of an actor that will have some sort of initial data that is usable by the messageHandler every message
Bartosz Sypytkowski
@Horusiath
@raymens if you must use some state in F# API, pass it as a rec loop parameter , eg:
type MyState = { X: int; Y: int }
let aref = spawn system "my-actor" <| fun mailbox ->
    let rec loop state = actor {
         let! msg = mailbox.Receive()
         return! loop ({ state with Y = msg })
    }
    loop ({X = 1; Y = 2})
this way it maintain F# principles - immutable data, function as unit of composition etc.
Raymen Scholten
@raymens
thanks, that's better :)
HÃ¥kan Canberger
@HCanber
@raymens If you don't name an actor, the system will assign it a unique name. If you want the name to follow some kind of pattern, like in your example, you have to write it yourself.
Bartosz Sypytkowski
@Horusiath
@Aaronontheweb do you have some kind of the documentation or tech. overview to Helios? I'd like to see, what else purposes could it serve.
Raymen Scholten
@raymens
@HCanber allright, thank you
Raymen Scholten
@raymens
Are questions better suited for StackOverflow or gitter?
Roger Johansson
@rogeralsing
Id say gitter, most of us are here every day
Aaron Stannard
@Aaronontheweb
@Horusiath very little, although I'm in the process of migrating it to its own organization and publishing docs around Helios 2.0
the only real docs I have for at it at the moment are its specs and samples
@stefansedich submitted a PR a couple of days ago which should enable Mono support in Helios
and should fix the Akka Remoting issues
turns out that TcpClient and UdpClient call Socket.Bind in their constructors on Mono, which makes it impossible to set socket options on them
Aaron Stannard
@Aaronontheweb
@smalldave you might appreciate this, btw https://github.com/petabridge/lighthouse - took an old project I started on with Akka.Cluster a while back and I'm modernizing it now
basically it's a windows service that acts as a dedicated seed node for clusters that want to use roles
runs virtually no code other than what's in Akka.Cluster so it doesn't need to be updated
designed for PaaS environments like Elastic Beanstalk, AppHarbor, Azure Websites
I'm in the process of rewriting it to use Topshelf now
and an NLog adapter that lets it write to the windows event log
Topshelf itself is super neat - never used it until I saw some of our contributors mention it: http://topshelf-project.com/
David Smith
@smalldave
+1 for Topshelf. Been using it for years. Microsoft should have adopted by now
lighthouse looks interesting
Aaron Stannard
@Aaronontheweb
yeah, this is way better than the alternatives
can't believe I hadn't used it until now
the idea behind lighthouse is basically to have a 1-2 lighthouse instances sitting on dedicated IaaS boxes
it's meant to be a scriptable, configurable Akka.Cluster service that you will eventually just be able to deploy via a packaged binary
and some .config modifications
the idea is to just keep a couple of these around as a lightweight, do-it-yourself Akka.Cluster service discovery endpoint
they're not necessary in environments where you can use something like the EC2 SDK to query all of the IPs of other machines in your deployment group
David Smith
@smalldave
think it's a good idea and good name!
Aaron Stannard
@Aaronontheweb
awesome, glad you like it :)
the code's super simple - mostly just some configuration injection stuff
David Smith
@smalldave
was @Horusiath talking about being able to deploy actors along with their code remotely in F#? makes a no frills cluster node interesting
Aaron Stannard
@Aaronontheweb
yes he was
I think there's a way that can be done generically too
David Smith
@smalldave
not sure how I feel about that. bit scary :)
Aaron Stannard
@Aaronontheweb
I was drafting a proof of concept idea for a talk @skotzko and I are giving later this month on doing Streaming ETL with Akka.NET
had the notion of allowing end users to install a NuGet package and write a .NET assembly that implements a few interfaces for doing Extract / Transform
and distributing that across the cluster - having specific actors deployed who use that code internerally since it knows how to construct objects with that interface
realized that you could just bake that code into the actor definitions themselves
the part that would suck is how you deal with updating an assembly you've already deployed once
I guess you'd need to have a registry on each node that its able to perform a CAS operation to do an in-place update
and some sort of coordinator responsible for making sure that all nodes eventually end up using the same binary
but then how do you kill off all of the actors deployed using the old stuff?
David Smith
@smalldave
you are making the f# approach sound less scary :)
Aaron Stannard
@Aaronontheweb
HAHA