Cloud Computing: a Solution for High Computing Needs - 180D-FW-2024/Knowledge-Base-Wiki GitHub Wiki
Introduction
Cloud computing took the world by surprise by enabling businesses’ access to computing power, storage, and databases. This is incredible as it is a cost-effective and agile alternative to the previous solution. Many years ago, businesses who needed servers had to consult firms to build physical servers on site that required high upfront costs and specialized staff that created maintenance burdens and problems with limited scalability. Each of them have entire buildings filled with computers whose entire job serves to perform work for its clients. For the purposes of this capstone, cloud computing has various providers, and various applications for raspberry pis, such as remote use, data storage, and big data analytics.
How does cloud computing work?
At a high level, cloud computing is a distributed system created with data centers and servers built by companies, such as Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP). These servers enable virtualization for the next generation of computing: internet of things, which is when there are so many sensors and data that a singular computer is no longer able to keep up, so a system of small computers processing a handful of sensors is required.
There are various types of cloud computing that differ between how much abstraction there is, such as Function as a Service (FaaS), Software as a Service (SaaS), and Infrastructure as a Service (Iaas). This does not include all the types of services, but this list are examples of cloud from high levels to low levels of abstraction. FaaS is a high level architecture, in which clients call specific functions. The user does not need to manage the server running these calls at all, and it is all managed by the cloud providers. On the other hand, for IaaS, the client needs to manage even the low-level details, like the physical computing resources, data storage, security, etc.
All of these services work by sending requests to these servers across the network as seen in the image below. The cloud providers manage these requests and delegate the tasks to an appropriate amount of resources across their data centers depending on the distance to the nearest data center, the traffic, and the computing needs.
Amazon Web Services
AWS has Amazon EC2 and AWS Lambda. Amazon EC2 is a scalable virtual private cloud. It has various instance types for specific workloads, like general-purpose, compute optimized, memory optimized, accelerated computing, storage optimized, and high performance computing instances. All these types and options can be found here comparing the number of virtual CPUs, memory, storage, and bandwidth.
On the other hand, AWS Lambda is serverless computing, which offers many advantages. Serverless computing is computing power without the need for a whole virtual computer. It's an architecture that provides backend services on an as-used basis, which allows users to write and deploy code without worrying about the infrastructure. Lambdas can be used for video and voice command processing by capturing the data locally then sending it to the cloud for processing.
For integration with the raspberry pi, Amazon has a great tutorial found here. It describes how to install the required tools and libraries to the raspberry pi as well as how to install and run a sample application and view the results.
Microsoft Azure
Azure offers a secure cloud platform that manages infrastructure data, analytics, and AI solutions with the latest industry-leading AI services. Like AWS, Azure also has various options depending on the client needs that can be found here. The official tutorial from Microsoft for integration with the raspberry pi can be found here.
Google Cloud Platform
Google’s cloud service offers similar services as Azure for secure computing with integration from their own AI, called Gemini, that serves to aid with building AI agents and code generation, similar to GitHub Copilot. While GCP is very similar to the other cloud services, Google is offering a $300 credit upon signup to users, which may be of interest to students who want to reduce costs for the course. Pricing information can be found here. As for integration with the raspberry pi, there are various tutorials available:
- "Cloud IoT step-by-step: Connecting Raspberry PI + Python" This provides a general step-by-step tutorial.
- "Rapid Hardware Prototyping: Connect Your Raspberry Pi to Google Cloud IoT" In addition to a step-by-step tutorial, it offers additional Internet of Things case studies of what the author has done with raspberry pi and cloud computing.
“Use Google Cloud Vision On the Raspberry Pi and GoPiGo" This provides a tutorial with an emphasis on Google’s Cloud Vision API.
Cloud Service Models
Cloud computing has fundamentally reshaped the way businesses approach IT infrastructure by providing a wide range of different service models. These models—Infrastructure as a Service (IaaS), Platform as a Service (PaaS), Software as a Service (SaaS), and Function as a Service (FaaS)—each provide a different level of control and convenience to fit the needs of each individual company. Essentially, they all companies to choose how much of their technology stack is controlled by themselves, and how much is handled by the cloud providers.
Infrastructure as a Service (IaaS)
IaaS is the fundamental level of cloud services, offering virtualized computing resources over the internet. Using the IaaS model, the provider supplies the essential computing infrastructure such as virtual machines, storage, and networking, and then users configure these components themselves. This gives users a high level of control and flexibility, which allows them to manage their own operating systems and applications. This makes it ideal when a high level of customization is required such as migrating an existing application to the cloud. However, it also means that the user is responsible for system updates, security patches, and system maintenance. Which requires a high level of knowledge and skill in cloud computing and software development. Some examples of IaaS are: Amazon EC2, Azure Virtual Machines, and Google Compute Engine.
Platform as a Service (PaaS)
PaaS builds upon IaaS by providing a complete development and deployment platform. This includes not only the infrastructure but also the operating systems and development frameworks, provided and managed by the cloud provider. This offers users a moderate level of control and allows the engineers using the service to focus primarily on coding and application logic, while the cloud provider handles the underlying infrastructure. PaaS often comes with built-in tools for development, testing, and deployment, which can help streamline the development process. The major limitation of this option is that users are limited by the provider's environment and tooling. Some examples of PaaS are Azure App Service, Google App Engine, and AWS Elastic Beanstalk.
Software as a Service (SaaS)
SaaS delivers complete, ready-to-use applications over the internet. In this model, the cloud provider manages everything from underlying infrastructure to application software. Users simply access the service using a web browser or client application. This service maximizes convenience and gets rid of the need to have an engineering background or team. SaaS is therefore ideal for generalized business functions where almost zero customization is required. Some examples of SaaS are Google Workspace, Salesforce, and Microsoft 365.
Function as a Service (FaaS)
FaaS works much different than any of the previously mentioned services. It allows engineers to execute discrete pieces of code, called functions, in response to specific events such as HTTP requests or file uploads. This model abstracts away all server management, automatically handling scaling and resource allocation. This makes the service ideal for decomposing applications into small, manageable, and independently scalable functions. FaaS is well suited for real-time data processing and IoT applications. Some examples of FaaS are AWS Lambda, Azure Functions, and Google Cloud Functions.
References
- Connect a Raspberry Pi or other device - AWS IoT Core
- What is serverless computing? | Serverless definition
- Why use serverless computing? | Pros and cons of serverless
- Serverless Computing - AWS Lambda
- Amazon EC2 Instance types
- Comparing AWS, Azure, GCP
- What is Cloud Computing
- Virtual Machine series
- Connect Raspberry Pi to Azure IoT Hub
- Build Applications with Azure
- Cloud Computing
- What are IaaS, PaaS, and SaaS?
- What are the different types of cloud computing?