Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Akka.IO and Streams update #2405

Closed
wants to merge 17 commits into from
Closed

Conversation

Horusiath
Copy link
Contributor

@Horusiath Horusiath commented Dec 8, 2016

DO NOT MERGE: work in progress

This is work I took over from @willieferguson on the akka-io branch. This PR contains new design of akka.io - without previous abstractions in form of socket channels. It's working directly on SocketAsyncEventArgs not and should be compatible with .NET Standard 1.3+ (no BeginXXX and EndXXX methods anymore).

Once I'll fix them, I'll remove WIP marker.
/cc #2153

@Horusiath
Copy link
Contributor Author

Looks like Mono build doesn't specify MONO compile flag - therefore compilation chain fails on IPAddress.MapToIPv4 as it's not implemented on Mono.

@alexvaluyskiy
Copy link
Contributor

Just move this extension method to Akka.Core package

public static IPAddress MapToIPv4(this IPAddress ipa)

@Horusiath
Copy link
Contributor Author

@alexvaluyskiy I've moved it and since it's using reflection, I've added conditional flag to use it only for mono (#if MONO), and use normal .NET API on remaining platforms. But it looks like the MONO flag is not set when building on linux-mono agent.

@alexvaluyskiy
Copy link
Contributor

@Horusiath change this line https://github.com/akkadotnet/akka.net/blob/dev/build.fsx#L26 to this
let configuration = if isMono then "Release" else "Release Mono"

@Horusiath
Copy link
Contributor Author

Thanks (the condition should be reversed IMO ;) ).

@alexvaluyskiy
Copy link
Contributor

@Horusiath It is not necessary to use #MONO flag here. You can stay with extension method (with reflection inside). The extension method never execute if there is the original method with the same signature.

@Horusiath
Copy link
Contributor Author

Horusiath commented Jan 16, 2017

@alexvaluyskiy

The extension method never execute if there is the original method with the same signature.

The current impl has that shape, because mono build was blowing up when I left this as an extension method before.

@Aaronontheweb
Copy link
Member

Looks like the Mono build is still having trouble on this PR.


[09:13:43]	./build.sh: line 13: wget: command not found
[09:13:43]	Cannot open assembly '/checkout/src/.nuget/nuget.exe': No such file or directory.
[09:14:31]	Running build failed.
[09:14:31]	Error:
[09:14:31]	Building /checkout/src/Akka.sln failed with exitcode 1.
[09:14:31]	Status:           Failure
[09:14:31]	  1) Building /checkout/src/Akka.sln failed with exitcode 1.
[09:14:31]	  2) CS1061: IO/IPExtensions.cs(28,65): Type `System.Net.IPAddress' does not contain a definition for `MapToIPv4' and no extension method `MapToIPv4' of type `System.Net.IPAddress' could be found. Are you missing an assembly reference?
[09:14:31]	  3) CS1061: IO/IPExtensions.cs(31,65): Type `System.Net.IPAddress' does not contain a definition for `MapToIPv6' and no extension method `MapToIPv6' of type `System.Net.IPAddress' could be found. Are you missing an assembly reference?
[09:14:31]	
[09:14:35]	Process exited with code 42

@Horusiath Horusiath force-pushed the akka-io branch 2 times, most recently from 607bfdf to 5085539 Compare February 7, 2017 19:55
@Horusiath
Copy link
Contributor Author

Missing parts, I'm working on:

  • Failing linux/mono tests - I've fixed most of them locally (by default creating Socket on Mono assigns it an AddressFamily.InterNetworkV6... which is not supported by Mono itself).
  • There are some other tests failing on linux/mono for reason I don't know.
  • I've created a stress test similar in mind to Helios horizontal scale test... but it can boil down my comp. Not sure why yet.

@alexvaluyskiy
Copy link
Contributor

@Horusiath should this https://github.com/Horusiath/akka.net/blob/akka-io/src/core/Akka/IO/SimpleDnsManager.cs#L56 returns true?

@Horusiath
Copy link
Contributor Author

It looks like the current issues on linux/mono environment will block this PR, and we cannot do much about: https://bugzilla.xamarin.com/show_bug.cgi?id=53229

@alexvaluyskiy
Copy link
Contributor

Could we temporary skip that tests on Mono. And create a know issue.


namespace Akka.Util
{
public static class ByteHelpers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why public?

@Horusiath
Copy link
Contributor Author

I've implemented IsMatch(ByteString substring, int fromIndex) method to optimize case when we check if substring starting from given index matches given one. This was pretty intensive case in Framing class, and it was using something like Equals(x.Slice(possibleMatch, y.Count), y) which was allocating way more objects than necessary. This version doesn't allocate any heap objects, it's just plain while loops.

alexvaluyskiy and others added 5 commits May 5, 2017 12:33
…adotnet#2622)

* added FAKE task to build proto files

* Added ClusterMessages protobuf3 serializer

* Added protobuf3 serialization to ClusterTools

* fix cluster serializer

* Made protobuf classes internal

* Added nbench spec for serialization

* update protobuf dependency in the projects

* Added sharding serializer

* fix serialization
* migrated akka.remote to protobuf3

* ported Akka.Remote.* to protobuf3, reverted src\core\protobuf content and moved new stuff to src\core\protobuf3 folder

* fixed serialization tests (handled TODOs left for myself)

* removed redundant ConnectionAssiciation.cs file from AkkaIO folder

* remote protobuf3 folder

* fix API

* fix API 2
…kadotnet#2623)

Protobuf3 serializers for system messages and for primitive types
@alexvaluyskiy alexvaluyskiy mentioned this pull request May 6, 2017
18 tasks
* Converted Akka.NET project to NetStandard
@Aaronontheweb
Copy link
Member

cc @alexvaluyskiy doesn't this need to target the v1.3 branch going forward now?

@alexvaluyskiy
Copy link
Contributor

@Aaronontheweb yes, it should target v1.3

@Horusiath Horusiath force-pushed the akka-io branch 2 times, most recently from 58b2d68 to cf350af Compare May 9, 2017 19:41
alexvaluyskiy and others added 5 commits May 11, 2017 17:16
* temporarily ignore Persistence.Tests due to OutOfMemoryException

* switch to dotnet-xunit and upgrade to xunit 2.3.0 beta

* formatting by vs

* tests already build so no need for build dependency

* straggling commented out code from local tests

* make windows tests pass with xunit 2.3.0

* skip snapshotstorespec on Linux, but still run on mono

* skip Persistence.Sqlite.Tests temporarily

* set back to original compiler directive based skip tests
This PR updates the docfx configuration file to support .netStandard
project files.
@Horusiath Horusiath force-pushed the akka-io branch 2 times, most recently from dd2cc7c to 98337f5 Compare May 16, 2017 20:01
Marc Piechura and others added 5 commits May 18, 2017 06:48
Enable performance tests on Windows/.NET Framework
This PR fixes a number of spelling typos, a number of copyright headers,
replaces various bits with <inheritdoc/>, and fills in more TBD placeholders.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants