SlideShare a Scribd company logo
Web Component Development
with Servlet & JSP Technologies
(EE 6)
Module-13: Deploying J2EE Application to Cloud
www.webstackacademy.com
Objectives
Upon completion of this module, you should be able to:
● What is Cloud?
● Types of Cloud.
● Cloud Sevice Models.
● Advantages of Cloud-Computing.
● What is Web Service?
● Types of Web Services.
● Building Web services with JAX-WS
● Deploy JAX-WS web services on Tomcat
● AWS (Amazon Web Service)
● AWS and Normal Web Hosting Service
● AWS Architecture
www.webstackacademy.com
Relevance
Discussion –
www.webstackacademy.com
What is Cloud?
● Cloud Computing is a general term used to describe a
new class of network based computing that takes place
over the Internet ,
- a collection/group of integrated and networked
hardware, software and Internet Infrastructure (called a
plateform).
- Using the internet for communication and transport
provides hardware ,software and networking services to
clients.
● These services hide the compexity and details of the
underlying infrastructure from users and applications by
providing Application Programming Interface.
www.webstackacademy.com
What is Cloud?
SERVERS
Shared pool of configurable computing resources
● On-demand network access
● Provisioned by the Service Provider
www.webstackacademy.com
Types of Cloud
● Public Cloud :- Public cloud allows the accessibility of systems and
services easily to general public. Eg. Amazon , IBM , Microsoft
,Google etc.
● Private Cloud :- Private cloud allows the accessibility of systems and
services within organization.
● Hybrid Cloud :- Hybrid Cloud is the mixture of public and private
cloud. Non critical activities are performed by public cloud and critical
activities are performed by private cloud.
www.webstackacademy.com
Cloud Service Models
Software as a
Service (SaaS)
Platform as a
Service (PaaS)
Infrastructure as a
Service (IaaS)
www.webstackacademy.com
Advantages of Cloud
● Lower Cost Computers for users - In Cloud , we don't
require a high-powered computer to run cloud computing's
web based applications because applications run on cloud
not on desktop PC or laptop.
● Lower IT infrastructure cost - By using cloud computing ,
we don't need to invest in larger numbers of more powerful
servers ,not require IT staff also for handling such powerful
servers.
● Lower Software Cost - It reduces the software cost
because we don't need to purchase separate software
packages fo each computer in the organization.
www.webstackacademy.com
Advantages of Cloud
● Instant Software updates – Another software related
advantage in cloud computing is that users don't need to
face with the choice between obsolete software and high
upgrade costs . If the app is web-based , updates happen
automatically and are available next time when the user
logs in to the cloud.
● Increased Computing Power – The execution capacity
of cloud servers are very high. It processes the
application very fast.
● Unlimited storage capacity - Cloud offers a huge
amount of storage capacity like 2000GB or more than that
if required.
www.webstackacademy.com
Web Services
A Web Service can be defined in following ways :
● is a client server application or application component for
communication.
● method of communication between two devices over network.
● is a software system for interoperable machine to machine
communication.
● is a collection of standards or protocols for exchanging
information between two devices or application.
www.webstackacademy.com
Types of Web Services
There are two types of Web Services:
1) Soap Web Services
2) RESTful Web Services
www.webstackacademy.com
Soap Web Services
Soap web services use XML messages that follow the
Simple Object Access Protocol (SOAP) standard , an XML
language defining a message architecture and message
formats. Such system often contain a machine -readable
description of the opeations offered by the service, written in
the Web Services Description Language(WSDL) , an XML
lanaguage for defining interface syntactically.
www.webstackacademy.com
RESTful Web Services
In Java EE 6 , JAX-RS provides the functionality for
Representational State Transfer(RESTful) web services.
RESTful web services often better integrated with HTTP than
SOAP-based services are , do not require XML messages or
WSDL service -API definitions.
RESTful web services use existing W3C and internet
Engineering Task Force (IETF) standards (HTTP , XML ,URI
,MIME) and have a lightweight infrastructure that allows services
to be built with minimal tooling ,devloping RESTful services is
inexpensive.
www.webstackacademy.com
SOAP & RESTful Web
Service
www.webstackacademy.com
Building Web services
with JAX-WS
JAX-WS allows developers to write message-oriented as
well as Remote Procedure Call-oriented(RPC -oriented)
web services.
The starting point for developing a JAX-WS web service
is a java class annoted javax.jws.WebService annotation.
The @ WebService annotation defines the web service
endpoint.
A service endpoint interface or service endpoint
Implementation (SEI) is a java class ,that declares the
methods that a client can invoke on the service. An
interface is not required when building a JAX-WS
endpoint.
www.webstackacademy.com
Deploy JAX-WS web
services on Tomcat
Steps of a web service deployment
● Create a web service
● Create a sun-jaxws.xml , defines web service implementation class
● Create a standard web.xml ,defines WSServletContextLitener
,WSServlet and structure of a web project.
● Build tool to generate WAR file.
● Copy JAX-WS dependencies to “${Tomcat}/lib” folder.
● Copy WAR to “${Tomcat}/webapp” folder.
● Start it.
www.webstackacademy.com
Creating Web Service
File : HelloWeb.java
package com.emertxe.ws;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
//Service Endpoint Interface
@WebService
@SOAPBinding(style = Style.RPC)
public interface HelloWeb{
@WebMethod String getHelloWebAsString();
}
www.webstackacademy.com
Creating Web Service
File : HelloWebImpl.java
package com.emertxe.ws;
import javax.jws.WebService;
//Service Implementation Bean
@WebService(endpointInterface = "com.emertxe.ws.HelloWeb")
public class HelloWebImpl implements HelloWeb{
@Override
public String getHelloWebAsString() {
return "Hello Web JAX-WS";
}
}
www.webstackacademy.com
Create a web service deployment
descriptor
File : sun-jaxws.xml
<?xml version="1.0" encoding="UTF-8"?>
<endpoints
xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime"
version="2.0">
<endpoint
name="HelloWeb"
implementation="com.emertxe.ws.HelloWebImpl"
url-pattern="/hello"/>
</endpoints>
www.webstackacademy.com
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems,
Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
<web-app>
<listener>
<listener-class>
com.sun.xml.ws.transport.http.servlet.WSServletContextListener
</listener-class>
</listener>
www.webstackacademy.com
<servlet>
<servlet-name>hello</servlet-name>
<servlet-class>
com.sun.xml.ws.transport.http.servlet.WSServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>hello</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>120</session-timeout>
</session-config>
</web-app>
web.xml
www.webstackacademy.com
WAR Content
WEB-INF/classes/com/emertxe/ws/HelloWeb.class
WEB-INF/classes/com/emertxe/ws/HelloWebImpl.class
WEB-INF/web.xml
WEB-INF/sun-jaxws.xml
www.webstackacademy.com
JAX-WS
Dependencies
Go here http://jax-ws.java.net/.
copy following JAX-WS dependencies to Tomcat library
folder “{$TOMCAT}/lib“.
jaxb-impl.jar
jaxws-api.jar
jaxws-rt.jar
gmbal-api-only.jar
management-api.jar
stax-ex.jar
streambuffer.jar
policy.jar
www.webstackacademy.com
Deployment
Copy the generated WAR file to {$TOMCAT}/webapps/ folder
and start the Tomcat server.
For testing, access this URL :
http://localhost:8080/HelloWeb/hello
www.webstackacademy.com
AWS (Amazon Web
Service)
● AWS is a subsidiary of Amazon.com ,offers a suite
of cloud computing services that make up an on-
demand computing plateform.
● The most central and best-known of these
services include Amazon Elastic Compute Cloud ,
also known as “EC2” and Amazon Simple Storage
Service, also known as “S3”.
www.webstackacademy.com
AWS (Amazon Web
Service)
● Amazon Web Services offers a broad set of global cloud-
based products including storage , database ,analytics,
networking ,mobile, developer tools ,management tools,
security, compute and enterprise applications.
● These services help organizations move faster , lower IT
costs and scale .
● AWS is trusted by the largest enterprises and starts-ups to
power a wide variety of workloads including : web and
mobile applications ,game development ,data processing
and warehousing ,storage ,archieve and many others.
www.webstackacademy.com
Normal Web Hosting
Service
● Shared :- A physical server that is shared by many
different customers. User account is restricted to certain
files , and very limited access. Usually this web server runs
one Web Server (usually Apache).
● Virtual Private :- Many virtual server are stored on one
physical server. Each Customer has their own private virtual
server.
● Dedicated : A physical server that is leased to a single
customer.
www.webstackacademy.com
Amazon Web Service
Standard :- AWS allows for dedicated root access to
the server , which is a feature not available in most
virtual private servers.
Dedicated :- Dedicated Amazon will provide a
virtual server that is not on a shared server ,but its own
private cloud . It is similar to a dedicated server , but
with the flexibility of a virtual private server.
www.webstackacademy.com
Amazon Web Service
advantages over normal
Web Hosting Service
● High -availability (Eliminating Single points of failure)
● Distributed Infrastructure ,reducing latency to all
regions of the world.
● Cost saving ,scaling down on hardware being
used,saving money in the long term.
● On-demand infrastructure for scaling applications
or tasks (adding servers or “horizontal scaling “ to
massively increase the hardware power available to
the application)
www.webstackacademy.com
AWS Architecture for a
Web App
www.webstackacademy.com
AWS Architecture for a
Web App
● The Web Application tiers runs on EC2( Amazon Elastic
Compute Cloud) instances in VPC.
● Access to the EC2 instances over SSH is controlled by a
security group which acts as a firewall.
● The Autoscaling maintains a fleet of EC2.Auto Scaling group
spans multiple availability Zones to protect against the potential
failureof a single scaling group.
● When the Auto Scaling group launches or terminates instances
based on the load ,the load balancer automatically adjusts
accordingly.
www.webstackacademy.com
● The database tier consists of DB instances in VPC,
including a master and a local slavelocated in multiple
Availability Zones.
● Access to the DB instances from the EC2 instances is
controlled by a security group.
● Amazon Route 53 provides secure and Reliable routing of
the domain name to infrastructure hosted on AWS.
AWS Architecture for a
Web App
Web Stack Academy (P) Ltd
#83, Farah Towers,
1st floor,MG Road,
Bangalore – 560001
M: +91-80-4128 9576
T: +91-98862 69112
E: info@www.webstackacademy.com

More Related Content

What's hot (20)

PDF
Windows Azure Platform Technical Deep Dive - Chris Auld (Intergen)
Spiffy
 
PDF
Introducing WebLogic 12c OTN Tour 2012
Bruno Borges
 
PPTX
Combining Private and Public Clouds into Meaningful Hybrids
David Chou
 
ODP
ZK MVVM, Spring & JPA On Two PaaS Clouds
Simon Massey
 
PPT
Oracle WebLogic Server Basic Concepts
James Bayer
 
PPTX
Windows Azure
Murali Krishna Alluri
 
PPTX
Delivering Hybrid Cloud Solutions on Microsoft Azure
Kemp
 
PPTX
Mesh-Enabled Web Applications
goodfriday
 
PPT
How To Scale v2
Georgio_1999
 
PDF
WebLogic for DBAs
Simon Haslam
 
PPT
ArcReady - Architecting For The Cloud
Microsoft ArcReady
 
PDF
Working with azure database services platform
ssuser79fc19
 
PDF
WebLogic JMS System Best Practices
Trivadis
 
PPT
The Top 10 Things Oracle UCM Users Need To Know About WebLogic
Brian Huff
 
PDF
Portfolio
addl D
 
PPTX
6.Live Framework 和Mesh Services
GaryYoung
 
PPT
Scalable Web Architecture
Aleksandr Tsertkov
 
PPT
Unplugged
Nigel Parker
 
PPTX
Microsoft Database Options
David Chou
 
PPT
Scaling drupal horizontally and in cloud
Vladimir Ilic
 
Windows Azure Platform Technical Deep Dive - Chris Auld (Intergen)
Spiffy
 
Introducing WebLogic 12c OTN Tour 2012
Bruno Borges
 
Combining Private and Public Clouds into Meaningful Hybrids
David Chou
 
ZK MVVM, Spring & JPA On Two PaaS Clouds
Simon Massey
 
Oracle WebLogic Server Basic Concepts
James Bayer
 
Windows Azure
Murali Krishna Alluri
 
Delivering Hybrid Cloud Solutions on Microsoft Azure
Kemp
 
Mesh-Enabled Web Applications
goodfriday
 
How To Scale v2
Georgio_1999
 
WebLogic for DBAs
Simon Haslam
 
ArcReady - Architecting For The Cloud
Microsoft ArcReady
 
Working with azure database services platform
ssuser79fc19
 
WebLogic JMS System Best Practices
Trivadis
 
The Top 10 Things Oracle UCM Users Need To Know About WebLogic
Brian Huff
 
Portfolio
addl D
 
6.Live Framework 和Mesh Services
GaryYoung
 
Scalable Web Architecture
Aleksandr Tsertkov
 
Unplugged
Nigel Parker
 
Microsoft Database Options
David Chou
 
Scaling drupal horizontally and in cloud
Vladimir Ilic
 

Similar to Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 13 - Deploying J2EE Application to Cloud (20)

PPTX
Cloud description
thanuambika
 
PPT
java web services - soap and rest services
VasantPrasad
 
PDF
Taking A Look At Web Services
Stacey Cruz
 
PDF
Java Web Services [1/5]: Introduction to Web Services
IMC Institute
 
PDF
Introduction to Web Services
Thanachart Numnonda
 
DOCX
AWS Overview
Scott Friedman
 
DOCX
AWS Overview
Scott Friedman
 
PDF
Chapter 1 introduction
jam c
 
PDF
Web Services
Katrien Verbert
 
PPTX
Introduction to webservices
Gagandeep Singh
 
PDF
JBoss / Red Hat: bridging the gap between web services technologies and real ...
ecows2011
 
PPT
web services-May 25.ppt
ShivaangiKrish
 
PPTX
Web services
ishmecse13
 
PPT
Cloud-Computing
Jegannath Alagendran
 
ODP
Web service Introduction
Madhukar Kumar
 
PDF
Data As A Service Composition Of Daas And Negotiation...
Christina Berger
 
PPT
Cloud ppt
SamreenAkhtar8
 
PDF
SOA and WCF (Windows Communication Foundation) basics
Yaniv Pessach
 
PDF
Web Services / Technology in Cloud Computing
Hitesh Mohapatra
 
Cloud description
thanuambika
 
java web services - soap and rest services
VasantPrasad
 
Taking A Look At Web Services
Stacey Cruz
 
Java Web Services [1/5]: Introduction to Web Services
IMC Institute
 
Introduction to Web Services
Thanachart Numnonda
 
AWS Overview
Scott Friedman
 
AWS Overview
Scott Friedman
 
Chapter 1 introduction
jam c
 
Web Services
Katrien Verbert
 
Introduction to webservices
Gagandeep Singh
 
JBoss / Red Hat: bridging the gap between web services technologies and real ...
ecows2011
 
web services-May 25.ppt
ShivaangiKrish
 
Web services
ishmecse13
 
Cloud-Computing
Jegannath Alagendran
 
Web service Introduction
Madhukar Kumar
 
Data As A Service Composition Of Daas And Negotiation...
Christina Berger
 
Cloud ppt
SamreenAkhtar8
 
SOA and WCF (Windows Communication Foundation) basics
Yaniv Pessach
 
Web Services / Technology in Cloud Computing
Hitesh Mohapatra
 
Ad

More from WebStackAcademy (20)

PDF
Webstack Academy - Course Demo Webinar and Placement Journey
WebStackAcademy
 
PDF
WSA: Scaling Web Service to Handle Millions of Requests per Second
WebStackAcademy
 
PDF
WSA: Course Demo Webinar - Full Stack Developer Course
WebStackAcademy
 
PDF
Career Building in AI - Technologies, Trends and Opportunities
WebStackAcademy
 
PDF
Webstack Academy - Internship Kick Off
WebStackAcademy
 
PDF
Building Your Online Portfolio
WebStackAcademy
 
PDF
Front-End Developer's Career Roadmap
WebStackAcademy
 
PDF
Angular - Chapter 9 - Authentication and Authorization
WebStackAcademy
 
PDF
Angular - Chapter 7 - HTTP Services
WebStackAcademy
 
PDF
Angular - Chapter 6 - Firebase Integration
WebStackAcademy
 
PDF
Angular - Chapter 5 - Directives
WebStackAcademy
 
PDF
Angular - Chapter 4 - Data and Event Handling
WebStackAcademy
 
PDF
Angular - Chapter 3 - Components
WebStackAcademy
 
PDF
Angular - Chapter 2 - TypeScript Programming
WebStackAcademy
 
PDF
Angular - Chapter 1 - Introduction
WebStackAcademy
 
PDF
JavaScript - Chapter 10 - Strings and Arrays
WebStackAcademy
 
PDF
JavaScript - Chapter 15 - Debugging Techniques
WebStackAcademy
 
PDF
JavaScript - Chapter 14 - Form Handling
WebStackAcademy
 
PDF
JavaScript - Chapter 13 - Browser Object Model(BOM)
WebStackAcademy
 
PDF
JavaScript - Chapter 12 - Document Object Model
WebStackAcademy
 
Webstack Academy - Course Demo Webinar and Placement Journey
WebStackAcademy
 
WSA: Scaling Web Service to Handle Millions of Requests per Second
WebStackAcademy
 
WSA: Course Demo Webinar - Full Stack Developer Course
WebStackAcademy
 
Career Building in AI - Technologies, Trends and Opportunities
WebStackAcademy
 
Webstack Academy - Internship Kick Off
WebStackAcademy
 
Building Your Online Portfolio
WebStackAcademy
 
Front-End Developer's Career Roadmap
WebStackAcademy
 
Angular - Chapter 9 - Authentication and Authorization
WebStackAcademy
 
Angular - Chapter 7 - HTTP Services
WebStackAcademy
 
Angular - Chapter 6 - Firebase Integration
WebStackAcademy
 
Angular - Chapter 5 - Directives
WebStackAcademy
 
Angular - Chapter 4 - Data and Event Handling
WebStackAcademy
 
Angular - Chapter 3 - Components
WebStackAcademy
 
Angular - Chapter 2 - TypeScript Programming
WebStackAcademy
 
Angular - Chapter 1 - Introduction
WebStackAcademy
 
JavaScript - Chapter 10 - Strings and Arrays
WebStackAcademy
 
JavaScript - Chapter 15 - Debugging Techniques
WebStackAcademy
 
JavaScript - Chapter 14 - Form Handling
WebStackAcademy
 
JavaScript - Chapter 13 - Browser Object Model(BOM)
WebStackAcademy
 
JavaScript - Chapter 12 - Document Object Model
WebStackAcademy
 
Ad

Recently uploaded (20)

DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Digital Circuits, important subject in CS
contactparinay1
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 

Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 13 - Deploying J2EE Application to Cloud

  • 1. Web Component Development with Servlet & JSP Technologies (EE 6) Module-13: Deploying J2EE Application to Cloud
  • 2. www.webstackacademy.com Objectives Upon completion of this module, you should be able to: ● What is Cloud? ● Types of Cloud. ● Cloud Sevice Models. ● Advantages of Cloud-Computing. ● What is Web Service? ● Types of Web Services. ● Building Web services with JAX-WS ● Deploy JAX-WS web services on Tomcat ● AWS (Amazon Web Service) ● AWS and Normal Web Hosting Service ● AWS Architecture
  • 4. www.webstackacademy.com What is Cloud? ● Cloud Computing is a general term used to describe a new class of network based computing that takes place over the Internet , - a collection/group of integrated and networked hardware, software and Internet Infrastructure (called a plateform). - Using the internet for communication and transport provides hardware ,software and networking services to clients. ● These services hide the compexity and details of the underlying infrastructure from users and applications by providing Application Programming Interface.
  • 5. www.webstackacademy.com What is Cloud? SERVERS Shared pool of configurable computing resources ● On-demand network access ● Provisioned by the Service Provider
  • 6. www.webstackacademy.com Types of Cloud ● Public Cloud :- Public cloud allows the accessibility of systems and services easily to general public. Eg. Amazon , IBM , Microsoft ,Google etc. ● Private Cloud :- Private cloud allows the accessibility of systems and services within organization. ● Hybrid Cloud :- Hybrid Cloud is the mixture of public and private cloud. Non critical activities are performed by public cloud and critical activities are performed by private cloud.
  • 7. www.webstackacademy.com Cloud Service Models Software as a Service (SaaS) Platform as a Service (PaaS) Infrastructure as a Service (IaaS)
  • 8. www.webstackacademy.com Advantages of Cloud ● Lower Cost Computers for users - In Cloud , we don't require a high-powered computer to run cloud computing's web based applications because applications run on cloud not on desktop PC or laptop. ● Lower IT infrastructure cost - By using cloud computing , we don't need to invest in larger numbers of more powerful servers ,not require IT staff also for handling such powerful servers. ● Lower Software Cost - It reduces the software cost because we don't need to purchase separate software packages fo each computer in the organization.
  • 9. www.webstackacademy.com Advantages of Cloud ● Instant Software updates – Another software related advantage in cloud computing is that users don't need to face with the choice between obsolete software and high upgrade costs . If the app is web-based , updates happen automatically and are available next time when the user logs in to the cloud. ● Increased Computing Power – The execution capacity of cloud servers are very high. It processes the application very fast. ● Unlimited storage capacity - Cloud offers a huge amount of storage capacity like 2000GB or more than that if required.
  • 10. www.webstackacademy.com Web Services A Web Service can be defined in following ways : ● is a client server application or application component for communication. ● method of communication between two devices over network. ● is a software system for interoperable machine to machine communication. ● is a collection of standards or protocols for exchanging information between two devices or application.
  • 11. www.webstackacademy.com Types of Web Services There are two types of Web Services: 1) Soap Web Services 2) RESTful Web Services
  • 12. www.webstackacademy.com Soap Web Services Soap web services use XML messages that follow the Simple Object Access Protocol (SOAP) standard , an XML language defining a message architecture and message formats. Such system often contain a machine -readable description of the opeations offered by the service, written in the Web Services Description Language(WSDL) , an XML lanaguage for defining interface syntactically.
  • 13. www.webstackacademy.com RESTful Web Services In Java EE 6 , JAX-RS provides the functionality for Representational State Transfer(RESTful) web services. RESTful web services often better integrated with HTTP than SOAP-based services are , do not require XML messages or WSDL service -API definitions. RESTful web services use existing W3C and internet Engineering Task Force (IETF) standards (HTTP , XML ,URI ,MIME) and have a lightweight infrastructure that allows services to be built with minimal tooling ,devloping RESTful services is inexpensive.
  • 15. www.webstackacademy.com Building Web services with JAX-WS JAX-WS allows developers to write message-oriented as well as Remote Procedure Call-oriented(RPC -oriented) web services. The starting point for developing a JAX-WS web service is a java class annoted javax.jws.WebService annotation. The @ WebService annotation defines the web service endpoint. A service endpoint interface or service endpoint Implementation (SEI) is a java class ,that declares the methods that a client can invoke on the service. An interface is not required when building a JAX-WS endpoint.
  • 16. www.webstackacademy.com Deploy JAX-WS web services on Tomcat Steps of a web service deployment ● Create a web service ● Create a sun-jaxws.xml , defines web service implementation class ● Create a standard web.xml ,defines WSServletContextLitener ,WSServlet and structure of a web project. ● Build tool to generate WAR file. ● Copy JAX-WS dependencies to “${Tomcat}/lib” folder. ● Copy WAR to “${Tomcat}/webapp” folder. ● Start it.
  • 17. www.webstackacademy.com Creating Web Service File : HelloWeb.java package com.emertxe.ws; import javax.jws.WebMethod; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; import javax.jws.soap.SOAPBinding.Style; //Service Endpoint Interface @WebService @SOAPBinding(style = Style.RPC) public interface HelloWeb{ @WebMethod String getHelloWebAsString(); }
  • 18. www.webstackacademy.com Creating Web Service File : HelloWebImpl.java package com.emertxe.ws; import javax.jws.WebService; //Service Implementation Bean @WebService(endpointInterface = "com.emertxe.ws.HelloWeb") public class HelloWebImpl implements HelloWeb{ @Override public String getHelloWebAsString() { return "Hello Web JAX-WS"; } }
  • 19. www.webstackacademy.com Create a web service deployment descriptor File : sun-jaxws.xml <?xml version="1.0" encoding="UTF-8"?> <endpoints xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime" version="2.0"> <endpoint name="HelloWeb" implementation="com.emertxe.ws.HelloWebImpl" url-pattern="/hello"/> </endpoints>
  • 20. www.webstackacademy.com web.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd"> <web-app> <listener> <listener-class> com.sun.xml.ws.transport.http.servlet.WSServletContextListener </listener-class> </listener>
  • 23. www.webstackacademy.com JAX-WS Dependencies Go here http://jax-ws.java.net/. copy following JAX-WS dependencies to Tomcat library folder “{$TOMCAT}/lib“. jaxb-impl.jar jaxws-api.jar jaxws-rt.jar gmbal-api-only.jar management-api.jar stax-ex.jar streambuffer.jar policy.jar
  • 24. www.webstackacademy.com Deployment Copy the generated WAR file to {$TOMCAT}/webapps/ folder and start the Tomcat server. For testing, access this URL : http://localhost:8080/HelloWeb/hello
  • 25. www.webstackacademy.com AWS (Amazon Web Service) ● AWS is a subsidiary of Amazon.com ,offers a suite of cloud computing services that make up an on- demand computing plateform. ● The most central and best-known of these services include Amazon Elastic Compute Cloud , also known as “EC2” and Amazon Simple Storage Service, also known as “S3”.
  • 26. www.webstackacademy.com AWS (Amazon Web Service) ● Amazon Web Services offers a broad set of global cloud- based products including storage , database ,analytics, networking ,mobile, developer tools ,management tools, security, compute and enterprise applications. ● These services help organizations move faster , lower IT costs and scale . ● AWS is trusted by the largest enterprises and starts-ups to power a wide variety of workloads including : web and mobile applications ,game development ,data processing and warehousing ,storage ,archieve and many others.
  • 27. www.webstackacademy.com Normal Web Hosting Service ● Shared :- A physical server that is shared by many different customers. User account is restricted to certain files , and very limited access. Usually this web server runs one Web Server (usually Apache). ● Virtual Private :- Many virtual server are stored on one physical server. Each Customer has their own private virtual server. ● Dedicated : A physical server that is leased to a single customer.
  • 28. www.webstackacademy.com Amazon Web Service Standard :- AWS allows for dedicated root access to the server , which is a feature not available in most virtual private servers. Dedicated :- Dedicated Amazon will provide a virtual server that is not on a shared server ,but its own private cloud . It is similar to a dedicated server , but with the flexibility of a virtual private server.
  • 29. www.webstackacademy.com Amazon Web Service advantages over normal Web Hosting Service ● High -availability (Eliminating Single points of failure) ● Distributed Infrastructure ,reducing latency to all regions of the world. ● Cost saving ,scaling down on hardware being used,saving money in the long term. ● On-demand infrastructure for scaling applications or tasks (adding servers or “horizontal scaling “ to massively increase the hardware power available to the application)
  • 31. www.webstackacademy.com AWS Architecture for a Web App ● The Web Application tiers runs on EC2( Amazon Elastic Compute Cloud) instances in VPC. ● Access to the EC2 instances over SSH is controlled by a security group which acts as a firewall. ● The Autoscaling maintains a fleet of EC2.Auto Scaling group spans multiple availability Zones to protect against the potential failureof a single scaling group. ● When the Auto Scaling group launches or terminates instances based on the load ,the load balancer automatically adjusts accordingly.
  • 32. www.webstackacademy.com ● The database tier consists of DB instances in VPC, including a master and a local slavelocated in multiple Availability Zones. ● Access to the DB instances from the EC2 instances is controlled by a security group. ● Amazon Route 53 provides secure and Reliable routing of the domain name to infrastructure hosted on AWS. AWS Architecture for a Web App
  • 33. Web Stack Academy (P) Ltd #83, Farah Towers, 1st floor,MG Road, Bangalore – 560001 M: +91-80-4128 9576 T: +91-98862 69112 E: [email protected]