37

We are trying to build a new Business API layer in between UI and applications/services.

Which project in spring is best and will serve the needs for developing Biz Api's with restful services?

Is it Spring Cloud or Spring Boot?

serenesat
  • 4,611
  • 10
  • 37
  • 53
SpringForLiving
  • 599
  • 2
  • 5
  • 12

2 Answers2

80

Spring Boot is app-centric. As @kryger said, Spring Cloud builds on boot. It solves higher level problems, such as:

  • Distributed configuration: How to configure every instance of all of your services (standard boot config files checked into git or svn and distributed via config server).
  • Service registration and discovery: how to locate a specific instance of a service (using Netflix Eureka)
  • Client Side load balancing: intelligently choose an instance of a service to use (using Netflix Ribbon) via a smart algorithm such as: round robin or response time
  • Plug into Ribbon via Spring Rest Template or Netflix Feign.
  • Serve all assets and api's via a proxy that is plugged into service discovery and load balancing (Netflix Zuul).
  • Stop cascading api failures with the Circuit Breaker pattern via Netflix Hystrix and visualize the health of all circuits with the Hystrix Dashboard.
  • Send commands to all or some services via a lightweight message bus.
  • Use oauth2 to protect resources
  • and other things I've probably forgotten.
spencergibb
  • 24,471
  • 6
  • 69
  • 75
2

Well the choice is yours based upon the need .

If you have multiple services and need service configuration , discovery , fault tolerant etc. then use Spring cloud features using spring boot app. Also cloud native libraries are also available for the dedicated Cloud services providers .

If you have just a single service and you are aware of your hosting mechanism then just a simple spring boot App is good enough .

Maiden
  • 207
  • 3
  • 4
  • My upvote was based on the second paragraph, especially the phrase "if (...) you are aware of your host mechanism". Good point. – Almir Campos Dec 31 '19 at 21:33