O'Reilly logo

Swift in the Cloud by Samuel Kallner, Karl Weinmeister, Ricardo Olivieri, Patrick Bohrer, John Ponzo, Leigh Williamson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 8Serverless Programming with Swift

In previous chapters of this book, you’ve read about Swift being used to implement cloud-hosted services that fit typical traditional server-side functions, such as web applications and data sources. However, there are some newer programming models that have arisen in cloud computing environments that offer distinct benefits for certain workloads. Swift also supports these models, and this chapter covers how the Swift language is used in one of these cloud environments—namely event-driven, or serverless, environments.

Microservices and Serverless Computing

An approach to cloud-native application architecture that has gained popularity and support in recent years involves multiple small, focused microservices being stitched together to form a full application. There are many advantages to structuring an application this way. Although a microservice-based architecture isn’t appropriate for every application, when it can be used, there are both economic and technical benefits to be exploited.

Because each microservice component of the overall application is independently deployable, it is easier to tune the application for maximum efficiency at scale than is the case for more monolithic application architectures. If one microservice is more resource intensive and requires more instances under heavy load than the others, then more instances of that one microservice can be deployed while the other microservices run fewer instances. In ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required