Replies: 2 comments
-
Hey @viglucci Thanks for starting this thread. If I get it right, are you mainly looking to use if the HTTP router, middleware, and the controllers can easily be used elsewhere like with socket.io or, in this case, with RSocket? Currently, they are limited to HTTP only, but nothing is stopping us from extracting them into a reusable API which is then leveraged by the HTTP layer and RSocket. Now, I look at the routing system + middleware + controllers as a convenience layer. But is there anything you see that is stopping you from having an integration in the first place? I agree that it may not have the desired API and DX. So let's say
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply @thetutlage. I think you correctly understood what I was asking. To clarify a bit further as well, the goal would be to be able to write an Adonis controller (and Middleware, etc.) that would be able to serve either HTTP or WebSocket/RSocket requests, without the controller or middleware needing to be needlessly aware of the transport protocol that was being used (HTTP vs WebSocket, etc.). Of course, there are some concepts though that only make sense to particular transports (Headers for HTTP, etc.), so some APIs may need to be generic or differ based on transport.
The primary hurdle to trying to create an integration currently would be a lack of familiarity with Adonis's internals. If there are prior works or existing non-http integrations you could recommend that we look at for inspiration, that could help us with getting started exploring an integration. |
Beta Was this translation helpful? Give feedback.
-
Hi all, I'm one of the maintainers on https://github.com/rsocket/rsocket-js, and I've been interested in trying to see what a rsocket-js + Adonis integration would look like. I'm mainly interested in seeing if Adonis could be a good framework for building RSocket-powered applications in TS, in the same way, that Spring is the go-to application framework for Java + RSocket.
Is there somewhere I can learn more about what it would take to integrate a non-HTTP transport into Adonis's existing patterns? My goal would be to still leverage the Routing and Controller patterns familiar to Adonis, but with RSocket as the transport protocol, rather than HTTP.
I have found the guide on using socket.io, however, I would say that this approach falls short of what I am envisioning, as it does not seem to be able to leverage the existing Routing and other facades available to HTTP scenarios.
Thanks for any info you can provide.
Beta Was this translation helpful? Give feedback.
All reactions