comp 655 distributed operating systems n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
COMP 655: Distributed/Operating Systems PowerPoint Presentation
Download Presentation
COMP 655: Distributed/Operating Systems

Loading in 2 Seconds...

play fullscreen
1 / 66

COMP 655: Distributed/Operating Systems - PowerPoint PPT Presentation


  • 92 Views
  • Uploaded on

COMP 655: Distributed/Operating Systems. Winter 2012 Mihajlo Jovanovic Week 11: System Examples. Distributed system examples. Commercial middleware J2EE Overview .NET Overview Web services: where middleware systems meet Web service from Open Source middleware. Java EE Overview.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'COMP 655: Distributed/Operating Systems' - cael


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
comp 655 distributed operating systems

COMP 655:Distributed/Operating Systems

Winter 2012

Mihajlo Jovanovic

Week 11: System Examples

Distributed Systems - COMP 655

distributed system examples
Distributed system examples
  • Commercial middleware
    • J2EE Overview
    • .NET Overview
  • Web services: where middleware systems meet
  • Web service from Open Source middleware

Distributed Systems - Comp 655

java ee overview
Java EE Overview
  • The problem Java EE attempts to solve: maximize the use of Java technologies by providing a suite of Java technology specifications that is
    • Integrated
    • Suitable for enterprise applications
    • Widely available
    • Includes all of the basic middleware capabilities for building distributed systems

Distributed Systems - Comp 655

enterprise applications require
Enterprise applications require
  • High throughput
    • Load balancing
    • Efficient communications
  • High availability
  • Highly reliable communications
  • Persistent, asynchronous communication option
  • Distributed transactions
  • High security
  • Ability to interoperate with whatever
  • Structured naming with de-centralized administration

Distributed Systems - Comp 655

the java platform

Java Technology Enabled Desktop

Workgroup

Server

High-End

Server

Java Technology

Enabled Devices

The Java™ Platform
the 3 cs of java ee
The 3 Cs of Java EE

Components

Containers

Connectors

Distributed Systems - Comp 655

j2ee overview
J2EE Overview

Distributed Systems - Comp 655

key middleware services
Key middleware services
  • Communication: RMI-IIOP, JMS
  • Naming: JNDI (part of Java SE)
  • Persistence: JPA, JDBC, JDO
  • Transactions: JTA, JTS
  • Security: (next page)

Distributed Systems - Comp 655

java se 6 security features
Java SE 6 Security Features
  • JAAS – Java Authentication and Authorization Service
  • JCE – Java Cryptography Extension
  • JSSE – Java Secure Socket Extension
  • Java GSS-API – Kerberos V5 secure communications
  • JSSE - Java Secure Socket Extension
  • More…

Distributed Systems - Comp 655

java ee for web services
Java EE for web services
  • Java Architecture for XML Binding (JAXB)
  • Java API for RESTful Services (JAX-RS)
  • Java API for XML-Based Web Services (JAX-WS)
  • SOAP with Attachments API for Java (SAAJ)
  • Java API for XML Messaging (JAXM)
  • Java API for XML Processing (JAXP)
  • Java API for XML Registries (JAXR)
  • Java API for XML-Based Remote Procedure Call (JAX-RPC)

Distributed Systems - Comp 655

enterprise java beans
Enterprise Java Beans
  • A server-side component technology
  • Easy development and deployment of Java technology-based application that are:
    • Transactional, distributed, multi-tier, portable, scalable, secure, …

Distributed Systems - Comp 655

enterprise java beans1
Enterprise Java Beans
  • Session beans
    • Represent business processes and data about an interaction with a client
    • Two types:
      • Stateless
      • Stateful
  • Entity beans (FROZEN at EJB 2.5)
    • Represent persistent data and data integrity rules
    • Two types of persistence:
      • Container-managed persistence
      • Bean-managed persistence

Distributed Systems - Comp 655

invoking an ejb method

3

5

4

JNDI

6

1

2

EJB

Object

7

  • Request home object
  • Return home object reference
  • Request new EJB object

NS, eg

LDAP

  • Create EJB object
  • Return EJB object reference
  • Invoke method
  • Delegate request to enterprise bean(s)
Invoking an EJB method

EJB Container

Home

Object

Client

Enterprise

Bean(s)

Distributed Systems - Comp 655

message driven beans
Message-driven beans
  • MDB are stateless beans that
    • Listen for and handle JMS messages
    • Participate in transactions if necessary
  • MDB have no
    • Home interface
    • Remote interface
    • Interfaces directly callable by clients (clients just send messages)

An MDB tutorial

An MDB article

Distributed Systems - Comp 655

if you remember one thing
If you remember one thing
  • Enterprise beans are
    • Single-threaded
    • Ignorant of security
    • Ignorant of transactions
    • Ignorant of networking
  • The container handles all that
  • Containers tend to be pricey

Distributed Systems - Comp 655

leading ejb containers
Leading EJB containers
  • Oracle/BEA Weblogic
  • IBM Websphere
  • JBoss (open source)
  • GlassFish (open source)
  • Geronimo (open source)

Distributed Systems - Comp 655

deployment descriptors
Deployment descriptors
  • Deferred binding for many of the things the bean developer need not worry about, including
    • Access control
    • Transaction requirements
    • Persistence parameters
    • Type of bean
    • Classes used for home and remote interfaces

Distributed Systems - Comp 655

deployment descriptor example
Deployment descriptor example

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise

JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

<ejb-jar>

<description>Deployment descriptor for the samplemdb JOnAS example</description>

<display-name>samplemdb example</display-name>

<enterprise-beans>

<message-driven>

<description>Describe here the message driven bean Mdb</description>

<display-name>Message Driven Bean Mdb</display-name>

<ejb-name>Mdb</ejb-name>

<ejb-class>samplemdb.MdbBean</ejb-class>

<transaction-type>Container</transaction-type>

<acknowledge-mode>Auto-acknowledge</acknowledge-mode>

<message-driven-destination>

<destination-type>javax.jms.Topic</destination-type>

<subscription-durability>NonDurable</subscription-durability>

</message-driven-destination>

</message-driven>

</enterprise-beans>

<assembly-descriptor>

<container-transaction>

<method>

<ejb-name>Mdb</ejb-name>

<method-name>*</method-name>

</method>

<trans-attribute>Required</trans-attribute>

</container-transaction>

</assembly-descriptor>

</ejb-jar>

Distributed Systems - Comp 655

java ee
Java EE

Distributed Systems - Comp 655

java ee 6
Java EE 6
  • Defined by JSR 316
  • Adds
    • JAX-RS (JSR 311)
    • Web Beans (JSR 299)
    • Java Authentication SPI for containers (JSR 196)
  • Removes
    • EJB Container-managed persistence
    • JAX-RPC
  • And other changes
  • Approved over a variety of concerns and objections

Distributed Systems - Comp 655

ejb 3
EJB 3
  • Developer does not have to implement EJB interfaces
  • EJB interface implementations inferred from annotations (for example @Stateless)
  • In many cases, explicit deployment descriptors are not needed
  • In many cases, deployment information can be inferred from annotations (for example @Stateless)
  • Enterprise beans frozen at version 2.5, replaced by Java Persistence API (JPA), based on Hibernate

Distributed Systems - Comp 655

ejb 3 continued
EJB 3, continued
  • In many cases, explicit JNDI lookups are not necessary
  • In many cases, system can infer the required lookup from annotations (for example, @EJB)

Distributed Systems - Comp 655

web sites 3 of thousands
Web sites (3 of thousands)

Sun’s J2EE site:

http://java.sun.com/javaee/

Mastering EJB 3.0 (downloadable)

EJB design patterns (downloadable)

J2EE Architect’s Handbook (downloadable)

Distributed Systems - Comp 655

connector
Connector
  • Defines standard API for integrating J2EE technology with EIS systems
    • CICS, SAP, PeopleSoft, etc.
  • Before Connector architecture, each App server has to provide an proprietary adaptor for each EIS system
    • m (# of App servers) x n (# of EIS's) Adaptors
  • With Connector architecture, same adaptor works with all J2EE compliant containers
    • 1 (common to all App servers) x n (# of EIS's) Adaptors
net overview
.NET Overview
  • The problem .NET tries to solve: maximize the sale of server-side licenses by providing a suite of Windows technologies that is
    • Integrated
    • Suitable for enterprise applications
    • Includes all of the basic capabilities for building distributed systems

Distributed Systems - Comp 655

net framework
.NET Framework
  • Platform for running .NET managed code in a virtual machine
  • Provides a very good environment to develop networked applications and Web Services
  • Provides programming API and unified language-independent development framework

.NET Application

.NET Framework

Operating System + Hardware

the core of net framework
The Core of .NETFramework
  • Common Language Runtime
    • Garbage collection
    • Language integration
    • Multiple versioning support (no more DLL hell!)
    • Integrated security
  • Framework Class Library
    • Provides the core functionality:

ASP.NET, Web Services, ADO.NET, Windows Forms, IO, XML, etc.

net framework common language runtime
.NET FrameworkCommon Language Runtime
  • CLR manages code execution at runtime
  • Memory management, thread management, etc.

Common Language Runtime

Operating System

net framework base class library
.NET FrameworkBase Class Library
  • Object-oriented collection of reusable types
  • Collections, I/O, Strings, …

.NET Framework (Base Class Library)

Common Language Runtime

Operating System

net framework data access layer
.NET FrameworkData Access Layer
  • Access relational databases
  • Disconnected data model
  • Work with XML

ADO .NET and XML

.NET Framework (Base Class Library)

Common Language Runtime

Operating System

net framework asp net windows forms
.NET FrameworkASP.NET & Windows Forms
  • Create application’s front-end – Web-based user interface, Windows GUI, Web services, …

ASP .NET

Web Forms Web Services

Mobile Internet Toolkit

Windows

Forms

ADO .NET and XML

.NET Framework (Base Class Library)

Common Language Runtime

Operating System

net framework programming languages

ASP .NET

Web Forms Web Services

Mobile Internet Toolkit

Windows

Forms

ADO .NET and XML

.NET Framework (Base Class Library)

.NET FrameworkProgramming Languages
  • Use your favorite language

C++

C#

VB.NET

Perl

J#

Common Language Runtime

Operating System

net framework common language specification

C++

C#

VB

Perl

J#

ASP .NET

Web Forms Web Services

Mobile Internet Toolkit

Windows

Forms

ADO .NET and XML

.NET Framework (Base Class Library)

.NET FrameworkCommon Language Specification

Common Language Specification

Common Language Runtime

Operating System

net framework visual studio net

ASP .NET

Web Forms Web Services

Mobile Internet Toolkit

Windows

Forms

ADO .NET and XML

.NET Framework (Base Class Library)

.NET FrameworkVisual Studio .NET

C++

C#

VB

Perl

J#

Visual Studio .NET

Common Language Specification

Common Language Runtime

Operating System

net framework standards compliance

C# Language – Submitted to ECMA

Open Language

Specification

ASP .NET

Web Services Web Forms

Mobile Internet Toolkit

Windows

Forms

Web services –

XML, SOAP-based

ADO .NET and XML

.NET Framework (Base Class Library)

XML-based

data access

.NET FrameworkStandards Compliance

C++

C#

VB

Perl

J#

Visual Studio .NET

Common Language Specification

Common Language Runtime

Operating System

net programming languages
.NET programming languages

Distributed Systems - Comp 655

key middleware services net
Key middleware services (.NET)
  • Communication: SOAP, http, ORPC
  • Naming: URI, DNS, COM+ Catalog, Windows Registry
  • Persistence: ADO, OLE-DB
  • Transactions: MTS
  • Security: SSL, Kerberos, NTLM

Distributed Systems - Comp 655

j2ee vs net
J2EE vs .NET
  • Microsoft says:
    • .NET is faster
    • You write less code and easier code with .NET
    • www.gotdotnet.com/team/compare/default.aspx
  • Sun says:
    • .NET is a closed system
    • .NET is immature
    • .NET lacks community
    • java.sun.com/features/2002/07/rimapatel.html

(NOTE: this is getting old)(Java in grade school?)

Distributed Systems - Comp 655

j2ee vs net continued
J2EE vs .Net continued
  • IBM says
    • Only 26% of mid-market companies have Windows only
    • .Net locks you into Windows
    • Microsoft competes with its partners
    • Our WebSphere-based J2EE platform is cheaper than a comparable server-side .Net platform
    • Read all about it

Distributed Systems - Comp 655

web services
Web Services
  • Where middleware systems meet
  • The idea: allow clients to find and interact with services over the web without regard to how the clients or services are built
  • How do you do that? With standards …
  • This is a MAJOR industry bandwagon, as you probably know

Distributed Systems - Comp 655

soap overview
SOAP overview

Protocols include HTTP, SMTP, TCP, MSMQ, …

What’s the difference between RPC and request/

response?

Distributed Systems - Comp 655

soap intermediaries
SOAP intermediaries

Distributed Systems - Comp 655

soap is v1 2
SOAP is (v1.2)

SOAP is a lightweight protocol intended for exchanging structured information in a decentralized, distributed environment. SOAP uses XML technologies to define an extensible messaging framework, which provides a message construct that can be exchanged over a variety of underlying protocols. The framework has been designed to be independent of any particular programming model and other implementation specific semantics.

msdn.microsoft.com/library/default.asp?

url=/library/en-us/dnsoap/html/understandsoap.asp

Distributed Systems - Comp 655

soap message structure
SOAP message structure

<soap:Envelope

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header> <!-- optional -->

<!-- header blocks go here... -->

</soap:Header>

<soap:Body>

<!-- payload or Fault element goes here... -->

</soap:Body>

</soap:Envelope>

Distributed Systems - Comp 655

soap message example
SOAP message example

<soap:Envelope

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<x:TransferFunds xmlns:x="urn:examples-org:banking">

<from>22-342439</from>

<to>98-283843</to>

<amount>100.00</amount>

</x:TransferFunds>

</soap:Body>

</soap:Envelope>

Distributed Systems - Comp 655

soap response message example
SOAP response message example

<soap:Envelope

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<x:TransferFundsResponse

xmlns:x="urn:examples-org:banking">

<balances>

<account>

<id>22-342439</id>

<balance>33.45</balance>

</account>

<account>

<id>98-283843</id>

<balance>932.73</balance>

</account>

</balances>

</x:TransferFundsResponse>

</soap:Body>

</soap:Envelope>

Distributed Systems - Comp 655

soap error message example
SOAP error message example

<soap:Envelope

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body>

<soap:Fault>

<faultcode>soap:Server</faultcode>

<faultstring>Insufficient funds</faultstring>

<detail>

<x:TransferError xmlns:x="urn:examples-org:banking">

<sourceAccount>22-342439</sourceAccount>

<transferAmount>100.00</transferAmount>

<currentBalance>89.23</currentBalance>

</x:TransferError>

</detail>

</x:TransferFunds>

</soap:Body>

</soap:Envelope>

Distributed Systems - Comp 655

soap extensibility example
SOAP extensibility example

<soap:Envelope

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<!-- security credentials -->

<s:credentials xmlns:s="urn:examples-org:security">

<username>dave</username>

<password>evad</password>

</s:credentials>

</soap:Header>

<soap:Body>

<x:TransferFunds xmlns:x="urn:examples-org:banking">

<from>22-342439</from>

<to>98-283843</to>

<amount>100.00</amount>

</x:TransferFunds>

</soap:Body>

</soap:Envelope>

Distributed Systems - Comp 655

must understand
Must-understand

<soap:Envelope

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Header>

<!-- security credentials -->

<s:credentials xmlns:s="urn:examples-org:security"

soap:mustUnderstand="1"

>

<username>dave</username>

<password>evad</password>

</s:credentials>

</soap:Header>

...

Distributed Systems - Comp 655

soap in http
SOAP in HTTP

Distributed Systems - Comp 655

soap in context
SOAP in context
  • SOAP is an extensible way to encode requests and responses in XML
  • WSDL (Web Services Description Language) is a way to describe the requests and responses a web service uses
  • UDDI (Universal Description, Discovery and Integration) is a way of locating web services

Distributed Systems - Comp 655

slide52
WSDL
  • WSDL is an XML format for describing network services as a set of endpoints operating on messages containing either document-oriented or procedure-oriented information.
  • http://www.w3.org/TR/wsdl
  • Protocol bindings described: SOAP 1.1, HTTP GET/POST, MIME

Distributed Systems - Comp 655

slide53
UDDI
  • UDDI enables a business to
    • describe its business and its services
    • discover other businesses that offer desired services
    • integrate with these other businesses.
  • http://www.uddi.org/

Distributed Systems - Comp 655

dissent rest
Dissent: REST
  • REST's proponents: the Web’s scalability and growth result directly from a few key design principles:
    • Application state and functionality are divided into resources
    • Every resource is uniquely addressable using a universal syntax for use in hypermedia links
    • All resources share a uniform interface for the transfer of state between client and resource:
      • Constrained set of well-defined operations
      • Constrained set of content types, optionally supporting code-on-demand
      • A protocol that is:
        • Client/Server
        • Stateless
        • Cacheable
        • Layered

Distributed Systems - Comp 655

rest resources
REST resources
  • The previous slide came from Wikipedia’s article
  • JAX-RS
  • Roy Fielding’s dissertation started the “movement”
  • Del.icio.us is a well-known (almost) example
  • Joe Gregorio on REST and WS-*
  • RESTful Web Servicesbook

Distributed Systems - Comp 655

web service from open source
Web service from open source
  • Two authors from HP
    • Chris Peltz
    • Claire Rogers
  • Goal: set up a weather-forecast web service on a laptop, using all Open Source infrastructure
  • http://sys-con.com/webservices/article.cfm?id=728

Distributed Systems - Comp 655

decisions decisions
Decisions, decisions …
  • Linux distribution
  • DBMS
  • Programming language
  • Java runtime
  • Java IDE
  • Web container
  • Web service container
  • Build environment
  • Testing

Distributed Systems - Comp 655

linux distribution
Linux distribution
  • RedHat – closes the gap between Windows and Unix, good for Linux novices
  • SuSE – good for existing Windows users
  • Debian – used by well-seasoned Linux developers [selected]
  • They also liked GNOME

Distributed Systems - Comp 655

open source database
Open source database
  • PostgreSQL – robust, full-featured
  • MySQL – maximize Web application performance, but no stored procedures or triggers [selected]
  • It took several tries to get MySQL installed, but it worked well once it was set up.

Distributed Systems - Comp 655

java sdk
Java SDK
  • J2SE SDK from Sun
  • Blackdown JDK
  • BEA’s JRockit [selected, primarily for performance reasons]
  • http://www.spec.org/
  • http://www.theserverside.com/ecperf/
  • They liked the “M x N” threading model

Distributed Systems - Comp 655

another industry benchmark
Another industry benchmark
  • www.tpc.org
  • TPC is best known for TPC-C, which pioneered the $/tpmC approach
  • www.tpc.org/tpcc/results/tpcc_perf_results.asp

Distributed Systems - Comp 655

java ide
Java IDE
  • vi or emacs
  • NetBeans (based on Swing, considered more platform-independent)
  • Eclipse (based on SWT, considered faster and more attractive on-screen) [selected]
  • They liked Eclipse’s plug-ins
  • HP is developing several plug-ins

Distributed Systems - Comp 655

web container
Web container
  • Resin
  • Jboss
  • Jetty
  • Tomcat [selected, for performance, stability, and because it’s the default web container for Apache Axis]
  • They were able to start and stop Tomcat from Eclipse, with the help of a plug-in

Distributed Systems - Comp 655

web services container
Web services container
  • They concluded that Apache Axis is currently the only “robust” open source web services platform.
  • They recommend writing your own WSDL for complex services, but for simple ones, Axis’ Java2WSDL is OK.

Distributed Systems - Comp 655

more on apache axis
More on Apache Axis
  • Some manual coding was needed to adapt their server-side code to the web service environment (example: had to make the Forecast class a Bean so it could be serialized)
  • The hardest part was figuring out what had to change.

Distributed Systems - Comp 655

build and test
Build and test
  • Ant for building.
  • WSDL2Java from Axis generates a client proxy class from the WSDL. Handy for testing.
  • Axis tcpmon for monitoring SOAP traffic.
  • Web service testing tools
    • JUnit
    • Grinder
    • Anteater
    • PushToTest TestMaker [selected]
  • TestMaker scripts are written in Jython

Distributed Systems - Comp 655