My Account Log in

3 options

Python microservices development : build, test, deploy, and scale microservices in Python / Tarek Ziadé.

EBSCOhost Academic eBook Collection (North America) Available online

View online

Ebook Central College Complete Available online

View online

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Ziadé, Tarek, author.
Language:
English
Subjects (All):
Python (Computer program language).
Application software--Development.
Application software.
Physical Description:
1 online resource (333 pages) : illustrations
Edition:
1st edition
Place of Publication:
Birmingham, England ; Mumbai, [India] : Packt Publishing, 2017.
System Details:
text file
Summary:
A practical approach to conquering the complexities of Microservices using the Python tooling ecosystem About This Book A very useful guide for Python developers who are shifting to the new microservices-based development A concise, up-to-date guide to building efficient and lightweight microservices in Python using Flask, Tox, and other tools Learn to use Docker containers, CoreOS, and Amazon Web Services to deploy your services Who This Book Is For This book is for developers who have basic knowledge of Python, the command line, and HTTP-based application principles, and those who want to learn how to build, test, scale, and manage Python 3 microservices. No prior experience of writing microservices in Python is assumed. What You Will Learn Explore what microservices are and how to design them Use Python 3, Flask, Tox, and other tools to build your services using best practices Learn how to use a TDD approach Discover how to document your microservices Configure and package your code in the best way Interact with other services Secure, monitor, and scale your services Deploy your services in Docker containers, CoreOS, and Amazon Web Services In Detail We often deploy our web applications into the cloud, and our code needs to interact with many third-party services. An efficient way to build applications to do this is through microservices architecture. But, in practice, it's hard to get this right due to the complexity of all the pieces interacting with each other. This book will teach you how to overcome these issues and craft applications that are built as small standard units, using all the proven best practices and avoiding the usual traps. It's a practical book: you’ll build everything using Python 3 and its amazing tooling ecosystem. You will understand the principles of TDD and apply them. You will use Flask, Tox, and other tools to build your services using best practices. You will learn how to secure connections between services, and how to script Nginx using Lua to build web application firewall features such as rate limiting. You will also familiarize yourself with Docker’s role in microservices, and use Docker containers, CoreOS, and Amazon Web Services to deploy your services. This book will take you on a journey, ending with the creation of a complete Python application based on microservices. By the end of the book, you will be well versed with the fundamentals of building, designing, testing, and deploying your Python microse...
Contents:
Cover
Copyright
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Table of Contents
Preface
Introduction
Chapter 1: Understanding Microservices
Origins of Service-Oriented Architecture
The monolithic approach
The microservice approach
Microservice benefits
Separation of concerns
Smaller projects
Scaling and deployment
Microservices pitfalls
Illogical splitting
More network interactions
Data storing and sharing
Compatibility issues
Testing
Implementing microservices with Python
The WSGI standard
Greenlet and Gevent
Twisted and Tornado
asyncio
Language performances
Summary
Chapter 2: Discovering Flask
Which Python?
How Flask handles requests
Routing
Variables and converters
The url_for function
Request
Response
Flask built-in features
The session object
Globals
Signals
Extensions and middlewares
Templates
Configuration
Blueprints
Error handling and debugging
Custom error handler
The debug mode
A microservice skeleton
Chapter 3: Coding, Testing, and Documenting - the Virtuous Cycle
Different kinds of tests
Unit tests
Functional tests
Integration tests
Load tests
End-to-end tests
Using WebTest
Using pytest and Tox
Developer documentation
Continuous Integration
Travis-CI
ReadTheDocs
Coveralls
Chapter 4: Designing Runnerly
The Runnerly application
User stories
Monolithic design
Model
View and Template
Background tasks
Strava token
Authentication and authorization
Putting together the monolithic design
Splitting the monolith
Data Service
Using Open API 2.0
More splitting
Chapter 5: Interacting with Other Services
Synchronous calls.
Using Session in a Flask app
Connection pooling
HTTP cache headers
Improving data transfer
GZIP compression
Binary payloads
Putting it together
Asynchronous calls
Task queues
Topic queues
Publish/subscribe
RPC over AMQP
Mocking synchronous calls
Mocking asynchronous calls
Mocking Celery
Mocking other asynchronous calls
Chapter 6: Monitoring Your Services
Centralizing logs
Setting up Graylog
Sending logs to Graylog
Adding extra fields
Performance metrics
System metrics
Code metrics
Web server metrics
Chapter 7: Securing Your Services
The OAuth2 protocol
Token-based authentication
The JWT standard
PyJWT
X.509 certificate-based authentication
The TokenDealer microservice
The POST/oauth/token implementation
Using TokenDealer
Web application firewall
OpenResty - Lua and nginx
Rate and concurrency limiting
Other OpenResty features
Securing your code
Asserting incoming data
Limiting your application scope
Using Bandit linter
Chapter 8: Bringing It All Together
Building a ReactJS dashboard
The JSX syntax
React components
ReactJS and Flask
Using Bower, npm, and Babel
Cross-origin resource sharing
Interacting with Data Service
Getting the Strava token
JavaScript authentication
Chapter 9: Packaging and Running Runnerly
The packaging toolchain
A few definitions
Packaging
The setup.py file
The requirements.txt file
The MANIFEST.in file
Versioning
Releasing
Distributing
Running all microservices
Process management
Chapter 10: Containerized Services
What is Docker?
Docker 101
Running Flask in Docker.
The full stack - OpenResty, Circus and Flask
OpenResty
Circus
Docker-based deployments
Docker Compose
Introduction to Clustering and Provisioning
Chapter 11: Deploying on AWS
AWS overview
Routing - Route53, ELB, and AutoScaling
Execution - EC2 and Lambda
Storage - EBS, S3, RDS, ElasticCache, and CloudFront
Messaging - SES, SQS, and SNS
Simple Email Service (SES)
Simple Queue Service (SQS)
Simple Notification Service (SNS)
Provisioning and deployment - CloudFormation and ECS
Deploying on AWS - the basics
Setting up your AWS account
Deploying on EC2 with CoreOS
Deploying with ECS
Route53
Chapter 12: What Next?
Iterators and generators
Coroutines
The asyncio library
The aiohttp framework
Sanic
Asynchronous versus synchronous
Index.
Notes:
Includes index.
Description based on online resource; title from PDF title page (ebrary, viewed September 23, 2017).
OCLC:
1000155636

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account