SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

ZK MVVM, Spring & JPA On Two PaaS Clouds
ZK MVVM, Spring & JPA On Two PaaS CloudsZK MVVM, Spring & JPA On Two PaaS Clouds
ZK MVVM, Spring & JPA On Two PaaS Clouds
Simon Massey
 
Oracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic ConceptsOracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic Concepts
James Bayer
 
WebLogic JMS System Best Practices
WebLogic JMS System Best PracticesWebLogic JMS System Best Practices
WebLogic JMS System Best Practices
Trivadis
 
Portfolio
PortfolioPortfolio
Portfolio
addl D
 
6.Live Framework 和Mesh Services
6.Live Framework 和Mesh Services6.Live Framework 和Mesh Services
6.Live Framework 和Mesh Services
GaryYoung
 

Was ist angesagt? (20)

Windows Azure Platform Technical Deep Dive - Chris Auld (Intergen)
Windows Azure Platform Technical Deep Dive - Chris Auld (Intergen)Windows Azure Platform Technical Deep Dive - Chris Auld (Intergen)
Windows Azure Platform Technical Deep Dive - Chris Auld (Intergen)
 
Introducing WebLogic 12c OTN Tour 2012
Introducing WebLogic 12c OTN Tour 2012Introducing WebLogic 12c OTN Tour 2012
Introducing WebLogic 12c OTN Tour 2012
 
Combining Private and Public Clouds into Meaningful Hybrids
Combining Private and Public Clouds into Meaningful HybridsCombining Private and Public Clouds into Meaningful Hybrids
Combining Private and Public Clouds into Meaningful Hybrids
 
ZK MVVM, Spring & JPA On Two PaaS Clouds
ZK MVVM, Spring & JPA On Two PaaS CloudsZK MVVM, Spring & JPA On Two PaaS Clouds
ZK MVVM, Spring & JPA On Two PaaS Clouds
 
Oracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic ConceptsOracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic Concepts
 
Windows Azure
Windows AzureWindows Azure
Windows Azure
 
Delivering Hybrid Cloud Solutions on Microsoft Azure
Delivering Hybrid Cloud Solutions on Microsoft AzureDelivering Hybrid Cloud Solutions on Microsoft Azure
Delivering Hybrid Cloud Solutions on Microsoft Azure
 
Mesh-Enabled Web Applications
Mesh-Enabled Web ApplicationsMesh-Enabled Web Applications
Mesh-Enabled Web Applications
 
How To Scale v2
How To Scale v2How To Scale v2
How To Scale v2
 
WebLogic for DBAs
WebLogic for DBAsWebLogic for DBAs
WebLogic for DBAs
 
ArcReady - Architecting For The Cloud
ArcReady - Architecting For The CloudArcReady - Architecting For The Cloud
ArcReady - Architecting For The Cloud
 
Working with azure database services platform
Working with azure database services platformWorking with azure database services platform
Working with azure database services platform
 
WebLogic JMS System Best Practices
WebLogic JMS System Best PracticesWebLogic JMS System Best Practices
WebLogic JMS System Best Practices
 
The Top 10 Things Oracle UCM Users Need To Know About WebLogic
The Top 10 Things Oracle UCM Users Need To Know About WebLogicThe Top 10 Things Oracle UCM Users Need To Know About WebLogic
The Top 10 Things Oracle UCM Users Need To Know About WebLogic
 
Portfolio
PortfolioPortfolio
Portfolio
 
6.Live Framework 和Mesh Services
6.Live Framework 和Mesh Services6.Live Framework 和Mesh Services
6.Live Framework 和Mesh Services
 
Scalable Web Architecture
Scalable Web ArchitectureScalable Web Architecture
Scalable Web Architecture
 
Unplugged
UnpluggedUnplugged
Unplugged
 
Microsoft Database Options
Microsoft Database OptionsMicrosoft Database Options
Microsoft Database Options
 
Scaling drupal horizontally and in cloud
Scaling drupal horizontally and in cloudScaling drupal horizontally and in cloud
Scaling drupal horizontally and in cloud
 

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

Online furniture management system
Online furniture management systemOnline furniture management system
Online furniture management system
Yesu Raj
 
Cloud Computing With AWS
Cloud Computing With AWSCloud Computing With AWS
Cloud Computing With AWS
Munish Gupta
 
WAD - WaveMaker tutorial
WAD - WaveMaker tutorial WAD - WaveMaker tutorial
WAD - WaveMaker tutorial
marina2207
 
WaveMaker tutorial with Flash
WaveMaker tutorial with FlashWaveMaker tutorial with Flash
WaveMaker tutorial with Flash
marina2207
 
KSDG 4th event: Windows Azure Session
KSDG 4th event: Windows Azure SessionKSDG 4th event: Windows Azure Session
KSDG 4th event: Windows Azure Session
Jeff Chu
 
IBM Innovate 2013: Making Rational HATS a Strategic Investment
IBM Innovate 2013: Making Rational HATS a Strategic InvestmentIBM Innovate 2013: Making Rational HATS a Strategic Investment
IBM Innovate 2013: Making Rational HATS a Strategic Investment
Strongback Consulting
 

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

Refactoring Web Services on AWS cloud (PaaS & SaaS)
Refactoring Web Services on AWS cloud (PaaS & SaaS)Refactoring Web Services on AWS cloud (PaaS & SaaS)
Refactoring Web Services on AWS cloud (PaaS & SaaS)
 
Cloud economics design, capacity and operational concerns
Cloud economics  design, capacity and operational concernsCloud economics  design, capacity and operational concerns
Cloud economics design, capacity and operational concerns
 
Cloud ppt
Cloud pptCloud ppt
Cloud ppt
 
Online furniture management system
Online furniture management systemOnline furniture management system
Online furniture management system
 
Components of a Generic Web Application Architecture
Components of  a Generic Web Application ArchitectureComponents of  a Generic Web Application Architecture
Components of a Generic Web Application Architecture
 
Cloud Computing With AWS
Cloud Computing With AWSCloud Computing With AWS
Cloud Computing With AWS
 
WAD - WaveMaker tutorial
WAD - WaveMaker tutorial WAD - WaveMaker tutorial
WAD - WaveMaker tutorial
 
WaveMaker tutorial with Flash
WaveMaker tutorial with FlashWaveMaker tutorial with Flash
WaveMaker tutorial with Flash
 
WaveMaker Presentation
WaveMaker PresentationWaveMaker Presentation
WaveMaker Presentation
 
KSDG 4th event: Windows Azure Session
KSDG 4th event: Windows Azure SessionKSDG 4th event: Windows Azure Session
KSDG 4th event: Windows Azure Session
 
Microsoft Azure
Microsoft AzureMicrosoft Azure
Microsoft Azure
 
Server Farms and XML Web Services
Server Farms and XML Web ServicesServer Farms and XML Web Services
Server Farms and XML Web Services
 
Cloud description
Cloud descriptionCloud description
Cloud description
 
Presentation about servers
Presentation about serversPresentation about servers
Presentation about servers
 
Cloud Computing basic
Cloud Computing basicCloud Computing basic
Cloud Computing basic
 
AWS Enterprise Workloads on AWS IP Expo 2013
AWS Enterprise Workloads on AWS IP Expo 2013AWS Enterprise Workloads on AWS IP Expo 2013
AWS Enterprise Workloads on AWS IP Expo 2013
 
Java Web Programming on Google Cloud Platform [1/3] : Google App Engine
Java Web Programming on Google Cloud Platform [1/3] : Google App EngineJava Web Programming on Google Cloud Platform [1/3] : Google App Engine
Java Web Programming on Google Cloud Platform [1/3] : Google App Engine
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Introduction to Windows Azure
Introduction to Windows AzureIntroduction to Windows Azure
Introduction to Windows Azure
 
IBM Innovate 2013: Making Rational HATS a Strategic Investment
IBM Innovate 2013: Making Rational HATS a Strategic InvestmentIBM Innovate 2013: Making Rational HATS a Strategic Investment
IBM Innovate 2013: Making Rational HATS a Strategic Investment
 

Mehr von WebStackAcademy

Mehr von WebStackAcademy (20)

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

Kürzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Kürzlich hochgeladen (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

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: info@www.webstackacademy.com