Sun Employee Blogs - RSS Feed URL - Blog rss feeds
Home | Most popular rss | Newest feed urls | Popular search | Tags | Submit RSS URL
RSS Feed Categories
.NET
Advertising & Marketing
Africa
Americas
Art & writing
Articles & tutorials
Asia
Australia
Automobile
C/C++
CA
Cisco
Computers
Construction
Developer News
Europe
Finance
Foods & Beverages
Fun & Entertainment
Games
General
Hardware & PDA
Health
Human resources
IBM
Internet
Java
Legal
Locals
Media
Microsoft
Moreover
News & Opportunities
News4Sites
NewsIsFree
Real Estate
Science & Education
Security
Shopping
Society
Software
Sports
SQL & databases
Sun
Telecom & Wireless
Thoughts & comments
Travel
UK
US
Web development
World
 
Recommended Sites
free ringtones sites
Free Ringtones
free ringtones
free ringtones
ringtones
ringtones
Free Ringtones
Free Music Lyrics
Sara Evans
free ringtones
free ringtones
info sites
Map quest
Map quest
fox news
celebrity oops
news
Used Cars
Pet Adoption
drink recipes
free articles
Apartments
online flowers
game cheats for ps2
pharmacy sites
Online Pharmacy
online pharmacy
online pharmacy

finance sites

Consolidate Debt Loans
Student Loans
mortgage calculator
Student Loans
Student Loans
Student Loans
consolidate debt loans
Student Loans
car loans
unsecured personal loans
nationwide home mortgage loan company
car loans
car loans

Sponsors Sites!


Sun Employee Blogs
RSS Feed URL : http://blogs.sun.com/roller/rss
Category : Sun
Total Views : 8
Latest entries from this feed url
FileBench 源代码和 Bug/RFE 信息

现在您可以在 OpenSolaris 中使用 OpenGrok 轻松浏览 FileBench 的源代码。我发现 OpenGrok 比 sourceforge 提供的工具更加友好。

对于源代码的基本细分条目,构成 C 二进制 "go_filebench" 的 *.c's、*.h's、*.l 和 *.y 文件可以在这里查看。同时,您还可以浏览工作负荷、主要的 perl 脚本 filebench(1).prof filesscripts 来比较结果并刷新文件系统缓存。

现在您还可以在我们的 bug 数据库中查询在 FileBench 中发现的 bug,以及在 OpenSolaris 上请求的 RFE


A Map For Saturday, A Backpackers Documentary
To me backpacking is an elusive kind of experience, one you might consider a bit like love in the sense that it runs the full gambit of emotions and when someone asks you to describe it you don't even know where to start. So usually when someone asks me about one of my trips or wants to talk about backpacking in general I play along as best I can, but what I'm really thinking inside is ... "just go on your own trip, then you'll know." Well, if you really can't go on your own trip but want to know more about what it's like to backpack, check out the dvd A Map for Saturday. It's a cool little documentary made by a guy who quit his job as a tv producer to go on an 11 month around the world trip and documented his experience. The cool thing is that this is more of a backpackers documentary than it is a travel documentary. Sure, you'll see where he's going and what he's doing, but it's more about the backpackers themselves, what their life is like on the road, the good and back things about the lifestyle, the emotions they go through, the challenges they face, etc. So go check it out and get at least a small glimpse into the life of a backpacker.
Logical Domains (LDoms) 1.0.3 is available
I skipped a post for LDoms 1.0.2 but I knew 1.0.3 was right on its heels and now its available for download here!

LDoms 1.0.3 adds a number of virtual I/O enhancements with Solaris 10 5/08 OS and supports the UltraSPARC T2 Plus, UltraSPARC T2 and UltraSPARC T1 based servers:

Supported Servers

Included in the download are optional LDoms System Management Tools:

  • Ldoms Management Information Base (MIB)
  • libvirt for LDoms

LDoms Documentation available at http://docs.sun.com/app/docs/coll/ldom1.0

  • Logical Domains (LDoms) 1.0.3 Administration Guide (html)(pdf)
  • Logical Domains (LDoms) 1.0.3 Release Notes (html)(pdf
  • Logical Domains (LDoms) Man Page Guide (pdf)
  • Logical Domains (LDoms) Management Information Base (MIB) 1.0.1 Administration Guide (html)(pdf)
  • Logical Domains (LDoms) Management Information Base (MIB) 1.0.1 Release Notes (html)(pdf)
  • Libvirt for LDoms 1.0.1 Release Notes (html)(pdf)
  • Libvirt for LDoms 1.0.1 Administration Guide (html)(pdf)

See The Download Page, README and/or Release Notes for required Software and patches

Support

Developer Blogs


Creating a custom widget in project websynergy

Courtesy : Thanks to Neel from the Portal team to give me a heads up on this.

Goal : To create a custom widget in the Project websynergy codebase and deploy it in the websynergy portal. Project Websynergy is Sun's next generation portal using Liferay Portal Server, GlassFish v3, and MySQL . I am re-using a JSR 286 portlet which my collegue has written and can be found here : http://portalpack.netbeans.org/tutorials/eventing/EventingStoryBoardTutorial.html

Creating a EmployeeInfo Portlet and a Health Portlet which displays the BMI of the person entered in EmployeeInfo Portlet.

Steps to create the widget in websynergy :

 Steps to checkout the websynergy code base : http://blogs.sun.com/siddeshkamath/entry/writing_a_custom_portlet_under

1. Once the code base is checked out, cd to synergy/widgets directory

2. run ant create . Enter the widget name as "EmployeeInfo" , Enter the widget directory as "EmployeeInfo"

3. The widget directory will have the "EmployeeInfo" directory created which will have src, web and build.xml

4. copy the Employee.java and EmployeeInfo.java under synergy\widgets\EmployeeInfo\src\java\com\sun\portlet

5. change the package name in Employee.java and EmployeeInfo.java for ex : to "package com.sun.portlet"

6. The EmployeeInfo directory will have "web" directory -> EmployeeInfo-docroot, META-INF and WEB-INF

7. copy the jsp files to WEB-INF/jsp directory

8. add the following lines in the individual jsp files

<%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %>
<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>

9. The purpose of liferay-display.xml and liferay-portlet.xml

a. liferay-portlet.xml is like a wrapper on the portlet.xml. Liferay has added certain extra functionalities and they have used their own dtd (liferay-portlet-app_5_0_0.dtd)

b. The liferay-display.xml has the following items :

<category name="category.sample">
 <portlet id="EmployeeInfo"/>

The category.sample means that when we deploy this portlet and then log in as paul/paul or any other user, then click on "Add application" link, the EmployeeInfo portlet will be displayed under "sample"

Here is how the portlets look on the websynergy :

http://blogs.sun.com/siddeshkamath/resource/synergy%20customportlet/customportlet_synergy.JPG

 

 


To checkout the websynergy code base

Project Websynergy is Sun's next generation portal using Liferay Portal Server, GlassFish v3, and MySQL

Steps to checkout the websynergy code base :

1. Download the svn utility from http://subversion.tigris.org/files/documents/15/41686/svn-1.4.6-setup.exe

2. Edit the servers file to add your respective proxy server which is  under the location C:\Documents and Settings\<windows user>\Application Data\Subversion . A Sample "servers" file is available at the following location. Just replace the tag "<Add your proxy name here>" with your proxy.

http://blogs.sun.com/siddeshkamath/resource/synergy checkout/servers

3. Note, sometimes the Subversion directory wont be present under C:\Documents and Settings\<windows user>\Application Data until you restart the machine

4. Download and install ant from the location : http://apache.cs.utah.edu/ant/binaries/apache-ant-1.7.0-bin.zip

5. Download and install JDK 1.6

6. Add a system variable JAVA_HOME = C:\Program Files\Java\jdk1.6.0

7. Add a system variable SVN = C:\Program Files\Subversion\bin\svn

8. Add the jdk path (C:\Program Files\Java\jdk1.6.0\bin) to the path variable

9. svn co http://mercurial.sfbay.sun.com/svn/repos/e2demo/synergy synergy

10. cd to the synergy directory and run ant

11. Once the ant is successful, cd to the directory synergy\install\image\glassfish\bin and run asadmin.bat start-domain

12. Wait for 1 or 2 mintues for the jsps to compile and run the websynergy portal by accessing http://localhost:8585  (user : paul@example.com password : paul)

 


A conversation with Joe Polastre, CTO of Sentilla Corp about Java powered wireless accelerometers

I knew that I could put Java in my car, in my cell phone, on my badge and on my 'puter.  But I didn't know someone can put it into supertankers or on my belt.     Why would anyone want it on my belt anyway?

Just a short conversation with CTO Joe Polastre about Java-powered devices at the JavaOne show.  Sentilla was one highlight of the show.   Cool stuff.  Go Stevie!


Top 10 JavaOne 2008 Rich Client things


Here's my top 10 list from Java on the client at JavaOne this year. Enjoy x 10 !

Top 10
What is it ?
Know more...
JavaFX SDK
The JavaFX SDK is (almost) here !
Hot demos (there were quite a few) and a cool new website are all good, but signing up for the SDK to get it next month or so is going to be awesome. Its built with Java, built on Java. Its built in Java.
JavaFX can run parleys.com. Did I mention its fast ?
JDK 6 is everywhere
JDK bundled with Linux, JDK 6 for Mac
On stage, I mentioned that the JDK, from the OpenJDK JDK6 project, is bundled with the latest release of the Ubuntu distro. Since then, its started shipping inside Red Hat's Fedora 9, and Red Hat's Enterprise Lunix too. Who's next ?
And, have you tried the JDK 6 release for OS-X yet ?
The Consumer JRE
Get the latest beta of JRE 6u10, its quick, quick, quick. Quick to download, quick to install, quick to start applets.
Applets that you can pull out of the web page. Applets that can live beyond the browser and drop onto the desktop. Applets that developers can write in Java or designers can write in JavaFX Script. See and believe that applets are back.
VisualVM
Get the release candidate of THE single cockpit for watching, diagnosing and tuning Java applications. If you thought JConsole was cool, you need to check VisualVM out. It integrates all the management and profiling tools for Sun's JDK into a graphical environment. See it for yourself.

On2 Media and JavaFX
Cross screen video, cross device sound.
Finally, one rich media format you can depend on that spans all the devices you own. Because it'll be built into JavaFX.
JavaFX Tools
First views of new tooling.
You've had the NetBeans support for nearly a year for JavaFX Script - and Eclipse support for that matter - but we previewed a new tool called JavaFX Distiller (see here: jump to minute 14). If you've ever written a GUI, and needed a little artistic help from a visual designer, this is one you need to know about.
Java ME LWUIT
Making better looking applications easier on today's Java ME devices.
This is a new open source community project in early access to add some portable fit and finish to your MIDP 2.0 applications. Shrinking some of the familar core pieces of the Swing framework, all you need is the NetBean Mobility pack to get started with it.
Java SE 7 sightings
Modularity, OSGi and turbo charging multiple languages I talked with Bob about some of the pieces we'd like to include in Java SE 7 that are progressing well. Here also are my session slides with more detail. In particular, the Java Module System, and its support for OSGi in JDK 7 (which is gaining some encouraging support) and the DaVinci project for accelerating multiple language support which has started producing prototypes.
BluRay, Java and Neil Young
Java as foundation for HD content.
In January, BluRay emerged as the winner of the biggest format war for a generation. So just in case you didn't know BD-J, the programming model for interactive BluRay content (so its on all the BluRay players), is based on Java ME (Personal Basis Profile, to be precise), and Neil Young announced he's releasing his full catalog on BluRay, using BD-J to provide all the interactivity.
Java SE Performance
Latest high performance release of Java SE
Its tuned for the racetrack and breaking records !




GlassFish V3 - Using JDBC Connection Pool / JDBC Resource / MySQL


This blog talks about creating a JDBC Connection Pool and an associated JDBC resource with MySQL as the Database vendor.

The
default database "sakila" of MySQL is used in this example. All these
could be done so easily with Netbeans 6.1 after installing the
GlassFish V3 plugin. 

This screencast explains how to create a JDBC Connection pool in the
administration console and its associated JDBC resource. It also shows
a HelloWorld web application that used this resource to get some values
from a table in sakila database.

Watch the screencast :

 

GlassFish V3 TP2 JDBC 

Download GlassFish V3 TP2 from https://glassfish.dev.java.net/downloads/v3-techPreview-2.html
 


Sun in Wired's Jargon Watch
Congrats to Jim Mitchell and crew for getting Sun into Wired's Jargon Watch for the June 2008 issue. Perhaps a dubious honor (and a dubious definition), but fun all the same.
Macrochip
n. An array of microchips connected by lasers, enabling them to communicate at the speed of light and effectively function as a single processor. Sun Microsystems secured $44 million from DARPA to build a prototype; it should extend Moore's law.

The Post-Literate age?
The Economist has an interesting column today on literacy in the age of digital media. They do the usual bemoaning of how graphical user interfaces and digital media are to blame for the dumbing down of our culture and reading abilities, but do offer some interesting counterpoints. For example:
Cultural observers bemoan the way electronic media—with their demand for spectacle and brevity—have shortened our attention spans. But as a blogger on Eastgate.com noted recently, that equates brevity with debased taste, and sees patience for long stories as a mark of high culture. But if brevity is to be deplored, what should we make of haiku, sonnets, and ink-brush calligraphy?

On the other side of the coin, lengthy sagas are not the sole prerogative of the literary elite. Pop culture has its share of huge tales—witness the Harry Potter canon. Indeed, for every pared-down presentation pumped out by the electronic media, an engaging narrative can be found.
But I particularly like the following:
[T]he quest for truth has given way to the quest for making sense of the world as experienced. For anyone under the age of 20, the world being experienced is one where the internet has always existed, and where everyone who matters is only a click, speed dial or text message away. “Tomorrow’s adults,” says Mr Federman, “live in a world of ubiquitous connectivity and pervasive proximity.” Their direct experience of the world is wholly different from yours or mine.
...
[T]eenagers of today ... are skilled in making sense not of a body of known content, but of contexts that are continually changing.

Teachers must recognise that our pedagogical tools are inconsistent with the skills needed to survive in a world where people are always connected to everyone and everything. In such a world, learning to think for oneself could well be more important than simply learning to read and write.

I couldn't agree more with the assessment of how people's experience of the world is changing. I also place an extremely high value on being able to think for oneself. But I'm not quite ready to give up the ability to read and write; I still view the ability to articulately communicate as a pre-requisite for success. After all, someone has to craft the concise soundbites.

Andy Bechtolsheim to Keynote Sun HPC Consortium in Dresden

The preliminary agenda for the Sun HPC Consortium has been published on their conference site. Andy Bechtolsheim, Sun co-founder and Chief Architect, will keynote the event.

The Sun HPC Consortium is an independent, volunteer-organized, international group of member organizations that own or use Sun computer systems with emphasis on high-performance, technical computing, and visualization.

Participants represent a broad range of computing applications and environments. The meeting format is designed to give participants the opportunity to present HPC developments, discuss applications and needs with their peers, and to hear and provide feedback on Sun's engineering plans.

Who should attend:
All Sun scientific, engineering, or research computing customers or anyone interested in high-performance computing on Sun technologies. Each meeting is designed to address a wide range of intrests from application developers to CIOs and VPs of Research. Registration site


My money's on tacgnol

200805161754

Technorati Tags:


Your Own (Virtual) GlassFish Memory Stick...

Maybe you were lucky and managed to get one of the nice GlassFish memory sticks during JavaOne. But, if you didn't, here is your oppty: Jen, who put together the content for the original memory sticks has posted the same content in her blog. Just follow the links from her "Fish Stick Anyone?" writeup.

ALT DESCR

The virtual memory stick includes GlassFish v3 TP3, GlassFish v2UR2, MySQL, NetBeans, Hands-on Labs, WebSynergy, Screencasts, Documentation, Blogs, and more. It looks very complete.

The World Wide Web - the ultimate (virtual) memory stick! :-) or, strictly speaking, USB flash drive...


Virtualization: Opportunity or Challenge

Charlie Babcock over at InformationWeek has a new article out today that dives into a number of issues around virtualization.  It's worth a read.  First, it gives a good overview of Desktop Virtualization.  In particular, he goes into a case study of how Cincinnati Bell is using Sun's VDI software stack and SunRay thin clients to get rid of 3,300 desktop PCs!  I sat in on a discussion with a large Wall Street customer yesterday who's just started a pilot with VDI.  It solves so many problems for their trading floor applications -- a very demanding area.  I can't wait to see what they do with it.

The article also goes into one interesting area of I/O virtualization, and talks about startup Xsigo.  It looks like they're doing some interesting things.  I recently found out my neighbor works there, so maybe I'll have to walk up the street and hear more about what they're up too.

Lastly, the article goes into the dark area of virtaulization security.  That's something we've been thinking a lot about lately too in xVM-land.  In fact, the other day the xVM CTO, Mike Wookey came into my office and talked to me about the new rage in virtualization security: Hyperjacking.  The term itself is so cool it belongs in a William Gibson novel.  I'm glad we have really smart people looking at the security of our own hypervisor offerings.

So many things to think about.  Virtualization is changing the IT so rapidly.  Will we even recognize a modern data center ten years from now?


Critter (Not Quite) Thursday

OK, so I got busy yesterday and missed Critter Thursday. Fear not! I was really waiting around for just the right thing, and Huffington Post was kind enough to compile the week's five cutest animal videos. While "cats on a treadmill" is a classic (and there are plenty more where that came from on YouTube), the doberman and the waterslide is my favorite.

Happy weekend.


DefaultTreeModel -- Adding, Removing and Updating Nodes
Many moons ago I had a discussion with Collin Fagan (Java Tutorial contributor and all around helpful guy) about the fact that I had seen some requests for a tutorial on how to add, remove and update nodes in a DefaultTreeModel.

Collin wasted no time creating such an example. Unfortunately, resources being what they are, I wasn't able to get engineering cycles for reviewing the example. Because we generally don't include material that hasn't been reviewed by engineering, it was backburnered.

Meanwhile, Collin posted his example and some accompanying text, The Secret Life of a DefaultTreeModel on JavaLobby.

Collin has now posted his example on the JavaTutorials forum!

When you compile and run the example (it will run under JDK 5) it brings up a panel containing a tree with a root node. When you open the root node you'll see three child nodes. At this point you can right-click any of the nodes (control-click on a Mac) and you can add 50 children to the current selection, remove the current selection, or modify the text on the current selection.

Thanks for this very useful example, Collin!

-- Sharon Zakhour
Riddles with EJB 3.1

EJB 3.1 aims to further simplify EJB programming model, introducing a series of new features like no-interface local view, .war file packaging, singleton bean, cron-like schedule-based timer, asynchronous invocation, etc.  Some of them have already been implemented by GlassFish V3.  Ken's blog has more details on many proposed new features in EJB 3.1. Mahesh from GlassFish EJB container team gave a preview of EJB 3.1 container in GlassFish v3 TP2.  In this post, I will share a riddles webapp to showcase the use of certain EJB 3.1 features and how they interact with web-tier components like Servlet, JSP, and JSTL.

1, Download GlassFish V3 Technology Preview 2 (TP2) at GlassFish download page.  See the installation instructions for installation steps, and the Quick Start Guide to get up and running quickly. 

For NetBeans 6.1 users, this can be completely automated with GlassFish V3 plugin (see ludo's blog).  Eclipse plugin for GlassFish V3 TP2 is also available (see Arun's blog).

2. Install EJB container on top of V3 TP2 by running <glassfish_home>/bin/updatetool.  Follow on-screen instructions, and choose to install glassfishv3-ejb from Available Add-ons.

3. Start V3 TP2 by running <glassfish_home>/bin/asadmin start-domain, or from within NetBeans or Eclipse.

4. Create a webapp named riddles.  The exact steps vary depending on IDE, but it simply contains:

The stateless bean class RiddleBean is annotated with @Stateless but implements no interfaces.  All public methods (only getRiddle method in this case) in the bean class and its superclasses are exposed as business methods.  @PostConstruct method is invoked after the bean instance is created and before any business method invocation.  It initializes riddle data in classpath with class.getResourceAsStream().

@Stateless
public class RiddleBean {
public Riddle getRiddle() {
String data = riddleData[rand.nextInt(riddleData.length)];
return new Riddle(data);
}

@PostConstruct
private void postConstruct() {
//read riddle data with getResourceAsStream
}

RiddleServlet acts as the client of RiddleBean EJB, a reference of which is injected into RiddleServlet.  With no-interface local view, the client references EJB with its bean class type.  But the client must still obtain the reference either through injection or lookup, not new operator.

The servlet does not create any response; it merely sets the injected bean reference into application scope so that it is available for JSP pages.  The purpose is to demonstrate the use of @EJB injection.  Alternatively, this servlet can be replaced with a context listener or filter, or totally removed by declaring <ejb-ref> in web.xml.

public class RiddleServlet extends HttpServlet {
@EJB private RiddleBean riddleBean;

protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
getServletContext().setAttribute("riddleBean", riddleBean);
getServletContext().getRequestDispatcher("/riddle.jsp";).forward(request, response);
}

riddle.jsp shows how easy it is to invoke EJB methods with JSP expression language (EL) , without using any java code.  The expression ${riddleBean.riddle} has the same effect as calling riddleBean.getRiddle().  The return vaue, a value object of type Riddle, is stored as riddle in page scope.

<c:set var="riddle" value="${riddleBean.riddle}" scope="page" />
... ...
<p><h4>Q: ${riddle.question}</h4></p>
<p><h4>A: ${riddle.answer}</h4></p>

In your project, EJB source files reside in the same place as servlet and other web component classes.  With .war packaging, EJB classes can be packaged under WEB-INF/classes or inside a jar file under WEB-INF/lib, just like any other .war classes.  It's no different than an ordinary .war, with no EJB interfaces (not even local business interface), no ejb-jar.xml, no ejb-jar, and no EAR.  This is the content of the war file after building the project:

WEB-INF/classes/riddle/Riddle.class
WEB-INF/classes/riddle/RiddleBean.class
WEB-INF/classes/riddle/RiddleServlet.class
WEB-INF/web.xml
riddle.jsp 

As for the riddle data file riddles.txt, you can package it inside the .war as WEB-INF/classes/riddles.txt.  Or you can jar it up as riddles.jar and copy riddles.jar to $GLASSFISH_HOME/domains/domain1/lib.  Any jars in this directory will be made available to all apps in domain1.  In GlassFish V2, I used to directly copy classes and resources to domain1/lib/classes without the wrapper jar, but this doesn't seem to be supported yet.  riddles.txt must follow certain format to be parsed properly (A: Q: %):

FORTUNE PROVIDES QUESTIONS FOR THE GREAT ANSWERS:
A: To be or not to be.
Q: What is the square root of 4b^2?
%

In my Ubuntu machine, I just use /usr/share/games/fortunes/riddles file.  riddles.war with sample riddles can be downloaded here.

5. Deploy riddles.war using autodeploy or asadmin deploy:

cp riddles.war $GLASSFISH_HOME/domains/domain1/autodeployor 
$GLASSFISH_HOME/bin/asadmin deploy riddles.war

Optionally, verify that the .war is deployed with

 $GLASSFISH_HOME/bin/asadmin list-components

6. Play riddles with EJB 3.1 at http://localhost:8080/riddles/

Riddles with EJB 3.1 snapshot


Exploring Sun's xVM VirtualBox

If you're like most people, when it comes to Virtualization you've probably heard the names VMware or Xen.

There is a new name in town, VirtualBox. VirtualBox

VirtualBox is a family of powerful x86 virtualization products for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL). See "About VirtualBox" for an introduction.

Since being acquired by Sun Microsystems, VirtualBox Version 1.6  is the first major release since the acquisition.

Version 1.6, has new host platform support, for Mac and Solaris, as well as new high performance virtual devices, and improved scalability.

VirtualBox also runs on Windows, Linux, Macintosh and OpenSolaris hosts and supports a large number of guest operating systems including but not limited to Windows (NT 4.0, 2000, XP, Server 2003, Vista), DOS/Windows 3.x, Linux (2.4 and 2.6), and OpenBSD.

 
Well let's give it a look!  In this exercise, I already have VirtualBox installed, and wanted to create two local VM's (local machines). Part I OpenSolaris 2008.05, and Part II Windows XP

Equipment Used:

  • Toshiba M9 laptop
    Intel® Core™2 Duo Processor
    4gb memory

You'll first need to download VirtualBox, by clicking here.

Select the Platform and Language you desire. In my case since my Toshiba M9 laptop has a Intel dual core proccessor, and running Solaris Nevada Build 87, I selected the Platform OpenSolaris AMD64.

With VirtualBox, you can run unmodified operating systems – including all of the software that is installed on them – directly on top of your existing operating system, in a special environment that is called a “virtual machine”. Your physical computer is then usually called the “host”, while the virtual machine is often called a “guest”.

Part I

Step1: Let's start by launching Sun xVM VirtualBox.

 root@sunrise8 # /opt/VirtualBox/VirtualBox

You will now see the Welcome to VirtualBox window

Click image to enlarge 

Step2: Let's create a new virtual machine. Start by clicking on the New button in the VirtualBox. You now get a dialog window stating, Welcome to the New Virtual machine Wizard box! Select the Next button.


Click image to enlarge

Step3: In the VM Name and OS Type dialog window, give the name to the new Virtual Machine and the OS Type. In this case you'll notice the name I've selected is OpenSolaris2008.05 and the OS Type I've selected from the OS Type drop-down menu is Solaris. Now click the Next button.

Click image to enlarge 

Step4: In the Create New Virtual Machine Memory dialog you can adjust the memory size of your virtual machine. You'll notice it gives you a recommended base memory size of 512mb. In this case I've chosen to give this virtual machine 1024mb or 1gb. You do this by moving the Base Memory Size Slide Bar or just change the number in the associated box. After making your the necessary changes click the Next button.

Click image to enlarge

Step5: In the Create New Virtual Machine Virtual Hard Disk dialog, you will select the image to be used as the boot hard disk for the virtual machine. You can either create a new hard disk using the New button or select an existing hard disk image from the drop-down list or by pressing the Existing button to invoke the Virtual Disk Manager dialog.

In this case I will choose New to create a new hard disk.

Click image to enlarge

Step6: The Welcome to the New Virtual Disk Wizard dialog will appear which will help you create a new virtual hard disks image for your virtual machine.

In this case we will using the Next button to go to the next page of the wizard.

Click image to enlarge

Step7: The Virtual Disk Image Type dialog window, you will now have two choices for your virtual disk image type. You can have either a dynamic expanding image, or a fixed-sized image. Please read the captions for each choice. Choice wisely!!!

In our case here, since I have enough disk space, we'll choose the dynamic expanding image.

Click image to enlarge

Step8: In the Virtual Disk Location and Size dialog you can press the select buttonto select the location and name of the file to store the virtual hard disk image, or type the file name in the entry field.

In our case shown here the Image File Name was pre-selected for us call OpenSolairs2008.05.  Also in this dialog window you will select the size of the virtual hard disk image in megabytes. This size will be reported to the Guest OS as the size of the virtual hard disk.

By default the wizard has chosen 16.00gb for our virtual hard disk image size. I will change this to 10gb for this exercise. Then click the Next button

Note: If you selected dynamic expanding image in the previous Virtual Disk Image Type dialog window above, the size of the image that is created here will not necessarily be 10gb, but could expand if needed to the full 10gb size. Keep your disk space in mind!!!!

Click image to enlarge

Step9: The Create New Virtual Disk Summary dialog window will appear to give you a summary of the how your new virtual hard disk will be created.

The following screen shows your virtual hard disk image parameters. You can go back and change things if you'd like or in our case we will click the Finish button.

Click image to enlarge

Step10: The Virtual Hard Disk dialog showing the Boot hard Disk (Primary Master)

This dialog well show you the path to the Virtual Hard Disk Image file. Click the Next button. 

Click image to enlarge

Step11: The Create New Virtual Machine Summary dialog will now show you the parameters of your new soon to be created virtual machine.

Click the Finish button 

Click image to enlarge

Note: To conserve the amount of reading in this post, I repeated Step1 through Step11 for my Windows XP virtual machine.

The next screenshot of the Sun xVM VirtualBox now shows the two Virtual Machines that are ready to be created and loaded.

Click image to enlarge

Step12: From the Sun xVM VirtualBox dialog window, in our case here, we will need change some details shown on the right in the dialog window. For installing the the OpenSolaris2008.05 OS image and the WIndows XP image we will click on the CD/DVD-ROM details link and change the following parameters.

Note: I ignored the following error dialog box that appeared, warning me about the USB Proxy Service has not been ported to this host. I just clicked OK to move ahead.

In the OpenSolaris2008.05 Settings dialog window, I've selected the Mount CD/DVD-ROM checkbox, and the ISO Image File checkbox. Click the Select folder next to the drop-down  box, to tell the installer the location of the OS image file. The Virtual Disk Manager dialog will open where you can added image locations. After adding the location of the image, click the Select button, then you can click the OK button, in this case the OpenSolaris2008.05 Settings dialog window.

Click image to enlarge

Step13: Now you will see the Sun xVM VirtualBox dialog window with changes you made above, showing the details of the new OpenSolaris2008.05 virtual machine.

Highlight the Virtual Machine you want to install and click the Start button.

Click image to enlarge

After clicking the Start Button you will now see the following informational dialog box. As you will notice the Auto capture keyboard option is turned on. this will cause the Virtual Machine to automatically capture the keyboard everytime the VM window is activated and make it unavailable to other applications running on your host machine. You can press the host key identified here as the Right Ctrl key to uncapture the keyboard and mouse. Please read it carefully, and click the OK button

Click image to enlarge

Step14: After clicking the OK button in the VirtualBox - Information dialog, you will now begin the installation of the OS for the new Virtual Machine. You will be asked several questions before the OS actually starts loading. For this first installation we will be installing OpenSolaris 2008.05 release. Select OpenSolaris 2008.05 in the Grub menu, and hit enter.

Click image to enlarge

After selecting OpenSolaris 2008.05 from the Grub menu, You'll now be prepare the live image for the new virtual machine for installation. On the new screen you will be asked to select a keyboard type. The default is 41 US English. For this exercise we'll take the default.

Click image to enlarge

Now you'll be asked to select the desktop language you'd prefer. The default is English.  In this case we'll take the default!! The system will now start configuring the devices, mount local partitions/cdrom, and read ZFS configuration.

Click image to enlarge

After the virtual machine is configured you will see the following VirtualBox Informational dialog appear. Read the dialog for virtual machine optimization, and click OK to accept. After clicking the OK.

Click image to enlarge

Please read the "OpenSolaris License". When finished click the Close button

Click image to enlarge

After reading the "OpenSolaris License", your OpenSolaris 2008.05 Virtual Machine is running and ready to be installed with you Operating System. As shown below. Let's start by shutting down the virtual machine and restart it. From the Systems drop-down menu select shutdown

Click image to enlarge

To restart the new OpenSolaris 2008.05 virtual machine, from the VitualBox widow select the OpenSolaris 2008.05 virtual machine and click the Start button.

Click image to enlarge

Step15: You are now ready to install OpenSolaris 2008.05 release on the Virtual Machine. From the Virtual Machine click on the Install OpenSolaris icon to invoke the OpenSolaris 2008.05 installer. 

Click image to enlarge

You will now be presented with the OpenSolaris 1008.05 Installer dialog window. Read and click the Next button

Click image to enlarge

The installer will now ask you where should OpenSolaris be install? The following dialog window is for Disk partition configuration. For this exercise we will take the default shown below. Click the Next button

Click image to enlarge

 Select Time Zone & Date Information. I've select the appropriate values for the OpenSolaris Virtual machine and clicked the Next button

Click image to enlarge

 You select the appropriate Locale for you OpenSolaris installation, then click the Next button

Click image to enlarge

Next the installer will ask you for the Users information. The Root users password, you will create a new user as welll as naming you system.

Click image to enlarge

A review on the installation settings before proceeding. You have the option of going back to change information. In our case we'll accept the setting and click the Install button.

Click image to enlarge

Installing OpenSolaris 2008.05 on your Virtual Machine.

Click image to enlarge

Your installation of OpenSolaris 2008.05 is now complete. As stated review the OpenSolairs install log for information. You now must reboot to start the system. However first I found you needed to quit and shutdown the virtual machine and unmount the ISO image or it will just read the mounted information and try to install again. So click on the Quit button, the install dialog window will go away. 

Click image to enlarge

Now select System and shutdown your virtual machine. 

Click image to enlarge

From the Sun xVM VirtualBox window, click on the CD/DVD-ROM link the following OpenSolaris2008.05 Settings dialog window will open.

Click image to enlarge

Uncheck the Mount CD/DVD-ROM drive checkbox to unmount the ISO Image.

Click image to enlarge

Step16: From the Sun xVM VirtualBox window, highlight the Virtual Machine you want to Power-on and click the Start button. In this case we'll highlight the newly installed OpenSolaris2008.05 virtual machine.

Click image to enlarge

Again by clicking the Start button, this will Power-on the new OpenSolaris2008.05 virtual machine, and you will again see the familiar VirtualBox informational dialog box. As you will notice the Auto capture keyboard option is turned on. this will cause the Virtual Machine to automatically capture the keyboard every time the VM window is activated and make it unavailable to other applications running on your host machine. You can press the host key identified here as the Right Ctrl key to uncapture the keyboard and mouse. Please read it carefully, and click the OK button

Click image to enlarge

Step17: After clicking the OK button above your virtual machine, will now be running and you will be presented with the Grub menu showing your new VirtualBox boot environment. Shown here. Select the OS from the Grub menu and boot OpenSolaris2008.08.

Click image to enlarge

OpenSolaris 2008.05 should now be boot as shown below here.

Click image to enlarge

Step18: Now that we have OpenSolaris 2008.05 booted, let's log in using the userID and password (or the Root User), we created when we installed the OpenSolaris2008.05 Operating System.

Click image to enlarge

This next screenshot, I've launched a terminal window showing I've successfully booted a VM running OpenSolaris on a ZFS root filesystem.

Click image to enlarge

There you go, "Basic VirtualBox in a Nutshell"   Part II Running Windows XP in a VirtualBox VM next post.

 


Download & Run: WebSynergy - Demonstrating AMI update from ZIP on S3

In this type of AMI image use, I will send a control data in form of ZIP file to AMI on instance start which will download from S3 prepackaged and zipped application stack, this way we don't need to rebuild AMI and we can update it on boot time.

This entry is part of Warm welcome: OpenSolaris on Amazon EC2 !

As as prepackaged and zipped application stack I select already build platform neutral Java based demo of WebSynergy, its sized around 120MB so it have size close to your real application stack.

WebSynergy is Sun's next generation web aggregration and presentation platform containing OpenPortal components.
This platform demo includes developer tooling and an enterprise grade presentation runtime based on Liferay Portal Server, GlassFish v3, and MySQL.

Project WebSynergy - Liferay and GlassFish Deliver a Modern Web Portal

Project WebSynergy details

Installing and Using Project WebSynergy

First: Make data zip file accessible locally and create control scrip, zip it

1. Get WebSynergy demo and save it locally into S3

Note: Reason is then we need to have download time under our control , S3 to EC2 give 12MB/s !!!

Got glassfish-synergy.zip

Make it available as S3 download under link:

Note: Current early access of WebSynergy use embeded Java based database, not MySQL server.

  http://sun-osol-sw.s3.amazonaws.com/glassfish-synergy.zip

2. Create control scrip

cat syncer.run
#!/bin/bash

# !!! You need to use full path to bins in SMF scrips !!!
# More info about composite AMI images tips see blog http://blogs.sun.com/VirtualGuru

echo "syncer.run got $1"
. /opt/ec2ify/rundata/ec2envs.run
case $1 in

 'start')
   echo "Downloading glassfish-synergy zip image "

/usr/bin/curl --connect-timeout 1100 --retry 5 --retry-delay 2 \
 http://sun-osol-sw.s3.amazonaws.com/glassfish-synergy.zip -o /tmp/glassfish-synergy.zip

 if [ $? -eq 0 ] ; then
   echo "Got OK receive glassfish-synergy zip image "
   curr_dir=$PWD
   cd /opt
   /usr/bin/unzip /tmp/glassfish-synergy.zip

     if [ $? -eq 0 ] ; then

      echo "Unpack OK glassfish-synergy zip image"
      rm -f /tmp/glassfish-synergy.zip
      /opt/glassfish/bin/asadmin start-domain

     else
      echo "Can't unpack glassfish-synergy zip image"
    fi
   cd $curr_dir
  else
   echo "Can't receive glassfish-synergy zip image"
  fi
;;
esac
exit 0

3. Create control file zip

  zip load-gf-websynergy.zip syncer.run 

Second: Run JeOS AMI instance with control ZIP file to load and start app stack

1. Download control ZIP file

 http://sun-osol-sw.s3.amazonaws.com/load-gf-websynergy.zip

2. Find JeOS Solaris instance

ec2-describe-images | grep JeOS
IMAGE   ami-7b49ac12    sun-osol/2008.05_JeOS_32_1.0.img.manifest.xml   327216928991    available       private         i386    machine

3. Open ports for WebSynergy demo

ec2-authorize default -p 8585

GROUP               default
PERMISSION              default ALLOWS  tcp     8585    8585    FROM    CIDR    0.0.0.0/0

ec2-authorize default -p 8686

GROUP               default
PERMISSION              default ALLOWS  tcp     8686    8686   FROM    CIDR    0.0.0.0/0

4. Run AMI instance with control file

 ec2-run-instances -k myec2-keypair ami-8142a7e8 -f ./load-gf-websynergy.zip

RESERVATION     r-71e92d18      327216928991    default
INSTANCE        i-24e42a4d      ami-8142a7e8                    pending myec2-keypair    0               m1.small        
2008-05-16T15:07:40+0000                        aki-b57b9edc    ari-b47b9edd

5. Check then instance is running (Start booting)

 ec2-describe-instances i-24e42a4d
RESERVATION     r-71e92d18      327216928991    default
INSTANCE        i-24e42a4d      ami-8142a7e8    ec2-67-202-55-40.compute-1.amazonaws.com        ip-10-251-67-69.ec2.internal    
running ec2-rk159669-keypair    0               m1.small        2008-05-16T15:07:40+0000                        aki-b57b9edc    ari-b47b9edd

6. Login and check update process

 ssh -i id_rsa-myec2-keypair root@ec2-67-202-55-40.compute-1.amazonaws.com

 svcs -l svc:/ec2ify/me:default
fmri         svc:/ec2ify/me:default
name         Amazon EC2 ec2ify me script - updating Solaris image for Amazon AWS infrastruture
enabled      true
state        online
next_state   none
state_time   Fri May 16 17:19:00 2008
logfile      /var/svc/log/ec2ify-me:default.log
restarter    svc:/system/svc/restarter:default
dependency   require_all/none svc:/system/filesystem/local (online)
dependency   require_all/none svc:/network/service (online)

cat  /var/svc/log/ec2ify-me:default.log | more

  inflating: glassfish/bin/startserv
  inflating: glassfish/bin/stopserv
Unpack OK glassfish-synergy zip image
Command start-domain executed successfully.
[ May 16 22:54:45 Method "start" exited with status 0. ]

7. Check Glassfish server is fully start

tail -f /opt/glassfish/domains/domain1/logs/server.log

You will a lot of deploy lines, start is finished when you see:

[#|2008-05-16T21:46:57.779-0500|SEVERE|GlassFish10.0|null|_ThreadID=13;
 _ThreadName=Thread-5;| INFO [DefaultQuartzScheduler_Worker-5] 
 (PluginPackageUtil.java:1140) - Reloading repositories
^C

8. Go to Dynamic URL

http://ec2-67-202-55-40.compute-1.amazonaws.com:8585/

9. Load of main page will take while, jsp are compiled

You can monitor system load to se when page will come to browser

top
q for quit top

10. Login with one of predefined user roles

See more about predefined roles at:

Installing and Using Project WebSynergy

If you are interesting this AMI updates approach, drop me note, I can create another samples.


JavaFX como plataforma de aplicativos RIA

O JavaOne terminou na sexta-feira. Lidamos com indivíduos do mundo todo e de todos os setores: equipamentos eletrônicos domésticos, jogos, TI empresarial, exploração espacial, automação de manufatura, indústria automotiva, setor acadêmico. Assim como a própria rede, Java tem algo a oferecer para quase todos, em qualquer lugar.

O enfoque dos maiores anúncios este ano foi o papel do Java no futuro dos RIAs (Rich Internet Applications). O que é um RIA? Depende da sua perspectiva: a meu ver, é qualquer aplicativo conectado à rede que persista face ao usuário, geralmente fora do navegador, e que funcione quando desconectado da rede.

Por outro lado, eu diria que o Java sempre foi uma plataforma RIA, mesmo antes que tal coisa fosse necessária. Os primeiros applets Java proporcionavam interatividade, porém em troca de complexidade de desenvolvimento e, no início, de desempenho – isso quando um navegador, e mais recentemente o Javascript, já seria suficiente.

Contudo, aplicativos baseados em navegador estão alcançando os limites de complexidade e desempenho, e os proprietários de conteúdo têm como meta obter um nível melhor de interação (por meio de vídeo de alta definição ou interatividade avançada). Desenvolvedores têm buscado algo novo – o navegador é um modelo de programação altamente acessível, porém é um modelo de implementação fraco no caso de aplicativos RIA/desconectados.

Outro fomentador do RIA é a evolução do modelo de negócios – muitas empresas por trás de aplicativos RIA buscam independência de navegadores e mecanismos de pesquisa, cujas configurações padrão e empresas proprietárias representam uma ameaça competitiva. Há um interesse crescente por aplicativos instalados localmente que resultem em uma interação rica, direta e permanente com os consumidores. Ninguém quer pagar pedágio para ir ao encontro de seus próprios clientes.

Tendo isso em mente, ao trabalhar para reinventar a plataforma Java, encontramos um conjunto consistente de requisitos. Vindos não somente de autores de código, mas também de franquias de esporte que buscam uma interação direta com os fãs, empresas de mídia que desejam se libertar das configurações do navegador, artistas, empresas e fabricantes de dispositivos – todos buscam interagir com seus clientes de modo exclusivo via a rede. Esse público tem requisitos similares quanto à plataforma RIA – eles querem uma tecnologia que:

  • Chegue até cada cliente na Internet, em PCs, celulares e novos dispositivos.
  • Forneça alto desempenho e possa atrair profissionais criativos em seu processo de design.
  • Tire proveito de habilidades e infra-estruturas empresariais existentes
  • Seja completamente gratuito e de fonte aberta.
  • Permita aos proprietários de conteúdo controlar e manter a propriedade de seus dados.

Semana passada, durante o JavaOne, abordamos cada uma dessas questões, do seguinte modo:

Em primeiro lugar, desenvolvedores de RIA desejam alcançar todos os consumidores do mundo, via qualquer tipo de dispositivo.

Por quê? Porque o mercado está na frente dos consumidores, qualquer que seja a tela que utilizem para visualizá-lo. Computadores, celulares, PDAs, livros digitais, qualquer coisa. O mercado está em todas as telas do seu dia a dia, não só na do PC.

Para ilustrar isso, só no caso de PCs, a popularidade de Java cresceu muito nos últimos anos, conforme foi medido pelo número de downloads do ambiente de tempo de execução – geralmente, registramos o download de 40 a 50 milhões de novos ambientes de tempo de execução do Java a cada mês, e realizamos a atualização de mais de um bilhão deles por ano. A adoção da plataforma Java excede a adoção do próprio Microsoft Windows – o ambiente de tempo de execução do Java (JRE) é pré-carregado em quase todos os computadores com Windows (da HP, Dell, Lenovo etc.), porém é executado também em computadores Macintosh da Apple e com Ubuntu, Fedora, SuSe, Solaris e OpenSolaris. Além disso, o JRE está presente em bilhões (sim, bilhões) de dispositivos sem fio e móveis, desde painéis de automóveis e dispositivos de navegação até o Kindle da Amazon (você sabia que o Kindle da Amazon é uma plataforma Java)?

Isso significa que a plataforma Java tem mais usuários do que qualquer outra tecnologia de software já criada no mundo.

Em segundo lugar, desenvolvedores de RIA desejam desempenho, funcionalidade E simplicidade.

Por quê? Porque proprietários de conteúdo e desenvolvedores de aplicativo querem captar o interesse dos consumidores e poder contar com artistas e profissionais criativos no fluxo de trabalho.

O histórico do Java em termos de simplicidade não é perfeito – por essa razão, nossas equipes reescreveram o modelo de applet e concentraram-se em assegurar que o novo ambiente de tempo de execução de Java para o consumidor possa ser carregado com excepcional rapidez em uma página da Web, apresente um desempenho notável durante interações complexas e seja facilmente acessível aos consumidores (clique aqui para baixar uma versão beta). Além disso, simplificamos o Java por meio de uma linguagem de script, a JavaFX script, que permite que profissionais criativos interajam com autores de código para criar experiências interativas completas, ao mesmo tempo que adotam a cadeia de ferramentas criativas (desde o design da interação até a manipulação de pixels) usada por designers e artistas digitais no mundo todo.

E tenho o prazer de termos solucionado o problema de instalação em desktop ao separar os applets JavaFX da página da Web com a simples ação de arrastar e soltar (clique na imagem acima para ver uma demonstração). Agora, os desenvolvedores podem ignorar o navegador e instalar com facilidade aplicativos nos desktops: uma vez que o applet é solto na área de trabalho, os proprietários do conteúdo garantem um relacionamento direto com seus consumidores.

Você talvez já tenha visto que estamos adicionando ao Java codecs de vídeo e áudio de alta qualidade completos para todas as plataformas em que é executado – solucionando outro problema dos desenvolvedores de RIA: suporte para mídia baseada em tempo (clique aqui para ver uma demonstração de vídeo de alto desempenho).

Em terceiro lugar, as empresas querem reutilizar suas habilidades e ativos de Java existentes ao migrar para RIA.

Quase todas as empresas empregam programadores com habilidades em Java – ainda é a principal linguagem de Internet ensinada no mundo todo, e encontra-se presente em quase toda a infra-estrutura comercial global. Conforme as empresas se esforçam para atrair o interesse de seus clientes via plataformas RIA, reutilizar habilidades existentes e conectar aplicativos RIA a sistemas existentes proporciona à comunidade Java uma habilidade exclusiva de criar a partir da base existente em vez de tentar substituí-la.

Essa familiaridade também permite que empresas e equipes de desenvolvimento concentrem-se na interação com os consumidores – em vez de irritar a equipe de TI com novos requisitos de infra-estrutura (desenvolvedores de JavaFX simplesmente conectam-se a infra-estruturas empresariais existentes em vez de exigir novos sistemas para os aplicativos RIA).

Em quarto lugar, desenvolvedores de RIA querem plataformas gratuitas e abertas.

Por que gratuitas? Porque desenvolvedores não querem complicar seus aplicativos com dependências que envolvam royalty, nem usar tecnologias que predefinam onde os consumidores podem aparecer. Você não cria comunidades de desenvolvedores em torno de fonte fechada, e sim cria comunidades de usuários e essa é uma situação em que a seleção e adoção dos desenvolvedores definirá o mercado de RIA. O JavaFX, como todas as plataformas de software da Sun, será disponibilizado gratuitamente como fonte aberta, e será lançado por meio da licença GPL (v2).

E não pense que software gratuito e de fonte aberta é atraente somente para os alternativos tatuados... estamos vendo um aumento notável de países em desenvolvimento buscando software de fonte aberta através de departamentos de compra governamentais e acadêmicos. Por quê? Para proteger o direito de escolha e criar oportunidades inerentes – não há motivos para criar a dependência de software proprietário quando isso pode ser evitado.

Por fim, admitamos, o valor real de Web 2.0 está nos dados - e não no aplicativo. E esses dados são SEUS.

Se você analisar o espaço de mídia social cuidadosamente como nós temos feito, entenderá o valor da instrumentação e intenção ao criar um negócio na Web. Saber o que os usuários estão fazendo com seu produto, seja ele uma liga de críquete fictícia ou um aplicativo de transação bancária, permite o surgimento de mais modelos comerciais inovadores, o fornecimento de serviços de maior valor, o posicionamento de anúncios mais eficaz – dados permitem a tomada de decisões informadas e o aumento do valor de um produto (além, claro, de um CPA mais alto).

Contudo, a maioria dos aplicativos RIA é criada e então implementada cegamente. Os desenvolvedores que ultrapassam os limites do navegador perdem o acesso a informações sobre o que os usuários fazem com o produto ou têm de depender de um provedor de tecnologia que acaba se infiltrando em seu fluxo de dados. E alguns desses provedores de tecnologia são concorrentes dos desenvolvedores de conteúdo.

Através de um projeto com o codinome Project Insight, vamos aprimorar a plataforma Java para permitir que desenvolvedores coletem o fluxo de dados gerado por seu conteúdo RIA. Os desenvolvedores de JavaFX poderão se concentrar em seus modelos de negócios em vez de ter de aprimorar os dos outros.

_______________________

Com isso tudo em mente, o que representa o sucesso do JavaFX para a Sun?

Por definição, ele vale mais para a Sun do que a adoção da plataforma de terceiros (conhecido como "valor de opção positiva") - e a infra-estrutura proprietária usada para servi-la (não se esqueça de que os RIAs contam com backends de Internet avançados). E no mundo de RIA, todas as opções serão gratuitas, sempre – essa não é uma corrida a ser ganha no preço.

Na minha opinião, a plataforma com maior chance de vencer é aquela que liberta os desenvolvedores para que alcancem mercados, oportunidades e experiências de usuário a seu critério, e não a critério dos fornecedores. E libertar desenvolvedores é o que fazemos melhor. É parte do DNA de tudo que criamos.

Desenvolvedores, saibam mais em JavaFX.com. E não deixem de conferir o NetBeans - assim como o próprio Java, ele começa a revolucionar o mundo livre...


ForumPA: LA Rivoluzione dell'Identità Digitale

15 Maggio 2008.  Ho avuto il piacere partecipare al ForumPA, a rappresentare Sun Microsystems, nell'ambito della tavola rotonda sul tema dell'identità federata per le due principali iniziative che riguardano SPCoop ed ICAR. La tavola rotonda ha avuto l'obiettivo di mettere in evidenza "L'Identità federata vista dal mercato e dalle società in house" ed ha visto la partecipazione, anche, di Andrea Garmignani (IBM), di Lucio Forastieri (Sardegna IT), di Vittorio Gallinella (LAit) e di Oscar Sovani (Regione Lombardia) con il ruolo di moderatore.
Il modello di federazione proposto da ICAR INF-3 è caratterizzato da una architettura  “User-centrica”.  Questa caratteristica è funzionale alla complessità della pubblica amministrazione rispetto alle modalità di erogazione dei servizi, per cui un utente che intende accedere ad un servizio è esso stesso parte del protocollo (in letteratura si definisce “people in the protocol”). La condizione necessaria e sufficiente per indirizzare un modello user-centrico sono il rispetto delle seguenti caratteristiche:

  • User consent - si da all'utente l'abilità di consentire (oppure no) lo scambio di informazioni.
  • User control - si riferisce all'abilità di un utente di definire una policy che governa lo scambio ad un livello granulare.
  • User centrism - è riservata ad un particolare classe di utenti in cui lo scambio dell'informazioni è sotto l'assoluto controllo del utente.

Al link seguente trovate la presentazione relativa mio intervento, dal titolo "Approccio all'identità federata per un modello user-centrico: La soluzione Sun tra Visione ed Innovazione", in cui  s'illustra il modello concettuale proposto da Sun (vedi figura sotto) che attraverso un approccio olistico mira ad indirizzare sia il tema della centralità dell'utente che gli aspetti di governance della gestione del ciclo di vita dell'identità e dei ruoli.

Modello Sun per ICAR-INF3

Come Sun, abbiamo tenuto a precisare che l'elemento fondamentale al successo dell'iniziativa (architettura federata e policentrica) è il rispetto degli standard, in particolare di SAML e che le specifiche d'interazione nel modello ICAR INF-3 devono soddisfare i profili d'interoperabilità definiti dagli standard stessi.

Ulteriormente, si è discusso della necessità di estendere il modello delle interazioni fino ad includere il processo autorizzativo in modo d'aiutare la pubblica amministrazione ad indirizzare le problemache di accesso ai servizi, in cui le policy di autorizzative sono anch'esse distribuite (almeno per quanto riguarda i ruoli ed i profili), attraverso l'implementazione di standard aperti (OASIS) come XACML (eXtensible Access Control Markup Language).

Ho evidenziato come l'estensione del modello verso device mobili (telefonini) è sicuramente uno degli aspetti più innovativi in cui l'architettura federata può evolversi per l'integrazione di una nuova generazione di servizi di mobile Government (mGovernment). Attraverso l'utilizzo d'informazioni di profilo memorizzati all'interno della SIM si consente, quindi, di sfruttare la pervasività dei device mobile con l'aggiunta alla capacità di strong authentication che questi meccanismi sono in grado di realizzare.
Un possibile scenario può prevede l'interazione tra un utente con telefono cellulare (con SIM abilitata ai servizi di profilo personale) e un ente preposto all'erogazione di servizi (eGov). La richiesta da parte dell'utente di un particolare servizio scatena uno scambio di messaggi tra il device mobile e il server, mediante il quale il server è in grado di richiedere informazioni sul profilo personale (memorizzati all'interno della SIM) ed elaborare, quindi, un servizio personalizzato in base a queste informazioni [SAML PAOS].



Social App that Helps Me Work

Thanks to my colleague Terry Sigle who referred Tripit.com to me Tuesday evening. I have been delighted with its real-world features that simplified my work life.

This afternoon, I completed a travel itinerary that required three separate reservations - two through the AMEX travel website and one through a direct call from a hotel. I then simply sent the three reservation emails, untouched, to tripit.com.

Voila! As if by magic, I received an email with a link to a composite itinerary complete with day-by-day weather forecasts, maps and driving directions. I easily verifed that everything was in sync printed out a combined schedule. Plus, all the individual reservations showed up on my i-cal compatible calendar and I easily accessed the itinerary via the mobile Tripit site.

In addition to this capability, Tripit.com has a social networking capability, similar to Dopplr, that allows travellers to link to each other and share travel plans. Please email me at mgd [at] sun [dot] com if you would like to connect and keep abreast of each other's travel schedule.

This, my friends, is great stuff!

Technorati Tags: , ,


Kernel code quality
Interesting artcle about the quality of the kernel source code. Diomidis Spinelli compared the FreeBSD, GNU/Linux, Solaris, and Windows kernels for his article A Tale of Four Kernels:
Despite various claims regarding the efficacy of particular open or close-source development methods, we can see from the table that there is no clear winner (or loser). The two systems with a commercial pedigree (Solaris and WRK) have slightly more positive than negative marks. However, WRK also has the largest number of negative marks, while Solaris has the second lowest number of positive marks. Therefore, the most we can read from the overall balance of marks is that open source development approaches do not produce software of markedly higher quality than proprietary software development.
An interesting read.

techcrunch at 1630 eastern

Just got a twitter that there will be big news on techcrunch at1630 eastern.

Technorati Tags:


What is Twitter?

When I started blogging, most of the people in the circles I run in didn't know what a blog is, exactly. 

I'd say: "Guess what! I'm a blogger. Check it out: MaryMaryQuiteContrary."

And I'd get this quizical look.

Sometimes I'd get a quizical look with a raised eyebrow.

Which would trigger my eyeballs sliding into the rolled back and locked position.  

But the point is lots of people didn't really know what a blog is.

(This was before I was selected as Time Magazine's Person of the Year, obviously :-)

(and before I truly embraced the reality that I could have close personal friends who are complete strangers.)

Now, we're seeing the same thing happening w/Twitter.

There are tons of Sun employees on Twitter.

OK, maybe not tons but lots and lots and lots of the really cool (and high-ranking) ones, and my favorite new-hire one.  

Still, lots of folks don't know what Twitter is, exactly.

In an effort to spare the Twitter-ati among us the quizzical looks the statement "I tweet" might solicit..... 

 

 

I found a great little video explaining it.  Thought I'd share.

Mary

p.s. the video... I found out about it from my complete total stranger Twitter friend ThommyB....


 


New Doc page on sun.com!

Looking for one-stop shopping to find technical documentation at Sun? Check out the newly updated Documentation Center. This page not only links to product documentation on docs.sun.com, but also to other Sun sites and other open source sites. You can begin to navigate through a broad range of information products for Sun software and hardware, all from a single landing page.


Server-side image processing with JRuby-on-Rails and the Java 2D API
One of the many advantages of creating Rails applications with JRuby is the access that JRuby gives you to the rich set of Java libraries available in the Java platform.

This blog entry provides step-by-step instructions for creating a simple Rails application that uses the Java 2DTM API to perform server-side image processing. It also shows you how to install and use the GlassFishTM v3 Gem, which contains only the GlassFish v3 kernel, Grizzly, and other utilities, thereby giving you an application server with a smaller size and a faster start-up time.

Although Rails is intended for developing database-backed web applications, this application does not use a database. Many think that it is better to use the file system rather than a database to store binaries. I'll leave it up to you whether you use a database or not for that. In any case, this blog entry focuses on taking advantage of JRuby to access Java platform libraries from a Rails application.

Installing the Software

To get started, go through these steps to install JRuby, Rails, and the GlassFish v3 Gem if you haven't already.
  1. Download jRuby-bin-1.1.zip from jruby.codehaus.org and unpack the zip file.
  2. Add the path to your jRuby installation to your system path.
  3. Install Rails on your JRuby VM by running this command:
    jruby -S gem install rails
    
  4. Install the GlassFish v3 gem on your JRuby VM by running this command:
    jruby -S gem install glassfish
    

Creating the Rails Application

Now, let's set up the application like you would with any JRuby-on-Rails application.
  1. Go to <JRUBY_INSTALL>/samples.
  2. Generate the application's directory structure:
    jruby -S rails photo
  3. Go to the photo directory you just created.
  4. Generate a controller and a default view:
    jruby script/generate controller home index
  5. Tell Rails that you are not using a database for this application by doing the following:
    1. Open the <JRUBY_INSTALL>/samples/photo/config/environment.rb file in a text editor.
    2. Remove the hash mark (#) from line 21 so that it reads:
      config.frameworks -= [ :active_record, :active_resource, :action_mailer ]

Setting Up the User Interface

This application has a simple UI that displays an image, a combobox, and a button. The user selects an image-filtering effect from the combobox and clicks the button. When the user clicks the button, the application performs an image processing operation on the displayed image to produce the effect and opens a new page that displays the processed image. Here's a screenshot of the first page:

To set up the UI, do the following:

  1. Copy a JPEG image to <JRUBY_INSTALL>/samples/photo/public/images.
  2. Open <JRUBY_INSTALL>/samples/photo/app/views/home/home.html.erb in a text editor.
  3. Replace its contents with the following:
    <html>
    <body>
    <img src="../../images/kids.jpg"/><p>
    <% form_tag :action => 'seeimage' do -%>
    <%= select_tag "operation",
            "<option selected='selected'>Grayscale</option>
            <option>Negative</option>
            <option>Brighten</option>
            <option>Sharpen</option>
    %>
    <<% end -%>
    </body>
    </html>
    
    Here you're using the form tag and select_tag helpers that Rails provides. It's a good idea to use the helpers rather than to write this HTML by hand because the helpers take care of a lot of extra stuff you'd have to add if you wrote the HTML yourself. When you run the application, just view the source of the page and you'll see what HTML the helpers generate for you. Check out Ruby on Rails Manual ActionView::Helpers for more information on the various helpers for views.

    From the combobox on this page, the user can select from four different image effects: Grayscale, Negative, Brighten, and Sharpen. The selected name of the effect is saved into the operation variable and is passed as a request parameter to the seeimage action of the controller. The action will use this request parameter to execute the appropriate image-processing code.

Adding the Image Processing Code to the Controller

This application gives you a good overview of how to access Java libraries from a Rails application using Ruby code. It also includes a nice sampling of the image-processing operations available in the Java 2D API.

While adding the Ruby code that performs the image processing to the controller, you'll learn the following concepts involved in using Java libraries in a Rails application:

  • Giving your controller access to Java libraries
  • Referring to Java classes
  • Performing file input and output using the java.io and javax.imageio packages
  • Assigning Java objects to Ruby objects
  • Calling Java methods and using variables
  • Converting arrays from Java language arrays to Ruby arrays
  • Streaming files to the client
You'll also learn the following concepts associated with performing image processing with Java 2D:
  • Reading an image file into a