Akka.net: NetCore meta-issue / Status

Created on 7 Jul 2016  Â·  74Comments  Â·  Source: akkadotnet/akka.net

What has been done

  • Converted all projects to the new MSBuild 15 (Visual Studio 2017 required)
  • Added support for netstandard1.6 for all core modules
  • Switched all old protobuf2 serialization for remoting to the new protobuf3
  • All test projects target net452 and netcoreapp1.1
  • Rewrote all build scripts

Critical

  • [x] Akka.IO - currently is not present in netstandard1.6 build, Tests are commented on all platforms. Waiting for (https://github.com/akkadotnet/akka.net/pull/2405)
  • [x] NetCore nightly builds on MyGet (https://github.com/akkadotnet/akka.net/issues/2755)

In progress

  • [ ] Fix FsCheck tests on for Akka.Remote project (https://github.com/akkadotnet/akka.net/issues/2827)
  • [ ] NetCore in FSharp projects (https://github.com/akkadotnet/akka.net/issues/2826)
  • [x] Remove protobuf2 serialization from Persistence (https://github.com/akkadotnet/akka.net/pull/2748)
  • [x] Akka.DI.Core and Akka.DI.TestKit should support netcore (https://github.com/akkadotnet/akka.net/pull/2732)
  • [x] Akka.Persistence.Sqlite should support netcore (https://github.com/akkadotnet/akka.net/issues/2682)
  • [x] Switch to protobuf3 in Akka.Remote.Testkit (https://github.com/akkadotnet/akka.net/issues/2664)
  • [x] Fix FsCheck tests on for Akka project
  • [x] Fix OutOfMemoryException for Windows Unit Tests CI task (https://github.com/akkadotnet/akka.net/issues/2658)
  • [x] Fix unit tests on Linux (both Mono and NetCoreApp1.1) (https://github.com/akkadotnet/akka.net/issues/2659)
  • [x] Run NBench tests on Windows for .NET (https://github.com/akkadotnet/akka.net/issues/2660)
  • [x] Fix tests in Akka.Streams.Tests (https://github.com/akkadotnet/akka.net/issues/2663)

Tests

  • [ ] Run MultiNode tests for netstandard1.6 target on Windows and Linux
  • [ ] Run NBench tests for netstandard1.6 target on Windows and Linux (https://github.com/akkadotnet/akka.net/pull/2768)
  • [ ] Fix FsCheck tests on for Akka.Remote project (https://github.com/akkadotnet/akka.net/issues/2827)
  • [ ] Invalid spec name on NetCore (https://github.com/akkadotnet/akka.net/issues/2690)
  • [ ] Fix Akka.MultiNodeTestRunner.Shared.Tests on NET 4.5.2 and NetCore (https://github.com/akkadotnet/akka.net/issues/2828)

Working branch
https://github.com/akkadotnet/akka.net/tree/v1.3

Alpha packages
https://www.myget.org/gallery/akkadotnet-netcore

netcore

Most helpful comment

done

All 74 comments

We don't have Delegate.Clone on NetCore, So this code won't work
https://github.com/akkadotnet/akka.net/blob/dev/src/core/Akka/Actor/Props.cs#L766
We should find an equivalent.
Is it a proper conversion?

var invokerCopy = (Func<TActor>)Delegate.CreateDelegate(typeof(TActor), invoker.Method);

Hmm why would we need Delegate.Clone in the Props example to begin with?
I'm failing to see how that delegate should ever change as Props are immutable.

Props.cs looks like very outdated and contains a lot of TODOs. It even contains JsonIgnore attributes. Probably we don't need Delegate.Clone here

One thing that we need to think about is what is idiomatic to .NET core.
My impression is that the Microsoft.Extensions.Logging and Microsoft.Extensions.DependencyInjection will be the way to go on .NET core for integration with the rest of the ecosystem.

So the question is, should we align the .NET core API of Akka.NET to this?

I agree with @rogeralsing about using the ME.Logging and ME.DI. They're good all purpose shims.

I've been using them at work in large shared projects with success for a while now. The logging one especially allows for teams to use their logging framework of choice.

Why MS made this method as abstract in TextWriter class?
https://github.com/alexvaluyskiy/akka.net/commit/a5b57a2a90cc641a13cd72ee90419cc84c19e947#diff-d033e8e925734250aa0ff60cc83e1714R90

@rogeralsing @adamhathcock I agree, DI and logging parts should be changed in Akka.NET. But it is out of scope here. Someone should do proof of concept.

I'll see if I can find time in the coming days/weeks

@cconstantin We have a dependency on Akka.Remote assembly in Akka.Persistence.Tests.
Here: https://github.com/akkadotnet/akka.net/blob/dev/src/core/Akka.Persistence.Tests/Serialization/SerializerSpec.cs#L362
So we can't port these tests to NetCore right now. Because we can't port Akka.Remote and co at the moment.
Why we have Persistence + Remoting tests here?

@adamhathcock it is ahead of time. We should fix all NetCore issues before. I did all what I had planned to do in NetCore branch. So I need an assistance

@alexvaluyskiy well, I'll help with some tasks on that if I can find time then :) It's just you can't rely on me for a stream of work between my job and two young kids

We should load App.config here in a some way
https://github.com/alexvaluyskiy/akka.net/commit/cd5d931e7630e0d30200aac74b771fd6fd986b3e#diff-390a43cf44056dff8f1c42cee7ab169aR67

@alexvaluyskiy could the Microsoft.Extensions.Configuration be done there instead? It's possible to make a HOCON reader for it as well as the usual JSON option they use. I use a YAML one personally.

Looking at HOCON and the config (from the light knowledge of it) I think YAML and IConfiguration could be dropped in place.

For a smaller task, just loading directly from any file could be implemented. App.config just doesn't exist anymore in .NET Core land

But Akka will target both net45 and netcore. So we should not break compatibility on NET45

Can keep the System.Configuration stuff in on a flag and support loading HOCON just from any file. I guess that's the most straight forward thing.

Personally, System.Configuration is a mess to me and encouraging many different config file that can merged into a single Configuration like Microsoft.Extensions.Configuration does is pretty nice. The only issue is that HOCON supports objects and arrays while ME.Configuration really only deals with string values.

Actually, ME.Config allows for arrays but you have to address them in the key. If HOCON doesn't require values to be objects or arrays then it can be done.

All my research is done while holding a baby...so armchair coding here.

Yes, it will be under the flag and we should test it. But App.Config don't load automatically in XPROJ. And we should load the config somehow for the test.

It seems that not everybody is happy with the way ME.DI abstraction was designed. Don't now if these remarks are valid points or not since I haven't used DI container that much, but we should take them into account before we make the final decision.

https://simpleinjector.org/blog/2016/06/whats-wrong-with-the-asp-net-core-di-abstraction/

http://blog.ploeh.dk/2014/05/19/conforming-container/

That's true but they're working on it https://github.com/aspnet/DependencyInjection/issues/379

I think it will get sorted out and picking an interface such as IServiceProvider is a good idea

Hey guys I would like to help out with this. Has anyone taken the Build/CI task yet?

@annymsMthd noone, you can take it

Looks the Xunit2 project isn't implemented yet. Anyone on this? I can take this one too

It has implemented. I 've skipped only xunit1 project

I see it now. Looks like my dotnet restore fails though. Ill look into it

Why we reference both Xunit1 and Xunit2 projects in Akka.TestKit.Tests?
We can't port Xunit1 to NetCore, so it causes problems
Should we support Xunit1 package? Xunit2 looks pretty mature

@annymsMthd fixed some bugs in Akka.TestKit.Tests project. Check it

Current status
Akka.Tests (net45) Total: 730, Errors: 0, Failed: 1, Skipped: 9, Time: 187,564s (Configuration test)
Akka.Tests (netstandard1.6) Total: 729, Errors: 0, Failed: 13, Skipped: 9, Time: 184,731s (Akka IO tests)

Akka.Persistence.Tests (net45) Total: 175, Errors: 0, Failed: 0, Skipped: 1, Time: 41,014s
Akka.Persistence.Tests (netstandard1.6) Total: 175, Errors: 0, Failed: 0, Skipped: 1, Time: 33,719s

Akka.Streams (net45) Total: 1092, Errors: 0, Failed: 6, Skipped: 43, Time: 1340,570s

Akka.Streams.Tests.Dsl.FlowThrottleSpec.Throttle_for_single_cost_elements_must_send_elements_downstream_as_soon_as_time_comes
Akka.Streams.Tests.Dsl.FlowIdleInjectSpec.KeepAlive_must_emit_elements_periodically_after_silent_periods
Akka.Streams.Tests.Dsl.FlowFlattenMergeSpec.A_FlattenMerge_must_cancel_substreams_when_failing_map_function
Akka.Streams.Tests.Dsl.FlowConflateSpec.Conflate_must_work_on_a_variable_rate_chain_simple_conflate
Akka.Streams.Tests.Dsl.FlowConflateSpec.Conflate_must_work_on_a_variable_rate_chain

Akka.Streams (netstandard1.6) - Total: 1092, Errors: 0, Failed: 4, Skipped: 43, Time: 1259,884s

Akka.Streams.Tests.Dsl.FlowFlattenMergeSpec.A_FlattenMerge_must_cancel_substreams_when_failing_map_function
Akka.Streams.Tests.Dsl.FlowSelectAsyncUnorderedSpec.A_Flow_with_SelectAsyncUnordered_must_not_run_more_futures_than_configured
Akka.Streams.Tests.Dsl.FlowSelectAsyncSpec.A_Flow_with_SelectAsync_must_not_run_more_futures_than_configured
Akka.Streams.Tests.Dsl.FlowBatchSpec.Batch_must_work_on_a_variable_rate_chain

@Horusiath
Converted Akka.FSharp and Akka.Persistence.FSharp with dotnet-cli-fsc alpha version
I didn't manage to convert Akka.FSharp.Tests because of this error "The value or constructor 'equals' is not defined F# dotnet cli". Also it references XUnit1, which is not supported in netcore.

How to get netcore status of our dependencies? Is someone from F# community plans to convert the libraries?

@Aaronontheweb this code is no crossplatform anymore
https://github.com/akkadotnet/akka.net/blob/dev/src/core/Akka/Util/MonotonicClock.cs#L40
It doesn't run on coreclr in Ubuntu

I didn't manage to run tests under Mono. I got this error "No executable found matching command dotnet-test-xunit"

@alexvaluyskiy we're testing that the message serializer works properly during remoting. I think it's a valid test to have.

@cconstantin Ok. I will temporarily disable them on netcore until we get Akka.Remote on netcore

@alexvaluyskiy we could get rid of the P/Invoke call and just use the Stopwatch there instead. That's what we have to do for Mono anyway.

It would always work with ASP.NET Core on the full framework. What's being added is support for .NET Core.

Oh Ok, got it. Thanks. By the way any idea on timeline for its support on .net core?

Btw, you guys are doing great job. Thanks.

@alexvaluyskiy got NBench running on Mono and Helios is just about there as well. Will work dotnet core for NBench soon.

I've got Akka Remote and Cluster running on .NET Core. Changes to Remote (willieferguson/akka.net@14a0ca54799d05486255f8c22fc8f9aaff275bbc) and Cluster (willieferguson/akka.net@03e755d19857bf18bd3d593456d2a22e8197d516) are trivial, but there are some issues with the dependencies:

Helios:
There are a number of synchronization primitives used in Helios which are not available in CoreFX. I've used the Akka IO transport until Helios is supported.

Google.ProtocolBuffers:
Although the changes required to ProtocolBuffers are trivial, it does not seem like Jon Skeet is accepting pull requests. I've tried using Google.Protobuf, which does support .NET core, but this library does not support Protocol Buffer v2, and therefore require updating the to v3.

This allows me to do this:
docker-akka-cluster

I've created a myget feed with netcore versions of Akka modules
https://www.myget.org/F/akka-netcore/api/v3/index.json
Only Akka, Persistence and TeskKit are present at the moment

@alexvaluyskiy I tried the myget feed and it has only one package: Mono.Cecil.

@jbtibor try to check prerelease packages

Thank you, this was the missing piece. I have the packages available now.

Is there any plans (timeframe) to have a akka version ready on Core?

@willieferguson What is outstanding on your work on Remote and Cluster?

Thanks for the hard work.
Core support for _DotNetty_ was merged last week: DotNetty#170

Updated NetCore packages on MyGet - https://www.myget.org/feed/Packages/akka-netcore

  • Moved to NetStandard1.4
  • Released Akka.Streams
  • Moved from project.json to MsBuild 15 (need VS 2017 RC)

@uatec I've ported Remote and Cluster - see 3dea1132001046d09e02dbb58d30f6b95a27cf42.

The biggest change required was to include the Akka IO transport in the remote specs. Before I can create a PR, I need to look at the Multi Node tests - these still have a dependency on Helios, but it might be fine to run these on NET45.

Akka IO transport is not production ready, it is just for tests

Is there any progress on this issue. As VS2017 has been released today with a lot more support for .NET Core we are looking into migrating some solutions to .NET Core. These solutions do however rely heavily on Akka.NET.

As it's quiet in here since november I'm wondering if there is any progress? Maybe even an ETA?

Thanks!

@johnvanloon we're constantly working on this. From my perspective, we're quite close to get in on board. Some of the packages (core + persistence) already have .net core compatible feeds on MyGet. @alexvaluyskiy will know the details.

Hi @alexvaluyskiy. How can I contribute to porting to .NET Core part of the project?

@ArturKarbone look at thic PR https://github.com/akkadotnet/akka.net/pull/2532
It should be merged anyway.

It has some blockers, some of them I can't fix right now

I'm getting this error about the Google.ProtocolBuffers dependency while restoring the Akka.Persistence package:
image
I'm using a .NET Standard 1.4 class library. Am I doing something wrong or is Akka.Persistence not yet compatible with .NET Standard 1.4?

@MonneOnrust I believe there's a new protobuff package we'll need to switch to that is .NET Standard compatible.

@Aaronontheweb thanks for your answer. BTW, the same goes for Reactive.Streams in the Akka.Streams package.

@alexvaluyskiy I would like to contribute to netcore too. I successfully updated Akka.Remote to use Google Protobuf3 but have no idea where to push PR.

Also got some technical questions such as if Akka supports communication between different versions such as application compiler with Akka 1.1 could sent messages to application compiled with Akka 1.5?

If yes proto2 cannot be replaced by Hyperion.

Update: I see coreclr_final was updated just now and it compiles. Is it correct branch to contribute to?

@OlegZee yes, coreclr_final is up-to-date coreclr branch.
I've also tried to convert all proto2 code to proto3 (converted all projects, except Remote).
And right now I want to try Hyperion instead of proto2. It works good in almost everywhere, except two cases with these types
Akka.Persistence.UnconfirmedWarning
Akka.Cluster.GossipEnvelope
If you could help to determine, why those messages are not processed correctly in the tests, it would be helpful. You can use this branch https://github.com/alexvaluyskiy/akka.net/tree/hyperionakka

dotnet pack does not support a version suffix properly. https://github.com/NuGet/Home/issues/4337
We should use this workaround

@alexvaluyskiy as of https://github.com/petabridge/NBench/pull/195, we should be all finished with NBench tooling for .NET Standard 1.6. @heynickc had to resolve some issues with how assembly loading behaves differently on .NET Core for dependent assemblies, but he's got that working now. Pushing out a new release of the NBench tools tomorrow and we should be able to drop them into Akka.NET without any further issues there, god-willing.

Would I be able to use akka.net for dotnet core by building the v1.3 branch? I only need the core runtime actor functionality. It is for a prototype project build in dotnet core, so I am happy to use a "beta" version of Akka.

@kvinther yes, you will. Some modules are not yet ported but the core is working perfectly.

@kantora Would Akka.Cluster work?

@ryudice I've tested it on Docker with Ubuntu and it worked fine. Hyperion serializer is still not supported, but JSON should do well.

Is the porting complete. Can I get the feed from NuGet for Akka.NET core packages

@VenkateshSrini It will be complete when we release 1.3

Wow!!!! That means i can develop full aka. Net application in. Net core.
I'm I right in saying that? I see June 30 as the targeted date but that
date is pushed. So what is the target date now

On Aug 1, 2017 6:17 PM, "Arjen Smits" notifications@github.com wrote:

@VenkateshSrini https://github.com/venkateshsrini It will be complete
when we release 1.3

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/akkadotnet/akka.net/issues/2153#issuecomment-319359990,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABHPMN3bSlskcGNRW5Q4limdod29IF9mks5sTx5xgaJpZM4JHhoi
.

done

What?!

Is it available in NuGET. I want to try this in .NET core.

Was this page helpful?
0 / 5 - 0 ratings