The life of a CA Copenhagen Campus Connection

Wednesday Apr 01, 2009

Sun has announced the launch of the JavaFX Coding Challenge, a coding contest that offers both professional and student developers a unique opportunity to win up to $25,000 USD (thats a hell of a lot of money!) in cash and have their application featured on the JavaFX.com website.

Developers and students are required to create and develop rich internet applications (RIA) using JavaFX 1.1 and NetBeans 6.5. The call for entries is open to persons of legal age in more than three dozen countries.

Sun is offering a number of prizes, with a top award of $25,000 USD in addition to cash prizes of $10,000 USD and $5,000 USD. There is a special category for students at an accredited college or university, with three $1,500 USD cash prizes that will be awarded to the top student applications. Students will not be limited to competing in this category, and are eligible to vie for the larger prizes as well. Additionally, Sun will award up to 100 honorable mentions, which will each earn a $25 Amazon gift certificate.

Java FX is a runtime with supporting tools and technologies that enable content authors and developers to create new content that combines the best capabilities of the existing Java platform with new immersive media services, which can be securely accessed from mobile phones, desktop browsers, TV and other consumer devices. The JavaFX platform is unique in that it allows content developers to focus on creativity, and not coding, while enabling them to create expressive content through the use of one platform across multiple media assets. The latest JavaFX Mobile platform was released in February.

The contest runs from now through May 29th. The entries will be judged by a panel of experts, to include members of the JavaFX engineering and product marketing teams. The winners will be announced during the week of June 29th.

The details of the contest can be found at http://www.javafx.com/challenge - now go go go make some fun apps!

Sunday Mar 15, 2009

At April 15th you have the possibility to attend CommunityOne North in Oslo for FREE. Its a jam-packed day of education, innovation and exchange.

CommunityOne North is held in connection to the Nordic conference GoOpen 2009 and the Nordic Perl Workshop  - so you can attend 3 conferences in 4 days - it's almost like an early easter egg...

The organizers have been working their butt off, to put together a super program including:
  • Ian Murdock: Connecting the dots: Open Source and Cloud Computing
  • Håkon Wium Lie, Opera Software: One Web
  • Simon Phipps: The Third Wave of Open: Open Source and Business Models
  • Knut Yrvin, Nokia: Why Nokia acquired QT

Check out the program - its going to be a  tough choice which session to attend! Sun got so many cool things going on a the moment.

Best of all - you can register today!

Hope to see you in Oslo on April 15th :-)

Tuesday Feb 24, 2009

Late 2008 I succeeded in persuading our database teacher to try out Glassfish for a new course on Web and Database programming for first year students. So before I knew it I was responsible for setting up a central Glassfish server for around 120 freshman programmers - UGH!

So how to best do this? This course has weekly lab-exercises and the teachers assistant need to grade them, so a distributed solution with a virtualbox image including netbeans and glassfish was not really the way forward - we needed a central server that the IT-dept. could maintain.

At DIKU we primarily use Gentoo Linux for our server park, so a standard HP DL360 G5 rack server was bought and a 64 bit version of Gentoo was installed from our customized Gentoo installation environment with Cfengine on top. Fortunately somebody had already made a Gentoo e-build package for Glassfish v2UR2, which easily could be updated. And within the hour I had a Glassfish server up and running - then the fun began  - it needed configuration.

Our education environment is based on Sunray terminals, but uses Linux based application hosts. Our app-hosts had Eclipse installed, so at first I thought that Eclipse could be used to interact with the remote Glassfish-server, but NONONO! Our Eclipse was the basic Eclipse installation, which didn't support Java EE applications, so I tried installing the Eclipse Enterprise Edition which has a nice Glassfish plugin - but alas - this plugin only support a local installation of Glassfish and couldn't connect to a remote server, so I turned to Netbeans 6.5.

The full edition of Netbeans 6.5 did the trick, but STILL required a local installation of Glassfish for the plugin to connect to the remote host. OK - so far so good. Now the students should be able to connect to the server from within Netbeans and deploy their web-apps.

Then for the configuration of the server: 120 freshman programmers, which need to be able to run their web-apps without crashing the server or overwriting each others programs. I turned to the Sun Java System Application server 9.1 admin guide (which is Glassfish).

Glassfish has support for virtual hosts, so I was wondering whether just setting up 120 virtual hosts would do the trick. Unfortunately the Netbeans Glassfish plugin, does NOT (currently) support deployment to a specific virtual host, so each student had to be given his/her own Glassfish domain which include two dedicated ports - one for the admin interface and one to view the web-apps.

I ended up configuring each domain with the following setup:

I started /opt/glassfish/bin/asadmin in interactive mode and typed:

create-domain --user di080156 --adminport 11156 --instanceport 12156 di080156

Our student accounts are named di080XXX for the student year 2008/2009 where XXX is an increasing number. The UNIX UID for these accounts are always 11XXX where XXX is the same number as in the account name. So I chose that the adminport number should be the same as their UNIX UID, which can easily be looked up in the system by using the command

purps@ask ~/$ id di080156
uid=11156(di080156) gid=10000(del1user) groups=10000(del1user)


The instanceport number is the UNIX UID + 1000

The name of the domain is the same as the student account number, so when I do a 'list-domains' from asadmin, it will be clearly visible which domains might need to get started.

When creating a new domain an admin-user and an admin-password need to be set. The admin username will be the student account number, while the password will be db + the students birth date (DDMMYY) which I could easily pull from our central postgreSQL server.

Now it will be relatively easy for each student to remember the most important data (the servername, the admin-port, the username and the password) to connect to the Glassfish server through Netbeans:

Log on to DIKUs system from a sunray terminal
open a xterm with 'besthost bach'
open /opt/netbeans-6.5/bin/netbeans &
(wait while Netbeans starts)

Choose File | New Project...
Choose Java EE and the type of project
Choose a name and place for the project

Click on button Target Server - choose Add...

Server: Glassfish V2 - click Next
Platform Location: /opt/glassfish-v2ur2

Choose Register Remote Domain og choose Next
Host: glassfish.diku.dk
Port: enter your UNIX UID for your student account
Choose Next
Type Admin username: your di080xxx account name
Type Admin password: dbDDMMYY - where DDMMYY is your birthdate
Choose Finish

Tuning the Glassfish-server

Unfortunately starting 120 domains requires A HELL OF A LOT OF RAM. Each domain is by default started with 512 MB. Our server "only" had 20 GB RAM and 140 GB of swap, so I needed to decrease the RAM usage of each domains JVM. I found the document "Tuning your Glassfish - Performance Tips" presentation and went to /opt/glassfish/domains and for each domain I changed domain.xml from

<jvm-options>-Xmx512m</jvm-options>

 to

<jvm-options>-Xms192m</jvm-options>
<jvm-options>-Xmx192m</jvm-options>

Afterwards each domain can be started with the command 'start-domain di080XXX' from asadmin, but after a while you don't want to start 120 domains manually, so a collegue of mine wrote a small script to start/stop all domains sequentially.

#!/bin/bash

ASADMIN=/opt/glassfish/bin/asadmin
DOMAINDIR=/opt/glassfish/domains

start_all(){
        for DOMAIN in ${DOMAINDIR}/*; do
                ${ASADMIN} start-domain ${DOMAIN##*/}
        done
}

stop_all(){
        for DOMAIN in ${DOMAINDIR}/*; do
                ${ASADMIN} stop-domain ${DOMAIN##*/}
        done
}

usage(){
        cat <<-HERE
        Usage: ${0} [command]

        where command is one of

          start     start all domains
          stop      start all domains
          restart   first stop and then start all domains

        HERE
}

case ${1} in
        start)
                start_all
                ;;
        stop)
                stop_all
                ;;
        restart)
                stop_all
                start_all
                ;;
        *)
                usage
                ;;
esac

Now I am anxiously awaiting the students use of the server. The RAM usage is horrifying and it is swapping like crazy, and I am unsure if I should stuff even more physical RAM in the machine or try turning down the JVM RAM usage on each domain even more. Here is a snapshot of top:

top - 12:23:00 up 22:22,  2 users,  load average: 1.55, 4.88, 4.06
Tasks: 212 total,   1 running, 211 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.2%us,  0.3%sy,  0.0%ni, 79.3%id, 19.1%wa,  0.0%hi,  0.1%si,  0.0%st
Mem:  20600040k total, 20497768k used,   102272k free,     6736k buffers
Swap: 143338536k total, 18882040k used, 124456496k free,    18708k cached
Which user (blank for all):
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                
23825 root      20   0  708m 166m 3820 S    1  0.8   1:49.27 java                    
 7208 root      20   0 10560 1288  876 R    1  0.0   0:00.37 top                     
31804 root      20   0  784m 167m 3820 S    1  0.8   1:50.51 java                    
  242 root      15  -5     0    0    0 D    0  0.0   4:08.55 kswapd0                 
  394 root      20   0  706m 167m 3848 S    0  0.8   1:47.89 java                    
 1537 root      20   0  787m 168m 3820 S    0  0.8   1:48.49 java


Sunday Feb 15, 2009

I've just returned home from 3 days in Prague - 3 fantastic and awesome days!

The tour was a opportunity to meet with the rest of the Campus Ambassadors from Central Northern Europe - and my expectations were fulfilled - it was 3 very intensive days.

A couple of us landed around the same time in the airport on Wednesday and shared a cab to the hotel. Afterward we went sightseeing in Prague - it was damn cold, windy and snowing, but it was the only day we had time for it, so we walked and walked and walked around the beautiful city with its churches and bridges and amazing castle.


Karls Bridge by night

Day 2 was an orientation with lots of sales talk and info on the goals of the Campus Ambassador program mostly for all the new CAs. Day 3 was more technical (more me), with presentations from the Solaris Testing Team and the Netbeans team which are both located in the Prague office.

But what was really really great about this meeting was the hallway track (as always). Meeting the other CAs face to face, hearing their experiences and best practices on how to be a Campus Ambassador. Learning new stuff between presentations and having a laugh with new friends.

Thanks guys - you're awesome!

Universal Translation Architecture

Did I forget to mention that the beer in Prague is damn good?

Saturday Oct 18, 2008

Thursday I attended a High Computing Seminar at the Danish Technical University (DTU). Ruud van der Pas, Sun Microsystems was on his annual visit in Denmark and gave a talk on Throughput Performance on the UltraSPARC T2 processor, based on the notion "core equivalent".

If you havn't heard it - there's a new kid on the block after the Niagara 2 chip, and thats Victoria Falls - a 2-way T2+ chip - and this is a work horse! The more work you throw at it, the better it performs. Where the Niagara T2 chip has 8 processor cores each with 8 threads and each core has a decent dedicated floating point unit. The Victoria falls chip has either 2 or 4 chips, with 8 cores per chip, 128 or 256 threads in all. Also the 8 L2 cache banks has been freed up, to allow faster memory access.

Chip Multi Threading (CMT) is a technology that allows multiple threads (process) to simultaneously share a single computing resource, such as a core. This greatly increases the efficiency of usage of the core. At the same time, multiple cores share chip resources, such as memory controllers and caches, thereby improving their utilization. The result is unprecedented per-chip performance.

This is a really good video with David Patterson from UC Berkeley giving his views on the Niagara 2 chip performance. You propably recognize the name - he is the co-author of one of the best machine architecture books written to date. Patterson and Hennessy even based the "putting it all together chapter" of their book on the Niagara chip.

Thursday Jul 17, 2008

You know the feeling, you go scavenging among your old disks to see if there's something useable, but mostly the individual disks are too small. Its just a bunch of old disks.

JBOD rectifies that problem, by allowing you to use the disks as if they were one single volume. The proper term is spanning, but most people call it JBOD (Just a Bunch Of Disks) in contrast to RAID (Redundant Array of Inexpensive Disks). So wherein lies the difference between JBOD and RAID 0 (striping) you might ask. Well JBOD can be thought of, as the opposite as RAID - in a RAID you partition the disks, which usually chops them up into smaller pieces, in a JBOD you combine the disks into a larger logical volume. But neither RAID 0 nor JBOD provides any fault tolerance. In fact JBOD only has 2 advantages over RAID 0:

  • Its avoiding drive waste
  • Easier disaster recovery

Now enter ZFS into the equation, which is designed from the assumption that all disks will eventually fail. It has excellent data-loss detection mechanisms and it can even detect silent data corruption. With ZFS your disks are stored in pools and the mount points share the same pool, which means, that its harder to run out of space. You can always add more disks to the pool without having to reshuffle your data - that's neat!

There is a really great interview with the inventors of ZFS (Jeff Bonwick and Bill Moore) on the web. Its 45 min, watch it if you have the time.


Wednesday Apr 16, 2008

Yesterday we had our second Danish OpenSolaris User Group meeting. Unfortunately very few attended the meeting, but those of us who did - had a great time :-). Jens Nyrup from Sun Denmark gave a nice presentation and demo on xVM and I gave one on SunSPOTs. Our third speaker Mads Toftum had called in sick - so no presentation on Zones :-(

Hopefully we'll have our third meeting in May.
If you're interested in Solaris - please join us!

 

Btw. It sounds like project Indiana will be released on May 5th. 

Friday Apr 04, 2008

Today I went to an interesting guest lecture given by Wei Hong, Co-founder and VP of Engineering at Arch Rock Corp. - a Berkley spinoff. He was talking about the tiered, IP-centric architecture of the low power wireless network platform designed to seamlessly integrate with the internet or intranet through the native TCP/UDP/IP protocols and Web Services.

Arch Rock are working on 6LoWPAN - a low power usage version of IPv6 for WSNs (wireless sensor networks) based on IEEE 802.15.4. The routers do the 4-6 translation. Really cool stuff!

The SunSPOT SDK v.2.0 currently has a LowPan implementation build on the 6lowpan draft, including support for mesh routing using an AODV derived routing manager and all of the hooks are exposed to implement IPv6 on top of this - but no working IP layer so far. :-( Could be so nice, to be able to ping those nodes. I am unsure of the status in the upcoming v.3.0 SDK.

But the guys over at Sun Labs are still having fun. They are currently working on an after-hours project strapping a SunSPOT to a high altitude Balloon - sending it to near space ;-) 

Tuesday Apr 01, 2008

Pick your poison - which IDE do you prefer? Have you tried Netbeans recently, because the NetBeans-team recently re-vamped the GUI completely. The NetBeans team have also gone completely Ruby-nuts in the latest 6.1 release and NetBeans now has Rails 2.0 support out-of-the-box.

Sun even went a step further and hired two of the main Jython developers (Ted Leung and Frank Wierzbicki), in order to get Jython and eventually Python support into NetBeans.

But check out the in-depth review at JavaWorld.

 

 

 

Sunday Mar 30, 2008

Right now, the reports on the voting results on the OOXML voting from the ISO National Bodies (NB) are pouring in. But take a look at Groklaw.

In February ISO had a Ballot Resolution Meeting (BRM), working their way through the pile of comments attached to the No votes. Now, the NBs should decide whether their comments had been addressed at the BRM, but the voting procedure seems to be overwhelmed with irregularities.

In Denmark the sub-committee "voted" 8-4 against, never-the-less Danish Standards voted Yes. But its hard to get confirmation, because sub-committee participants are not allowed to talk about what happened at the meeting. Don't know why. So much for Openess.

In Norway the sub-committee vote was 21-2 against, but the Standard Norway still changed their vote to Yes.

And so forth - almost every country has its own story of irregularities.
 

Looks like the world will have another flawed technical standard.

I am looking forward to seing what insights Simon Phipps, might have on the subject. Andy Updegrove has chosen the positive attitude. Personally I am not sure whether to laugh or cry and I am unsure which impact having two document stardards will have in the long run besides making the TCO bigger.

Saturday Mar 29, 2008

OpenOffice.org 2.4 is barely out the door, but the OpenOffice developers are already working on the 3.0 release - set to release in about half a year.

Check out an early look at the 3.0 feature set.

Btw. looks like OOoConf 2008 will be in Beijing, China. 


 

Wednesday Mar 26, 2008

Tuesday the 25th (the day after Easter), I went to Alsion in Sønderborg to give a SunSPOT talk for the SoftwareForum Alsund group. Even though it had snowed through the night it was a clear blue sky and I sat by the window in the small plane and had the most fantastic view.

When I arrived at Sønderborg airport there were no taxis, so I had to call one. Coming from Copenhagen, I have never been to an airport with no taxis outside before, but hey - there's allways a first time for everything ;-)

The taxi drove through the town of Sønderborg, to get me to Alsion, which is a science park in the southern Denmark, not far from Danfoss Universe. Some of the faculties of University of Southern Denmark (SDU) are also located in Alsion. The view of the science park from across the water was breathtaking, its really beautiful architecture.

 

Photo courtesy 3XN

So I got to the main entrance, where a friend waited for me. I had been told to go "to the red box above the cafeteria" - I had no idea what that meant, but it made sense the minute I stepped through the door. At the 2nd floor suspended above the cafeteria was the meeting room like a giant floating red box.

Photo courtesy 3XN

15 people had showed up for the SunSPOT tech talk, but it was a tough crowd - most of them were embedded systems developers working with ARM chips on a daily basis, and they asked loads of questions - which I tried to answer the best I could. The atmosphere was relaxed and in good spirits.

After the talk I went to a friends house for dinner, before spending 4.5 hours on a train going back to Copenhagen. I had to change trains in Fredericia, and of course my second train was a little delayed - so I stood there and watched a container cargo wagon with the word "KLine" (which is funny if you use IRC) and the cargo wagon next to it had a container with the words "tex" on it (which is funny if you use TeX as typesetting). Nerd humour!

Nice trip never the less :-)

Today is the official Document Freedom Day! The main goal of the day is promotion and adoption of free document formats. It is a day of grassroots effort to educate the public about the importance of Free Document Formats and Open Standards in general. It will be interesting to read the reports and see the pictures from the many teams worldwide in the coming days.

 

Wednesday Mar 05, 2008

On February 28th FreeBSD 7.0 was finally released, and one of the many new features is Experimental support for Suns ZFS file system!

Last year at EuroBSDCon (the annual European BSD conference), the FreeBSD developer Pawel Jakub Dawidek accounted for the process of porting ZFS to FreeBSD. What really surprised him, was that it had only taken about 10 days to port the core functionality of ZFS to FreeBSD, because the code was so modular and well documented. Of course there was quircks, but it worked.

Pawel also took his own presentation a step further and showed a video of the superhero ZFS-Man:

At MacOSForge they are also working hard, to get the full implementation of ZFS into Apples OS X 10.5 - Leopard, so its not stuck at read-only access. Their ZFS implementation is now in sync with Solaris build 72.

Its good to see ZFS being embraced into the open source community :-)

Saturday Mar 01, 2008

So, maybe you're considering trying out Solaris 10, but then there is OpenSolaris - and what's this new thing called Indiana they keep talking about? And No, its not the one, with last name Jones I am talking about...

Solaris comes in different flavours these days, and depending on the purpose of your installation, you have several options. Here is the quick "cheat sheet":

  • Solaris 10 - The Official Sun OS
    OpenSolaris Express Community Edition (SXCE - code name Nevada) - The open source version of Solaris 10. New build every 2 weeks.
    OpenSolaris Express Developer Edition (SXDE), a quarterly release of Nevada 
  • OpenSolaris Developer Preview (Indiana) - the next version of OpenSolaris
  • Nexenta - OpenSolaris kernel with Gnu application userland, Live CD, basically Ubuntu with OpenSolaris underneath
  • Schillix - The first OpenSolaris Live CD made. It includes only free software. Currently based on OpenSolaris Nevada build 82.
  • BeleniX - OpenSolaris Live CD including extra open source packages
  • Milax - Damn Small Solaris Live CD, based on OpenSolaris Nevada build 81, can boot from USB flash drives.

If you decide to get the free Starter Kit, you will get OpenSolaris Express Community Edition and the Live CDs: Nexenta, BeleniX and SchilliX.

Enjoy your vanilla or chocolate flavour Solaris!