[From the last episode: We looked at how containersA way of separating applications running on the same server. It’s lighter-weight than a full virtual machine. help to separate the different activities that might be going on at the same time within one serverA computer with a dedicated purpose. Older familiar examples are print servers (a computer that controls local printing) and file servers (a computer used for storing files centrally). More modern examples are web servers (the computers that handle your web requests when you use your browser) or application servers (computers dedicated to handling the computing needs of a specific application). Servers are often powerful, expensive machines since they have to handle a heavy load..]
We’ve talked so far about how we can take a single program and provide better securityRefers to whether or not IoT devices or data are protected from unauthorized viewers., privacyRefers to whether or not information gathered about your usage of IoT devices by authorized people can be made public, or shared with others, without your consent. Different from (although related to) security, which protects such data and devices from access by unauthorized people. Different from privacy, which is more concerned about use of data by authorized people., and proper operation by using virtualization techniques. But there’s another trend going on at the same time, and there’s a pretty straightforward analogy from our everyday lives that helps to illustrate it.
Mega-Stores Unlimited
In the US, we’ve become a country where you go to giant grocery stores for food. Heck, some “grocery” stores sell furniture and all other manner of non-grocery items, all under a massive roof. If you don’t know where a product is, you could spend a very long time wandering the store to find it.
So what happens if, say, there’s a fire in the bakery section? The entire store would have to be emptied during the fire and inspected after the fire. If damage extended beyond the bakery due, for instance, to water everywhere, then the store couldn’t reopen until the entire repair was complete.
Or let’s say that the store wanted to restructure where the frozen foods were located. That would mean, at the very least, shutting down the current location as well as the future location, and maybe other rows as well, until the move was complete. Customers might not be able to find what they want during the transition, or, at the very least, they might end up confused or inconvenienced.
There’s a way we could avoid some of these issues, and it involves going back in time. In fact, really big cities still have some of this: individual stores for, say, baked goods and meat and produce. If we broke the huge grocery store up into smaller independent individual stores, then, for example, the bakery fire would impact only the bakery. And if the frozen foods store wanted to reconfigure itself, it wouldn’t affect any of the other stores. And, assuming there would be multiple versions of these stores (I know, true competition is kind of a quaint old-fashioned notion in this day of everything-owned-by-a-few-giant-corporations), then, if one bakery was down due to a fire, you go to the one a few blocks away.
Breaking Up the Big Guys
While there’s no sign of us breaking up the giant grocery stores (and, realistically, these days, all able-bodied people are expected to put in as many work hours as possible, so who has time to go to multiple stores anyway?), this is exactly the approach that developers are taking with big cloud programs. Rather than having one giant program, there are small programs that do parts of what the giant program would do, and they do them as “services” – often referred to as micro-servicesSmall programs that do things that, in an earlier time, would have been done within one large program. Breaking them out into smaller programs that then act as services to other programs makes them more robust and easier to maintain..
What does that mean? It means that there still might be one main program, but, rather than doing everything itself, it “outsources” many of the tasks to these outside services. So, for example, when you log into your bank account, there might be a service that handles the password check. There might be another service that retrieves your basic account information when you click on that. There might be a service to handle the confidential messaging within the site, and another to handle account-to-account transfers.
To be clear, I’m making these up – I have no insight into banking sites. But hopefully it gives you an idea about how this notion of micro-services works.
Why This Is Helpful
But what does this help? It does the same thing that breaking up the grocery store would do. For instance, if something goes wrong (like a fire in the bakery), you don’t end up taking down the whole big program. One instance of the main program might fail, but the micro-services keep going for other instances and other programs. That make it more fault-tolerant – a phrase that refers to the ability to keep going somehow if something goes wrong (rather than unceremoniously crashing).
It also impacts how programming works. We’ll look more closely next week at how programs are released and updated, but for now, picture a big program that’s having some small part of it improved in a new release – kind of like restructuring the frozen-food section. Since it’s all one big program, you have to test to make sure that the changes one place didn’t mess something else up. And if anyone else is making changes to another part of it, then they all have to coordinate on a single update release date. That might sound trivial, but it’s anything but when you’re talking about giant development teams.
With micro-services, each one has its own development team that can be independent from any of the other ones. They can update as needed without having to coordinate with anyone else. This untangles all of the interactions between the different parts of the Single Big Program.
So the reality is that, when you interact with the cloudA generic phrase referring to large numbers of computers located somewhere far away and accessed over the internet. For the IoT, computing may be local, done in the same system or building, or in the cloud, with data shipped up to the cloud and then the result shipped back down., either through internet browsing or an IoTThe Internet of Things. A broad term covering many different applications where "things" are interconnected through the internet. device, you’re probably running many small programs rather than any one single big program unless the site is very small and limited (like this website).
Leave a Reply