Python Microservices

Video in TIB AV-Portal: Python Microservices

Formal Metadata

Python Microservices
Title of Series
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this license.
Release Date

Content Metadata

Subject Area
Python Microservices [EuroPython 2017 - Talk - 2017-07-10 - Anfiteatro 2] [Rimini, Italy] This talk is for Python web developers interested in learning what are the core ideas behind microservices, what problems they try to solve, and what are the viable options to implement them in Python, both from technical and teamwork point of views. Some of the topics that will be discussed include the role of APIs, the improvements microservices bring to application scalability, upgrades, and maintenance, and the challenges in breaking up a monolithic application. Attendees will leave the talk with a good idea of what microservices are, and how they help build better applications. As usual with my presentations, there will be actual code examples presented during the talk that I will also host on GitHub, for those interested in investigating further on their own
Axiom of choice Web page Slide rule Intel Service (economics) Information Open source State of matter Flash memory Software developer Multiplication sign Projective plane Cloud computing Coma Berenices Bit Online help Mass Formal language Wave packet Latent heat Personal digital assistant Blog Software
Functional (mathematics) Function (mathematics) Analogy Software developer Moment (mathematics) Online help Game theory Social class
Functional (mathematics) Function (mathematics) Energy level Right angle Game theory
Point (geometry) Module (mathematics) Logic Structural load Modul <Datentyp> Cartesian coordinate system Power (physics) Template (C++)
State observer State of matter Code Scaling (geometry) Multiplication sign 1 (number) Water vapor Cuboid Endliche Modelltheorie Website Error message Social class Scripting language Email Structural load Data storage device Bit Instance (computer science) Web application Message passing Crash (computing) Right angle Modul <Datentyp> Random number Functional (mathematics) Game controller Service (economics) Token ring Control flow Web browser Regular graph Entire function Theory Number Crash (computing) Propagator Green's function Queue (abstract data type) Energy level Software testing Task (computing) Form (programming) Module (mathematics) Authentication Scaling (geometry) Database Cartesian coordinate system Personal digital assistant Logic
Axiom of choice Complex (psychology) Group action Multiplication sign Set (mathematics) Database Client (computing) Replication (computing) Mereology Stack (abstract data type) Web 2.0 Facebook Mechanism design Core dump Cuboid Diagram Arrow of time Social class Service (economics) Relational database Kolmogorov complexity Structural load Software developer Constructor (object-oriented programming) Sound effect Bit Instance (computer science) Complete metric space Flow separation Connected space Type theory Message passing Process (computing) Crash (computing) Telecommunication Right angle Quicksort Physical system Windows Registry Trail Functional (mathematics) Service (economics) Link (knot theory) Twitter Flow separation Computer architecture Dependent and independent variables Standard deviation Host Identity Protocol Validity (statistics) Forcing (mathematics) Physical law Code Database Stack (abstract data type) Cartesian coordinate system System call Personal digital assistant Collision
Windows Registry Group action Building Service (economics) Token ring Connectivity (graph theory) Multiplication sign Demo (music) Database Client (computing) Raster graphics Mereology Disk read-and-write head Entire function Proper map Theory Response time (technology) Strategy game Computer configuration Network socket Personal digital assistant Diagram Divisor Nichtlineares Gleichungssystem Computing platform Computer architecture Authentication Service (economics) Information File format Kolmogorov complexity Projective plane Bit Line (geometry) Control flow Cartesian coordinate system Message passing Function (mathematics) Strategy game Computing platform Website Lastteilung
Standard deviation Service (economics) Proxy server Open source Twin prime State of matter Reflection (mathematics) Structural load Multiplication sign Bit Client (computing) Open set Cartesian coordinate system Statistics Online chat Explosion Diagram Proxy server
Game controller Service (economics) Proxy server Divisor Programmable read-only memory Sheaf (mathematics) Shared memory Menu (computing) Client (computing) Instance (computer science) Statistics Approximation Message passing Explosion Network topology Revision control Cuboid
Windows Registry Scripting language Stapeldatei Service (economics) State of matter Chemical equation Physical law Virtual machine Bit Distance Computer programming Type theory Message passing Proxy server Computing platform
Windows Registry Scripting language Service (economics) Touchscreen Proxy server Moment (mathematics) Bit Database Approximation 2 (number) Message passing Arithmetic mean Explosion Bit rate Term (mathematics) Revision control Proxy server
Revision control Execution unit Message passing Proxy server Revision control Instance (computer science)
Execution unit Explosion Proxy server Forcing (mathematics) Programmable read-only memory Lemma (mathematics) Revision control Maxima and minima Quantum Gamma function Statistics
Execution unit Service (economics) Demo (music) Multiplication sign Connected space
Axiom of choice Building Structural load Scaling (geometry) Multiplication sign Demo (music) File format Combinational logic Chaos (cosmogony) Instance (computer science) Client (computing) Facebook Mechanism design Moving average Cuboid Remote procedure call Process (computing) Physical system Scripting language Service (economics) Mapping Data storage device Instance (computer science) Windows Registry Connected space Mechanism design Message passing Computer configuration Telecommunication Software framework Website Configuration space Software testing Lastteilung Queue (abstract data type) Windows Registry Slide rule Server (computing) Service (economics) Open source Sequel Video game Data storage device Event horizon Frequency Population density Software testing Message passing Proxy server Computing platform Computer architecture Default (computer science) Standard deviation Variety (linguistics) Chemical equation Projective plane Computer network Client (computing) Database Cartesian coordinate system Scalability System call Database normalization Query language Computing platform Collision
Link (knot theory) Vector space Virtual machine Gastropod shell Cartesian coordinate system Laptop Cloning
Presentation of a group Service (economics) Chemical equation Multiplication sign Virtual machine Set (mathematics) Numbering scheme Instance (computer science) Process (computing) Different (Kate Ryan album) Personal digital assistant Operator (mathematics) Data center Cuboid Right angle
Mathematics Backup Computer configuration Different (Kate Ryan album) Multiplication sign Database Instance (computer science) Parameter (computer programming) Cartesian coordinate system Rule of inference
Mobile Web Multiplication Standard deviation Service (economics) Multiplication sign Decision theory Gradient Control flow Set (mathematics) Database Database transaction Bit Function (mathematics) Instance (computer science) Cartesian coordinate system Hand fan Revision control Mathematics Computer configuration Routing Position operator Exception handling Computer architecture
it the so close and I welcome the there are many of you know in case you don't but this is a bit of a background information about myself and a mass of a developer Rackspace's company in the in the edge states but probably
if you know we need only because of the last minute tutorial is this is this use of articles that I wrote on my blog a few years ago that that are somewhat popular but I also wrote the writing books on the last but mostly these days I will make the ISA microservices and my language of choice only 90 per cent of the time and coding Python but sometimes have no way to avoid writing JavaScript on so you in the previous slide that I used to work a lot would see the the swell once you have my dear my of my blog which has a lot of articles about Python but last and I might get have page where you can find a bunch of open source projects that I I did uh before I start I also wanted to mention the other 2 places I'm going to be available on this conference but tomorrow there is a training session the hour-long session on the specific topic on services and so tomorrow morning and that's that's when it's when this is happening and then also going to a help desk on Thursday if you have any questions about flask what development already all my open source projects will be more than happy to talk to you 1 1 that yeah I OK so
yeah this is this is going be an introductory talk on micro-services probably intermediate level of make maybe a beginner that's a pretty to jump into the this this pool of intermediate you that that nobody knows exactly what it is but that's basically the target audience and so I can start with a simple analogies mention
of this this is something that happened to me I have a friend who's taking a so for the moment last this is not a developer that this was an elective of class a keep that in college he had to write a game ping-pong and yet about the came to ask me for help and where he showed me his coat with the pre much like the whole game in the function
so he called upon and and that that was the game and yet above with the way the ball moved right so as to help and I had to go to understand pre-match the holding
right it is very hard for me to to figure out what's going on so use opportunities show in a better way to structure this this game right side I told him
you use something like this where you have
a bunch of functions each function that's 1 thing and then when when you need to do something bigger that would a fine-tuned us then you have a function also the functions and all the functions just call each other and achieve the big thing that is the whole day right and I'm sure we all going to agree that they're the 1 right it's much better than 1 let so here but if you were saying that you know shortened folk used functions other than look for interest to a lot of things now what happens if if we go 1 level above so that
this is a this is an example from my book the flask book you if if you start the book with it it teaches you how to build a flask
application and when you reach the end of Chapter 6 you end up with an application that that that's quite a lot but basically the whole point for logic is in this this 1 module load power then you have a bunch of templates and a bunch of us that fights but the basically the whole by collecting this in 1 5 so so then you need chapter 7 and chapter 7 is 1 that teaches you how to structure your application so that it's are more maintainable so so the ego's in something like this
where where you have a starter script managed by considerations it's in its own module you have other applications in a package and then the tests are in in a different package and that if you keep looking at the application task of a couple of modules that are of specific things that so the database models are in 1 module e-mail supporters another 1 of those this out this main folder which is I never subpackage that is a will in fact we call it a blueprint which for those of you familiar with John will be sort of the same as the general application and if you if you keep looking then you have for for that really have errors forms and use so that basically once again the same thing as functions no would modules were saying that small unfocused modules are better than large models that do a lot of things thank you now what happens if if we take this even higher level and we talk about services web applications will but then we translate this
so this is an example of a big web application that that this is actually an application that exists it's to make get have I use this application to teach a class to demonstrate that last can scale and basically the idea with this application is that you have these 2 green boxes of flap is the name of the application and celery water itself but it is the 1 or more workers that dual asynchronous functions the and the idea is that he can run on any number of flak instances and any number of city workers and you scale those 2 according to your needs that and then you have a database of both use and there's a message queue that's used by salary and also used to to allow the celery workers to approach of modifications to the client through about the WebSocket so anyway did this is probably observer advanced fish application of a scalable but it's it's 1 coordinates so then we apply the same logic that we applied to functions and modules to this and you might be the answer is yes then the Working for 1st I should I should tell you about some of the problems with this so what wrong that we have is that that the the code is is is a single base so it's so it's really hard to test them all the things are basically couples you are you have a code that deals with the users in this particular case the flak this example is a chat application so we have coded users and messages all mixed up you then you realize that you will use the having of you know coupling between those 2 potentially separate functions of this application if you are working with the team and you need to introduce a new member to your team but that person is it it can have a hard time trying to figure out how to do not become productive because it is here that they'll have to understand a lot of things before our never before you let them participate in you to to reduce the risk of them breaking things so In particular what when you use a summary of some very fine fine I I don't like that much of this that if you if you need to operate even though in this case we have 2 separate services that that the main service and this theory and they all come from the same coordinates so there's no way to look great and separate you have to stop both or if you have many instances of each all that we need to stop the the upgrade of break database whatever else you need to do then you start them again so basically have to take your application down for the parade also if you have a problem and application crashes then basically the whole application crashes and sigh goes down until you figure out what's what's going on and you can restart of this gain becomes difficult I imagine in because of a chat application like this so it's we have a model that uses a module that these with the messages are very likely there's maybe more activity on the messages side than in the use of side right you can have up a bunch of regular users that are already registered and going to be chatting so sending a lot of messages so if if if you find it you need to go to scale your application you give the scaling the whole service so you can have and you know that the necessary on the Missouri number of instances to satisfy the load for the messages but then you can also be having a lot of things that can be what users are not the you know the over the over scaling for the users and there's a way to have more fine control but we control is basically the the facility versus the rest of the main service from also consider the case where I uh let let's say this is an all application you did didn't in Python 2 and now you are interested in going to buy the and that's going to be a problem you have the right because it's all or nothing you have to upgrade the whole propagation in 1 go so all these are problems that are typical before we called monoliths sets the the speed applications of our on the built using the codebase no this is also a real application it's the same application so some might get have its converted to this idea of micro-services and of Dubuque probably guess that it is basically to write or smaller services and the services in talk among themselves to achieve here that the whole function of the application and in this case he would went from 2 green boxes to find the answer is not there anymore so so we have a 5 services and so you can see in in water we can see that applying the wife of this is a service that serves as the on the application that runs in the browser up to this particular case I wrote that in by phone but in most cases I'm going to guess that is going to be a node application and that's solidifying because you know that the independent services you can write each service with that of the best technology and for for that service so have plenty right we have a service that is tokens and that this is this is authentication messages and uses a separate services and then we have some service which is the WebSocket but push-notification from module to those separate in this case these are all flask applications some of these are so small that you can open them in your screen and see the whole code and and the ones that you don't have only 2 states that no more than that they're all new for a small you can see that we we we went from to orange boxes we we had a database and a the message queue on the monolithic case now we have 4 boxes we have a message you that that that serves the same function it helps the these the services communicate among themselves up then we have to be databases that we have a bit of a database for the messages so this database for the user so this and the database 40 tokens which stores rolled of tokens and then what is we have we
have a new Boston Globe also called service registry I am at about that more later but basically this is a very efficient database that keeps track of all the services are running it knows law was running and any communication with the load balances that about knows what what to you know what the set aside now this is a fighting boxes they're all independently scalable now so it's so now if if I have more and more load on the messages side I can run more and more instances of messages they keep users you at 1 or 2 for example so I talk about a new disadvantages of the monolith and all those not translate into benefits problem would be my classes the core complexity it's not greatly reduced the each service as as I said it's a very small last application of you know reminiscing of the hello world type application you see the documentation and actually very simple to decode maintain our because were forced to keep things separate it's less likely that we're going to use the box the to coupling but the use of service has no way to access for example the messages database directly based top the mistress service so messages will have a publicly TI that when exposed to to clients or to other services to the users who will do the same thing and basically that that's the couple signed you by force you you basically this design promotes the the couple beside the hips helps create problems have response I now that the case of having a new member the team that that you want to to to make productive as soon as possible so that that becomes really easy because you you can put that person work on 1 of your simplest services and like in the case of long if you have you know the the construction with functions if I need to fix how the ball moves I don't need to learn how they you know how how the players move or how the collisions have all I need to do this this is but the function of most of all and this is the same thing you can put a new developer to work on the on the dock and services for example the top and so this is very simple and you know right away they they can start being productive validity even even allow a new person to create a new service because it's it's a very simple application and the 1 of the things that I find most exciting he said you can upgrade like the big guys this without of going down we will never find out when Facebook Twitter etc. on you and deploy operates because they do it in a while running and we do the same with its and the show an example of that later properly you don't believe me but you know give me in a benefit of the doubt I'll show you in a little bit so if you have a problem with a service that crashes or her spots or whatever but that's can effect a small part of your application the rest of replication continue to work so that is you are lucky and your talk service goes down which basically means that nobody would do to authenticate if I if you have a big application with lots of services and 1 minus service goes down and then the rest of the application will continue to work so it it it's a partial failure not not a complete failure in case of a month on I mentioned that you can scale individually services and adapt to the loads of and finally also very important you can choose the best technology stack for each service they don't need to be all written in Python 2 or Python 3 they can all be written in the best tool in in in the in the example of going from Python 2 to Python 3 if if you start its application with Python 2 then you could start migrating services 1 by 1 to by the strongest that can mediation mechanisms between your services that standard so you you you will do for example HTTP for example of then it everything will continue to work and you can do a gradual upgrade to a new technology likewise if you find that you need to write a new service and for some reason you find that go or no Ruby This is the best choice then it's absolutely no problem you can do that service in the army in a different technology and that it doesn't really matter but of course it's not your whole process and the no benefits there are some some problems to what went from very see of you know I enforced the fact that things become simpler this this this is create true but not not so much that the complexity doesn't go away completely from the complexity goes into the you look at the diagram this into the arrows so that the complexity migrates from inside the green boxes into the arrows and now you have a web of connections sometimes it's pre crazy so you have to make sure that the example that you have a psychic links the service calls there was a course of this be and be eventually constant a again you know you may need to look for in efficiency seen in that sort of thing so and as I suggested by showing the the boxes that each service has its own database so something that people like me which are like relational databases a lot I I suffer would have been able to do joins because now each service a has some database so if you if you need to create a joining this example between users and messages have to live in the application there's no way to to use SQL because it it's 2 databases and you want so this cannot access the database from the other and we don't want to to to can separate and there be able to operate on the services separately so the brain is a hard and you know the box people will tell you that I you know it's just a for for DevOps people but you know that there are so many moving pieces that you you know that it requires a full time job sometimes
to keep things going on when we have this type of architecture and then finally I like you are you have this this pinball effect right in each service that's a small things so when when the client requests the complex action then that that may require additional requires a request to the
molten different services like the the entries service be messages messages they need to talk to tokens to verify the authentication it may need to talk to users to use the information they need to talk to socket year to to push a notification to the client so basically he becomes a less efficient so you have to keep that in mind to so response times for the time of the not ready as great as when you have a single codebase and so you you may wonder how the you about transforming converting all refactoring uh a monolithic application into microservices and fortunately that's free hard and that that this is the the the main strategies the 1 that's this probably the easiest to say OK what i have so far I'm going to keep that rewarding about that but then anything new raster building from now on I'm and build on you know using small services my services that's that's easier is not not the greatest 1 because you still have a monolith that you need to rent out the into your of micro-services platform another option would be to have to start with the big service the incorporate that but then over time you start breaking away parts of that septic application into small services so eventually over time you are going to end up with the micro-services architecture that stuff pure but then distributed potentially long transition time where you will be you will be working with the hybrid that's probably what most people do what when when they do this and then finally he he is you can use the line in the sand approach and say OK I'm going to reflect its application to much services you know today I it may take you a week for 2 weeks or months but then when you're done you you have a complete application that's yeah that's fully micro-services enabled hold something that's important and I feel of a lot of projects that sale them into my services and bolder to start writing services and that's probably of cities 2 per cent of the equation that you need to have a platform that's proper format services 2 years and it basically this if the free what's OK and if we if we go to the following if we if we go to the diagram of this is basically the the load balancer and the service registry every important components that are that the to be in place even if you have a monolithic that you are transitioning into my head as you have to figure out a way to incorporate that monolith the into the platform that allows Microsoft to exist and describe what that means it but before before I get
into a little bit more theory and a with them and then it is if I have enough time at at the site get data from part and so
on OK so so this is this this this
might reflect application so I'm a show you the see it so I wanna begin yeah but that's basically chat application for open standards so that they can go to another town you can see that things are looking have 2 balls 4 weeks of this before so now I can could another user you chose 3 simple stuff but it sounds that and the little bit it this is probably be wall what was yeah no so this is the an open source load balancing so that the the yellow and the yellow of books that you saw on the diagram on the left that's called a cheap proxy probably properly you you know this 1 you really know into next time maybe you know traffic which is another 1 that's that's kind have becoming popular the states and solving these tools do is basically you tell them you know where where the services and then you have clients connect to this thing and this is sort of
Switchboard a control factor the traffic control that basically shares of all the requests that come from clients among all instances now if it if this is a super I'm not explain everything because it's relevant to our purposes here but if you if you look at the intersections of 6 sections the top section shows you status about and the this is this each approximation into requests will ignore that and that there's 5 more sections and these are the 5 sections or a for the fortified services that we have this 5 mean boxes you can see that uh
messages running tree instances were running a version for before the
messages service and we have to be so when requests come to this law balanced program be assigned to 1 of these things and basically H proximal will make sure that all the state come more or less equally busy now we have 1 of something you have to of tokens and in 1 well if you are in 1 of users so you can see that I'm scaling independent and so this is already in radiant machines in to show you some fun stuff yeah so what was it should say of the people we used to hear micro-services associated with but you platforms like up with
amazing that type of thing which you can use that I'm not using that that right now this is you know and I'm a flask ionic simple stuff so that this is all built on using batch and a little bit of Python so this platform doesn't use any you know professional you know professional-grade micro-services platform and i have a cheap proxy I have a service registry and then on the batch so for example I have a batch script that runs news service I can say for example at the shrine uses looked at his so this this is around a new container this is all based on vocal containers so I'm running a 2nd uses you can on going to see in a little bit of which approximately something and show me to
so the the the wage approximate rate is a little bit clunky plants the
screen but that doesn't mean sounds just is that the where our panel that at this so that the plant but I know you can see at the end of long now have to users so what I did was run this now I can show you pick this soulful but somewhere here here at the top you have a new this is the new users container they started so just by starting the container on the container itself talks to the service registry which is this database that on the notes about everything and then this research knows about it and that that gets communicated to reach proxy such a proxy votes that service online immediately FIL term you have a minute just be nasty here the and I'm going to kill that guy yeah to the moment that I stop the pitch a Protestant notice that something is going not right so it's scanner blacklist that that's so that's so immediately you know in any requests are coming the vinegar to the good 1 that the other 1 right and in a few more seconds since this isn't coming back then it's gonna go away completely the so so that this is 1 of the whole thing that you can do with my services so please see start and stop things that I mentioned before that upgrades of really fun and very efficient so as soon as this this French guy goes away I'm going to show you that have another another bash script and that's that's going to a great messages have to be you you
have 3 messages instances of the running before or now in this instance I
have already here a version 5 that I'm about to deploy so say enough of great all messages and pay attention to what happens so so you are going to see if the 5 messages come up this so
and thank you have so
so how 1 defines and now 1 the 4 is going down and another we find some
kind and then I will be forced to go down so so basically as you see there's always at
least 3 that are running so the we never stop we never had we never have less than 3 which is what we intended but the running eventually you know that all the the the the forces of the killed and the the place
but the TV fights can we have 1 more to
so that's how you do it that operate without something that's a such that the understanding if if I look at these these 2 guys there's
writing somehow I get to bolster but other than that these these are still connected they never lost a connection and so so people using this service this will never noticed that you can have great
yes OK the so that was a demo so in in that time I have left the
they not much yeah so fine in its environments and try to rush for this and describe the the pieces that are that make this a that the buildings and so so we have a lower answer I mention that I'm using a cheap proxy the so basically having a barrister when micro-services is is a must you you can try to do not use an event that it's the pre use a lot of benefits you basically get to very simple rolling upgrades I showed you can bash script that can do a rolling operate without going down and that's the only because we have a low balances that supports this this architecture you A B testing according to the promising all the school things you you hear the you know the the the very popular companies frequency Facebook's in the Netflix is talking about that they do the chaos monkey in all those things you can you can do the and and that the little balances is the main piece that supports this so super important that you have a 1 in place before we draw you start this how the service registry is it's a our database and usually it's designed to be highly available you run multiple instances of it constant redundant and basically superfast a conscious of stuff in the memory so that you can you do queries are very quick and basically this summer tragedy of times the density connected from all the services when they start so that aggression themselves and then the service dies that data connection that depends on the system but usually the the connection of opacity so if if the service doesn't refresh the connections and say I'm still here him so you would stop saying that then the server you will remove it and then immediately will talk to the load balancer and you remove it from the lands as well so basically that that that's the whole magic and if you know here but the registry them using is another open-source project call at the ETC the it's it's very simple it's actually the 1 that combinations users as well so containers are are at the department usually use you see my services platforms or always some containers it's only because it makes things much more of a PC other container provides the layoff isolation and all that good there than which processes for example allows you to to work with the virtualized IT ports and all these services that you see in the slide services in the example but that's all the instances of all the services all running for 5 thousand which is a flask default and and and and takes care of the mapping that into some of the care for patentable ported it's but but you know for me right the services at sporophyte house every time so that's really nice I mean you can do that yourself if you don't use talker but you know it makes things a lot more difficult in 0 will of course using different different technologies and then having container so make sure that you have collisions between conflicting dependencies as well so we we have the orange boxes so storage and use storage containers usually a database of self-righteous can also be considered storage a message you know all those for all those for production platform he would you will look for something that's highly available something you can make justice of so typically using 4 to my sequel you will look at Gilera uh which is just a solution of war or or if you want AWS in all those things that this make the service very reliable and I'm not running 1 instance that if she dies and the whole thing goes down to the same thing for cues and so on but they have the obligations so these use of the green boxes and these applications are stateless so I need to rush uh the desired thickness so that that would week I'll ask to start and stop the services they have no data and then they use the storage services to store data so that this allows me to start PO and it doesn't really matter they all but basically this possible I can horizontally scale them for free you can run as many as they want and basically more around the more that I can handle on that service and I think mn skip this 1 in spirit of saving time I already talked about this and basically the lifestyle of the lecture this starts to the search for the service registry and then what you dies stops talking to the service registry and that that translates into the load balancer removing it from from its configuration and then finally we have a service service communication which is the mechanism by which the services talk among themselves in this example and using the HTTP as a way for internal communication there are many projects that the site only use HTTP for for a client communication into the into the project but internally they use different mechanisms which is probably fine as long as it is a mechanism that doesn't restrict your choices of technologies so you should you should find of standard Okecie mechanisms for example that would be a very good way to to the more efficient way of doing this communication and http
so I'm at the link to the sides but if you wanna try this example yourself you can this Runciman a vagrant vector machine and these are the instructions and the requirements of the user and this application and play with it like that played here uh in there tomorrow I'm a talk more detail about this if you wanna learn how this was built
yeah you 2000 yet
slides few
been remote organized of
intelligent me to have time for questions of very close it thanks the presentation of my question is can there be a difference between running the 2 instances of the same micro-services into docker containers on the same machine and the run just 1 instance in 1 of the container so I can tell you with low balance in other cases 1 can hope so when EmotionFinder find the same question but typically you will not run on your presence let's say you have the 3 instances you are probably going around in different hosts and then a balance there is going to be you know know in front of all those and the reason is that if the host goes down you don't want to know all the reasons to go down so there is no case usually when you would run to market services into the locus on the same machine right I'm sorry I I give you will of should have and you know you have about sentences specific but yeah I mean how can that be the case when we have to micro-services into the the containers and they are on the same machine because the they have different processes and that is the case when it's good to go the World Boxing goes but it's still the final you you you you may have is operations between the the 2 containers not I mean I wouldn't make sense in any case yeah what will make more sense is to produce different hosts OK like but that was a question like that in all the 4 4 Alliance right you you you you don't want you know the host the a host of that down and take all your instances of this set you you will have the EU different data centers that if your your doing this for real that's OK thank him any more questions so the yes and the I think you're much I was wondering what's best practice
for of rolling upgrading my questions like adjusted when 1 service is changing the debate the scheme and the other 1 isn't yeah and so uh yeah I can expect to have and to
talk about this but let me ask are there are some rules out so when you make upgrades to the database at that that's not the only case but if you make a brace their place they need to be backwards compatible always the same thing with the API societies if there is a you know you its exports and API that other so this is an appliance use is that you may change to that they cannot be making changes so in my example here when I went to we fought over 45 of over 7 I need to make sure that I can have before and the 5 running at same time using the same database so usually if if you need to make a significant changes to your database you need to make them in stages you cannot make them will will you cannot remove a column for example you can deprecated column you know the upgrade once you know you you operated only then would you make sure that no instances are using that Holland and then removing the 2nd step it is more difficult it's a pain option 1 more questions I very interesting
talk thank you have got 1 question if you to up euro opaque application and to many that keep the data different databases holding you keep your database backups consist of but how you keep your argument you basically itself is independent so you have
to back up everything separately and they can be in some stage of you that only to be done in about the same time on that OK so it's that you have to to put up you transactions so that what has to be 1 transaction has to be the standard of its them OK thank you but have time for 1 last question hello and so again update ended up the basic you're saying that they instances of them it Microsoft assisted 108 and they can be killed at any time but again upgrading database how do you uh mundane the data because the services to them be holding to the I was so you have but basically that's in question before it it it's difficult you have to decide Europe database upgrades so that they are that they don't break it to the application of the existing version of the instance of to so typically requires multiple stage approach to to make significant changes and usually you try to avoid making big changes but usually you have stuff but never will will remain of the output because those are inexpensive to and to deploy them because of all their and and the rest of breaking something so so yeah typically you start thinking it in a properly now if if you've never done it sounds crazy and I was in that same position a couple years ago but but but then you get used to that and then you start thinking in the nearly near the signing the database you know so that you have to make a new breaking changes so often of course so if if you if you need to make a break change then you know you can make an exception so again this time and self everything grade and started moving in and then there's some downtown you can even go that route to our and other option is to use a non no single databases which I mean I'm a big fan and mobilize site at and traditionally trained I'd like to relational but but but I have to agree that from for this set of architecture no single makes a lot of sense yeah we because if it's a lot that no schema 2 need to deal with bit thank you a much needed new