a history of java snu oopsla lab. prof hyoung-joo kim

37
A History of Java SNU OOPSLA Lab. Prof Hyoung-Joo Kim

Upload: andrea-lee

Post on 13-Dec-2015

232 views

Category:

Documents


2 download

TRANSCRIPT

A History of JavaA History of Java

SNU OOPSLA Lab.

Prof Hyoung-Joo Kim

Contents

• Origin of Java

• Why do people use Java?

• The Past , Present and Future of Java.

• Structure Overview of Java

• How was Java improved?• The difference between Java and C++?

• Performance of Java

• Tendency on Java-related Company

Origin of Java(1)

• Generation– James Gosling & Patrick Naughton at 1990

• Goal : to develop distributed system which is applicable to electronic products(platform independent)

– *7(Star Seven) system by 1st Person Inc• named by Oak

• Research Settop Box & VOD with OS(Green)

• disappeared

Origin of Java(2)

NCSA Mosaic(1994) - first browser: Big Bang of the Web

James Gosling

Web Browser may provide uswhat we want such as

platform independence, security

WebRunnerBrowser implemented by Java

Java(1995.5)

Why do people use Java?(Announced by ACM, CACM)

• Platform Independence– JVM 과 Java API 가 구현된 곳은 어디서나 수행가능– PC 서버와 NT 서버가 제공하는 성능과 안정성 한계

• Productivity– Garbage Collection

– C++ 라이브러리보다 풍부한 자바 표준 API

• Reuse of Component-based code– Java Beans Component 로 가능하게 됨

Past, Present, Future(Addressed by the president of Java Soft)

지금까지 자바의 개발은 개발자들이 요구하는 기능 즉 , API 를 가능한 한 빨리 Java Platform 에 수용하는 것

지금까지 자바의 개발은 개발자들이 요구하는 기능 즉 , API 를 가능한 한 빨리 Java Platform 에 수용하는 것

성공적인 응용프로그램 개발을 위한 필수 기능 수용

성공적인 응용프로그램 개발을 위한 필수 기능 수용

Reliability, Performance and Portability 의 향상

Reliability, Performance and Portability 의 향상

Past

Present

Future

Structure Overview of Java

Hardware Platform

OS Platform

Java Virtual Machine

Java APIs

Sparc, Intel, Mac, HP ...

Solaris, Windows, Mac, Linux ..

OS application Language Primitives

Auxiliary Window Tookit

JDBCRMI

Servlet API JavaBeans

Etc.

JDBC Drivers

Web Server

How was Java improved?

• JDK 1.0

• JDK 1.1

• JDK 1.2 Beta version

• Java 2 Platform

• J2SE-v1.3.0

JDK 1.0

• Just reflect the feature of language itself andthe one of Applet

• Sun didn’t pass through the alpha, beta version, and just were intended on displaying the bug-modified version

• problem : huge bugs and insufficient GUI

JDK 1.1

• Event model, light component framework

• Additional API– JDBC, RMI, JavaBeans, 국제화 . 지역화지원 API

• 객체 직렬화 (object serialization)

• 객체에 속한 Method 와 field 를 알아내는 Reflection

• Servlet API, Enterprise JavaBeans– 자바가 Server 측에 수용되는데 밑거름이 됨

JDK 1.2 beta

• JDBC, RMI 등의 기반 API 들을 개선• 2-Dimension Imaging 과 Printing, GUI

component, Security Model

• CORBA 의 지원 (org.*)

• 주로 client 측의 S/W 를 위한 API 완성

Java 2 Platform(Java 1.2 의 정식버전 )

• API 관련– Swing(AWT 의 확장 ), 2D API, drag&drop API, JFC

• Security 관련– Policy-Based Access Control

• 프로그래밍 관련– Reflection 과 Serialization 에 대한 성능 개선

• HotSpot 은 포함되지 않음

J2SE(Java 2 platform Standard Edition - JDK1.3)

• JNDI - Directory, Naming Service

• RMI/IIOP - RMI 와 CORBA 의 연동• Java Sound(Application 에서 )

• Swing, AWT, Drag&Drop Enhancement

• HotSpot Engine( 개선된 JVM) 포함

보안 구조의 변천

JDK1.2 Security Model

JDK1.0 Security Model

JDK1.0 Security Model

Difference between Java and C++

Java• Single inheritance• C data type not supported

struct, union, pointer• Command line arguments

args• String

First-class object• Exception handling

Try-Catch-Finally• Garbage collection• No operator overloading

C++• Multiple inheritance• C data type supported• Command line arguments

argc, argv• String

character array• Exception handling

Try-Catch• No garbage collection• Operator overloading

Difference between Java and C++Example 1 - command line argument

public class echo{ public static void main(String argv[]) { for(int i=0; i < argv.length; i++) System.out.print(argv[i] + “ ”); System.out.print(“\n”); System.exit(0); }}

int main(int argc, char **argv){ for(int i = 0; i < argc; i++) printf(“%s ”, argv[i]) printf(“\n”); return 0;}

$> java echo arg1 arg2arg1 arg2$>

$> echo arg1 arg2echo arg1 arg2$>

Difference between Java and C++Example 2 - garbage collection

public void memory_function(){ Aclass cls; cls = new Aclass(…); cls.fn1(); cls.fn2(); cls.fn3(); ……….. return;}

public void memory_function(){ Aclass *cls; cls = new Aclass(…); cls->fn1(); cls->fn2(); cls->fn3(); ……….. delete cls; return;}객체 삭제관련 코드가

없음 (garbage collection)

객체 생성

Java API 중 awt 가 재작성 되어서 그림과 같이 수행 속도 향상

How about performance of Java?

1.0.2 1.1 1.1.6

성능향상을 위한 방안• Library 의 최적화

예 : Swing Applet• Compile 을 전담하는 자바 Daemon프로그램을 띄워서 Compile 한다 .• HotSpot Virtual Machine

Code OptimizationThread 간 동기화 속도 개선Memory 관리 개선

Tendency on Java-related Company

• Java OS

• EJB(Enterprise JavaBeans)

• JINI(Embedded Solution)

• Java 통합 개발환경

Java OS(Standalone Environment)

• Small, efficient operating environment

• Executes Java application directly without requiring a host operating system

• native code + java code

• layered architecture

Java OS(Architecture)

핫자바핫자바

AWT 클래스AWT 클래스 IO.net 클래스IO.net 클래스

Java OS window system

Java OS window system

Java OS Network Protocol Network

file system

Java OS Network Protocol Network

file systemJava OS

Graphic systemJava OS

Graphic system Java OS driverJava OS driver

Java Virtual MachineJava Virtual Machine

Java OS MicroKernelJava OS MicroKernel

Java OS BooterJava OS Booter

Jav a OS

Java

Cod

eC

or

Ass

emb l

y C

ode

H/W

Java API

Java OS(Kernel)

• Booting• Exceptions• Threads• Memory Management• File System

• Interrupts• DMA• Debugging

Java OS(Virtual Machine)

• Execute the bytecodes

• handle the exceptions

• manages almost all of the memory(RAM)

• handle the simultaneous execution of multiple threads

Java OS(Device Drivers)

• Written in Java

• use some native codes– Memory classes

• access device, memory and bus registers

– Interrupt classes• managing interrupt handler

Java OS(Window and Graphics)

• AWT centric graphic primitives

• Window system– written in java– optimized for limited memory

• Graphic rendering system– mostly written in java– designed for java– support H/W graphic acceleration

EJB(Enterprise JavaBeans)

• 표준 분산 통합 서버측 Component 시스템– “Write Once, Deploy anywhere!”

• JPE(Java Platform for the Enterprise) 의 하나• EJB 는 spec. 이며 product 는 아님

– Draft : Dec. 1997– Version 1.0 : March 1998(1998 JavaOne)– Version 2.0 Q2 : 1999

• Client Java beans 와는 무관

EJB(Server, Container, Component)

Server

Container

Components

EJB(Session Bean)

• Session Bean 은 클라이언트 코드를 서버상에 확장– 클라이언트 세션 관리 .

– 클라이언트 코드를 서버에 올려 Thin-Client 로 만듦– 클라이언트 Reference 가 없을 때 지속적이지 못함

• Example– Banking 시스템의 입출금 행위

EJB(Entity Bean)

• Entity Bean 은 영구적인 데이터를 표현하는 EJB– Example: EJB 는 데이터베이스의 테이블의 ROW 를

표현 기능– 한 클라이언트에 종속적이지 않음 (Shared Object)

– 영구적인 Storage 에 지속성이 있음 (file, DB, etc)

• Entity lifetime 은 클라이언트 커넥션에 의존적임– Entity EJB 는 영구적인 Storage 에 존재하는 한 존재

• Container-managed vs. Bean-managed Entity Beans

EJB(Entity Bean -cont.)

• Bean-managed vs. Container-managed

Bean-managed

•지속성관리를 위한 코딩을 많이 해야 함

•지속성 관리는 배치 시 변경될 수 없음

•object/relational mapping 에 대한 제어

•만약 관계형 DBMS 사용 시 SQL 질의에 대한 제어

Container-managed

•지속성관리를 위한 코딩 필요 없음

•유연한 지속적인 스토리지

•object/relational mapping 은 개발 툴 에 의해서 제안

•SQL 질의에 대한 적은 제어 (generated by container)

•성능이 Bean-managed Entity Bean 보다 떨어짐

EJB ServerEJB Server

Environment with EJB

EJBEnterprise JavaBeans

EJBEnterprise JavaBeans

EJB ServerEJB Server

EJBEnterprise JavaBeans

EJBEnterprise JavaBeans

EnterpriseJavaBeans

client

Java IDLclient

CORBAclient

vendor1

vendor2

vendor3

IIOP

IIOP

IIOP

IIOP

vendor4 vendor5

JINI(Introduction)

• 접속과 동시에 필요한 기능을 수행하는 것을 목표로 함 (Impromptu Community)

• Lookup Service 에 등록된 장치들과 Service들로 구성

• 기본적으로 RMI 를 통해 통신을 함• Java 의 튼튼한 보안 모델이 JINI Technology 에

그대로 적용이 됨• Packet 기반 네트워크에서 객체기반의 분산

객체 컴퓨팅 환경으로 이전하는 시발점이 됨

JINI(Architecture)

ApplicationApplication ServiceService

JINI Technology(JDK, RMI, etc)JINI Technology(JDK, RMI, etc)

Operating System(Windows, Solaris, etc)Operating System(Windows, Solaris, etc)

Network Transport(TCP/IP, X.25, etc)Network Transport(TCP/IP, X.25, etc)

HardwareHardware

Home Networking based on Jini

Public NetworkRSTN, 인터넷

프린터

홈넷허브

컴뮤니케이션과 컨트롤

홈RF

카메라 스캐너

웹폰IEEE 1394

엔터테이먼트 센터

전화선네트웍

전력선네트웍

네트웍 카메라

Java 통합 개발환경Borland JBulider

• Borland 사의 자바 개발환경• Visual Interface 사용• JDK1.3 환경 수용• HTML, XML, CSS viewer 제공• Survlet wizard support

• Many EJB wizards

• http://www.borland.com/jbuilder

Java 통합 개발환경Symantec Café

• Symantec 의 자바 개발환경• Visual Interface 제공• native x86 compiler 제공• Database application wizard 제공

– QBE(Query by Example) 포함• 강력한 debugging tool 제공• http://www.visualcafe.com

Java 통합 개발환경MS Visual J++

• Microsoft 의 자바 개발환경• Visual Interface

• Microsoft 의 다양한 제품들과 연동• Java 의 기본 class 외에 MS 에서 만든

class 들을 제공 (Windows Foundation Class)

• http://msdn.microsoft.com/visualj