Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cloud Foundry service vs app

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?

like image 867
John Jerrby Avatar asked Jan 02 '17 12:01

John Jerrby


2 Answers

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

like image 102
data_henrik Avatar answered Oct 05 '22 09:10

data_henrik


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.

like image 35
Chris Snow Avatar answered Oct 05 '22 11:10

Chris Snow