paint-brush
Building Serverless Microservices With Pythonby@hackernoon-archives
554 reads
554 reads

Building Serverless Microservices With Python

by HackerNoon ArchivesFebruary 10th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

As we move to the different models of production, distribution, and management when it comes to applications, it only makes sense that abstracting out the, behind the scenes processes should be handled by third parties, in a move towards further decentralization. And that’s exactly what serverless computing does — and startups and big companies are adopting this new way of running applications.

Company Mentioned

Mention Thumbnail
featured image - Building Serverless Microservices With Python
HackerNoon Archives HackerNoon profile picture

Serverless Computing is Exploding

As we move to the different models of production, distribution, and management when it comes to applications, it only makes sense that abstracting out the, behind the scenes processes should be handled by third parties, in a move towards further decentralization. And that’s exactly what serverless computing does — and startups and big companies are adopting this new way of running applications.

In this post, we will discover answers to questions: What Serverless is all about and how does this new trend affect the way people write and deploy applications?

Serverless Computing

“Serverless” denotes a special kind of software architecture in which application logic is executed in an environment without visible processes, operating systems, servers or virtual machines. It’s worth mentioning that such an environment is actually running on the top of an operating system and use physical servers or virtual machines, but the responsibility for provisioning and managing the infrastructure entirely belongs to the service provider. Therefore, a software developer focus more on writing code.

Serverless Computing Advances the way Applications are Developed

Serverless applications will change the way we develop applications. Traditionally a lot of business rules, boundary conditions, complex integrations are built into applications and this prolongs the completion of the system as well as introduces a lot of defects and in effect, we are hard wiring the system for certain set of functional requirements. The serverless application concept moves us away from dealing with complex system requirements and evolves the application with time. It is also easy to deploy these microservices without intruding the system.

Below figure shows how the way of application development changed with time.

Monolith- A monolith application puts all its functionality into a single process and scale by replicating the monolith on multiple servers.

Microservice- A microservice architecture puts each functionality into a separate service and scale by distributing these services across servers, replicating as needed.

FaaS- Distributing Microservices further into functions which are triggered based on events.

Monolith => Microservice => FaaS

Let’s get started with the deployment of a Serverless Application on NexaStack.To create a function, you first package your code and dependencies in a deployment package. Then, you upload the deployment package on our environment to create your function.

  • Creating a Deployment Package
  • Uploading a Deployment Package

Database integration for your application

  • Install MongoDB and configure it to get started.
  • Create Database EmployeeDB
  • Create table Employee
  • Insert some records into the table for the demo.
  • Write a file “config.py” to setup configuration on the serverless architecture as shown below.

Continue Reading The Full Article At —XenonStack.com/Blog