Hey guys, I’ve implemented a coroutine-based multi...
# feed
j
Hey guys, I’ve implemented a coroutine-based multiplatform STOMP client over websockets (JVM/Browser/NodeJS). I would love to hear any feedback! (issues and PRs are welcome) https://github.com/joffrey-bion/krossbow
❤️ 2
👍 2
b
How's this different from ktor client?
j
Ktor doesn’t have a STOMP protocol implementation as far as I know. Or maybe I missed it? One of the possible backing websocket implementations of Krossbow is actually Ktor, but STOMP is a protocol built on top of websockets
b
I see, thanks for explaining it.
c
@Joffrey this is going off of my memory but I believe @jessewilson once told me that STOMP is not built on top of websockets and it has nothing to do with websockets in general. Maybe that's just me being pedantic, but I know that clarification helped my team decide to ditch stomp over WS.
j
What’s STOMP over websockets do for me that I can’t get with web sockets alone?
j
@Colton Idle STOMP is a frame based protocol that technically could be implemented on a plain TCP connection, yes. However, websockets already bring a frame structure to a TCP connection, and also they help use sockets on the web via HTTP upgrade, because you can’t just open a socket to a random port on a server you don’t own. So when you want to use STOMP in a browser, you pretty much have to rely on websockets (or an emulation of them like SockJS).
@jessewilson it’s an application level messaging protocol, it brings you more structure and features than raw websockets. Destinations (routes), headers, subscriptions, receipts, transactions... All of which could of course be implemented ad hoc, but when you use a standard you usually find libraries already implemented for you, and compatible server implementations. For instance Spring already supports STOMP out of the box, and it’s the first thing you find when you look for websockets in Spring. We could ask the same question for why use HTTP, it technically brings nothing you can’t do with TCP, because you could literally reinvent it yourself in a different way. It’s just higher level and standard.
j
Makes sense, thanks for teaching!
f
Thanks for the work on this, I’ve started using it in our android app and it’s nice and simple to use, and the docs are really good, so cheers
❤️ 1
c
4 years ago! blast from the past!
j
Thanks a lot @Fred Bowker, I really appreciate it 🙏
102 Views