I've been wanting to give this architecture a go f...
# javascript
e
I've been wanting to give this architecture a go for a while now, mostly to create a reusable template. Would be a nice example to showcase how Multiplatform can be leveraged, I guess?
🔥 1
d
What's a concrete example of this architecture?
e
To keep it short, we talk to mainframes via TCP sockets. While investigating browser support for our applications, for whatever reason it was decided implementing a WebSocket server was out of question. At that point, with the only option being using TCP and its unavailability in a web page context, my idea was to offer a browser extension and an accompanying native host. Obviously it's not something I'd want to ship or maintain, but it's probably a good exercise. The SPA uses the browser extension + the native host as proxy for the server, instead of using the typical REST APIs or WebSockets.
👍 1
Btw, if Ktor is going to support the embedded server on Windows, than that could be another solution. We can use browser > embedded server via WebSocket on localhost > server via TCP socket. But the native host solution is cool because the browser manages its lifecycle.