Giter VIP home page Giter VIP logo

xoom-net-wire's People

Contributors

conradcreel avatar mihaj avatar tjaskula avatar vaughnvernon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

xoom-net-wire's Issues

Target netstandard2.0 et netstandard2.1

The goal is to use new C#8 features like default interface implementation and nullable types which helps a lot porting java code to .net.

  • Change TargetFramework to TargetFrameworks in csproj, listing netstandard2.0;netstandard2.1

  • Add <LangVersion>latest</LangVersion>

  • Add <Nullable>enable</Nullable>

  • Change TargetFramework to TargetFrameworks in csproj, listing netcoreapp3.0 for test project

  • Finish #58

  • Finish #59

Investigate test crash on Travis-ci

The log from the test : https://travis-ci.org/vlingo-net/vlingo-net-wire/jobs/601331813

A total of 1 test files matched the specified pattern.
The active test run was aborted. Reason: Test host process crashed : Unhandled exception. Unhandled exception. Unhandled exception. System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'.
   at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult, SocketError& errorCode)
   at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
   at Vlingo.Wire.Fdx.Bidirectional.BasicClientRequestResponseChannel.ReceiveCallback(IAsyncResult ar) in /Users/travis/build/vlingo-net/vlingo-net-wire/src/Vlingo.Wire/Fdx/Bidirectional/BasicClientRequestResponseChannel.cs:line 279
   at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
   at System.Net.ContextAwareResult.CompleteCallback()
   at System.Net.ContextAwareResult.<>c.<Complete>b__15_0(Object s)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Net.ContextAwareResult.Complete(IntPtr userToken)
   at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
   at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionCallback(Int32 numBytes, SocketError errorCode)
   at System.Net.Sockets.OverlappedAsyncResult.CompletionCallback(Int32 numBytes, Byte[] socketAddress, Int32 socketAddressSize, SocketFlags receivedFlags, SocketError errorCode)
   at System.Net.Sockets.SocketAsyncContext.BufferMemoryReceiveOperation.InvokeCallback(Boolean allowPooling)
   at System.Net.Sockets.SocketAsyncContext.AsyncOperation.<>c.<TryCancel>b__18_0(Object o)
   at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'.
   at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult, SocketError& errorCode)
   at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
   at Vlingo.Wire.Fdx.Bidirectional.BasicClientRequestResponseChannel.ReceiveCallback(IAsyncResult ar) in /Users/travis/build/vlingo-net/vlingo-net-wire/src/Vlingo.Wire/Fdx/Bidirectional/BasicClientRequestResponseChannel.cs:line 279
   at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
   at System.Net.ContextAwareResult.CompleteCallback()
   at System.Net.ContextAwareResult.<>c.<Complete>b__15_0(Object s)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Net.ContextAwareResult.Complete(IntPtr userToken)
   at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
   at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionCallback(Int32 numBytes, SocketError errorCode)
   at System.Net.Sockets.OverlappedAsyncResult.CompletionCallback(Int32 numBytes, Byte[] socketAddress, Int32 socketAddressSize, SocketFlags receivedFlags, SocketError errorCode)
   at System.Net.Sockets.SocketAsyncContext.BufferMemoryReceiveOperation.InvokeCallback(Boolean allowPooling)
   at System.Net.Sockets.SocketAsyncContext.AsyncOperation.<>c.<TryCancel>b__18_0(Object o)
   at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
Unhandled exception. System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'.
   at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult, SocketError& errorCode)
   at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
   at Vlingo.Wire.Fdx.Bidirectional.BasicClientRequestResponseChannel.ReceiveCallback(IAsyncResult ar) in /Users/travis/build/vlingo-net/vlingo-net-wire/src/Vlingo.Wire/Fdx/Bidirectional/BasicClientRequestResponseChannel.cs:line 279
   at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
   at System.Net.ContextAwareResult.CompleteCallback()
   at System.Net.ContextAwareResult.<>c.<Complete>b__15_0(Object s)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Net.ContextAwareResult.Complete(IntPtr userToken)
   at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
   at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionCallback(Int32 numBytes, SocketError errorCode)
   at System.Net.Sockets.OverlappedAsyncResult.CompletionCallback(Int32 numBytes, Byte[] socketAddress, Int32 socketAddressSize, SocketFlags receivedFlags, SocketError errorCode)
   at System.Net.Sockets.SocketAsyncContext.BufferMemoryReceiveOperation.InvokeCallback(Boolean allowPooling)
   at System.Net.Sockets.SocketAsyncContext.AsyncOperation.<>c.<TryCancel>b__18_0(Object o)
   at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
Unhandled exception. System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'.
   at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult, SocketError& errorCode)
   at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
   at Vlingo.Wire.Fdx.Bidirectional.BasicClientRequestResponseChannel.ReceiveCallback(IAsyncResult ar) in /Users/travis/build/vlingo-net/vlingo-net-wire/src/Vlingo.Wire/Fdx/Bidirectional/BasicClientRequestResponseChannel.cs:line 279
   at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
   at System.Net.ContextAwareResult.CompleteCallback()
   at System.Net.ContextAwareResult.<>c.<Complete>b__15_0(Object s)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Net.ContextAwareResult.Complete(IntPtr userToken)
   at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
   at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionCallback(Int32 numBytes, SocketError errorCode)
   at System.Net.Sockets.OverlappedAsyncResult.CompletionCallback(Int32 numBytes, Byte[] socketAddress, Int32 socketAddressSize, SocketFlags receivedFlags, SocketError errorCode)
   at System.Net.Sockets.SocketAsyncContext.BufferMemoryReceiveOperation.InvokeCallback(Boolean allowPooling)
   at System.Net.Sockets.SocketAsyncContext.AsyncOperation.<>c.<TryCancel>b__18_0(Object o)
   at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
Test run in progress.Test Run Aborted.
Total tests: Unknown
     Passed: 15
 Total time: 14.4311 Seconds
The command "dotnet restore ./src/Vlingo.Wire.sln; dotnet build ./src/Vlingo.Wire.sln; dotnet test ./src/Vlingo.Wire.Tests/Vlingo.Wire.Tests.csproj;" exited with 1.
Done. Your build exited with 1.

RSocket implementation

Based on Java reference implementation:

  • however we should not expose Task

Note: This is postponed because RSocket doesn't support Aeron for now. The main reason of introducing it on Java side.

SocketChannelWriter should be asynchronous

SocketChannelWriter is synchronous today because its Write method signature is returning an interesting` about the number of bytes read. But for asynchronous operation it cannot be returned straight away, only on received callback.

There are two solutions (or more):

  • Either return the number of bytes that we want to write to the buffer before sending
  • Or implement a different pattern but this would also has a ripple effect on java side.

Implement System.IO.Pipelines for network streams

Instead of managing buffers manually, and all overhead it adds to work with sockets, .NET core community pushes towards using of System.IO.Pipelines which should be more performant, easier to understand and deals with built in features like back-pressure.

Add Travis integration

Related to #57

According to the following template

language: csharp
jobs:
  include:
    - os: linux
      dotnet: 3.0.100
      mono: none
    - os: osx
      osx_image: xcode11
      dotnet: 3.0.100
      mono: none
sudo: false  # use the new container-based Travis infrastructure
script:
  - dotnet restore ./src/Vlingo.UUID.sln;
    dotnet build ./src/Vlingo.UUID.sln;
    dotnet test ./src/Vlingo.UUID.Tests/Vlingo.UUID.Tests.csproj;

notifications:
  slack: vlingo-platform-net:kwiEEBuUpRnz2rYYYstTBpXr

Change Appveyor configuration

Related to #57

Make changes according to this template

version: 0.0.{build}
image:
  - Visual Studio 2019
  - Ubuntu
configuration: Release
skip_commits:
  message: /.*\[ci\-skip\].*/ 
before_build:
  - dotnet restore src/Vlingo.UUID.sln
build:
  project: src/Vlingo.UUID.sln
  verbosity: minimal
  publish_nuget: true
test_script:
  - dotnet test src/Vlingo.UUID.Tests
deploy:
  - provider: NuGet
    api_key:
      secure: keYt7U6hDEIBzKLfVMts/6deGh0bqJdcjhlO2mWEJ04SRIS0Y6+e3EjszsRqq5nJ
    skip_symbols: true
    artifact: /.*\.nupkg/
    on:
      branch: master
notifications:
  - provider: Webhook
    url: https://webhooks.gitter.im/e/2b56d1ca84637acb9ee8
    method: POST
    on_build_success: true
    on_build_failure: true
    on_build_status_changed: true

RawMessage CopyBytesTo doesn't give the expected results

In the following UT, RawMessage.CopyBytesTo is wrong because when parsing to text we have a discrepancy where the parsed text should equal to expected :

Assert.Equal() Failure
          ↓ (pos 0)
Expected: JOIN\nid=1 nm=node1 op=localhost:35745 app···
Actual:   ����JOIN\nid=1 nm=node1 op=localhost:35745···
          ↑ (pos 0)

There are two extra characters.

Implement ApplicationOutboundStreamActor if necessary

This is for the purpose of tracking the missing feature compared to java version. It is about ApplicationOutboundStreamActor which seems not used inside the wire but should be implemented if used in external lib.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.