Notes
Slide Show
Outline
1
jbox
  • A Pure Java Cluster Node
  • JAOO 2002
  • Michael Ringgaard (mringgaa@csc.com)
  • Bjarne Hansen (bhansen4@csc.com)
2
Welcome & Agenda
  • Welcome
    • Bjarne Hansen, bhansen4@csc.com
      Computer Sciences Corporation
    • Michael Ringgaard, mringgaa@csc.com
      Computer Sciences Corporation
  • Agenda
    • What is a jbox?
    • Why would we want a jbox?
    • What can a jbox be used for?
    • How to build a jbox
3
What is a jbox?
  • A server appliance for Java programs
    • Requires only power and a network connection
    • No monitor, keyboard, or mouse

  • Built for standard Intel based PC
    • Cheap, simple and powerful

  • Runs only one process: the Java VM
    • Specifically the HotSpot Java VM for Windows
    • Relies on a small and efficient kernel

  • Transforming application servers to appliances
4
Appliances
  • Characteristics of appliances
    • Unpack, connect, use...
    • Can’t rely on experts to operate ..
    • Must require just about zero maintenance
    • Like: phone, TV, video, video game, washing machine, oven, ...
  • Would be nice characteristics for an IT business system!


  • By the way...next generation of home appliances: Broadband router, DHCP, DNS,...
5
Why a Java Appliance?
  • Need effective development and execution platform
    • Hardware:
      • Before: Exotic processor/hardware
      • Now: Complies with PC specification
    • Development platform
      • Before: C, C like variant, or assembler
      • Now: OO, VM, garbage collection
  • Cost effective
    • Extremely cheap hardware
    • Develop on PC, execute on appliance
    • Wide selection of development environments, tools, utilities...
    • No specialized developers
  • Java is a powerful and rich environment yet simple enough to use in an appliance


6
What can a jbox be used for?
  • What would we like to achieve?
    • Apply the virtues of traditional appliances to IT business systems
    • Apply the effective software development tools, utilities, and methodologies to appliance development
  • As a Java server appliance
    • Ideal development environment to develop, deploy and maintain software for appliances
  • As a Java cluster node
    • It’s better to own 100 appliances than 100 application servers
7
Just add water...
8
Clusters of Appliances
  • Clustering support is a feature of specific J2EE server products
    • Focus on transparency (developer, user)


  • Custom designed distributed architectures
    • J2EE +
    • Jini, JavaSpaces
    • P2P, JXTA, ...
9
Appliance Management
  • Standalone appliances can be managed using browser interface
  • Most J2EE servers has built-in web based management consoles
  • Appliance clusters requires special attention on deployment and configuration issues
    • How do you deploy applications to many nodes
    • Centralized application and configuration repository (JMX).
  • Manage applications, not servers
10
Application Clusters
11
jbox – A Pure Java Cluster Node
  • How to build a jbox...
12
Java and the operating system
  • What is actually going on under the hood when you run a Java application?
  • How is the JVM using the operating system?
  • What features of the operating system are used by a Java server application?
  • Do you really need an operating system?
13
What is an operating system?
  • Hardware Abstraction Layer
  • Resource Manager
  • Bootstrap Loader
  • Application Programming Interface
  • Virtual Machine Implementation
  • Utility Collection
  • One-stop-shopping User Entertainment System
14
Java VM on Windows
15
194 Windows API calls used
16
OS Services
  • file
  • network
  • virtual memory
  • threads
  • synchronization
  • time




  • resolver
  • heap
  • modules
  • critical sections
  • thread local storage
17
JavaOS emulator
18
Design objectives
  • Build a kernel for executing Java server application on appliances
  • Use existing HotSpot VM
  • Small,simple, fast but complete kernel
  • Run on standard PC hardware (IA-32)
  • Develop using Microsoft Visual C
  • Use standard PE (EXE/DLL) executables
19
How to build a JavaOS kernel
  • Use the existing HotSpot VM
  • Write stub DLLs for Win32 DLL
  • Implement user mode components:
    • loader, heap, tls, critsect, resolver...
  • Implement a boot loader to load kernel
  • Implement kernel
    • memory management, thread control, device I/O and networking.


20
Core kernel services
  • System booting and application loading
  • Memory Management
    • Virtual memory mapping
    • Physical memory allocation and paging
    • Heap allocation and module loading and linking
  • Thread Control
    • Thread scheduling and trap handling
    • Thread context
    • Thread synchronization and timers
  • I/O Management
    • I/O bus and unit enumeration
    • Block devices and file systems
    • Stream devices
    • Packet devices (NIC) and networking (TCP/IP)

21
OS Development on the Internet
  • There are lots of information and code on the internet on OS topics:
    • Linux kernel code (www.kernel.org)
    • IA-32 Reference Manual (www.intel.com)
    • TCBs and u-kernels (Jochen Liedtke, i30www.ira.uka.de/teaching/coursedocuments/47/)
    • DNS Resolver (ISC BIND lwres, www.isc.org)
    • TCP/IP Stack (Adam Dunkels, www.sics.se/~adam/lwip/)
    • Heap Allocator (Doug Lea, http://gee.cs.oswego.edu/dl/html/malloc.html)
    • Bochs (bochs.sourceforge.net) and WMWare simulators (www.vmware.com)
    • IDE Disks (Hale Landis, www.ata-atapi.com)
    • ...

22
Architecture layers
23
sanos  API
24
Where is the code?
25
Conclusion