This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

JAX-RS2.0- Video question

 
Ranch Hand
Posts: 1907
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Alex,
REST based services are now preferred ways of developing web services. In the past , i have seen the discussion on other forums that REST based services  can eliminate the need of middle ware(broker based architecture), mainly asynchronous messaging. What is your opinion on this? REST based services(mainly http) are primarily synchronous. How we can achieve message delivery guarantee, scalability,caching  which are much doable in broker based architecture etc
 
Author
Posts: 114
11
Spring Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Arjun

The short answer is that if you want message delivery guarantee, scalability and caching (typical MQ broker qualities) then you should use a message broker. Don't expect or try to make REST do MQ things. It was not designed for that. And precisely because they are quite different is why I don't see that they are competing technologies. They solve different problems and often complement each other.

For communication between microservices within the same organizational space then a message broker offers the best set of features such as guaranteed delivery, reliability, encryption, clustering, efficient wire-level protocol, async behavior, and so on. REST operates over HTTP which is not reliable and message delivery is not guaranteed. However, the REST pattern is far more expressive and is ideally designed for use by external developers who don't know (or need to know) more than just the resources the endpoint represents. So a possible architecture is that the services within your organization communicate over a message broker but communicate with the outside world via a REST interface (possible via a gateway or something similar).

There may be use cases where using REST internally is the best option and it is often used by microservice developers to allow services to communicate with each other.

Alex
 
Ranch Hand
Posts: 8934
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IMHO the main benefit of REST based architecture is simplicity. There are some patterns like retry , circuit breaker which can be used.Please refer to links here
https://dzone.com/articles/understanding-retry-pattern-with-exponential-back
 
It means our mission is in jeapordy! Quick, read this tiny ad!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!