Skip to content
BCA-304N · Cloud Computing
Unit 4

Platform as a Service (PaaS) and Software as a Service (SaaS)

Sign in to save
Unit 4 Learning Hub

Platform as a Service (PaaS) and Software as a Service (SaaS)

Core Definitions & Key Concepts

Core Definitions & Key Concepts

What is Platform as a Service (PaaS)

A cloud model that delivers hardware, operating systems, storage, network capacity, and language execution runtimes to developers over the internet, allowing them to build, test, and deploy applications without managing underlying infrastructure.

What is Software as a Service (SaaS)

A cloud delivery model where complete, ready-to-use software applications are hosted centrally by a vendor and licensed to end-users over the web on a subscription basis, eliminating local client software installation and maintenance.

Name two industry-standard PaaS offerings and two SaaS applications

  • PaaS: Google App Engine, AWS Elastic Beanstalk, Heroku.
  • SaaS: Google Docs/Gmail, Salesforce CRM, Microsoft 365, Slack.

PaaS and SaaS from a user perspective

PaaS targets software developers and dev teams who write code and deploy custom applications. SaaS targets business professionals and end-consumers who interact with finished applications via web browsers or mobile apps.

What is a Web Service

A standardized software component designed to support interoperable machine-to-machine interaction over a network, using standard protocols (HTTP) and serialization formats (XML, JSON).

SOAP and REST Web Services

  • SOAP (Simple Object Access Protocol): Rigid, standardized protocol requiring XML message envelopes, WSDL contracts, strict WS-Security, and transport independence.
  • REST (Representational State Transfer): Lightweight architectural style using standard HTTP verbs (GET, POST, PUT, DELETE) and flexible serialization (JSON).

A Web OS (Web Operating System)

A cloud-based desktop environment running inside a web browser that simulates the GUI, file system, process execution, and desktop applications of a traditional OS over the internet.

What is Multi-Tenant Database Architecture in SaaS

An architecture where a single operational database server serves multiple enterprise clients (tenants), utilizing separate databases, separate schemas, or a shared schema with tenant ID column partitioning.

What is API-First Design in modern SaaS development

A software design approach where application programming interfaces (APIs) are conceptualized, documented, and developed as the primary product before building graphical frontends or integrations.

Serverless Computing (Function as a Service - FaaS) within PaaS

An execution model where the cloud provider dynamically manages the allocation of server resources, running event-driven code snippets (functions) only on demand and charging strictly for execution milliseconds (e.g., AWS Lambda).

✓Topic 1 covered: Core Definitions & Key Concepts
Next: Conceptual & Architectural Analysis↓

Conceptual & Architectural Analysis

Conceptual & Architectural Analysis

Compare Multi-Tenant Database Design Patterns for SaaS Applications

Architecture PatternIsolation LevelDevelopment CostScalability & Maintenance
Separate DB per TenantMaximum (Physical DB separation)High (Requires N database migrations)Hard to maintain across thousands of tenants
Shared DB, Separate SchemaHigh (Logical schema separation)ModerateModerate; clean SQL search paths
Shared DB, Shared SchemaLowest (Shared tables, tenant_id)Lowest (Single migration pipeline)Highest density; requires strict RLS to prevent leakage

REST Architectural Constraints (Roy Fielding)

Roy Fielding's 6 Core REST Constraints

  1. Client-Server Architecture: Decouples user interface concerns from data storage concerns, improving UI portability.
  2. Statelessness: No client context is stored on the server between requests. Each request from the client must contain all information necessary to process it.
  3. Cacheability: Responses must implicitly or explicitly define themselves as cacheable or non-cacheable (Cache-Control: max-age=3600).
  4. Uniform Interface: Standardized manipulation of resources via representations, self-descriptive messages, and HATEOAS.
  5. Layered System: Client cannot determine whether it is connected directly to the end server or an intermediary proxy, CDN, or load balancer.
  6. Code-on-Demand (Optional): Servers can temporarily extend client functionality by transferring executable code (e.g., JavaScript).

Detail the Architecture and Working of Google App Engine as an Exemplary PaaS

Google App Engine Architecture

  • Standard vs Flexible Environment:
  • Standard Environment: Runs applications in highly secure sandboxed containers pre-configured with specific language runtimes (Java, Python, Go). Scales from zero to thousands of instances in sub-second response times.
  • Flexible Environment: Runs code inside custom Docker containers on Compute Engine VMs, supporting any programming language or native library.
  • Automatic Management: Automatically handles health checking, load balancing, operating system patching, and scaling based on traffic volume.

Examine SaaS Security Challenges: Data Segregation, Identity Federation, and Regulatory Compliance

Key SaaS Security Vectors

  1. Cross-Tenant Data Bleed: A bug in application code or flawed SQL query leaking Tenant A's private records to Tenant B. Mitigated via PostgreSQL Row-Level Security (RLS).
  2. Federated Identity & Single Sign-On (SSO): Supporting enterprise identity providers (IdPs) using SAML 2.0 and OpenID Connect (OIDC), eliminating localized password stores.
  3. Data Residency & Sovereignty: Ensuring customer data is physically stored within specific geopolitical boundaries as mandated by laws (e.g., GDPR in Europe, RBI guidelines in India).

Case Studies in Cloud Service Models: Salesforce (SaaS) and Heroku (PaaS)

Real-World Case Studies

  • Salesforce CRM (PaaS/SaaS Pioneer): Demonstrates enterprise multi-tenancy. Built a proprietary Metadata Architecture where core code is immutable and tenant-specific customizations (custom fields, business workflows) are stored as dynamic metadata records in shared relational databases.
  • Heroku (Developer PaaS): Abstracted deployment into a simple git push heroku main workflow. Introduced Dynos (lightweight Linux execution containers) and the 12-Factor App methodology, allowing developers to declare dependencies and backing services via configuration.
✓Topic 2 covered: Conceptual & Architectural Analysis
Next: In-Depth Analysis & Implementation↓

In-Depth Analysis & Implementation

In-Depth Analysis & Implementation

Provide an In-Depth Architectural Analysis of Modern SaaS Multi-Tenancy: Comparing Database Isolation Models, Data Bleed Prevention, and Row-Level Security (RLS)

Comprehensive SaaS Multi-Tenancy Architecture

System Architecture / Concept DiagramHorizontal Scroll Enabled
+-----------------------------------------------------------------------------------------+
|                            SAAS DATABASE ISOLATION MODELS                               |
|                                                                                         |
|  1. Database-per-Tenant         2. Schema-per-Tenant         3. Shared Schema (RLS)     |
|  +----------+  +----------+     +--------------------+       +------------------------+ |
|  | Tenant A |  | Tenant B |     |   Single Database  |       |    Single Database     |
|  | Database |  | Database |     | +----------------+ |       | +--------------------+ | |
|  +----------+  +----------+     | | Schema: TenantA| |       | | Table: orders      | | |
|                                 | +----------------+ |       | | [tenant_id | data] | | |
|  - Max Isolation                | | Schema: TenantB| |       | +--------------------+ | |
|  - High Infrastructure Cost     | +----------------+ |       | - Lowest Overhead      | |
|  - Complex Backups              +--------------------+       | - Requires Strict RLS  | |
+-----------------------------------------------------------------------------------------+

1. Detailed Isolation Model Tradeoffs

  • Database-per-Tenant: Offers complete physical cryptographic boundary. Used in banking and defense. However, running 5,000 idle databases creates massive memory exhaustion and nightmare migration loops.
  • Schema-per-Tenant: Single database engine with separate PostgreSQL schemas. Clean isolation; search paths set at connection (SET search_path TO tenant_a). Schema migrations still scale linearly with tenant count.
  • Shared Table with Tenant ID: Every table includes a tenant_id UUID column. Most cost-effective, scalable model.

2. Bulletproof Prevention of Data Bleed with PostgreSQL Row-Level Security (RLS)

Application-level WHERE tenant_id = 'xxx' clauses fail when a developer forgets the clause. RLS enforces isolation directly inside the database kernel:

System Architecture / Concept DiagramHorizontal Scroll Enabled
-- 1. Enable RLS on Sensitive Multi-Tenant Table
ALTER TABLE public.student_notes ENABLE ROW LEVEL SECURITY;

-- 2. Define Strict Policy Tied to JWT Authentication Context
CREATE POLICY tenant_isolation_policy ON public.student_notes
FOR ALL
USING (tenant_id = NULLIF(current_setting('app.current_tenant_id', true), '')::uuid);

Even if application code executes SELECT * FROM student_notes;, PostgreSQL transparently injects the security predicate at the query engine level, preventing any possibility of cross-tenant data leakage.

Design and Detail a Microservices-Based SaaS E-Learning Platform Utilizing Containerized Runtimes and Event-Driven Architecture

Microservices E-Learning SaaS Blueprint

System Architecture / Concept DiagramHorizontal Scroll Enabled
                                  [ API Gateway (Kong / Envoy) ]
                                  /             |              \
                                 /              |               \
           [ Auth Service (OIDC) ]    [ Course Catalog ]    [ Quiz & Assessment ]
                     |                         |                       |
                     v                         v                       v
             [ PostgreSQL Auth ]       [ MongoDB Catalog ]     [ PostgreSQL Quizzes ]
                     \                         |                       /
                      \                        v                      /
                       +--------> [ Apache Kafka Event Bus ] <-------+
                                               |
                                               v
                                   [ Analytics & Leaderboard ]
                                               |
                                               v
                                      [ Redis Cache Cluster ]

Architecture Components:

  1. API Gateway: Central point of ingress handling rate limiting, JWT authentication verification, and route distribution.
  2. Polyglot Persistence: Course catalog stored in MongoDB for dynamic schema flexibility; user accounts and quiz assessments stored in relational PostgreSQL with ACID compliance.
  3. Event-Driven Decoupling: When a student completes a quiz, the Assessment service publishes a QuizCompletedEvent to Kafka. Downstream notification and analytics services consume this event asynchronously without degrading quiz submission latency.

Critically Analyze Roy Fielding's REST vs GraphQL vs gRPC as the Modern API Backbone for Cloud Computing

Enterprise API Paradigm Evaluation

Architectural VectorREST (HTTP/1.1 or HTTP/2)GraphQL (Query Language)gRPC (HTTP/2 Protocol Buffers)
Data SerializationText (JSON, XML)Text (JSON)Binary (Protobuf - Ultra compact)
Network TransportHTTP/1.1 / HTTP/2HTTP/1.1 / HTTP/2Strictly HTTP/2 (Multiplexed)
Over/Under-FetchingHigh (Fixed endpoint schemas)Zero (Client requests exact fields)Fixed schema; efficient binary
Streaming SupportPolling, Server-Sent EventsSubscriptions (WebSockets)Native bidirectional streaming
Best Used ForPublic developer APIs, CRUDFrontend-to-Backend (BFF layer)High-speed inter-microservice RPC

Architectural Synthesis:

Modern cloud systems avoid dogmatic single-protocol adherence. They deploy REST/GraphQL at the public edge for mobile and browser consumption and deploy gRPC internally between backend microservices to minimize network serialization overhead and latency.

✓Topic 3 covered: In-Depth Analysis & Implementation
Next: Important Exam Points & Quick Revision↓

Important Exam Points & Quick Revision

Important Exam Points & Quick Revision

Examiners frequently test: PaaS vs SaaS vs IaaS differences (5/10 marks), Multi-tenant database patterns (5 marks), and REST constraints (5/10 marks).

Practice Ready

Ready to practice Unit 4?

You've read the core concepts. Take the balanced 10-question practice set to test your mastery!

Save progress