9

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

joe
  • 2,468
  • 2
  • 12
  • 19
hans
  • 93
  • 1
  • 5

2 Answers2

14

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

joe
  • 2,468
  • 2
  • 12
  • 19
  • 1
    Something that some might find useful to know: openwhisk is not only automatically scalable but takes care of the load balancing for you as well. – Sebas Jan 24 '17 at 15:46
7

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.

markusthoemmes
  • 3,080
  • 14
  • 23
  • serverless is a misnomer. You cannot say that the difference is that with PaaS you are hosting your own server. Not the case. The distinction is the operational model in that with FaaS the function only runs when needed, where as with PaaS, typically you have multiple instances always running waiting for something to do. – christo4ferris Jun 27 '16 at 18:51
  • @christo4ferris Isn't that exactly what i stated in paragraph 3 and 4? In PaaS you are in fact running your own server (softwarewise, not hardwarewise). – markusthoemmes Jun 28 '16 at 09:12
  • the distinction is only the operational model. Yes a PaaS packages things up and creates a 'server' but you really don't 'host' it, the platform does. In FaaS the same thing happens. The function must exist in a runtime etc, you just cannot access it. – christo4ferris Jun 28 '16 at 09:17
  • Right, i edited the answer a bit to say "running a server-process" instead of "hosting a server". Thanks for the feedback – markusthoemmes Jun 28 '16 at 09:33