0% found this document useful (0 votes)
77 views15 pages

CST-440 - Web Framework in Cloud (AngularJS) - UNIT1

The document provides an overview of cloud computing concepts including: 1. Cloud computing allows users to access servers and data over the internet, reducing costs and increasing functionality compared to local data storage. Major cloud providers include AWS, Azure, and Google Cloud. 2. Cloud services can be software, infrastructure, or platforms delivered over the internet. Software as a service (SaaS), infrastructure as a service (IaaS), and platform as a service (PaaS) are the main types. 3. A cloud adoption framework provides best practices to help companies migrate applications and infrastructure to the cloud in an organized way. Security measures for cloud computing include encrypting data, monitoring data activity, and defining data
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views15 pages

CST-440 - Web Framework in Cloud (AngularJS) - UNIT1

The document provides an overview of cloud computing concepts including: 1. Cloud computing allows users to access servers and data over the internet, reducing costs and increasing functionality compared to local data storage. Major cloud providers include AWS, Azure, and Google Cloud. 2. Cloud services can be software, infrastructure, or platforms delivered over the internet. Software as a service (SaaS), infrastructure as a service (IaaS), and platform as a service (PaaS) are the main types. 3. A cloud adoption framework provides best practices to help companies migrate applications and infrastructure to the cloud in an organized way. Security measures for cloud computing include encrypting data, monitoring data activity, and defining data
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

UNIVERSITY INSTITUTE OF

ENGINEERING (UIE)

Department of Computer Science Engineering

19BCC-1 (Cloud Computing)

SUBJECT NAME. : Web Framework in Cloud(AngularJS)

SUBJECT CODE : CST-440

FACULTY : Rahat Yezdani


Lecture Notes
UNIT-1
Chapter 1.1 Introduction and evolution of Cloud computing

CO1: The students will become familiar with the concepts cloud web development, REST
API’s, use of REST API’s in AngularJS

Lecture 1.1.1 Evolution of cloud computing

Cloud Computing is one of the latest trends in application deployment and web integration, which
not only reduces costs but also gives many functionalities. The main purpose of cloud computing
is to give access to data centers to many users. Users can also access data from a remote server.
ex: AWS, Azure, Google Cloud.

What is Cloud?!!!

Cloud is nothing but a server that we access over the internet, it contains a large amount of data
such as text files, video, audio, images, docs, pdfs, and so on.

Advances in virtualization make it possible to see the growth of Internet clouds as a new
computing paradigm.

It is just like developing software for millions to use as a service rather than distributing
software to run on their PCs.

Evolution Of Cloud:

In 1984, John Gage Sun Microsystems gave the slogan, “The network is the computer.”

In 2008, David Patterson UC Berkeley said, “The data center is the computer.”

Rajkumar Buyya of Melbourne University simply said: “The cloud is the computer.”

Some people view clouds as grids or clusters with changes through virtualization since clouds
are anticipated to process huge data sets generated by the traditional Internet, social networks,
and the future IoT.

A single-site cloud (as known as a “Datacenter”) consists of

1. Compute nodes (grouped into racks).


2. Switches, connecting the racks.
3. A network topology, e.g., hierarchical.
4. Storage (backend) nodes are connected to the network.
5. Front-end for submitting jobs and receiving client requests.
6. Software Services.

What is meant by Distributed Computing?!!

A distributed system consists of multiple autonomous computers, having their own memory,
communicating through message passing.

What is meant by Cloud Computing?!!

Clouds can be built with physical or virtualized resources over large data centers that are
distributed systems. Cloud computing is also considered to be a form of utility computing or
service computing.

Major Categories of Cloud:

Can be either an (i) public cloud or (ii) private cloud.

Private clouds -are accessible only to company employees.

Public clouds - provide a service to any paying customer:

Amazon S3 (Simple Storage Service): store arbitrary datasets, pay per GB-month stored.

Amazon EC2 (Elastic Compute Cloud): upload and run arbitrary OS images, pay per CPU
hour used.

Google App Engine/Compute Engine: develop applications within their App Engine framework,
upload data that will be imported into their format, and run.

The Trend toward Utility Computing

Aim towards automatic operations that can be self-organized to support dynamic discovery.
Major computing paradigms are composable with QoS and SLAs.

Plug your thin client into the computing Utility and play intensive compute and Communicate
Applications.

Utility computing focuses on a business model in which customers receive computing resources
from a paid service provider.

All grid/cloud platforms are regarded as utility service providers.

Features of Today's Clouds


Massive scale: Very large data centers contain tens of thousands, sometimes hundreds of
thousands of servers, and you can run your computation across as many servers as you want and
as many servers as your application will scale.

On-demand access: Pay-as-you-go, no upfront commitment.

Data-intensive Nature: What was MBs has now become TBs, PBs, and XBs.

New Cloud Programming Paradigms: MapReduce/Hadoop, NoSQL/Cassandra/MongoDB, and


many others.

Demand services

On-demand: renting vs. buying one. E.g.: AWS Elastic Compute Cloud (EC2): a few cents to a
few $ per CPU hour AWS Simple Storage Service (S3): a few cents per GB-month.

Haas: Hardware as a Service: Get access to barebones hardware machines, do whatever you
want with them, Ex: Your own cluster Not always a good idea because of security risks.

PaaS: Platform as a Service: Get access to flexible computing and storage infrastructure,
coupled with a software platform (often tightly coupled) Ex: Google’s App Engine (Python, Java,
Go).

SaaS: Software as a Service: Get access to software services, when you need them. subsume
SOA (Service Oriented Architectures). Ex: Google docs, MS Office on demand.

Data-intensive Computing

Computation-Intensive Computing: Example areas: MPI-based, High-performance computing,


Grids Typically run-on supercomputers EX: NCSA Blue Waters.

Data-Intensive: Typically store data at datacenters Use compute nodes nearby Compute nodes
run computation services.

In data-intensive computing, the focus shifts from computation to the data

CPU utilization no longer the most important resource metric, instead I/O is disk and/or
network.

New Cloud Programming Paradigms

Google: MapReduce and Sawzall

Amazon: Elastic MapReduce service (pay-as-you-go)


Google (MapReduce): Indexing: a chain of 24 MapReduce jobs, ~200K jobs processing
50PB/month (in 2006)

Yahoo! (Hadoop + Pig): WebMap: a chain of several MapReduce jobs, 300 TB of data, 10K
cores, many tens of hours (~2008)

Facebook (Hadoop + Hive): ~300TB total, adding 2TB/day (in 2008) , 3K jobs processing
55TB/day

NoSQL: MySQL is an industry-standard, but Cassandra is 2400 times faster

Lecture 1.1.2 Fundamentals of cloud services

Cloud Computing is one of the latest trends in application deployment and web integration,
which not only reduces costs but also gives many functionalities. The main purpose of cloud
computing is to give access to data centers to many users. Users can also access data from a
remote server. ex: AWS, Azure, Google Cloud.

The term "cloud services" refers to a wide range of services delivered on demand to companies
and customers over the internet. These services are designed to provide easy, affordable access
to applications and resources, without the need for internal infrastructure or hardware. From
checking email to collaborating on documents, most employees use cloud services throughout
the workday, whether they’re aware of it or not.

Cloud services are fully managed by cloud computing vendors and service providers. They’re
made available to customers from the providers' servers, so there's no need for a company to
host applications on its own on-premises servers.

What types of cloud services solutions are there?

Generally speaking, there are three basic types of cloud services:

Software as a Service (SaaS)

The most widely recognized type of cloud service is known as software as a service, or SaaS.
This broad category encompasses a variety of services, such as file storage and backup, web-
based email, and project management tools.

Examples of SaaS cloud service providers include Dropbox, G Suite, Microsoft Office 365,
Slack and Citrix Content Collaboration. In each of these applications, users can access, share,
store, and secure information in “the cloud.”

Infrastructure as a Service (IaaS)


Infrastructure as a service, or IaaS, provides the infrastructure that many cloud service
providers need to manage SaaS tools—but don’t want to maintain themselves. It serves as the
complete datacenter framework, eliminating the need for resource-intensive, on-site
installations.

Examples of IaaS are Amazon Web Services (AWS), Microsoft Azure and Google Compute
Engine. These providers maintain all storage servers and networking hardware, and may also
offer load balancing, application firewalls, and more. Many well-known SaaS providers run on
IaaS platforms.

Platform as a Service (PaaS)

The cloud service model known as platform as a service, or PaaS, serves as a web-based
environment where developers can build cloud apps. PaaS provides a database, operating
system and programming language that organizations can use to develop cloud-based software,
without having to maintain the underlying elements.

Many IaaS vendors, including the examples listed above, also offer PaaS capabilities.

Lecture 1.1.3 Introduction to cloud framework

When describing a cloud computing framework, the umbrella term “framework” refers to
anything from sets of development tools, middleware technology, or even database management
software that helps with the administration, creation, and control of cloud applications.

What is a cloud adoption framework?

A cloud adoption framework is a strategy to help companies expedite their cloud migration or
adoption process. For example, Microsoft’s Cloud Adoption Framework for Azure includes a
set of documents, guidelines, best practices, and implementation instructions that make it easy
for companies to plan out their move to the cloud.

It is extremely important to use a secure operating system when inputting your data on the
cloud. What measures do cloud computing services put in place to prevent dangerous internet
crime from reaching your cloud?

Encrypting data

A must for organizations using multilayer cloud integration and highly important for businesses
of all sizes, cloud data encryption ensures all data stored on the cloud is safely kept both when
in use and at rest.

Monitoring data activity


Systems and services connected to your cloud computing framework need to be actively
monitored at all times. Keeping track of data exchanges between different cloud services and
logging data access will help maintain visibility and spot any extraordinary actions.

Defining data ownership

Many cloud services adopt a shared-responsibility model, where compliance and accountability
for utmost security are divided between the cloud provider and the customer – the first takes care
of the security of the cloud infrastructure, the latter for keeping data within the cloud. Within
this security model, it is key to define data ownership between public and private third parties,
so the customer can navigate it seamlessly.

Lecture 1.1.4 Cloud service providers

A cloud service provider is a third-party company offering a cloud-based platform,


infrastructure, application or storage services. Much like a homeowner would pay for a utility
such as electricity or gas, companies typically have to pay only for the amount of cloud services
they use, as business demands require.

Besides the pay-per-use model, cloud service providers also give companies a wide range of
benefits. Businesses can take advantage of scalability and flexibility by not being limited to
physical constraints of on-premises servers, the reliability of multiple data centers with multiple
redundancies, customization by configuring servers to your preferences and responsive load
balancing which can easily respond to changing demands. Though businesses should also
evaluate security considerations of storing information in the cloud to ensure industry-
recommended access and compliance management configurations and practices are enacted and
met.

How do I choose a cloud service provider?

Once you have decided to make the move to cloud computing, your next step is to select a cloud
service provider. It is vital to assess the reliability and capability of a service provider that you
plan to entrust with your organisation’s applications and data. Some things to consider:

Business health and processes

Financial health. The provider should have a track record of stability and be in a healthy financial
position with sufficient capital to operate successfully over the long term.

Organisation, governance, planning and risk management. The provider should have a formal
management structure, established risk management policies and a formal process for assessing
third-party service providers and vendors.

Trust. You should like the company and its principles. Check the provider’s reputation and see
who its partners are. Find out its level of cloud experience. Read reviews and talk to customers
whose situation is similar to yours.
Business knowledge and technical know-how. The provider should understand your business
and what you are looking to do and be able to match it up with their technical expertise.

Compliance audit. The provider should be able to validate compliance with all of your
requirements through a third-party audit.

Administration support

Service Level Agreements (SLAs). Providers should be able to promise you a basic level of
service that you are comfortable with.

Performance reporting. The provider should be able to give you performance reports.

Resource monitoring and configuration management. There should be sufficient controls for the
provider to track and monitor services provided to customers and any changes made to their
systems.

Billing and accounting. This should be automated so that you can monitor what resources you
are using and the cost, so you don’t run up unexpected bills. There should also be support for
billing-related issues.

Technical capabilities and processes

Ease of deployment, management and upgrade. Make sure the provider has mechanisms that
make it easy for you to deploy, manage and upgrade your software and applications.

Standard interfaces. The provider should use standard APIs and data transforms so that your
organisation can easily build connections to the cloud.

Event management. The provider should have a formal system for event management which is
integrated with its monitoring/management system.

Change management. The provider should have documented and formal processes for
requesting, logging, approving, testing and accepting changes.

Hybrid capability. Even if you don’t plan to use a hybrid cloud initially, you should make sure
the provider can support this model. It has advantages that you may wish to exploit at a later
time.

Security practices

Security infrastructure. There should be a comprehensive security infrastructure for all levels
and types of cloud services.

Security policies. There should be comprehensive security policies and procedures in place for
controlling access to provider and customer systems.
Identity management. Changes to any application service or hardware component should be
authorised on a personal or group role basis and authentication should be required for anyone to
change an application or data.

Data backup and retention. Policies and procedures to ensure integrity of customer data should
be in place and operational.

Physical security. Controls ensuring physical security should be in place, including for access to
co-located hardware. Also, data centers should have environmental safeguards to protect
equipment and data from disruptive events. There should be redundant networking and power
and a documented disaster recovery and business continuity plan.

Chapter 1.2 Representational State Transfer REST

CO1: The students will become familiar with the concepts cloud web development, REST
API’s, use of REST API’s in AngularJS

Lecture 1.2.1 Introduction to REST architecture

What is REST architecture?

REST stands for REpresentational State Transfer. REST is web standards based architecture and
uses HTTP Protocol. It revolves around resource where every component is a resource and a
resource is accessed by a common interface using HTTP standard methods. REST was first
introduced by Roy Fielding in 2000.

In REST architecture, a REST Server simply provides access to resources and REST client
accesses and modifies the resources. Here each resource is identified by URIs/ global IDs. REST
uses various representation to represent a resource like text, JSON, XML. JSON is the most
popular one.

HTTP methods

Following four HTTP methods are commonly used in REST based architecture.

GET − Provides a read only access to a resource.

POST − Used to create a new resource.

DELETE − Used to remove a resource.

PUT − Used to update a existing resource or create a new resource.

Introduction to RESTFul web services


A web service is a collection of open protocols and standards used for exchanging data between
applications or systems. Software applications written in various programming languages and
running on various platforms can use web services to exchange data over computer networks
like the Internet in a manner similar to inter-process communication on a single computer. This
interoperability (e.g., between Java and Python, or Windows and Linux applications) is due to
the use of open standards.

Web services based on REST Architecture are known as RESTful web services. These
webservices uses HTTP methods to implement the concept of REST architecture. A RESTful
web service usually defines a URI, Uniform Resource Identifier a service, provides resource
representation such as JSON and set of HTTP Methods.

Defining the resources in RESTful applications

You can use Java™ API for RESTful Web Services (JAX-RS) to develop services that follow
Representational State Transfer (REST) principles. RESTful services are based on manipulating
resources. Resources can contain static or dynamically updated data. By identifying the
resources in your application, you can make the service more useful and easier to develop.

Before you begin

After you have identified the application that you want to expose as a RESTful service, you must
first define the resources for your RESTful application. After you have defined the resources for
your application, consider the type of data you want to expose. Perhaps you already have a
relational database that contains information that you want to expose to users that are using the
REST technology. Do you already have a set of Java classes defined for accessing that data?

For example, consider the case of an application that is defined to support a book store. This
application currently has a database with several tables that define the various items in the
collection of books and the inventory of each book. In this example, there are a number of ways
to represent the data in the database in a RESTful application. One approach is to consider each
table as an individual resource, so that each of the verbs in the RESTful request maps to the
actions that the database supports on that table such as select, insert, update, delete. This example
is a simple approach to creating a RESTful application. This approach using the book store
example is also used in the documentation that describes defining URL patterns for resources,
resource methods, HTTP headers and response codes, media types, and parameters for request
representations to resources

In support of this database for the book store application, there might already be existing code
that is responsible for accessing the database and retrieving the data from each table. Even
though the rows in each of the tables logically represent each resource, the accessor classes are
used to define the resources. The implementing JAX-RS applications documentation provides
more details on how these classes are incorporated into your JAX-RS application.
Alternately, you might have more static content that does not reside in a database that you want
to distribute as resources. Whether it is a collection of documents in various formats or a
resource-based facade for other remote systems, when using JAX-RS, you can distribute content
from multiple sources.

About this task

Resources are the basic building block of a RESTful service. Examples of a resource from an
online book store application include a book, an order from a store, and a collection of users.

Resources are addressable by URLs and HTTP methods can perform operations on resources.
Resources can have multiple representations that use different formats such as XML and JSON.
You can use HTTP headers and parameters to pass extra information that is relevant to the
request and response.

With JAX-RS, you can annotate existing or new Plain Old Java objects (POJO) with JAX-RS
specific annotations. JAX-RS annotated resource classes and the annotated methods are started
depending on the URI patterns.

Procedure

1. Identify the types of resources in the application.


2. (optional) Identify existing Java classes that you can use as resource classes.
3. Create new Java classes for resources that do not have an existing Java class.

Results

You have defined the content that you want to expose as a collection of resources in your
application.

What to do next

Based on the resources that you have defined, read about defining URL patterns for resources,
resource methods, HTTP headers and response codes, media types, and parameters for request
representations to resources to learn more about additional steps you can take to define the
resources for your JAX-RS application.

Lecture 1.2.2 Designing REST applications

How to Design a REST API?

Learning REST in pieces is one thing while applying all these concepts into real application
development is completely another challenge.
In this tutorial, we will learn to design REST APIs for a network-based application. Please note
that the takeaway from this whole exercise is the learning of how to apply REST principles in the
application design process.

Steps in designing REST Services

1. Identify Object Model


2. Create Model URIs
3. Determine Representations
4. Assign HTTP Methods
5. More Actions

1. Identify the resources – Object Modeling

The very first step in designing a REST API-based application is – identifying the objects which
will be presented as resources.

For a network-based application, object modeling is pretty much more straightforward. There
can be many things such as devices, managed entities, routers, modems, etc. For simplicity sake,
we will consider only two resources i.e.

➢ Devices
➢ Configurations

Here configuration may be a sub-resource of a device. A device can have many configuration
options.

Note that both objects/resources in our above model will have a unique identifier, which is the
integer id property.

2. Create Model URIs

Now when the object model is ready, it’s time to decide the resource URIs. At this step, while
designing the resource URIs – focus on the relationship between resources and their sub-
resources. These resource URIs are endpoints for APIs.

In our application, a device is a top-level resource. And configuration is a sub-resource under


the device. Let’s write down the URIs.

/devices

/devices/{id}

/configurations

/configurations/{id}
/devices/{id}/configurations

/devices/{id}/configurations/{id}

Notice that these URIs do not use any verb or operation. It’s crucial not to include any verb in
URIs. URIs should all be nouns only.

3. Determine Resource Representations

Now when resource URIs have been decided, let’s work on their representations. Most
representations are defined in either XML or JSON format.

4. Assigning HTTP Methods

So our resource URIs and their representation are fixed now. Let’s decide all the possible
operations in the application and map those operations to the resource URIs.

For example, a user of our network application can perform browse, create, update, or delete
devices from the network as well as create/deploy/remove the device configurations.

5. More Actions

So far, we have designed only object models, URIs and then decided HTTP methods or
operations on them. You need to work on other aspects of the application as well:

1) Logging

2) Security

3) Discovery etc.

See the source code of this example application to understand better. So our resource URIs and
their representation are fixed now. Let’s decide all the possible operations in the application and
map those operations to the resource URIs.

References

What is a cloud computing framework? | ViiBE

How to choose a cloud service provider | Microsoft Azure

Defining the resources in RESTful applications - IBM Documentation

You might also like