Introduction to Cloud ComputingUnit 610 min read
Cloud Platforms & Apps: Services, APIs, Deployment Models
Unit 6 of Introduction to Cloud Computing explores real-world cloud platforms (AWS, Azure, GCP), their service models (IaaS, PaaS, SaaS), deployment models (public/private/hybrid), and how APIs and serverless computing enable modern applications like eSewa, Daraz, and Ncell. Learn to compare platforms, analyze cost str
Key Platforms and Service Models
Cloud Service Models: IaaS vs PaaS vs SaaS
Cloud computing delivers services in three primary models, each abstracting different layers of infrastructure. The cloud stack (shown below) illustrates how each model builds upon the previous one:
Comparison Table:
| Model | Provider Responsibility | User Responsibility | Example (Nepal) | Example (Global) |
|---|---|---|---|---|
| IaaS | Physical hardware, virtualization | OS, middleware, runtime, apps, data | NTC’s cloud-based network tools | AWS EC2, Azure VMs |
| PaaS | Hardware, OS, middleware, runtime | Apps, data | Daraz’s backend for order mgmt | Google App Engine, Heroku |
| SaaS | Everything except user data | Data input, configuration | eSewa for bill payments | Gmail, WhatsApp, YouTube |
Worked Example: eSewa’s Cloud Model eSewa operates as a SaaS for bill payments but relies on PaaS (e.g., AWS Lambda) for backend processing like transaction validation. Users interact only with the frontend (SaaS), while eSewa manages servers, databases, and security (PaaS/IaaS layers).
Cloud Deployment Models
Public vs Private vs Hybrid Clouds
Deployment models determine where and how cloud resources are hosted. The choice impacts cost, security, and scalability.
mindmap
root((Cloud Deployment Models))
Public Cloud
"Shared infrastructure (multi-tenant)"
"Examples: AWS, Google Cloud"
"Pros: Low cost, scalability"
"Cons: Less control, security risks"
Private Cloud
"Dedicated infrastructure (single-tenant)"
"Examples: Ncell’s internal cloud"
"Pros: High security, customization"
"Cons: High cost, maintenance burden"
Hybrid Cloud
"Combination of public + private"
"Examples: Bank core systems (private) + AWS for scaling"
"Pros: Flexibility, cost-efficiency"
"Cons: Complexity, integration challenges"Real-World Tie-In: Ncell’s Cloud Strategy Ncell uses a hybrid cloud model:
- Private cloud: Hosts sensitive customer data (e.g., SIM registration details) for compliance with Nepal’s telecom laws.
- Public cloud (AWS): Handles scalable services like mobile app updates and SMS gateways during peak load (e.g., Dashain festivals).
- Cost saving: Public cloud reduces capital expenditure by 40% for non-critical workloads.
Cloud Platforms: AWS, Azure, and Google Cloud
Feature Comparison
| Feature | AWS (Amazon Web Services) | Microsoft Azure | Google Cloud Platform (GCP) |
|---|---|---|---|
| Strengths | Largest market share, global reach | Deep integration with Microsoft tools | AI/ML leadership, Kubernetes native |
| Pricing Model | Pay-as-you-go, reserved instances | Hybrid Benefit (discounts for Azure + on-prem) | Sustained-use discounts |
| Key Services | EC2 (IaaS), Lambda (serverless), S3 (storage) | Azure Functions (serverless), SQL Database | BigQuery (analytics), Cloud Run (serverless) |
| Use Case (Nepal) | NEPSE’s trading platform (scalability) | Nepal Rastra Bank’s digital identity (Azure AD) | Pathao’s ride-matching (AI routing) |
Worked Example: Daraz’s Cloud Cost Optimization Daraz (Alibaba’s Nepal arm) uses AWS for its e-commerce platform. During Dashain sales, traffic spikes by 500%. Daraz leverages:
- Auto-scaling: EC2 instances scale from 100 to 1,000 based on demand.
- S3 for static content: Reduces server load by 60%.
- CloudFront CDN: Caches product images globally, reducing latency for Kathmandu users by 40%.
Cost Calculation:
- Peak hour (1,000 instances): $0.10/hour × 1,000 = $100/hour.
- Off-peak (100 instances): $0.10/hour × 100 = $10/hour.
- Savings with Reserved Instances: 30% discount on long-term commitments.
APIs and Serverless Computing
How APIs Enable Cloud Applications
APIs (Application Programming Interfaces) allow cloud services to communicate. For example, Khalti’s API lets Daraz process payments without building a payment system from scratch.
sequenceDiagram
participant User as Daraz User
participant Daraz as Daraz Website
participant Khalti as Khalti API
participant Bank as Bank (Nabil, Global IME)
User->>Daraz: Selects product + "Pay with Khalti"
Daraz->>Khalti: Sends payment request (API call)
Khalti->>Bank: Validates funds (API call)
Bank-->>Khalti: Approves/Rejects
Khalti-->>Daraz: Returns transaction ID
Daraz-->>User: Shows "Payment Successful"Key API Types in Cloud Platforms:
- REST APIs: Used by AWS S3 (
GET /object), Azure Blob Storage. - GraphQL APIs: Used by Google Cloud for flexible queries.
- WebSockets: Real-time updates (e.g., Pathao’s live driver tracking).
Serverless Architecture: Functions as a Service (FaaS)
Serverless computing abstracts infrastructure entirely. Developers write functions (e.g., in Python, Node.js) that run in response to events.
stateDiagram-v2
[*] --> Trigger: "Event (HTTP request, timer, DB change)"
Trigger --> Function: "AWS Lambda / Azure Functions"
Function --> Process: "Execute code (e.g., process order)"
Process --> Store: "Save to DynamoDB"
Store --> [*]Example: NTC’s Traffic Monitoring NTC uses AWS Lambda to:
- Trigger: Receive data from traffic cameras every 5 minutes.
- Function: Analyze congestion using Python (OpenCV).
- Output: Update a real-time dashboard (hosted on S3 + CloudFront).
- Cost: Only pay for the 300ms execution time per trigger (~$0.000016 per call).
Comparison: Traditional vs Serverless
| Aspect | Traditional (EC2) | Serverless (Lambda) |
|---|---|---|
| Scaling | Manual (scale up/down) | Automatic (per request) |
| Cost | Pay for idle VMs () | Pay per execution (cents) |
| Use Case | Long-running services (e.g., web servers) | Event-driven tasks (e.g., file processing) |
Cloud Platforms for Nepalese Industries
1. FinTech (eSewa, Khalti, Banks)
- Platform: AWS (used by Nabil Bank for mobile banking).
- Services:
- IaaS: Hosts transaction logs in encrypted S3 buckets.
- PaaS: Uses AWS RDS for PostgreSQL databases.
- SaaS: Customers use Khalti’s mobile app (no backend management needed).
- Security: AWS KMS for encrypting customer data (mandatory per Nepal Rastra Bank).
2. E-Commerce (Daraz, Sano Commerce)
- Platform: Alibaba Cloud (Daraz’s parent) + AWS for global scaling.
- Services:
- Serverless: Lambda for order processing.
- CDN: CloudFront for fast image delivery.
- AI: Google Cloud’s Vision API for product tagging.
3. Telecom (Ncell, NTC)
- Platform: Hybrid (Azure for private core, AWS for public APIs).
- Services:
- IaaS: VMs for call routing (Ncell’s switch).
- PaaS: Azure Functions for SMS gateways.
- SaaS: Customers use Ncell’s MyAccount portal.
4. Government (e-Governance, NEPSE)
- Platform: Government Cloud Nepal (private cloud).
- Services:
- IaaS: Hosts NEPSE’s trading system (high availability required).
- PaaS: Custom portals for share trading (e.g., CDSCO’s API).
Exam Tip
This unit is conceptual + application-based. Expect:
- Short Questions (3–5 marks):
- Define IaaS/PaaS/SaaS and give a Nepalese example.
- Draw a cloud deployment model (public/private/hybrid) and label pros/cons.
- Explain how Khalti uses APIs to integrate with banks.
- Long Questions (10–15 marks):
- Compare AWS, Azure, and GCP for a given use case (e.g., "Design a cloud solution for Pathao’s ride-matching system").
- Cost analysis: Calculate monthly AWS costs for a startup hosting a web app (use EC2, S3, and Lambda pricing).
- Diagram-based: Draw a sequence diagram for "How does eSewa process a bill payment?" (include user, eSewa API, bank, and database).
- Case Studies (15 marks):
- Analyze Ncell’s hybrid cloud strategy (why private for core? why AWS for scaling?).
- Propose a cloud platform for a new Nepalese app (e.g., a food delivery service) and justify your choice.
Common Pitfalls:
- Confusing service models (IaaS/PaaS/SaaS) with deployment models (public/private/hybrid).
- Forgetting to mention cost in comparisons (e.g., "Azure is cheaper for Windows apps").
- Overlooking Nepal-specific examples (examiners love eSewa, Khalti, NEPSE).
Pro Tip:
- Memorize one real-world example per service model (e.g., "eSewa = SaaS," "NTC’s network tools = IaaS").
- Practice drawing diagrams under time pressure (sequence diagrams for APIs, mindmaps for deployment models).
Based on the TU BSc CSIT syllabus for Introduction to Cloud Computing, unit 6.
Discussion
Loading…