This week's book giveaways are in the Cloud and AI/ML forums.
We're giving away four copies each of Cloud Native Patterns and Natural Language Processing and have the authors on-line!
See this thread and this one for details.
Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Websocket coverage in Spring in Action

 
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With this new edition it appears Websockets are covered and I'm really interested in this area. In past demos I've seen messaging queues like RabbitMQ used to implement websockets and in this book it appears that STOMP is used specifically for websockets and a separate chapter is devoted to messaging.

Is STOMP the standard websockets implementation for Spring? Does it differ from the standard Spring websocket module?
 
author
Posts: 396
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

STOMP and WebSocket are related, but different concepts. STOMP is to WebSocket what HTTP is to TCP Socket. That is, it provides a standard format for the messages sent over WebSocket.

Spring's low-level WebSocket implementation is fine, but it leaves it up to you to coordinate the message format between client and server. Add STOMP on top of that and that problem is handled for you. Spring in Action covers both models, but truthfully, I favor the STOMP option, as it lets you write message handlers in a way very similar to how you write HTTP request handlers in Spring MVC.


Matt Kidd wrote:With this new edition it appears Websockets are covered and I'm really interested in this area. In past demos I've seen messaging queues like RabbitMQ used to implement websockets and in this book it appears that STOMP is used specifically for websockets and a separate chapter is devoted to messaging.

Is STOMP the standard websockets implementation for Spring? Does it differ from the standard Spring websocket module?

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!