Archive for August, 2008

Day 5 @ Sun

Friday, August 29th, 2008

Driven by our excitement with getting HTML to render in-world yesterday, today we began trying to turn the HTML Viewer into…well…the HTML Viewer (and not a hacked version of the PDF Viewer.) We discussed some design details with Jon over the phone this morning, such as the decision to have clients (rather than the server) render HTML, etc. Much more work is needed, and hopefully the core functionality HTML Viewer will be completed by the end of next week.

We have also started building a sample world/team room to showcase our progress. It’s very simple right now, but we’ll expand it as we create more components to put into the room.

Finally, we’ve committed the HTML Viewer in its current state, as well as the sample team room, to Sun’s Wonderland Modules Incubator subversion repository. The Cobra libraries required by the HTML Viewer will not be committed to the repository until the licensing issues mentioned in previous blog posts are straightened out.

Interlude: 3D Data Visualization Brainstorm

Friday, August 29th, 2008
Ideas for Data Visualization in 3D

Ideas for Data Visualization in 3D

It’s worth mentioning that we’ve been brainstorming ideas for displaying data in a 3D environment. Just for fun, here’s a picture of some of our whiteboard sketches. Interpretation of them is up to you, the reader. :)

Something Smells Like Progress: Day 4 @ Sun

Thursday, August 28th, 2008
First Breakthrough: HTML Rendering In-World

First Breakthrough: HTML Rendering In-World

Today, we got HTML to render natively in-world! Don’t get too excited yet, because so far, our HTML Viewer component is a slightly modified version of Nigel Simpson’s Wonderland PDF viewer. It can only display whatever web page URL is hard-coded into the source code. Still, we’re very excited about this and will be rounding out the Wonderland HTML Viewer component during the coming days.

In any case, today was a pretty busy day for us. This morning, we called Nigel to ask him some specific questions about the logistics of modifying his PDF Viewer component to display web pages. Nigel was extremely helpful, and we’ll continue to ask him quetsions as we undoubtedly run into issues while completing the HTML Viewer.

We also (obviously) spent some time refactoring Nigel’s code to get it to render HTML in-world, and we were able to construct a (very) basic example demonstrating that making an HTML viewer for Wonderland is definitely possible.

The Cobra HTML rendering engine we’re using to accomplish this is released under an LGPL license, but it makes use of Mozilla’s Rhino ‘JavaScript for Java’ library for its JavaScript functionality. Rhino is released under a dual MPL 1.1/GPL 2.0 license. Amusingly, Rhino includes a library from Sun that it uses for debugging. We discussed these various licenses with Jordan, and how they might interact or potentially conflict with Wonderland’s own dual license. Jordan said that Cobra would have to undergo a license review by Sun’s legal department before it would be allowed to officially be included in Wonderland, but this is understandable.

Other things that happened today included a department “Tea” at 3:00, and we’ve scheduled weekly meetings (that will happen either in Wonderland or in person) with our WPI advisor, Gary Pollice. We forgot to mention that we got our badges yesterday! We feel official now. :-)

Day 3 @ Sun

Wednesday, August 27th, 2008

We started the day by reading through Nigel’s notes on Wonderland’s PDF viewer, in order to prepare for our meeting with him tomorrow.

We then talked with Jordan and John about the method our HTML viewer would use to save images of web pages (to be used as textures in-world.) It seemed that the easiest way to scrape image data from Cobra would be to have Cobra render a page onscreen, convert its output to an image, and then save that image as a file. This approach is frowned upon for a number of reasons. The biggest problem is that if this code were to be theoretically integrated into Wonderland, pages would have to be rendered inside a hidden X11 session using Wonderland’s Server Master Client. This would have defeated the main purpose of creating the HTML viewer component in the first place: to ELIMINATE the act of scraping images from X11 applications.

Fortunately, after some heavy Googling, we found code on Martin Brown’s blog that significantly alleviated our fears. His code demonstrates how to make Cobra render directly to an image using headless AWT. We slightly expanded his code and added required error checking, and ended up writing a simple Java method with this signature:

public static void takeWebshot(String uri, Dimension size, File output) {}

This method uses the Cobra engine to save a PNG screenshot of a given web page. This is certainly a step in the right direction! Jordan thinks we may even be able to forgo saving PNG images, and paint AWT BufferedImages directly on objects in-world. We’ll have to continue working on the HTML viewer component and find out.

Also, today we saw a presentation from Sun’s chip design department, and got tours of two of their data centers. The presentation was very informative because none of the WPI MQP students knew too much about the SPARC architecture or about Sun’s processor line.

Tomorrow will be very busy indeed…watch out for tomorrow’s blog post!

Day 2 @ Sun

Tuesday, August 26th, 2008

Today was our second day at Sun. After some further research, Josh and I decided to use the Cobra HTML rendering engine for our Wonderland ‘web page component’. This engine was the most accurate and efficient one, and is easy to implement.

Jordan met with us in the early morning and discussed with us how rendering would work in Wonderland. AWT and Swing cannot be used in world (this will change in 0.5), so Jordan recommended saving rendered HTML as an image and then using that image to texture in-world geometry. So far we were able to write code that uses Cobra to render web sites inside a JPanel, and then save the contents of the JPanel as a PNG image.

We will also be meeting with Nigel on Thursday, inside Wonderland. Nigel created Wonderland’s PDF viewer component. During our meeting, Nigel will educate us about how the PDF viewer works. In the meantime Nigel has sent us very detailed notes about the PDF viewer so that we can do some research before our meeting.

Josh and I also continued to brainstorm about how to visualize things like html pages and statistics in a 3D environment. We came up with some interesting ideas and will likely post photos soon.

Additionally, we looked at the  Building a World from WFS tutorials to see if we can make headway towards our team room goals.

Also, after some diligent searching, Josh and I were given high quality speakers for music…thanks Nicole!

Day 1 @ Sun

Tuesday, August 26th, 2008

Today was all of the WPI MQP Students’ first day at Sun.

Gerard and I have our own lab to work/collaborate in, and we each have our own Sun workstation running Ubuntu 8.04, with (much appreciated) 24.1″ LCDs.

In the morning, we met with Jordan, Nicole, and John to talk about the focus of our project. We described our overall vision of the Software Engineering Team Room to them, and then discussed a couple of ideas about what to tackle first.

We decided to start by building a single component that could be useful for both our team room project and Wonderland in general: an in-world HTML rendering engine component that doesn’t depend on an external web browser. In theory, this HTML rendering engine component could work in a similar fashion to Wonderland’s PDF viewer. This component could basically turn dynamic web pages into ‘posters’ in a team room; whenever team members enter the room, current Hudson build statistics could be displayed on a wall, etc.

We’d like to have this component make use of an EXISTING open-source HTML rendering engine, rather than write our own. We’ve played with a few engines, and so far Cobra looks like the most promising one, but further research is needed.

We spent the remainder of the day following and completing Jordan’s tutorials about creating custom cell types in Wonderland, and starting to do research for the aforementioned HTML rendering engine component.

Day 3 @ Boot Camp

Thursday, August 21st, 2008

Today, Derek White from Sun gave a presentation about Sun Spots and what makes them tick. Later on, we got to play with Sun Spots. We first experimented with the preloaded ‘bounce demo’ on the Sun Spots, and then attempted to program them using NetBeans and the Sun Spot SDK. We managed to get a few of the demo programs that come with the Sun Spot SDK to compile and deploy to a Sun Spot. Neat stuff!

Gerard and I have started thinking about ideas for our project proposal, and are still attempting to complete the Wonderland tutorials that Jordan asked us to look at.

Day 2 @ Boot Camp

Wednesday, August 20th, 2008

Today we heard from Professor Pollice about the history of Sun Microsystems. Our Sun liaison, Jordan Slott, also gave a presentation that discussed what Project Wonderland is, as well as a high-level overview of how Wonderland works internally.

To complete the homework assignment Jordan gave us, we set out to build and run Wonderland and then follow the first three parts of a tutorial about extending Wonderland. Although we were able to build and run Wonderland and play around in the default world, we were unable to successfully complete the first ‘extending Wonderland’ tutorial.

We followed the tutorial’s instructions as closely as we could. Although we ended up creating a new Wonderland world for an avatar to play around in, the whole point of the tutorial was to be able to add a sphere to the world, and no sphere was displayed in-world for us.

In no particular order, here’s a list of random ideas for extending Wonderland that we discussed:

  • X-Windows –> Java
  • Flickr (already implemented,) Facebook, Twitter stuff?
  • Team Room apps –> Dev Tools
  • Bandwidth detection for automatic audio quality adjustment
  • Easy import feature for applications (does this exist?)
  • Airplanes in Wonderland
  • Hooks for usage statistics
  • Continuous file integration status

Day 1 @ Boot Camp

Monday, August 18th, 2008

Today was officially the first day of the Sun Microsystems WPI MQP. This week, all Sun MQP students are participating in “Sun Boot Camp” at WPI. We’ll actually start working at Sun next week. Today we heard Professor Heineman and Professor Pollice–our MQP advisors–discuss various administrative topics. Professor Heineman also conducted a teambuilding activity involving status injective graphs.

Jim Waldo visited us from Sun today, and gave all of us an overview of what Project Darkstar is as well as some of the development considerations behind it. Jim told Gerard and I that we should research Darkstar further and become familiar with it because Wonderland is built on top of it.

For homework, I read the paper “Technology and Courage” by Ivan Sutherland.