Closed jimmarino closed 3 years ago
43 files ±0 43 suites ±0 5s :stopwatch: ±0s 104 tests ±0 100 :heavy_check_mark: ±0 4 :zzz: ±0 0 :x: ±0
Results for commit b6ce3adf. ± Comparison against base commit b6ce3adf.
:recycle: This comment has been updated with latest results.
Getting started
This PR is for discussion and not intended for merging yet.
The purpose of the demo protocol is to provide a simple data transfer extension that can be used to:
To get started, run DemoPushStreamTransferTest. Only the web socket push streaming scenario is currently implemented (see below).
Longer-term idea
I think there may be value in abstracting some of the capabilities into this extension into more general, production-grade extensions:
We may want to add the ability to publish web socket endpoints in the web extension similar to the way JAX-RS works
We may want to have an extension (or extensions) that supports web socket and webhook-based messaging
Regarding point 2, a websocket/webhook data transfer extension could support a use case where "event data" is transferred via a dataspace. In this case, the provider connector transfer extension could receive a request for an event stream and forward it (with access credentials and an endpoint URL) to another system, which would begin publishing a stream. On the consumer connector side, the transfer extension would have setup a webhook or websocket endpoint. This endpoint would be outside the controller process and could be a lambda or some other infrastructure that receives events. If the events are JSON, they can be dispatched by their polymorphic type to a handling system.
What's implemented and what could be added
I think there are a number of use cases the demo extension can implement:
Push streaming over web sockets. The consuming connector sets up a destination that the providing connector publishes to over a web socket. This is implemented in DemoPushStreamTransferTest.
Push streaming over HTTP. This is not yet implemented but could be done by creating an HTTP StreamSession implementation and JAX-RS endpoint to receive messages.
Object storage over HTTP. The consuming connector provisions a storage container and sends a request to the providing connector which sends the data over HTTP. This has not been implemented and could be a good thing for someone to pick up.
Pull streaming over web sockets. The consuming connector sends a request to the provider, which provisions an endpoint destination the consuming connector can subscribe to and receive data.
Pull streaming over HTTP. I'm not sure we want to do this, but for completeness, we can list it. Basically, scenario 4 but over some form of HTTP long-polling.