Commit Graph

37 Commits

Author SHA1 Message Date
Mikael Mengistu 32ef3eb355 Hub<T> (#689) 2017-08-08 17:39:09 -07:00
Mikael Mengistu 8ba29b578d Dynamic Hub Change Part 2 (#644) 2017-07-14 15:54:31 -07:00
David Fowler 38efde7b50 Merge transport and hub protocols (#517)
* Merge transport and hub protocols
- This change merges the transport and hub protocols into a single protocol. The
idea being that sockets in a purely streaming layer that sends frames from the underlying
transport. This makes things like TCP possible and doesn't impose a framing layer at the lowest
level. This will make it possible to build servers like kestrel on top of the TCP layer.
- The Message was removed from the lowest layer of the stack and pushed into the hubs layer. Hub invocations
are framed with what was before the transport protocol. Connections also need to state upfront if they support
binary or not. This will determine how data will be serialized to the specific connection.
- Changed the SSE parser and writer to be strictly SSE without any of the transport protocol specific
information.
- To ensure we aren't using types in the wrong layers
- Moved protocol logic into SignalR
- Socket.Abstractions is now the root of the universe, Sockets.Common will likely be removed
or turned into Sockets.Common.Http.
- Move SSE parser to Sockets.Client and SSE writer into Sockets.Http
- Moved tests into the appropriate test projects
- Updated the spec
2017-06-05 09:45:40 -10:00
Andrew Stanton-Nurse 263dd0e4fe Fix #324 by adding streaming support to the server (#461) 2017-05-31 09:10:20 -07:00
David Fowler 9d9a52119e Progress towards splitting the layers (#473)
* Progress towards splitting the layers
- This is based on the work anurse did in anurse/endpoint-middleware-spike to
introduce a connection middleware pipeline that mimics much of our http
pipeline. The intent is that this layer will be generic enough to build both
SignalR and Kestrel on top of but we're not there yet. This change makes incremental
progress towards splitting apart sockets and http so that we can add the tcp transport
without breaking everything all at once.
- Created Microsoft.AspNetCore.Sockets.Abstractions where the primitives for
sockets live. That includes, ConnectionContext (formerly Connection), EndPoint,
ISocketBuilder, SocketDelegate, etc.
- ConnectionContext isn't in it's final form as yet, it still very closely mirrors
the original Connection object we had so that tests continue to pass.
- The HttpConnectionDispatcher doesn't know about EndPoint anymore, it just cares
about invoking the SocketDelegate.
- EndPointOptions has been removed as part of this change as it coupled http specific configuration
to the end point type. There's a new HttpSocketOptions that needs to be passed into MapSocket calls.
- Updated the tests to deal with the API changes.
2017-05-23 02:43:32 -07:00
David Fowler 2aabce48b4 Remove custom routing and path matching from HttpConnectionDispatcher (#471)
- We're now using the routing system in a very vanilla way now that
we're not using the URL space as part of the protocol.
- Removed the path argument from the HttpConnectionDispatcher (simplifies code and removes duplication from tests)
2017-05-20 00:34:29 -07:00
David Fowler 240a88f7af Make the http end points more resty (#470)
- Use HTTP verbs to describe functionality for endpoints
- Updated TransportProtocols.md
2017-05-19 23:37:17 -07:00
Andrew Stanton-Nurse 991c1d8517 Implement new Hub Protocol (Part Deux) (#390)
* convert to new protocol
* removed InvocationDescriptorRegistry because we're not yet sure about custom protocols
* update SocialWeather sample
* Moving ts client to using new protocol
* make the functional tests a little easier to run on ctrl-f5
2017-05-09 12:24:58 -07:00
BrennanConroy 0a3c7001d4 React to Logging API changes (#433) 2017-05-03 10:39:29 -07:00
Andrew Stanton-Nurse 2d278009b2 clean up client sample (#392) 2017-04-18 12:41:23 -07:00
David Fowler 63ce7f6160 Supported transports (#294)
Supported transport spike
- Allow turning transports on or off per end point with a flags enum
- Added `TransportType` to Sockets.Common
- Added tests
2017-03-20 12:23:00 -07:00
BrennanConroy 485f9595e2 EndPoint options and injection 2017-03-01 14:38:50 -08:00
David Fowler cd9ed9228a Remove streaming transport as a top level API (#110)
- Remove Streaming* classes from Sockets. The main
API will be channels based and streaming transports
will use the PipelineChannel (formerly FramingChannel) to
access messages.
- Added WriteAsync and ReadAsync to Connection and hid
the IChannelConnection from public API.
- Also fixed the fact that unknown methods caused server side
exceptions.
- Changed the consumption pattern to WaitToReadAsync/TryRead to avoid
exceptions.
- React to API changes
2017-01-11 04:01:49 -08:00
Andrew Stanton-Nurse d281cb72ea add "messaging" endpoints and transports
* Need a separate set of primitives to handle messaging
* Using Channels (not Pipelines!) to provide the data flow for messaging
* All transports are now "message" based transports
* Added an adaptor to convert message-based transports to serve
streaming endpoints
2017-01-09 16:01:08 -08:00
David Fowler 1b59fc6f80 DI enabled Microsoft.AspNetCore.Sockets (#47)
* DI enabled Microsoft.AspNetCore.Sockets
- Added AddSockets extension method to IServiceCollection
- Inject IApplicationLifetime into ConnectionManager to handle
graceful shutdown and added test.
- Call AddSockets from AddSignalR

* PR feedback
- Added AddSignalR overload that takes Action<SignalROptions>
2016-11-26 23:09:38 -08:00
Andrew Stanton-Nurse d299cc9186 apply license headers 2016-11-07 12:00:04 -08:00
David Fowler b114e4e9fd Get rid of RpcEndpoint and samples
- Merge RpcEndpoint and HubEndPoint, still need to move discovery of hub
methods to another class.
2016-11-03 00:17:01 -07:00
David Fowler b6f15338eb Cleanup and shuffling things
- Moved the InvocationAdapterRegistry registration to SignalROptions
- Moved the JsonNetInvocationAdapter to Microsoft.AspNetCore.SignalR
- Remove dead JavaScript code
2016-11-02 20:54:58 -07:00
David Fowler 0f863be588 Renamed JsonInvocationAdapter to JsonNetInvocationAdapter 2016-11-02 08:54:42 -07:00
David Fowler 9e7513a7bd Added UseSignalR 2016-11-02 03:20:44 -07:00
David Fowler 377711f68c Changes to redis and groups
- Made group add and removal async as they may be backed by a network
connection
- Added ISignalRBuilder and a pattern similar to mvc for doing extension methods off
AddSignalR
- Added RedisOptions
2016-11-02 02:29:04 -07:00
David Fowler 40039afd4f Make a SignalR project and SignalR.Redis project
- Moved RPC into SignalR for now since we don't have a middle layer yet.
- Fixed up name spaces
2016-11-02 01:49:05 -07:00
David Fowler 915ebbda6b Get rid of pub sub abstraction and add redis impl 2016-11-02 01:21:51 -07:00
David Fowler 4221db3890 Some cleanup and error checking
- Dispose hubs after invoke
2016-11-01 23:27:49 -07:00
David Fowler 53858495dc Hubs are more fleshed out (#11)
- `HubEndPoint<T>` : `RpcEndPoint<T>` where T is the Hub type. Optimizing for a single hub per connection here.
- Hubs get OnConnectedAsync and OnDisconnectedAsync methods that are invoked at the right time and with the right scope.
- Introduced HubLifetimeManager<THub> (naming TBD) which is the center of the universe for Hub behaviors.
2016-11-01 23:15:31 -07:00
moozzyk ffc0a048e3 Addressing review comments 2016-10-27 09:30:20 -07:00
moozzyk fd10deba6c Removing formatters 2016-10-27 09:30:19 -07:00
moozzyk a854b13754 Handling custom protobuf types 2016-10-27 09:30:18 -07:00
moozzyk 5d41b218f0 Fixing line protocol 2016-10-27 09:30:15 -07:00
moozzyk a8c831bad6 Very hacky protobuff support 2016-10-27 09:30:06 -07:00
moozzyk fb387ed03d Decoupling formatters from endpoints
Moving formatters out from Sockets
2016-10-25 16:37:23 -07:00
moozzyk 8b905907fe Typed formatters 2016-10-25 16:37:22 -07:00
moozzyk f64c986b5d Adding support to non-Json hub invocation 2016-10-25 16:37:21 -07:00
David Fowler e5e8d1bee3 Decouple the dispatcher from routing for easier testing 2016-10-04 00:12:07 -07:00
David Fowler 1a5138e972 Added hub sample 2016-10-02 03:23:23 -07:00
David Fowler 58e58b7fb7 Added JSON RPC demo 2016-10-02 01:51:43 -07:00
David Fowler c3753c4f0e Renamed the project and split into class library and sample 2016-10-01 00:43:33 -07:00