cloud compiler - minor project by students of cbpgec

52
Cloud Compiler Group Members: JASWANT KUMAR 01220703111 KRISHNA NAND MISHRA Mentor Name and Designation Mr. Aditya Tandon (asst. Prof) Cloud Compiler

Upload: vipin-kumar

Post on 26-Jun-2015

560 views

Category:

Engineering


2 download

DESCRIPTION

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

TRANSCRIPT

Page 1: Cloud compiler - Minor Project by students of CBPGEC

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

Page 2: Cloud compiler - Minor Project by students of CBPGEC

CONTENT

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

2

Page 3: Cloud compiler - Minor Project by students of CBPGEC

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.

Page 4: Cloud compiler - Minor Project by students of CBPGEC

What is CLOUD COMPILER??

INTRODUCTION

Page 5: Cloud compiler - Minor Project by students of CBPGEC

WHY CLOUD COMPILER??

Page 6: Cloud compiler - Minor Project by students of CBPGEC

ARCHITECTURE Cloud Compiler

Page 7: Cloud compiler - Minor Project by students of CBPGEC

CLOUD Architecture

7

Page 8: Cloud compiler - Minor Project by students of CBPGEC

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

Page 9: Cloud compiler - Minor Project by students of CBPGEC

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

Page 10: Cloud compiler - Minor Project by students of CBPGEC

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

Page 11: Cloud compiler - Minor Project by students of CBPGEC

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.

Page 12: Cloud compiler - Minor Project by students of CBPGEC

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

Page 13: Cloud compiler - Minor Project by students of CBPGEC

Architecture OF TOMCAT

Page 14: Cloud compiler - Minor Project by students of CBPGEC

• Tomcat Installation and Configuration• Tomcat 5.5 Manager• Tomcat and Eclipse

Tomcat features

Page 15: Cloud compiler - Minor Project by students of CBPGEC

LANGUAGE 1: JAVA

Page 16: Cloud compiler - Minor Project by students of CBPGEC

LANGUAGE 2: SQL

Page 17: Cloud compiler - Minor Project by students of CBPGEC

LANGUAGE 3: HTML

Page 18: Cloud compiler - Minor Project by students of CBPGEC

LANGUAGE 4: C#

Page 19: Cloud compiler - Minor Project by students of CBPGEC

• 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)

Page 20: Cloud compiler - Minor Project by students of CBPGEC

Architecture OF JSP

[email protected] 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

Page 21: Cloud compiler - Minor Project by students of CBPGEC

JSP’s implementation

*.classrequest

response

jsp parserJDK

*.jsp *.java

implementation

Page 22: Cloud compiler - Minor Project by students of CBPGEC

PLATFORM2: STRUTS

WHAT IS STRUTS?

Why struts? What’s wrong with jsp/servlet coding?

Page 23: Cloud compiler - Minor Project by students of CBPGEC

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

Page 24: Cloud compiler - Minor Project by students of CBPGEC

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)

Page 25: Cloud compiler - Minor Project by students of CBPGEC

Struts 2.0 uses Model 2 MVC patternModel 2 architecture

Servlet

Java function

JSP File

Page 26: Cloud compiler - Minor Project by students of CBPGEC

MVC Architecture

View

Controller

Model

Page 27: Cloud compiler - Minor Project by students of CBPGEC

Designing Web Applications

• High Level Architecture

PresentationLayer

ControlLayer

ApplicationLogic

DataSources

Page 28: Cloud compiler - Minor Project by students of CBPGEC

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

Page 29: Cloud compiler - Minor Project by students of CBPGEC

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

Page 30: Cloud compiler - Minor Project by students of CBPGEC

FUTURE SCOPE and LIMITATIONS

Page 31: Cloud compiler - Minor Project by students of CBPGEC

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.

Page 32: Cloud compiler - Minor Project by students of CBPGEC
Page 33: Cloud compiler - Minor Project by students of CBPGEC

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

Page 34: Cloud compiler - Minor Project by students of CBPGEC

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

Page 35: Cloud compiler - Minor Project by students of CBPGEC

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

Page 36: Cloud compiler - Minor Project by students of CBPGEC

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.

Page 37: Cloud compiler - Minor Project by students of CBPGEC

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

Page 38: Cloud compiler - Minor Project by students of CBPGEC

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.

Page 39: Cloud compiler - Minor Project by students of CBPGEC

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.

Page 40: Cloud compiler - Minor Project by students of CBPGEC

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

Page 41: Cloud compiler - Minor Project by students of CBPGEC

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.

Page 42: Cloud compiler - Minor Project by students of CBPGEC

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?

Page 43: Cloud compiler - Minor Project by students of CBPGEC

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)

Page 44: Cloud compiler - Minor Project by students of CBPGEC

44

JSP Actions - <jsp:useBean>

Servlet JSP

bean

How can I use that bean?

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

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

Page 45: Cloud compiler - Minor Project by students of CBPGEC

ARCHITECTURE Cloud Compiler

Page 46: Cloud compiler - Minor Project by students of CBPGEC

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

Page 47: Cloud compiler - Minor Project by students of CBPGEC

• 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.

Page 48: Cloud compiler - Minor Project by students of CBPGEC

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

Page 49: Cloud compiler - Minor Project by students of CBPGEC

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

Page 50: Cloud compiler - Minor Project by students of CBPGEC

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

Page 51: Cloud compiler - Minor Project by students of CBPGEC

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

Page 52: Cloud compiler - Minor Project by students of CBPGEC

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