by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 17:40
    ismaelhamed opened #4498
  • Jul 02 19:33
    Danthar commented #4487
  • Jul 02 19:27
    Danthar closed #4494
  • Jul 02 19:27
    Danthar commented #4494
  • Jul 02 16:12
    Arkatufus commented #4265
  • Jul 02 15:18
    ismaelhamed edited #4497
  • Jul 02 15:16
    ismaelhamed edited #4497
  • Jul 02 15:15
    ismaelhamed opened #4497
  • Jul 02 15:07
    ismaelhamed commented #4482
  • Jul 02 08:02
    glikoz commented #4495
  • Jul 02 08:02
    glikoz commented #4495
  • Jul 01 13:26
    Aaronontheweb closed #4495
  • Jul 01 13:26
    Aaronontheweb commented #4495
  • Jul 01 13:20
    Aaronontheweb commented #4496
  • Jul 01 13:20
    Aaronontheweb milestoned #4496
  • Jul 01 13:20
    Aaronontheweb labeled #4496
  • Jul 01 13:20
    Aaronontheweb labeled #4496
  • Jul 01 12:18
    ondrejpialek commented #4495
  • Jul 01 12:18
    ondrejpialek commented #4495
  • Jul 01 11:52
    ondrejpialek commented #3710
Zetanova
@Zetanova
EventStore has two events, no other errors
Zetanova
@Zetanova
LOL
extend it to
if (persistent.PersistenceId != PersistenceId)
throw new InvalidOperationException(String.Format("Invalid Persistent Message for persistenceId '{1}' expected '{0}'.", PersistenceId, persistent.PersistenceId));
WTF
found the bug
its the CS_PID in the SQl.common / SQL server extension
John Nicholas
@MrTortoise
so no takers for my generics woes ... are any of you f# people? Have been working through some scala akka stuff and converting it to c# ... got me wondering if f# is a nice fit for this stuff? I've put off learning it - maybe now is the tiem to dabble?
Zetanova
@Zetanova
Not so important any more @MrTortoise
what u do
Yin Zhang
@melcloud
Hi guys, can I specify a consistent hash mapping in config? Or if I config a consistent hash router through hocon config, can I add a consistent hash mapping later on?
Hyungho Ko
@hhko
Can I get the sample about CQRS on Akka.NET?
Arjen Smits
@Danthar
@hhko @Horusiath made a sample. Although note that its not based on the current version of Akka. https://github.com/Horusiath/AkkaCQRS
Bartosz Sypytkowski
@Horusiath
@MrTortoise IMO F# is even better fit than C#, only lack of time and F# contributors stops us from making F# API more and more beautiful
@Zetanova I think, we should drop this CS_PID field, I'll take that once I finish our problems with build manager
Hussein Ait-Lahcen
@hussein-aitlahcen
@Horusiath Is the fsm implementation finished or should i still use the Become for my behavior ?
Bartosz Sypytkowski
@Horusiath
FSM is finished and fuels things such as akka remote and cluster ;) but using it is matter of personal preferences
Zetanova
@Zetanova
@Horusiath yes sql server has support for an index on strings. Checksum performnce good on ntext and blob or composite keys. Never the less in both situations a check on the keys itself is required
 'WHERE CS_PID = CHECKSUM(@PersistenceId) AND PersistenceID = @PersistenceId'
Zetanova
@Zetanova
I got this problem because i am using a Sequenced Guid generator so that an Guid-Index performance well. But in Akka its encoded to Base36 with a Prefix 'ARTypeName-5m6w1yqafkxkqb4o74fbfc1z9'. A Row Sequenced Guid as PersistendId would perform much better.
John Nicholas
@MrTortoise
hmm i have a load of actors that stop logging (Context.GetLogger()) after a few calls down. The actor code hits lots of task based code that messses with schedulers and then heads back into an akka actor ... no idea about what thread it is on at this point ... but it seems like logging isnt working. Does that imply i need to marshall back onto the thread that the console would be on?
jweimann
@jweimann
@MrTortoise do you have a gist of the generics problem you're having? sounds like it may be something I had to do a while ago, but not 100% clear.
John Nicholas
@MrTortoise
@jweimann the probelm i have is a lack of overload. I dont know what type of the inner type in the generic is at the time of writing the recieve handler.
@jweimann I have worked around that by simply not using a generic - there was a problem elsewhere which meant it was opportune to factor it out and use a different appraoch anyway
Chris G. Stevens
@cgstevens
Not sure how to explain this... I have a dev server which is located on a separate part of the network and it has 7 ip addresses.
My Tasker is configured to use 1.1.98.230, nothing specifies the hostname. The error that I am errors in my logs are "[akka://MyService/system/endpointManager/reliableEndpointWriter-akka.tcp%3a%2f%2fMyService%401.9.2.8%3a60133-9] - Invalid address: akka.tcp://MyService@1.9.2.8:60133" which is my ClusterViewer app.
Afterwards it becomes disassociated and eventually causes my tasker to loose its leader role and everything seems to fall apart from there. Not understanding why it would not be leader anymore which causes me not to be able to connect to it even when the status is UP.
I ran WireShark on the server and found that when this happens wireshark shows my Source to be a different address... (1.1.98.234).
When everything seems to run good WireShark shows the ip 1.1.98.230 talking with the 1.9.2.8.
So I guess why is my cluster not only working on the ip 1.1.98.230 which is specified in the HOCON configs. To me the cluster shouldn't even be trying to communicate on 1.1.98.234.
Thanks for any info!
Bartosz Sypytkowski
@Horusiath
@Aaronontheweb to fix #1399 I'll need some of your assist, I see that there is heavy amount of custom code back there, could you explain it to me?
Aaron Stannard
@Aaronontheweb
@Horusiath this is just for the NuGet push?
Bartosz Sypytkowski
@Horusiath
yes
Aaron Stannard
@Aaronontheweb
ok
//--------------------------------------------------------------------------------
// Pack nuget for all projects
// Publish to nuget.org if nugetkey is specified

let createNugetPackages _ =
    let removeDir dir = 
        let del _ = 
            DeleteDir dir
            not (directoryExists dir)
        runWithRetries del 3 |> ignore

    ensureDirectory nugetDir
    for nuspec in !! "src/**/*.nuspec" do
        printfn "Creating nuget packages for %s" nuspec

        let project = Path.GetFileNameWithoutExtension nuspec 

        let workingDir = workingDir </> project

        CleanDir workingDir

        let projectDir = Path.GetDirectoryName nuspec
        let projectFile = (!! (projectDir @@ project + ".*sproj")) |> Seq.head
        let releaseDir = projectDir @@ @"bin\Release"
        let packages = projectDir @@ "paket.references"
        let packageDependencies = if (fileExists packages) then (Paket.GetDependenciesForReferencesFile packages |> Seq.toList) else []
        let dependencies = packageDependencies @ getAkkaDependency project
        let releaseVersion = getProjectVersion project

        let pack outputDir symbolPackage =
            NuGetHelper.NuGet
                (fun p ->
                    { p with
                        Description = description
                        Authors = authors
                        Copyright = copyright
                        Project =  project
                        Properties = ["Configuration", "Release"]
                        ReleaseNotes = release.Notes |> String.concat "\n"
                        Version = releaseVersion
                        Tags = tags |> String.concat " "
                        OutputPath = outputDir
                        WorkingDir = workingDir
                        SymbolPackage = symbolPackage
                        Dependencies = dependencies })
                nuspec

        // Copy dll, pdb and xml to libdir = workingDir/lib/net45/
        ensureDirectory libDir
        !! (releaseDir @@ project + ".dll")
        ++ (releaseDir @@ project + ".pdb")
        ++ (releaseDir @@ project + ".xml")
        ++ (releaseDir @@ project + ".ExternalAnnotations.xml")
        |> CopyFiles libDir

        // Copy all src-files (.cs and .fs files) to workingDir/src
        let nugetSrcDir = workingDir @@ @"src/"
        // CreateDir nugetSrcDir

        let isCs = hasExt ".cs"
        let isFs = hasExt ".fs"
        let isAssemblyInfo f = (filename f).Contains("AssemblyInfo")
        let isSrc f = (isCs f || isFs f) && not (isAssemblyInfo f) 
        CopyDir nugetSrcDir projectDir isSrc

        //Remove workingDir/src/obj and workingDir/src/bin
        removeDir (nugetSrcDir @@ "obj")
        removeDir (nugetSrcDir @@ "bin")

        // Create both normal nuget package and symbols nuget package. 
        // Uses the files we copied to workingDir and outputs to nugetdir
        pack nugetDir NugetSymbolPackage.Nuspec

let publishNugetPackages _ = 
    let rec publishPackage url accessKey trialsLeft packageFile =
        let tracing = enableProcessTracing
        enableProcessTracing <- false
        let args p =
            match p with
            | (pack, key, "") -> sprintf "push \"%s\" %s" pack key
            | (pack, key, url) -> sprintf "push \"%s\" %s -source %s" pack key url

        tracefn "Pushing %s Attempts left: %d" (FullName packageFile) trialsLeft
        try 
            let result = ExecProcess (fun info -> 
                    info.FileName <- nugetExe
                    info.WorkingDirectory <- (Path.GetDirectoryName (FullName packageFile))
                    info.Arguments <- args (packageFile, accessKey,url)) (System.TimeSpan.FromMinutes 1.0)
            enableProcessTracing <- tracing
            if result <> 0 then failwithf "Error during NuGet symbol push. %s %s" nugetExe (args (packageFile, "key omitted",url))
        with exn -> 
            if (trialsLeft > 0) then (publishPackage url accessKey (trialsLeft-1) packageFile)
            else raise exn
    let shouldPushN
so these are the two methods that are failing
actually, I take that back
it's just publishNuGetPackages
let me double check the build log
yep, that's correct - just publishNuGetPackages
let publishNugetPackages _ = 
    let rec publishPackage url accessKey trialsLeft packageFile =
        let tracing = enableProcessTracing
        enableProcessTracing <- false
        let args p =
            match p with
            | (pack, key, "") -> sprintf "push \"%s\" %s" pack key
            | (pack, key, url) -> sprintf "push \"%s\" %s -source %s" pack key url

        tracefn "Pushing %s Attempts left: %d" (FullName packageFile) trialsLeft
        try 
            let result = ExecProcess (fun info -> 
                    info.FileName <- nugetExe
                    info.WorkingDirectory <- (Path.GetDirectoryName (FullName packageFile))
                    info.Arguments <- args (packageFile, accessKey,url)) (System.TimeSpan.FromMinutes 1.0)
            enableProcessTracing <- tracing
            if result <> 0 then failwithf "Error during NuGet symbol push. %s %s" nugetExe (args (packageFile, "key omitted",url))
        with exn -> 
            if (trialsLeft > 0) then (publishPackage url accessKey (trialsLeft-1) packageFile)
            else raise exn
    let shouldPushNugetPackages = hasBuildParam "nugetkey"
    let shouldPushSymbolsPackages = (hasBuildParam "symbolspublishurl") && (hasBuildParam "symbolskey")

    if (shouldPushNugetPackages || shouldPushSymbolsPackages) then
        printfn "Pushing nuget packages"
        if shouldPushNugetPackages then
            let normalPackages= 
                !! (nugetDir @@ "*.nupkg") 
                -- (nugetDir @@ "*.symbols.nupkg") |> Seq.sortBy(fun x -> x.ToLower())
            for package in normalPackages do
                publishPackage (getBuildParamOrDefault "nugetpublishurl" "") (getBuildParam "nugetkey") 3 package

        if shouldPushSymbolsPackages then
            let symbolPackages= !! (nugetDir @@ "*.symbols.nupkg") |> Seq.sortBy(fun x -> x.ToLower())
            for package in symbolPackages do
                publishPackage (getBuildParam "symbolspublishurl") (getBuildParam "symbolskey") 3 package
just realized that not all of it made it onto the last code snippet
so all this code does is locate all of the *.nupkg and .symbols.nupkg files
and upload them based on the arguments passed into FAKE
i.e. the publishKey and target
which are different for our build server (MyGet) and production (NuGet)
honestly the easiest way to fix this would be to just add back in build.cmd and build.sh the instructions to dynamically download nuget.exe
Aaron Stannard
@Aaronontheweb
because the way this code works is by spawning a process and passing in the commandline args directly
relevant batchfile from DotNetty
@echo off

pushd %~dp0

SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe

IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"

:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

:restore

.nuget\NuGet.exe update -self

.nuget\NuGet.exe install FAKE -OutputDirectory packages -ExcludeVersion -Version 3.28.8

.nuget\NuGet.exe install xunit.runner.console -ConfigFile .nuget\Nuget.Config -OutputDirectory packages\FAKE -ExcludeVersion -Version 2.0.0

if not exist packages\SourceLink.Fake\tools\SourceLink.fsx ( 
  .nuget\nuget.exe install SourceLink.Fake -OutputDirectory packages -ExcludeVersion
)
rem cls

set encoding=utf-8
packages\FAKE\tools\FAKE.exe build.fsx %*

popd
and BASH equivalent
#!/bin/bash

SCRIPT_PATH="${BASH_SOURCE[0]}";
if ([ -h "${SCRIPT_PATH}" ]) then
  while([ -h "${SCRIPT_PATH}" ]) do SCRIPT_PATH=`readlink "${SCRIPT_PATH}"`; done
fi
pushd . > /dev/null
cd `dirname ${SCRIPT_PATH}` > /dev/null
SCRIPT_PATH=`pwd`;
popd  > /dev/null

if ! [ -f $SCRIPT_PATH/.nuget/nuget.exe ] 
    then
        wget "https://www.nuget.org/nuget.exe" -P $SCRIPT_PATH/.nuget/
fi

mono $SCRIPT_PATH/.nuget/nuget.exe update -self

mono $SCRIPT_PATH/.nuget/nuget.exe install FAKE -OutputDirectory $SCRIPT_PATH/packages -ExcludeVersion -Version 3.28.8

mono $SCRIPT_PATH/.nuget/nuget.exe install xunit.runners -OutputDirectory $SCRIPT_PATH/packages/FAKE -ExcludeVersion -Version 2.0.0

if ! [ -e $SCRIPT_PATH/packages/SourceLink.Fake/tools/SourceLink.fsx ] ; then
    mono $SCRIPT_PATH/.nuget/nuget.exe install SourceLink.Fake -OutputDirectory $SCRIPT_PATH/packages -ExcludeVersion

fi

export encoding=utf-8

mono $SCRIPT_PATH/packages/FAKE/tools/FAKE.exe build.fsx "$@"
that would need to be merged with whatever Paket code is there
use Paket for restore
NuGet for push
Bartosz Sypytkowski
@Horusiath
I'm not 100% sure, but Paket can publish nuget packages and it's self updating
Aaron Stannard
@Aaronontheweb
yeah, but why do we need that?
this code works fine as long as the binary is there