Zappa serves Python Web apps, minus the servers

10.02.2016
Zappa, a framework for running "server-less" Python Web applications, will deploy scalable applications to the cloud with one command.

Detailed by Rich Jones of freelance developer service gun.io, Zappa, named for the late musician, uses the AWS Lambda compute service and Amazon's API gateway service. Applications can be deployed for a fraction of the expense that comes with using a traditional Web server, Jones said in a blog post announcing the service this week. The first major client library for the framework is django-zappa, for deploying Django applications on AWS Lambda with the gateway.

The GitHub repo for Zappa boasts that the technology eliminates tedious Web server configuration and paying for 24-by-7 server uptime as well as load-balancing and scalability worries. The Zappa core library, for use by any WSGI-compatible Web framework, handles packaging of projects, configuring API gateway routes, setting up identity and access management roles, and API deployment.

"I've used the word 'server-less' to describe Zappa, but ... obviously, it's not completely server-less -- there still is a machine returning the HTTP response to the client," Jones said in the blog post. "The difference is that the server's entire lifespan exists within the lifecycle of a given HTTP request."

Web servers like Apache or Nginx sit idle waiting for new requests, he said, but Zappa has the server created after the HTTP request comes in through the API gateway. "It then turns the API Gateway request into normal Python WSGI, processes the request, and returns it back through the API Gateway to the client. And then, poof -- the server is gone."

By using AWS Lambda, responses can be processed in parallel. And the AWS Lambda service has developers paying by the millisecond, offering cost advantages, Jones explained. Users only pay for the amount of requests, which typically means pennies per month for an ordinary website. Jones hopes to add more client libraries, supporting Flask, Pylons, and other WSGI Python frameworks.

(www.infoworld.com)

Paul Krill

Zur Startseite