-
Notifications
You must be signed in to change notification settings - Fork 357
Aggregation of reactivesocket-java-impl into reactivesocket-java #89
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
Conversation
first commit
ReactiveSocket over Aeron
…ffer to send a message if the message is larger than the MTU size. Created a AeronClientDuplex connection
added code to establish a connection. Publish operator will now use o…
pulling from master
Mtu length
updating to reactive socket 1.0.1
merging from master
updated to match reactive socket java changes
throwing a TransportException when a connection is closed
* aeron client can run embededded media driver so you don't have to run the external driver * added toString methods for duplex connections for debugging and access log purposes
changed constructor access level to protected to enable subclassing
use StandardCharsets
This module provides support for encoding/decoding ReactiveSocket data and metadata into using different mime types as defined by [ReactiveSocket protocol](https://github.com/ReactiveSocket/reactivesocket/blob/master/Protocol.md#setup-frame). The support for mime types is not comprehensive but it will atleast support the [default metadata mime type](https://github.com/ReactiveSocket/reactivesocket/blob/mimetypes/MimeTypes.md) See README.md for usage.
…-java-impl into yschimke-testutil
For default metadata mime-type, using Jackson CBOR codec, produces more allocations (one buffer allocation per value) which are unnecessary. This was the major driving factor to invest in a _simple_ codec that can reduce allocations and be more suitable for ReactiveSocket design (using thread-local pooled buffers). Although, the codec is intended to be used only for a map type, but it is rather generic to be used for a majority of CBOR data types. If this proves useful, we can extend this for the remaining data types.
…cket-java-impl into custom_meta_codec
Problem When a TransportException happens on the transport, it is propagated up in the chain but the Susbscription is not cancelled. Then, any source associated with the chain continue to emit events. One example of that is the Keep-Alive Observable, which regularly emit keep-alive messages at fixed interval, when the connection is closed, the observable has to be cancelled. Solution In all DuplexConnection implementation, cancel the Subscription when we saw a TransportException.
…lation Propagate cancellation when a TransportException occurs
Custom CBOR codec (for metadata)
* Refactor Factory to Connector + Implement availability Problem We need to comply with the recent refactoring "Factory to Connector" introduced in reactivesocket-java. Also, implementation of DuplexConnection have to return an availability. Solution The Factory to Connector refactoring is pretty straight forward. All implementations of DuplexConnection return an availability which directly map the state of the underlying resource (0.0 if the resource is closed, 1.0 otherwise). This will greatly help the load-balancer to select a valid connection. I removed the blocking method from reactivesocket-java, so I moved some utility blocking code inside the TestUtil class. Clean-up of the Netty implementation, remove unused args, explicitey specify tcp socket configuration. Shortened the toString name to ease log-reading. Bug All DuplexConnection implementations now cancel the subscription when an exception occurs. This fix the problem, where the Keep-Alive Observable kept trying to send a keep-alive on a closed connection. * Refactor the TestUtil helper to return CompletableFuture * rs version * Restore rs dependency to latest.release * Remove mavenLocal in gradle build file * Propagate cancellation in all cases * Use helper method from ReactiveSocket Unsafe
|
This is cool and will reduce a bunch of headaches :) Few questions:
You do not have to do all the changes in this PR, we can merge this (I don't think anyone can review :)) and then do incremental changes. I just thought it will be good to discuss this since we are doing the restructuring. |
I don't think so, @rdegnan can confirm.
Again, I agree. I hesitated to do exactly this but I wanted to limit the already large PR.
Do you mean a subdirectory containing multiple submodules?
We don't have "-java" in the module name, only in the name of the repo.
It will change after I split |
In order to keep the reactivesocket name and simplify searching in maven central, rename all the 'rs-*' project into 'reactivesocket-*'.
|
Per offline discussion, I renamed the "rs-" project into "reactivesocket-" |
* Introducing default mime type for metadata. As per discussion in issue rsocket#89, this change proposes a default mime-type for metadata payloads. Existing `Schema.md` is replaced by this new `MimeTypes.md` document which elaborates this new mime type. * Incorporating review comments. - Removed the custom encoding and using CBOR. - Text formatting. - Language correction for optional encoding. * Updates the mimetype name Modified the name of the mimetype to "application/x.reactivesocket.meta+cbor" since it is a specific schema for metadata and not just cbor. * Update Protocol.md * Update Protocol.md
Problem
The current multi repo organization of reactivesocket is annoying to use, it
forces us to publish jars to test libraries.
Solution
Migrate all the subprojects from reactivesocket-java-impl into reactivesocket-java.
To avoid having version number conflict, and to start a convention, I renamed the
projects like this:
Note
Both git histories are kept.