kevinarthurackerman / remotiatr Goto Github PK
View Code? Open in Web Editor NEWRun your MediatR requests and commands from a remote client
License: MIT License
Run your MediatR requests and commands from a remote client
License: MIT License
Implement a raw TCP message transport. While HTTP runs over TCP, it would be more efficient to have a lower level implementation since we don't make use of HTTP specific features. Also, this implementation will support applications that don't use the MVC IApplicationBuilder
, so that it can run on just about any server.
IMessageTransport
that uses a TcpClient
to send the message. The transport just needs to send the message Stream
to the uri, and receive the response. You can use DefaultHttpMessageTransport
from RemotiatR.MessageTransport.Http.Client
as an example, but skip implementing batching and other advanced concepts for now.TRemotiatr
from the service collection and hook it up to a TcpListener
. It should be somewhat similar to the ProcessSingle
method of IApplicationBuilderExtensions
of RemotiatR.MessageTransport.Http.Server
.Follow the patterns of DefaultJsonMessageSerializer to create a binary serializer. The serializer should support self-referencing object graphs and preserve types (the same as the JSON serializer). This serializer should focus specifically on compressing the message size as much as possible without losing any precision.
Message caching should be configurable on the client and on the server so that two matching requests can return a cached response.
I'm still working out the details on this. Primarily, I'm working through the details of what a "matching" request should be; should it require an exact match, some sort of matching func, or something else. Feel free to share your thoughts.
Right now the HTTP message transport works and supports batching, but the batching support can be enhanced in the following ways:
message-lengths
header with the Transfer-Encoding: chunked
header, and write the chunk sizes to the stream before each message. See this link for brief details. Once this is complete the messages should stream and become available as soon as they are written. You might test this by adding a delay between writing each message and seeing if they arrive one after another, or if it waits until the end to send the whole request.Feel free to create a PR per main bullet.
This ticket is to add a second server to the example project to prove and demonstrate the multi-server capabilities of the library.
This ticket is to create a default NoopSerializer that will be used when no other serializer is specified. This serializer will primarily be used when the registered message transport ignores the serialization result anyways.
Serializer\Json
as a template to implement a the new serializer and registration code.Stream
that throws an exception if you actually attempt to read from it. The exception should inform you that you must either replace the no-op serializer with an actual serializer or you must use a message transport that does not use a serializer.A basic HTTP message transport exists that will be used for organizations that don't need to take advantage of HTTP extensions such as server logging, API documentation, and middle tier request caching. This ticket is to create a new HTTP message transport that will produce more standard RESTful HTTP requests.
Func<Type,HttpMethod>
, where HttpMethod
is an enum constrained to GET, PUT, POST, DELETE. Provide a reasonable default configuration, something like "all types with the postfix 'query' (non-case-sensitive) are GET, everything else is POST.IMessageQueryStringSerializer
interface that extends IMessageSerializer
. Create a default query string serializer that serializes the message object to a query string format, using the format "Parent.Child.Grandchild" for nested properties.Additional details about GET, PUT, POST
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.