Copyright © 2001 Qusay H. Mahmoud Case Study A Global Compute Engine Here we will discuss some implementation details: – Class Loaders – Compute Engine.

Slides:



Advertisements
Similar presentations
About ClassLoaders. What Do They Do? In java code, we simply do this: In java code, we simply do this: java.util.Hashtable table=new java.util.Hashtable();
Advertisements

COS 461 Fall 1997 Network Objects u first good implementation: DEC SRC Network Objects for Modula-3 u recent implementation: Java RMI (Remote Method Invocation)
What is RMI? Remote Method Invocation –A true distributed computing application interface for Java, written to provide easy access to objects existing.
Java Card Technology Ch07: Applet Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Computer Science & Engineering.
Dynamic Code Generation in Java. Class Loading Class loading is the process of transforming a byte code (e.g., a.class file) into a Java class A Java.
Java Applet Security Diana Dong CS 265 Spring 2004.
1 InTroToJCL Introduction to Java Class Loaders. 2 class loader l ia an object responsible for loading classes. The class ClassLoader is an abstract class.
Java security (in a nutshell)
Dan Sedlacek CTO, Systems Management Group Sterling Software Java Security and Encryption.
1 1 Lecture 14 Java Virtual Machine Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung Institute of Technology.
Lab Information Security Using Java (Review) Lab#0 Omaima Al-Matrafi.
Copyright © 2001 Qusay H. Mahmoud RMI – Remote Method Invocation Introduction What is RMI? RMI System Architecture How does RMI work? Distributed Garbage.
Remote Method Invocation
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
Remote Method Invocation Chin-Chih Chang. Java Remote Object Invocation In Java, the object is serialized before being passed as a parameter to an RMI.
Advanced Java Class Network Programming. Network Protocols Overview Levels of Abstraction –HTTP protocol: spoken by Web Servers and Web Clients –TCP/IP:
1 HANDOUT 14 Remote Method Invocation (RMI) BY GEORGE KOUTSOGIANNAKIS THIS DOCUMENT CAN NOT BE REPRODUCED OR DISTRIBUTED WITHOUT TH E WRITTEN PERMISSION.
Dynamic Code Generation in Java. Class Loading Class loading is the process of transforming a byte code (e.g., a.class file) into a Java class A Java.
Definition Servlet: Servlet is a java class which extends the functionality of web server by dynamically generating web pages. Web server: It is a server.
Session-02. Objective In this session you will learn : What is Class Loader ? What is Byte Code Verifier? JIT & JAVA API Features of Java Java Environment.
Java Security Updated May Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security.
Java Software Solutions Lewis and Loftus Chapter 2 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Software Concepts -- Introduction.
Java Security. Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security Manager.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
CISC6795: Spring Object-Oriented Programming: Polymorphism.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
The Web As A Global Computing Platform [Slides from a presentation at the 7 th International Conference on High Performance Computing and Networking Europe.
Introduction to Java CSIS 3701: Advanced Object Oriented Programming.
1 Comp 104: Operating Systems Concepts Java Development and Run-Time Store Organisation.
Chapter 1: Introducing JAVA. 2 Introduction Why JAVA Applets and Server Side Programming Very rich GUI libraries Portability (machine independence) A.
Basic Security: Java vs.NET Master Seminar Advanced Software Engineering Topics Prof. Jacques Pasquier-Rocha Software Engineering Group Department of Informatics.
POS 406 Java Technology And Beginning Java Code
Java 2 security model Valentina Casola. Components of Java the development environment –development lifecycle –Java language features –class files and.
In the name of Allah The Proxy Pattern Elham moazzen.
Java™ How to Program, 9/e Presented by: Dr. José M. Reyes Álamo © Copyright by Pearson Education, Inc. All Rights Reserved.
Object Persistence and Object serialization CSNB534 Asma Shakil.
RMI remote method invocation. Traditional network programming The client program sends data to the server in some intermediary format and the server has.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Garbage Collection and Classloading Java Garbage Collectors  Eden Space  Surviver Space  Tenured Gen  Perm Gen  Garbage Collection Notes Classloading.
Chapter 3 Collections. Objectives  Define the concepts and terminology related to collections  Explore the basic structures of the Java Collections.
Chapter 8 Class Inheritance and Interfaces F Superclasses and Subclasses  Keywords: super F Overriding methods  The Object Class  Modifiers: protected,
Programming in java Packages Access Protection Importing packages Java program structure Interfaces Why interface Defining interface Accessing impln thru.
UMBC Distributed Computing with Objects RMI/Corba CMSC 432 Shon Vick.
Java Distributed Object Model A remote object is one whose methods can be invoked from another JVM on a different host. It implements one or more remote.
RealTimeSystems Lab Jong-Koo, Lim
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 29 Remote Method.
Binding & Dynamic Linking Presented by: Raunak Sulekh(1013) Pooja Kapoor(1008)
 It is a pure oops language and a high level language.  It was developed at sun microsystems by James Gosling.
Introduction to Java Chapter 1 - Introduction to Java1 Chapter 1 Introduction to Java.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Topic: Java Class Loader
Java Distributed Computing
RMI Packages Overview java.rmi java.rmi.server java.rmi.registry
Remote Method Invocation
What is RMI? Remote Method Invocation
Java security (in a nutshell)
Topic: Java Security Models
Running An Encrypted Java Program
Lecture 20 – April 2, 2002 Bond Objects.
2.1. Compilers and Interpreters
null, true, and false are also reserved.
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Chapter 40 Remote Method Invocation
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Chapter 46 Remote Method Invocation
Chapter 46 Remote Method Invocation
M S COLLEGE ART’S, COMM., SCI. & BMS
Copyright 1999 B.Ramamurthy
Presentation transcript:

Copyright © 2001 Qusay H. Mahmoud Case Study A Global Compute Engine Here we will discuss some implementation details: – Class Loaders – Compute Engine – Security Managers Refer to Chapter 6 of the book “Distributed Programming with Java” for more details

Copyright © 2001 Qusay H. Mahmoud Class Loaders Java is a dynamic language capable of loading classes as they are needed (locally or from a remote machine) Classes are introduced in the Java environment when they are referenced by name in a running class The first class that gets to run is the one with main() Future attempt at loading classes is carried out by the class loader

Copyright © 2001 Qusay H. Mahmoud Class Loaders java.lang.ClassLoader is an abstract class It provides a number of methods, e.g.: – defineClass: converts an array of bytes to an instance of Class (final) – findSystemClass: find the system class with the specified name (final) – loadClass: resolve the specified name to a class or load a class (abstract) – Refer to docs for exact method signatures….

Copyright © 2001 Qusay H. Mahmoud Class Loaders When working with class loaders: – loadClass(String, boolean) must be defined by a subclass of ClassLoader. If the flag is set to true, then the method should call the resolveClass – defineClass converts an byte b[] to an instance of Class. It must be resolved before used to determine if any referenced classes are to be defined – The system class loaded by the findSystemClass method is from the local file system – To avoid loading the same class more than once, use a hashtable

Copyright © 2001 Qusay H. Mahmoud Building a network class loader public class NetClassLoader extends ClassLoader { } Provide impl’n for loadClass(String, boolean) – Verify the class name – Check if the class request has already been loaded – Check if class is a system class – Define the class for the JVM – Resolve the class – Return the class to the caller

Copyright © 2001 Qusay H. Mahmoud Network Class Loader Hidden issue: inability to cast an object created from a loaded class into its original class. The object to be returned needs to be casted. Example: NetClassLoader ncl = new NetClassLoader(); Object o; Class c; c = ncl.loadClass(“Hello”); o = c.newInstance(); ((Hello)o).someMethod(); // this is a problem

Copyright © 2001 Qusay H. Mahmoud Network Class Loader Solutions: – Have the loaded class extends an abstract class – Have the loaded class implements an interface public interface Compute { void run(); } If a class is to be loaded by the NetClassLoader, it must implement the Compute interface – Use Reflections APIs (explore this)

Copyright © 2001 Qusay H. Mahmoud Network Class Loader Example: – NetClassLoader.java – Compute.java – Fetch.java – HelloTest.java For the latest info on network class loaders, see: king/classloaders/ king/classloaders/

Copyright © 2001 Qusay H. Mahmoud Compute Engine Responsible for loading a remote client class It receives the URL of the class to be loaded then it uses the network class loader to load the class and all its associated classes Collects the output and sends it back to the client Security: how to protect the compute engine’s host file system from malicious client’s code??