cloud compiler - minor project by students of cbpgec

Post on 26-Jun-2015

560 Views

Category:

Engineering

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

A ppt on Cloud compiler for Minor Project by students of CBPGEC in first phase .

TRANSCRIPT

Cloud Compiler

Group Members:JASWANT KUMAR 01220703111KRISHNA NAND MISHRA 03020703111VIPIN KUMAR 04020703111RAHUL VASHISTH 05520703111

Mentor Name and Designation

Mr. Aditya Tandon (asst. Prof)

Cloud Compiler

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.

What is CLOUD COMPILER??

INTRODUCTION

WHY CLOUD COMPILER??

ARCHITECTURE Cloud Compiler

CLOUD Architecture

7

Cloud Service Models

8

Software as a Service (SaaS)

Platform as a Service (PaaS)

Infrastructure as a Service (IaaS)

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

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.

9

SaaS Maturity Model

Level 2: Configurable per customer

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

Level 3: configurable & Multi-Tenant-Efficient

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

Level 4: Scalable, Configurable & Multi-Tenant-Efficient

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

• .

11

Hardware

Virtual Machine Monitor (VMM) / Hypervisor

Guest OS(Linux)

Guest OS(NetBSD)

Guest OS(Windows)

VM VM VM

AppApp AppAppAppXen

VMWare

UML

Denali

etc.

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 Installation and Configuration• Tomcat 5.5 Manager• Tomcat and Eclipse

Tomcat features

LANGUAGE 1: JAVA

LANGUAGE 2: SQL

LANGUAGE 3: HTML

LANGUAGE 4: C#

• 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

19

Container

servlet

JSP

request

response

HelperObjects

(business logic)

(presentation logic)

Business Tier

PLATFORM1: Java ServerPages (JSP)

Architecture OF JSP

dbc@csit.fsu.edu 20

HTTP request

HTTP response

Web server

JSP page

JSP container compiles to

a servlet

URL

request

JavaBeanLibrary

DB

properties,call methods

HTTP page

response

Browser

JSP’s implementation

*.classrequest

response

jsp parserJDK

*.jsp *.java

implementation

PLATFORM2: STRUTS

WHAT IS STRUTS?

Why struts? What’s 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 Java’s 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 patternModel 2 architecture

Servlet

Java function

JSP File

MVC Architecture

View

Controller

Model

Designing Web Applications

• High Level Architecture

PresentationLayer

ControlLayer

ApplicationLogic

DataSources

Cloud Compiler Characteristics

28

Common Characteristics:

Low Cost SoftwareLow Cost Software

VirtualizationVirtualization Service OrientationService Orientation

Advanced SecurityAdvanced Security

HomogeneityHomogeneity

Massive ScaleMassive Scale Resilient ComputingResilient Computing

Geographic DistributionGeographic Distribution

Essential Characteristics:

Resource PoolingResource Pooling

Broad Network AccessBroad Network Access Rapid ElasticityRapid Elasticity

Measured ServiceMeasured Service

On Demand Self-ServiceOn Demand Self-Service

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

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 user’s input

Applying MVC to WebApplications

• View:– HTML form; native Java interface; client-side 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 dynamically-generated content.

• JSP pages share the "Write Once, Run Anywhere" characteristics of Java technology.

Why struts? What’s 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 patternStill 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 Java’s Write Once, Run Anywhere Philosophy• Supports different model implementations (JavaBeans, EJB, etc.)• Supports different presentation implementations( JSP, XML/XSLT, etc)

44

JSP Actions - <jsp:useBean>

Servlet JSP

bean

How can I use that bean?

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

request.setAttribute(“userBean”, userBean”) <jsp:useBean …./>

ARCHITECTURE Cloud Compiler

What is Cloud Computing

• Shared pool of configurable computing resources• On-demand network access• Provisioned by the Service Provider

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

• 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 directory and WAR file from webapps/

50

Find these options in the tomcat manager GUI

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

top related