Are you new to cloud development? Maybe feeling a little intimidated by what it all means? If you’ve been working with Amazon Web Services (AWS), Azure, Google Cloud Platform (GCP) or the like for a while, have you ever stopped to think about what working in “the cloud” really means?
When you understand the fundamentals of what cloud development is, building software solutions becomes a lot easier.
Containers for Everything
Whenever you write software designed to run in the cloud, that software is packaged up in a way that allows it to run on their infrastructure. That packaging mechanism is almost always in the form of containers.
Popularized by Docker, containers are a way of describing an entire environment for the benefit of your software. This includes the operation system to use, what supporting software is installed and any required configuration. So if you want to run your code on a particular Linux distribution and make sure that Python 3.10 is installed, you can use a pre-built docker image or roll your own.
But what about serverless, you might ask?
With AWS Lambda, for example, you provide a zip file that contains your executable code. This code is unpacked into, you guessed it, a container! In fact, if you’d rather have more control over how your serverless code runs, you can provide your own, custom container image to use.
Learn how to work with containers and you’ll go a long way towards understanding how to develop in the cloud.
Other People’s Computers
Once you upload your container image to run, it doesn’t execute in some magical fairly land.
It runs on computers–other people’s computers. That’s it.
Sure, the cloud providers abstract away the details, so you don’t usually need to care, but there are racks and racks of servers–computers–just waiting to run your code.
What does this mean to you?
You still have to care about the constraints of CPU, memory, and disk space…they’re just more malleable. If the traffic to your website has increased, you can increase the memory or CPU available, if you don’t scale horizontally first.
Sending a request across the network still takes much longer than a function call. Even though cloud provider networks are super-fast.
In other words. Build your software with the understanding that there are constraints, even in the cloud, and you’ll be in a much better place.
At Your Service
What about all the other “stuff” that cloud providers have available? I’m talking about messaging systems, object storage, databases, and more.
All these wonderful building blocks are just computers–servers–that have well defined APIs you can use to interact with them.
AWS S3? Computers that manage storage and provide APIs to upload arbitrary data.
Azure Service Bus? Computers that accept messages and distribute them to other services.
DynamoDB? Computers that manage structured data and provide APIs that allow you to query and manage that data.
S3, EFS, SNS, Event Bridge, SQS, Cosmos DB DynamoDB…they’re all applications written by or packaged by the cloud providers and made available for you to use.
It may sound like I’m trivializing these services. That is not my intent. These are all very useful, sophisticated applications that allow you to focus on writing something more interesting to you or your business.
It’s Not Magic
Cloud computing sometimes has an aura of magic around it. It’s easy to see why. The cloud providers have done a lot of work to make things “just work”.
Working in the cloud provides a lot of benefits. You are able to focus on the main problem and leave many of the mundane details to the cloud provider. But that doesn’t mean you can ignore them completely.
It’s not sorcery. It’s just computers running containers that provide APIs for you to use. Remember that, and you’ll be that much more effective when you put your head in the clouds.
Question: What do you think is the most misunderstood thing about cloud development?