Python Microservices Development – 2nd edition by Simon Fraser Tarek Ziadé

Python Microservices Development – 2nd edition by Simon Fraser Tarek Ziadé

Author:Simon Fraser, Tarek Ziadé
Language: eng
Format: epub
Tags: COM060160 - COMPUTERS / Web / Web Programming, COM051360 - COMPUTERS / Programming Languages / Python, COM051230 - COMPUTERS / Software Development & Engineering / General
Publisher: Packt
Published: 2021-09-29T00:50:46+00:00


Let us now see how we can generalize this pattern in a Quart app that needs to interact with other services.

This naive implementation is based on the hypothesis that everything will go smoothly, but real life is rarely so easy. We can set up different error handling options in a ClientSession, such as retries and timeouts, and we only need to set them up in that one place.

Finding out where to go

When we make a web request to a service, we need to know which Uniform Resource Locator (URL) to use. Most of the examples in this book use hardcoded URLs—that is, they are written into the source code. This is nice and easy to read for an example, but can be a problem when maintaining software. What happens when a service gets a new URI, and its hostname or IP address changes? It might move between AWS regions due to a failure or be migrated from Google Cloud Platform to Microsoft Azure. An API update can make the path to a resource change, even if the hostname or IP address has not updated.

We want to pass in data about which URLs to use as configuration to our application. There are several options to manage more configuration options without adding them directly to the code, such as environment variables and service discovery.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Popular ebooks
Whisky: Malt Whiskies of Scotland (Collins Little Books) by dominic roskrow(55903)
What's Done in Darkness by Kayla Perrin(26518)
Shot Through the Heart: DI Grace Fisher 2 by Isabelle Grey(19002)
The Fifty Shades Trilogy & Grey by E L James(18955)
Shot Through the Heart by Mercy Celeste(18877)
Wolf & Parchment: New Theory Spice & Wolf, Vol. 10 by Isuna Hasekura and Jyuu Ayakura(16978)
Python GUI Applications using PyQt5 : The hands-on guide to build apps with Python by Verdugo Leire(16869)
Peren F. Statistics for Business and Economics...Essential Formulas 3ed 2025 by Unknown(16799)
Wolf & Parchment: New Theory Spice & Wolf, Vol. 03 by Isuna Hasekura and Jyuu Ayakura & Jyuu Ayakura(16693)
Wolf & Parchment: New Theory Spice & Wolf, Vol. 01 by Isuna Hasekura and Jyuu Ayakura & Jyuu Ayakura(16318)
The Subtle Art of Not Giving a F*ck by Mark Manson(14251)
The 3rd Cycle of the Betrayed Series Collection: Extremely Controversial Historical Thrillers (Betrayed Series Boxed set) by McCray Carolyn(14069)
Stepbrother Stories 2 - 21 Taboo Story Collection (Brother Sister Stepbrother Stepsister Taboo Pseudo Incest Family Virgin Creampie Pregnant Forced Pregnancy Breeding) by Roxi Harding(13416)
Scorched Earth by Nick Kyme(12710)
Drei Generationen auf dem Jakobsweg by Stein Pia(10919)
Suna by Ziefle Pia(10843)
Scythe by Neal Shusterman(10265)
International Relations from the Global South; Worlds of Difference; First Edition by Arlene B. Tickner & Karen Smith(9473)
Successful Proposal Strategies for Small Businesses: Using Knowledge Management ot Win Govenment, Private Sector, and International Contracts 3rd Edition by Robert Frey(9314)
This is Going to Hurt by Adam Kay(9091)