Skip to Content
Learning Apache OpenWhisk
book

Learning Apache OpenWhisk

by Michele Sciabarrà
July 2019
Intermediate to advanced
391 pages
8h 40m
English
O'Reilly Media, Inc.
Content preview from Learning Apache OpenWhisk

Chapter 8. Using CouchDB with OpenWhisk

In the first part of the book, when we were developing our contact form we actually used a database to store data. At the time, we didn’t go into much detail about how the database works, because the focus of the first part was understanding OpenWhisk.

But at this point, we need to know more about how to use a database since data storage is a key component of every nontrivial application.

Or course, we can’t possibly cover every single database out there—we have to choose one. OpenWhisk offers a package that integrates with the Cloudant and CouchDB databases, NoSQL databases based on JSON that fit the JSON-based paradigm of OpenWhisk pretty well, so the choice is obvious.

Note

Cloudant is an IBM product, a cloud-based NoSQL database offered as a software service in the cloud. Cloudant is based on the open source Apache project CouchDB, which can be deployed into on-premises deployments of OpenWhisk. OpenWhisk is not bound to Cloudant, since you can also use CouchDB. Everything in this chapter applies to both Cloudant and CouchDB. For simplicity, in the rest of the chapter I’ll talk about CouchDB, but it also applies to Cloudant.

CouchDB is a good match for OpenWhisk because it is JSON based, it is schemaless, and it is scalable.

Let’s discuss those points. First, all the actions in OpenWhisk talk to each other and exchange JSON objects. Hence, JSON is the natural format for managing data. The obvious requirement in similar environments ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Learning Docker

Learning Docker

Rick Fast
Apache Cookbook, 2nd Edition

Apache Cookbook, 2nd Edition

Rich Bowen, Ken Coar

Publisher Resources

ISBN: 9781492046158Errata Page