Serverless computing is undergoing two major advances as an enterprise platform for deploying new types of microservices....
On the one hand, software vendors are starting to refactor their existing applications so they can be called by lightweight functions. At the high end, enterprise architects are considering the creation of event-driven architectures for composing more sophisticated serverless apps. Best practices for taking advantage of both trends were covered at JavaOne and Oracle OpenWorld.
Mike Lehmann, VP of product management for Oracle, said: "There are a lot of projects for driving serverless infrastructure. AWS [Amazon Web Services] Lambda is the most popular, but IT vendors are working to define specifications for more open infrastructure that can work across cloud providers."
Oracle has recently joined the Serverless Working Group of the Cloud Native Computing Foundation.
Oracle is also planning some major announcements for developing serverless apps on Oracle Cloud Platform at Oracle OpenWorld.
The crux of the serverless model is about increasing productivity and agility. Lehmann said: "This involves raising the abstraction level so developers no longer have to think about servers, VMs [virtual machines] or containers. They can focus on building applications. It is a programming approach for writing code and delivering apps."
Make functions simple for developers
SaaS vendors are starting to bring serverless programming models to their community of developers. For example, Twilio recently rolled out Twilio Functions to reduce the barrier of creating new apps that take advantage of the company's various communications services. Pat Malatack, Twilio's VP of product, said: "Developers and businesses building cloud communications apps should be focusing on the customer experience, not managing servers."
But Twilio also had to make this new model compatible with traditional application development approaches. Malatack explained: "The serverless computing paradigm hasn't always been ideal for long-running tasks. Cold starts and additional overhead from microservice architectures have historically plagued serverless implementations. Breaking up these longer tasks into checks for serverless functions can be difficult and often requires a queue or other data store."
To address this gap, architects need to think about creating mechanisms for managing longer-running tasks in concert with serverless architectures. For example, Twilio implemented a feature called Twilio Sync that allows developers to manage long-running tasks without the need for additional infrastructure. This also needs to incorporate health checks to ensure that Functions are sufficiently warm before completing a deployment. This approach allows developers to use a runtime client to orchestrate Functions without network overhead.
Balance serverless and microservices apps
Burr Sutter, senior manager of product management at Red Hat, said: "Functions as a service [FaaS] is very exciting as it represents a new way to give developers more productivity when it comes to wiring together internal enterprise services and third-party SaaS services in new and clever ways."
Sutter believes enterprises need to think about building an infrastructure to accommodate both serverless apps and traditional microservices for several reasons:
- There is still a need for meaty and transactional business logic. It is currently unclear if enterprises can have dynamically wired-together (event-driven) functions to achieve average use cases.
- The microservices programming model is well-known and has been in use for many, many years. It is leveraging approaches like Java API for RESTful Web Services, Express and Spring MVC, which have been in use and are well-known. The use of functions as a programming model are new and unique.
- Today's microservices can be built, debugged and run based on technologies like Spring Boot, Vert.x or Node.js easily on a laptop.
- The portability of code is still valued. The family jewel of a digitally transformed organization is custom business logic. But this can be a challenge when an organization wishes to move away from one of the proprietary cloud vendors' FaaS solutions.
New questions for serverless platforms
Most of the cloud platforms have their own serverless platform. But vendors are coming together on cross-platform serverless infrastructure, like the OpenWhisk project. This provides an open source cloud framework that executes functions in response to events at any scale.
Lehmann said that some of the aspects that enterprise architects need to consider include:
- What is the programming model?
- How does the enterprise implement monitoring and diagnostics for serverless?
- How should enterprises debug event-driven serverless apps?
- How will this new model interact with microservices apps?
Adopt event architectures to address complexity
The initial case of serverless has been focused on simplifying the process of coding and deploying apps.
The next phase lies in exploring event-driven architectures in which applications execute in response to one or more events. A simple case might be updating an inventory database when an order is inserted into a persistent back end. More complex applications will require weaving dozens or even hundreds of such services together.
Lehmann said that architects are going to need to define how this is implemented to build large-scale serverless architectures. He explained: "The ecosystems around serverless have yet to be defined. There is an opportunity as many architects are thinking through the problem domain to bring together a rich model for building these types of event-driven applications."
Deployment tips for serverless apps
Enabling offline development for serverless apps
Getting more from serverless applications in public cloud