These are chat archives for akkadotnet/

Apr 2017
Apr 16 2017 04:05
so if I want to build a console app, and have it connect or share an actorsystem with a webapp
is that clustering and requiring lighthouse?
Chris Ochs
Apr 16 2017 07:48
if both have static ip's and can reach each other, I don't see a reason for lighthouse really. just put the addresses of both as the seed nodes in both apps
or same address different ports that works also
Arjen Smits
Apr 16 2017 15:34
@ronnyek at the very least that you would need akka.remote. You can create an server/client or peer to peer connection with akka.remote manually
akka.clustering layers on top of akka.remote and adds service discoverability and reliability things that would expect from a full blown cluster
Apr 16 2017 16:00
I think I'll do that and add clustering later... Need to simplify this project for experimentation
Remove variables until I am familiar with and comfortable with
Tomasz Jaskula
Apr 16 2017 17:11
Is this the only way defining parent/child relationship with FSharp API ? cc: @Horusiath
let playback = 
        spawn system "Playback"
        <| fun parentMailbox ->
            let child = 
                spawn parentMailbox "child" 
                    <| fun childMailbox ->
                        childMailbox.Defer (fun () -> printfn "Child stopping")
                        printfn "Child started"
                        let rec childLoop() = actor {
                            let! msg = childMailbox.Receive()
                            return! childLoop()
            cprintfn ConsoleColor.Gray "Creating parent actor..."
            // define parent behavior
            let rec loop() = actor {
                let! msg = parentMailbox.Receive()
                child.Forward(msg)  // forward all messages through
                return! loop ()
            loop ()
Bartosz Sypytkowski
Apr 16 2017 19:41
@tjaskula using Akka.FSharp? Yes. But in normal conditions you'd probably move child behavior to separate function