JasperFx / wolverine

Supercharged .NET server side development!
https://wolverinefx.net
MIT License
1.17k stars 126 forks source link

HTTP Message Transport #856

Open jeremydmiller opened 1 month ago

jeremydmiller commented 1 month ago

Problem

You know what technology is really, really good at request/reply mechanics? Good ol' fashioned HTTP.

What I'd like to propose is two things:

  1. A basic messaging transport for Wolverine based on HTTP. We can use message batching, and that'll be pretty simple. Assuming the application itself is behind a cluster, you even get some level of competing consumers
  2. A new kind of cheat in Wolverine so that when you call IMessageBus.InvokeAsync<T>() to do a remote request/reply, it can "see" that the message would be using HTTP and, issue a single request w/ expected reply via HTTP

Mechanics

What about Security?

Dunno, something to figure out to make any of this feasible.

Jasper (Wolverine's predecessor) actually had a generic HTTP messaging transport that could send batches of messages between Wolverine applications. Cool, but it got thrown away before even Jasper went 1.0.

Arne-B commented 1 week ago

I like the idea of having a "simple" transport which works without additional infrastructure.HTTP plays nice with firewalls and proxys and encryption is a solved problem via HTTPS. I would suggest using websockets for live events, but offer a plain http endpoint with batch support as a fallback where WS are not feasible or not desired.

jeremydmiller commented 1 week ago

@Arne-B I think we'd opt for a SignalR transport (finally) if we did that. I've done custom web sockets before, but I'm not wanting to sign up for that one ever again!

Arne-B commented 1 week ago

@jeremydmiller fair enough, been there... Since SignalR can use different kinds of transports, and WS(S) is one of them, it might even bring more flexibility. Since there are also clients readily available for different languages , I see that as a plus for easy integration.