What is the difference between the concepts of service
/user provided service
and apps
in Cloud Foundry? After all both expose URLs
So when is it recommended to create a service and when an app?
The app
sits on top of the stack and often has a user-interface. It consumes services (is built on services). The Cloud Foundry app typically runs in the browser and is accessible via an URL. There are apps that have no route (not an accessible URL).
A service
provides consumable functionality. It also has an URL, so that apps or other services can reach it. A typical service is a database or a bot / conversation / dialog service, a map or some sign-on / password service.
To make it more fun, there are services that wrap an app and make the app's functionality accessible via an URL. I would recommend reading the Cloud Foundry overview or Bluemix overview. You may also want to check out some samples here or here that demonstate how apps are built on services.
To answer the part about when to build a service or an app:
- Is the functionality for an end-user? Does it have a user interface? => app
- Is it going to be used by another app or service? => service
One way to consider this is by looking at it from a dependency perspective:
Applications typically depend on services such as databases or third-party SaaS providers. When a developer provisions and binds a service to an application, the service broker for that service is responsible for providing the service instance.
Source: https://docs.cloudfoundry.org/concepts/architecture/#services
On the flip side, services don't tend to depend on applications.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With