Vous êtes sur la page 1sur 52

CloudCompiler

Compiler
Cloud

Group Members:
JASWANT KUMAR
01220703111
KRISHNA NAND MISHRA

Mentor Name and


Designation
Mr. Aditya Tandon (asst.
Prof)

CONTENT

OBJECTIVE
INTRODUCTION
PLATFORM USED
SERVER USED
FUNCTIONALITY
CHARECTERISTICS
FUTURE SCOPE AND LIMITATIONS
2

OBJECTIVE
The project aim is to describe a centralized
compiler which avoid the installation of the
compiler on each computer to compile, run,
test and debug the code.

INTRODUCTION
What is CLOUD
COMPILER??

WHY CLOUD
COMPILER??

ARCHITECTURE Cloud
Compiler

CLOUD Architecture

Cloud Service Models


Software as a
Service (SaaS)

Platform as a
Service (PaaS)

Adopted from: Effectively and Securely Using the Cloud Computing Paradigm by peter Mell, Tim
Grance

Infrastructure as a
Service (IaaS)

Software as a Service
(SaaS)
SaaS is a model of software deployment
where an application is hosted as a service
provided to customers across the Internet.
SaaS alleviates the burden of software
maintenance/support
but users relinquish control over software
versions and requirements.

SaaS Maturity Model


Level 1: Ad-Hoc/Custom
One Instance per
customer
Level 2: Configurable per
customer

Level 3: configurable
& Multi-Tenant-Efficient
Level 4: Scalable,
Configurable & MultiTenant-Efficient

Source: Frederick Chong and Gianpaolo Carraro, Architectures Strategies for Catching the Long Tail

10

Virtualization
Virtual workspaces:
Implement on Virtual Machines (VMs):
Provide infrastructure API:
App

App

App

App

App

Guest OS
(Linux)

Guest OS
(NetBSD)

Guest OS
(Windows)

VM

VM

VM

Virtual Machine Monitor (VMM) / Hypervisor


Hardware

Xen
VMWare
UML
Denali
etc.

11

TOMCAT : SERVER
A container for Servlets and JSP

Tomcat is a Servlet container (Web server that


interacts with Servlets) developed under the
Jakarta Project of Apache Software
Foundation
Tomcat implements the Servlet and the Java
Server Pages (JSP) specifications of Sun
Microsystems
Tomcat is an open-source, non commercial
project
Licensed under the Apache Software License

Tomcat is written in Java (OS independent)


12

Architecture OF TOMCAT

Tomcat features

Tomcat Installation and


Configuration
Tomcat 5.5 Manager
Tomcat and Eclipse

LANGUAGE 1:
JAVA

LANGUAGE 2: SQL

LANGUAGE 3: HTML

LANGUAGE 4: C#

PLATFORM1:
Java ServerPages (JSP)
Java Server Pages allow special tags and Java code to be
embedded in HTML files.

Presents dynamic content to users


Handles the presentation logic in an MVC architecture

(business logic)

servlet
Container

response

Helper
Objects

JSP

Business Tier

request

(presentation logic)

19

Architecture OF JSP
URL

JSP page

request

HTTP request
JSP container properties,JavaBean
compiles to call methodsLibrary
a servlet
HTTP response

response

HTTP page

Browser

DB

Web server
dbc@csit.fsu.edu

20

JSPs implementation

request

*.jsp

jsp parser

JDK
*.java

*.class

implementation
response

PLATFORM2:
STRUTS
WHAT IS STRUTS?
Why struts? Whats wrong with jsp/servlet coding?

why is Struts so useful?


Structural separation of data presentation and business
logic
Struts provides a Controller that manages the control flow
easy localization (internationalization is more important
than ever)
based on standard Java technologies (JSP, Servlets,
JavaBeans)
open-source
every vivid open-source project with growing developer
community

Struts Framework Features

Model 2 -MVC Implementation


Internationalization(I18N) Support
Rich JSP Tag Libraries
Annotation and XML configuration options
POJO-based actions that are easy to test
Based on JSP, Servlet, XML, and Java
Less xml configuration
Easy to test and debug with new features
Supports Javas Write Once, Run Anywhere Philosophy
Supports different model implementations (JavaBeans, EJB,
etc.)
Supports different presentation implementations( JSP,
XML/XSLT, etc)

Struts 2.0 uses Model 2 MVC pattern

Model 2 architecture
Servlet

JSP File
Java function

MVC Architecture
View

Controller

Model

Designing Web Applications


High Level Architecture

Presentation
Layer

Control
Layer

Application
Logic

Data
Sources

Cloud Compiler
Characteristics
Common Characteristics:
Massive Scale

Resilient Computing

Homogeneity

Geographic Distribution

Virtualization

Service Orientation

Low Cost Software

Advanced Security

Essential Characteristics:
On Demand Self-Service
Broad Network Access

Rapid Elasticity

Resource Pooling

Measured Service

Adopted from: Effectively and Securely Using the Cloud Computing Paradigm by peter Mell, Tim
Grance

28

Opportunities and
Challenges
The use of the cloud provides a number of
opportunities:
It enables services to be used without any
understanding of their infrastructure.
Cloud compiler works using economies of scale:
Data and services are stored remotely but
accessible from anywhere.
Use of cloud compiler means dependence on
others and that could possibly limit flexibility and
innovation:
Security could prove to be a big issue:
There are also issues relating to policy and access:
29

FUTURE SCOPE and


LIMITATIONS

References

Cloud Documentation and Centralized Compiler for Java & Php


Online Java Compiler Using Cloud Computing .[Mayank Patel]
Grobauer, B. Walloschek, T. Stocker, E., Understanding Cloud Computing
Vulnerabilities, Security & Privacy,IEEE March-April 2011
Cloud Computing Bible, Barrie Sosinsky wiley publishing.

MVC
Keep Presentation Layer Separate
from Data Layer
Model-View-Controller Architecture
Model (Struts 2: action)
Represents the Data Objects

View (Struts 2: result)


Screen representation of the Model

Controller (Struts 2: FilterDispatcher)


How the user interface reacts to the users
input

Applying MVC to Web


Applications
View:
HTML form; native Java interface; clientside script; applet

Controller:
Java servlet; session Bean

Model:
Entity Bean or other business logic object

JSP
Java Server Pages
What is JSP?
Java Server Pages allow special tags and Java
code to be embedded in HTML files.

Presents dynamic content to users

Handles the presentation logic in an MVC architecture

INTRODUCTION
The system mainly deals with the creation of
environment for the java , html, sql and other
language to code compile, run, test and debug the
code in the browser using Web-based interfacing of
various compilers.

Virtualization
Virtual workspaces:
An abstraction of an execution environment that can be
made dynamically available to authorized clients by
using well-defined protocols,
Resource quota (e.g. CPU, memory share),
Software configuration (e.g. O/S, provided services).

Implement on Virtual Machines (VMs):


Abstraction of a physical host machine,
Hypervisor intercepts and emulates instructions from
VMs, and allows management of VMs,
VMWare, Xen, etc.

Provide infrastructure API:


Plug-ins to hardware/support structures

Why Cloud Compiler?

The proposed system is user friendly, understandable and easy to use and
learn.
It supports many languages like HTML, CSS, JAVASCRIPT, SQL, C#,
JAVA etc and many other languages.
Users need not to download compilers in their desktop.
Allow users to access any program in any language easily.
Allows any number of logged-in users to have a typed, real-time, on-line
compilation more commonly via a network.
It provides on line help and error messages for user ease.
It must be portable.

java
According to Sun, the developer of JAVA, Java Platform,
Enterprise Edition or Java EE is a widely used platform for
server programming in the Java programming language. The
Java platform (Enterprise Edition) differs from the Java
Standard Edition Platform (JavaSE) in that it adds libraries
which provide functionality to deploy fault-tolerant,
distributed, multi-tier Java software, based largely on
modular components running on an application server.

Architecture

Server: Server represents the entire Tomcat server. One


server per JVM.
Service: Service component creates the connectors and
associates the engine with this group of connectors.
Connector: Connectors are components that implement the
socket listeners. They connect web applications to clients.
This component provides flexibility to the Tomcat
architecture. It allows the Tomcat servlet engine to integrate
with many different types of web servers such as Apache, IIS
etc.
Engine: Engine is the top level container. It examines the
request and routes the request to the appropriate virtual
host.
Host: This allows multiple servers to be configured on the
same physical machine and be identified by separate IP
addresses.
Context: This represents a single web application

JSP
Java Server Pages allow special tags and
Java code to be embedded in HTML files.
JavaServer Pages (JSP) technology
provides a simplified, fast way to create
web pages that display dynamicallygenerated content.
JSP pages share the "Write Once, Run
Anywhere" characteristics of Java
technology.

Why struts? Whats wrong with jsp/servlet


coding?

Using only Servlets difficult to output a html and needs lot of out.printlns
hard to read and clumsy
Using only JSP added scriptlets and implicit objects into jsp - awkward to
see java inside html hard to read and maintain useful if very small
application
Using JSP+ Java beans Code inside bean and jsp to display . Good choice
for small applications. But what if there is need of multiple type of views? Eg:
if there is need of different language display depending on client location? making request to a general servlet, which outputs data according to the
client locale, for same url request, will be good choice Model 2 architecture
evolved.
Using JSP+Servlets+JavaBeans Model 2 architecture
Request made to servlet, servlet does business calculation using simple java
POJO gets the result. Also decides the view and give back the response using
the view to the client.
Here servlet called Controller, Business calculation POJO called Model and
JSP called - View
Uses : the business logic is separated from JSPs and JSP gets displayed
depending upon the result of model (the business function). similar
behavior like all applications above, but the code is more structured now.
Changing business logic will not affect view and vice versa.

Struts 2.0 also uses Model 2 MVC pattern


Still the question remains: Why struts?

Struts Framework Features

Model 2 -MVC Implementation


Internationalization(I18N) Support
Rich JSP Tag Libraries
Annotation and XML configuration options
POJO-based actions that are easy to test
Based on JSP, Servlet, XML, and Java
Less xml configuration
Easy to test and debug with new features
Supports Javas Write Once, Run Anywhere Philosophy
Supports different model implementations (JavaBeans, EJB,
etc.)
Supports different presentation implementations( JSP,
XML/XSLT, etc)

JSP Actions - <jsp:useBean>

getId();
setId(..)
getName()
setName()

How can I
use that
bean?

bean
Servlet
request.setAttribute(userBean, userBean)

JSP
<jsp:useBean ./>

44

ARCHITECTURE Cloud
Compiler

What is Cloud
Computing

Shared pool of configurable computing


resources
On-demand network access
Provisioned by the Service Provider
Adopted from: Effectively and Securely Using the Cloud Computing Paradigm by peter Mell, Tim
Grance

46

Struts is a framework to develop web


application easily. Using Struts, makes easier
to develop web application and maintain them.
Struts is an open source framework which
makes building web applications easier, based
on Java Servlets and JSP technologies.
The Struts framework was created by Craig R.
McClanahan and was donated to the Apache
software foundation in 2000. Since then it is a
open source software.

Tomcat Installation and


Configuration

Install JDK1.5
Download the Jakarta Tomcat
software
Set the JAVA_HOME variable
Change port from 8080 to 80
(optional)
Set the CATALINA_HOME variable

Tomcat 5.5 Manager


Tomcat 5.5 comes with a Web application
called manager, which supports functions
for managing Web applications
You can either use the HTML interface at
http://<machine>:<port>/manager/html/
or send direct HTTP requests to it
You will need to authenticate as a
privileged user
Use the username admin with no password

49

Tomcat 5.5 Manager


Using the manager, you can
Deploy a Web application by posting a WAR file
Undeploy a deployed Web application
Start/stop a Web application (make it
available/unavailable)
Reload an existing Web application (unpack new
WARs)

Warning: while stop makes an application


unavailable, undeploy deletes the application
Find theseand
optionsWAR
in the tomcat
managerwebapps/
GUI
directory
file from
50

Tomcat and Eclipse


You can use an Eclipse plugin for
Tomcat Web-application development
The Sysdeo Eclipse Tomcat
Launcher plugin is installed in CS
Using this plugin, you can start/stop
the server, reload an application, etc.
Detailed explanations in the course
technical-help section
51

why is Struts so useful?


structural separation of data presentation and business logic
easy separation of development tasks (web design,
database, )
increases maintainability and extendibility (new views!)
increases reusability of code
Struts provides a Controller that manages the control flow
changes in the flow can all be done in struts-config.xml
abstraction from (hard coded) filenames (forwards)
easy localization (internationalization is more important than
ever)
based on standard Java technologies (JSP, Servlets, JavaBeans)
thus running on all kinds of JSP/Servlet containers
open-source
affordable
no dependence on external companies
robustness (due to freely accessible source code)
very vivid open-source project with growing developer
community

Vous aimerez peut-être aussi