Wednesday, April 16, 2008

Sun Labs Open House 2008 Report (3)

On the second day (4/10/2008), I attended the following sessions
  • Project Caroline
  • Project Darkstar / Project Wonderland
Here is a summary for the sessions:

Project Caroline

Project Caroline is a hosting platform for development and delivery of dynamically scalable Internet-based services. The platform comprises a programmatically configurable pool of virtualized CPU, storage, and networking resources. Project Caroline helps software providers develop services rapidly, update in-production services frequently, and automatically flex their use of platform resources to match changing runtime demands.

Internet services move from just writing code to "writing AND running" code, but it's really hard to get started. This also means deployment becomes part of developer workflow. To overcome this hard task, Sun Labs has started a research project called "Project Caroline" developing a platform for development and deployment of long-running Internet services.

The main characteristics of this project is "full programmatic control of distributed resources", so you can control resources with Java, JRuby, Perl, Python, etc. For example, a layer 4 load balancer is created as follows by using Java.

scfg = new L4VirtualServiceConfiguration();
scfg.setExternalNetworkAddress(extAddr.getUUID());
scfg.setPort(80);
scfg.setProtocol(Protocol.TCP);
scfg.setRealServices(Arrays.asList(
new RealService(intAddr.getUUID(), 8080)));
myLB = grid.createNetworkSetting(“myLB”, scfg);

This is another example to create DNS record:

bcfg = new HostNameBindingConfiguration();
bcfg.setHostName(“www”);
bcfg.setAddresses(Arrays.asList(extAddr.getUUID()));
myDNS = grid.getExternalHostNameZone().createBinding(
“myDNS”, bcfg);

In this session, there is a demo to control resources for Facebook application. For detailed documentation and samples of this project, please see https://www.projectcaroline.net/.

Project Darkstar / Project Wonderland

Project Darkstar is a software server, written entirely in Java, to handle massive-scale low-latency applications such as online games. This project is available as open source under GPLv2 license and commercial licenses can be provided. The main goal of this project is to provide an infrastructure that can use available resources very efficiently while giving developers a simple event-driven, single-system view of the world. The current focus of this project has been building out support for multi-node clustering, supporting multiple machines working together to host a single game. For the detail, please visit http://projectdarkstar.com/.

Project Wonderland is the Java-based business grade virtual world toolkit. Within those worlds, users can communicate with immersive audio and even share applications, such as web browsers and OpenOffice documents. And Project Wonderland is implemented as serious game on top of Project Darkstar. In this session, an engineer deeply explained how to change Wonderland client design to overcome poor throughput and how to adjust it well to Project Darkstar Server.

Tuesday, April 15, 2008

Sun Labs Open House 2008 Report (2)


In the Sun Labs Open House 2008, there is a Sun SPOT HOL (hands-on lab). This HOL is exactly the same one as the one in JavaOne 2008 that will be held on May 6-9 2008. So if you have a chance to participate in, please try it by yourself. Unfortunately, I wasn't able to take part in the HOL because I had to hear another session at the same time. But the HOL instructor lent me the full kit for this HOL, so I was able to try it after returning to the hotel.

The goal of this HOL is to control a servo (HiTec HS-311 Servo) remotely based on the input from a bend sensor (Flexpoint Sensor Systems bend sensor) like the following video:



The exercise is divided into 5 parts as follows
  • bend sensor hardware setup
  • bend sensor programming on Sun SPOT
  • servo hardware setup
  • servo programming on Sun SPOT
  • networking between 2 Sun SPOTs
and use breadboard to design the circuit. So if you're a software developer, but a beginner for electronic circuit, this exercise is just good for you.

Wednesday, April 9, 2008

Sun Labs Open House 2008 Report

Today is the first day of Sun Labs Open House 2008 and I'm here in Menlo Park to participate in this event. I worked at Sun Labs last June for about 2 weeks to learn and create Sun SPOT demos, so my main purpose here is still for Sun SPOT, however, there were several cutting edge technologies other than it. So I'd like to introduce them as far as I can.

I heard some interesting JVM topics in the morning, but they are all internal-only sessions, so omit the details here. In the afternoon, I attended the following sessions:
  • Sun Small Programmable Object Technology (SPOT)
  • Project Live* [live star]
  • Project Squawk
and watched some demos. Here is a summary:

Sun Small Programmable Object Technology (SPOT)

This is a session to explain Sun SPOT overview & in-the-field including some demos. The agenda is divided into some topics: introduction, hardware, squawk, networking, security, solarium, emulator, in the field and hands on labs.

Sun SPOT device has three layers: battery, processor board with radio and sensor board. Processor board alone acts as a base-station that is connected to PC via USB to communicate with other Sun SPOT. And users can program the device entirely in Java using standard Java tools and/or IDE like NetBeans.

Here is Sun SPOT processor board (what is so called "eSPOT") spec:
  • 180 MHz 32 bit ARM920T core processor (Atmel AT91RM9200)
  • 512K RAM/4M Flash PROM
  • 2.4GHz 802.15.4 Radio Transceiver (TI CC2420)
  • USB interface - mini-b connector
  • Real Time Clock and Power Management Processor (Atmega88)
  • 3.6V rechargeable 750 mAh lithium-ion battery
  • 30 pin high density interboard connector
  • “Java on the metal” - No OS. Squawk VM runs on the bare metal
eDemoboard (sensor board) spec is:
  • 2G/6G 3-axis accelerometer
  • Light sensor
  • Temp sensor
  • 2 push buttons
  • 8 RGB 24 bit LEDS, power/control LED
  • 6 analog inputs readable by a 12 bit ADC
  • 5 General Purpose I/O pins (GPIO) and 4 high current output pins w/ Atmega88 IO processor
You can even make your own Sun SPOT hardware: eDemoboard is just a sample impl. shipped with Sun SPOT developer's kit (see the detail: eBones project).

Sun SPOT developer's kit includes
  • 2 x Full Sun SPOTs with eDemoSensor boards and batteries
  • 1 x base-station Sun SPOT
  • Software (Squawk VM, Java SDK, Netbeans)
  • Other equipments (USB cable, Mounting clips, 2 x wall mounts, 1 x PC board mount)
Sun SPOT radio is based on IEEE 802.15.4 (Zigbee) that is lower cost and power but slower than Bluetooth (802.15.1) or Wi-Fi (802.11). The radio spec is 128-byte packets, ~70m range, 250Kbps, 2.4 GHz and "autonomous mesh networking" extends communication range. It also has easy interface with internet-connected devices via HTTP, TCP/IP* (*TCP/IP implementation is now on going).

The new feature of security aspect (for a forthcoming SDK release) is SSL protocol support. To support SSL, you can just change the current syntax for opening a radio stream connection:

conn = Connector.open(“radiostream://” + addr + “:” + port);

to

conn = Connector.open(“sradiostream://” + addr + “:” + port);

Sun SPOT SDK also includes a great emulator, so you can try your program even if you don't have any real Sun SPOT!

In the field, Sun SPOT is utilized for several projects like "Project Blackbox" to keep track of conditions present in the box while in transit and Yggdrasil, common framework for data collection.

Project Live* [live-star]

Project Live* explores a new approach to software distribution and configuration of enterprise systems. Live* pushes the traditional installation process back to the factory. Software is distributed in the form of pre-installed immutable file system images that contain major software components, e.g. an OS, a database or an application server. At boot time Live* dynamically composes a collection of such modules into a single virtual software environment. Using a simple file system virtualization technology, Live* makes this composition entirely transparent to all existing software.

Also, similar to software in consumer electronics, Live* consolidates the system customization and configuration settings into a repository separate from the original software. This technology extends the concept of software distribution in the form of ready-to-run images like LiveCDs, with the true modularity and flexibility of customization.

In the demo room, the simplicity of Linux distribution upgrade is demonstrated as follows:
  • A user runs a Red Hat version A (for Live*) on xVM
  • the user makes a lot of customization on this system, e.g. network, font..
  • the user upgrades OS to a new Red Hat version B (for Live*).
  • After installation, he would usually need to reconfigure the above setting, but they are on Live* repository, so the user can use the new system seamlessly.
So, Live* software is even more advantageous when combined with VMware, xVM (Xen) or Virtual Box. It simplifies management while improving robustness and security.

Project Squawk

Squawk is a Virtual Machine designed for resource constrained devices like Sun SPOT (and now being planned to port to LEGO Mindstorms NXT and Custom FPGA). The Squawk
  • Implements J2ME CLDC 1.1/IMP 1.0 Profile
  • Runs on the bare metal (No OS)
  • Designed for memory constrained devices
  • Written mainly in Java
  • Runs multiple applications (isolates) that can be migrated across devices
  • Also runs on Solaris, Linux, Mac and Windows
  • Easy to port
Compared to Standard JVM, a lot of functions on Squawk JVM, e.g. loader, garbage collector, compiler and device driver, are written mainly in Java. With "isolates", One JVM OS process can run more than one applications on it and those applications can share some memories.

Tuesday, April 8, 2008

buziness trip for Sun Labs Open House 2008 (3)

Whenever I stay here at W silicon valley, I always go to "Sushi Boat"@Newark. As the name implies, it's a Japanese-style sushi restaurant though there are no Japanese chefs & staff here.

Monday, April 7, 2008

buziness trip for Sun Labs Open House 2008 (2)

I met again Sun SPOT members@Sun Labs today. It's been a while since I visited Sun Labs last June for 2 weeks to develop Sun SPOT applications. I was writing a Sun SPOT program at Sun Labs in the morning.

At lunch time, I went to Google@Mountain View to meet my friend. From Menlo Park (Sun's office), take 101 South to Rengstorff Ave, turn right at Amphitheatre Pkwy and follow this street (it takes about 10 minutes, so close!). I was treated to Google lunch here and his friend gave me a nice Google T-shirts (thanks a lot!).

In the afternoon, spent my time to continue Sun SPOT programming and talk with Sun Labs members.

Saturday, April 5, 2008

buziness trip for Sun Labs Open House 2008

I've been here in Silicon Valley to participate in Sun Labs Open House 2008. Sun Labs Open House is the annual opportunity to see what's new and exciting research at Sun Labs. It's open not for Sun employees, but for partners & customers.

I arrived at SFO (San Francisco) this morning after 10 hours' flight from Narita. It's 6 or 7 times for me to visit here, but I'm never tired of this place. After renting a car at the airport, I headed to Menlo Park office, then went to the hotel I'm staying. The hotel is W Silicon Valley, which is one of my favorite hotels.

And I'm trying to use this comfortable king size bed right now..