Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 27 22:16
    dependabot-preview[bot] synchronize #3985
  • Jan 27 22:16

    dependabot-preview[bot] on nuget

    Bump FsCheck.Xunit from 2.9.0 t… (compare)

  • Jan 27 22:16
    dependabot-preview[bot] edited #3985
  • Jan 27 22:15
    dependabot-preview[bot] edited #3985
  • Jan 27 22:15
    dependabot-preview[bot] synchronize #3986
  • Jan 27 22:15

    dependabot-preview[bot] on nuget

    Bump NUnit from 3.6.1 to 3.12.0… (compare)

  • Jan 27 22:15
    dependabot-preview[bot] synchronize #3985
  • Jan 27 22:15

    dependabot-preview[bot] on nuget

    Bump FsCheck.Xunit from 2.9.0 t… (compare)

  • Jan 27 22:15
    dependabot-preview[bot] edited #3986
  • Jan 27 22:15
    dependabot-preview[bot] edited #3985
  • Jan 27 22:15
    dependabot-preview[bot] synchronize #4066
  • Jan 27 22:15

    dependabot-preview[bot] on nuget

    Bump FSharp.Quotations.Evaluato… (compare)

  • Jan 27 22:15
    dependabot-preview[bot] edited #4066
  • Jan 27 22:15
    dependabot-preview[bot] edited #4149
  • Jan 27 22:14
    Aaronontheweb synchronize #4128
  • Jan 27 22:14

    Aaronontheweb on nuget

    (compare)

  • Jan 27 22:14

    Aaronontheweb on dev

    Bump Hyperion from 0.9.11 to 0.… (compare)

  • Jan 27 22:14
    Aaronontheweb closed #4149
  • Jan 27 22:13
    dependabot-preview[bot] edited #3986
  • Jan 27 22:13
    dependabot-preview[bot] edited #3985
Håkan Canberger
@HCanber
And the switch statement looks like there could be something hidden in there, but I'm not sure if it actually could cause any errors. One thread think the CB is closed, and then before it's executed it becomes open by another thread.
Bartosz Sypytkowski
@Horusiath
in my use case you initialize CB one for each action, that need it, then you can call if async from multiple threads and release it when all work is done
any proposed solution? without lock or double check it will be hard to achieve
acutally I don't think that executing closed behavior once/twice while CB is switching to open state it's a bad thing, if something caused CB to open, probably there are already many concurrent requests which already are waiting for their timeout or will fail anyway
one/few more calls which will pass the state check while state itself is changing, shouldn't make a difference
Håkan Canberger
@HCanber
I was thinking the same thing.
Bartosz Sypytkowski
@Horusiath
@nvivo how would your async/await support proposition work with dispatchers not operating on TPL at all?
Bartosz Sypytkowski
@Horusiath
Persistence tests/debug are so fu**ing hard
Stefan Sedich
@stefansedich
hey guys just looking at the IoC chat
"It's just has to take the actor reference and call something like release(Actor)."
in autofac for example you would not do it that way but instead reslove a lifetime scope or an owned instance and then dispose of that after, there is no release method on the actual container.
Stefan Sedich
@stefansedich
For those interested updated with my findings of the issues with Mono and the fixes required, akkadotnet/akka.net#636 we are now happily running in Mono using these fixes.
jcwrequests
@jcwrequests
@stefansedich The release thing is based on the following post http://blog.ploeh.dk/2014/05/19/di-friendly-framework/ which I think does an excellent job explaining the need plus its an interesting read.
Stefan Sedich
@stefansedich
You look at autofac for example
they don't have release in that way instead the request gets wrapped in a lifetime scope which itself is disposed.
Although if using autofac we could resolve an Owned<T> and in the release dispose that
would probably be enough
where T being the actor type
so yeah sorry release is probably enough :)
Raymen Scholten
@raymens
Is there someway to append a incrementing number to an actors name that will enforce the name to be unique? (like SomeRandomActor-Child-1, ....-Child-2, ....)
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