Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between Cloud Foundry and OpenWhisk?

I see these both in Bluemix, but what is the difference between them?

like image 631
hans Avatar asked Jun 19 '16 20:06

hans


People also ask

Is IBM OpenWhisk is a cloud service provider?

What is IBM Cloud® Functions? Based on Apache OpenWhisk, IBM Cloud Functions is a polyglot functions-as-a-service (FaaS) programming platform for developing lightweight code that scalably executes on demand.

What is Cloud Foundry used for?

Cloud Foundry is an open application Platform as a Service (PaaS) developed under an open source license. In other words, Cloud Foundry is a system to easily deploy, operate and scale stateless applications which are written in any programming language or framework.

What is IBM OpenWhisk?

Apache OpenWhisk is an open source, function as a service (FaaS) platform that allows you to execute functions remotely while responding to events. OpenWhisk offers a rich programming model and supports a growing list of languages, including Node. js, Java, and Python.

What is an event driven compute platform that runs application logic in milliseconds in response to events or direct invocations from web or mobile ap?

IBM Bluemix OpenWhisk is an event-driven compute platform, which executes application logic in milliseconds in response to events or direct invocations from web/mobile apps or other endpoints.


2 Answers

Cloud Foundry and OpenWhisk are two Bluemix Compute models that a developer can used to power an application's workload.

I'll give a very high-level summary of both services and when I would use them...

Cloud Foundry

  • IBM Bluemix was originally based off Cloud Foundry's open technology. It is a cloud computing platform as a service that supports the full lifecycle, from initial development, through all testing stages, to deployment.
  • Cloud Foundry has a CLI program called cf which is the primary tool to interact with Bluemix (or Bluemix provides a web GUI for this).
  • Cloud Foundry introduces the concepts of Organizations that contain Spaces which you can think of as workspaces. Different spaces typically correspond to different lifecycle stages for an application.
  • Cloud Foundry introduces the concepts of Services and Applications. A Cloud Foundry service usually performs a particular function (like a database service), and an application usually has services and their keys bound to it.

OpenWhisk

  • OpenWhisk is a brand new IBM Cloud developed distributed event-driven compute model.
  • It has a distributed automatically scaling serverless architecture that executes application logic on events.
  • OpenWhisk also has a CLI program called wsk which can be used to run your code snippets, or actions, on OpenWhisk.
  • OpenWhisk introduces the concepts of Triggers, Actions, and Rules.
  • Triggers are a class of events emitted by event sources.
  • Actions encapsulate the actual code to be executed which support multiple language bindings including Node.js, Swift and arbitrary binary programs encapsulated in Docker Containers. Actions invoke any part of an open ecosystem including existing Bluemix services for analytics, data, cognitive, or any other 3rd party service.
  • Rules are an association between a trigger and an action.

Cloud Foundry vs. OpenWhisk

So the question remains: when should you use Cloud Foundry, or when should you use OpenWhisk?

In my limited experience using OpenWhisk, here are my thoughts. I like to think of OpenWhisk as an easily implementable automatically scaling architecture that application developers can use without needing much prior knowledge in backend development. I think of Cloud Foundry as a lower level in the software stack which might give you more customization, but will likely take more skill and knowledge for setting it up.

I would use Cloud Foundry if I...

  • Was a backend & application developer.
  • Had experience creating and connecting services together.
  • Needed functionality that just might not be possible using OpenWhisk.

I would use OpenWhisk if I...

  • Was an application developer.
  • Didn't want to worry about a server.
  • Didn't want to learn different programming languages, etc. to figure out how to set up my server.
  • Really wanted focus on developing my application and have the backend just work.

Hope that helped.

Edit:

Here's a cool image that I found that illustrates this:

comparison

like image 195
joe Avatar answered Oct 19 '22 02:10

joe


CloudFoundry is a PaaS (Platform-as-a-service) platform, which means in a nutshell, that it hosts the platform for your application to run on. Examples of a platform include node.js or a JVM.

OpenWhisk is a serverless platform. The term FaaS (Function-as-a-service) seems to be emerging as well. You upload code, which is executed once an event happens. That event might be anything, ranging from a simple HTTP request to a change happening in your database.

The fundamental difference between the two is the mode of operation. PaaS means, you're still running a server-process. You'll have a long running process which listens to events and executes your logic, once an event happens. All the other time, the process is idle, still requiring CPU cycles and memory to actually listen for events.

In serverless, the platform takes the burden of "listening for events". Once an event happens, your code is instantiated and executed. That code is shutdown afterwards thus not requiring any resources anymore. That also explains why OpenWhisk actions have a time limitation of 5 minutes. It is not meant to have long running actions.

Disclaimer: Both platforms support a lot more than I described here, I tried to keep it down to the most substantial difference between the both.

like image 43
markusthoemmes Avatar answered Oct 19 '22 03:10

markusthoemmes