Archive

Archive for the ‘Open Source’ Category

Selected software development trends

January 17th, 2012 1 comment

About 2 months ago InfoWorld published 11 programming trends to watch. I’d like to share three with you since they are close to home for me:

  1. No code is an island
  2. Bandwidth is no longer free
  3. Energy is no longer free, either

No code is an island

Having worked in integration project for almost a decade the idea that there is little code living on an island is not strange to me. However InfoWorld points out that besides that more and more software developer are creating products to enhance other products

Our code is living increasingly in ecosystems. Many PHP programmers, for instance, create plug-ins for WordPress, Drupal, Joomla, or some other framework. Their code is a module that works with other modules.

The same goes for development for mobile devices that rely increasingly on modules or apps created by others, whether they run on the device or in the cloud. This increases the demand for stable interfaces and contracts. Besides that the requirements for availability and scalability will weigh in heavier.

An urge for lean programming

Or create programs that deliver value in an efficient way. New releases of software programmers tend to demand always more resources (just a small example). The cost of keeping a computer plugged in has never been an issue. It never mattered how much energy your rack of servers sucked down because the colo just sent you a flat bill for each box.

The Cloud trend tends to make cost more transparent. Some of the clouds — like Google App Engine or Amazon S3 (example) — don’t bill by the rack or root password. They charge for database commits and queries. This adds a new perspective for software developers. We might need to start thinking about the cost of each subroutine in euros, not in lines of code, function points or milliseconds of execution time.

On the consumer side more and more ISPs adding bandwidth caps and metering. To a software developer this means that optimizing bandwidth consumption when designing apps is becoming imperative. Besides the cost issue this will also be needed because of the customer experience (loading speed etc).

SCA Diagrammer

November 10th, 2011 No comments

SCAWhile doing some research on the web I came across a Service Component Architecture Diagram Generator. The script generates diagrams for applications based on the Service Component Architecture (SCA) model. This can be a great aid to understand the relations between components in large BPEL or SOA applications.

Download the tool here. The readme is over here. The script runs on Linux/Unix and has primarily been tested with Oracle Fusion Middleware 11g applications but should work with other BPEL or SOA frameworks.

Oracle releases NoSQL Database, Enterprise Edition 1.1.100

October 25th, 2011 No comments

While the NoSQL Database Community Edition still waits for final license approval, Oracle has released it’s NoSQL Database, Enterprise Edition 1.1.100. The download is available on OTN.

The Oracle NoSQL Database is a distributed key-value database. It is designed to provide highly reliable, scalable and available data storage across a configurable set of systems that function as storage nodes.

The documentation page is still rather empty. However Technical Overview and a Data Sheet are already available.

Oracle NoSQL is a key offering in Oracle’s portfolio of Big Data products. The product is based on the Java version of Berkeley DB, an open source database used in embedded systems.

Update

VirtualBox Solved VBOX_E_FILE_ERROR 0x80BB0004

August 9th, 2011 No comments

Recently I wanted to share a VirtualBox Appliance with a colleague. So I tried to export the created appliance. Unfortunate this failed with a:

VBoxManage.exe: error: Code VBOX_E_FILE_ERROR (0x80BB0004) – File not accessible or erroneous file contents (extended info not available)

So I thought why not just copy it… Oh wait, first compact it to save some space and time using VBoxManage modifyvdi some.vdi compact:

>VBoxManage modifyvdi Windows7.vdi compact
0%...10%...20%...30%...40%...50%...60%...70%...80%...
Progress state: VBOX_E_FILE_ERROR
VBoxManage.exe: error: Code VBOX_E_FILE_ERROR (0x80BB0004) - File not accessible or erroneous file contents (extended info not available)

When I tried to copy or zip the file there were errors accessing it. Somehow the VirtualBox Appliance was still running fine. The files that make up the appliance weren’t locked.

Use CHKDSK

My laptop (the host of the appliance) is is running Windows7 and I decide to run chkdsk and found:

CHKDSK controleert de bestandsgegevens (stap 4 van 5)...
Leesfout met status 0xc0000185 op offset 0x17410c9000 voor 0x10000 bytes.
Leesfout met status 0xc0000185 op offset 0x17410d6000 voor 0x1000 bytes.
Er zijn beschadigde clusters in bestand 37907 met naam \Users\ppvdbeek\VIRTUA~2\Windows7\Windows7.vdi vervangen.

This is Dutch stating that there were bad sectors in the vdi file that had to be corrected. After that I could run the appliance, compact the disk and export the appliance successful.

On Linux you could use fsck (for “file system check”) in a similar case.

Installing Ubuntu 11.04 in VirtualBox

June 8th, 2011 No comments

This post will show you how to install Ubuntu 11.04 in VirtualBox. In later posts this will be used to run: JRockit 64 bit, WebLogic Server (WLS) and Oracle Service Bus (OSB).

Prepare Ubuntu install in VirtualBox

A short recipe for preparing the Virtual Machine to install Ubuntu on it. The blog post Installing Ubuntu inside Windows using VirtualBox is more extensive on this subject…

  • Create a new Virtual Machine using the VirtualBox Manager
  • Click Next in the Welcome screen
  • Choose a Name for the Virtual Machine and select the Operating System (OS) before you click Next
  • Set the amount of memory you want to allocate to the Virtual Machine
  • When asked for the Virtual Hard Disk, check the Boot Hard Disk box and Create a new hard disk. Then the Create New Virtual Disk Wizard will start guiding you through the process
  • I choose a Fixed-size storage when asked for the Hard Disk Storage Type
  • Choose the Size (16 GB) and Location (left it default) for the Virtual Hard Disk
  • Check the summary
  • Watch the progress while the .vdi file is created
  • Click Finish to acknowledge the creation of the new Virtual Machine
  • The newly created Virtual Machine will show up in the VirtualBox Manager
  • In order to install Ubuntu 11.04 on the Machine go to the settings to alter the storage settings
  • Use the icon besides the IDE Controller to add the disk image – ISO file – you downloaded to boot and install Ubuntu as media in a drive
  • Check the boot order and make sure that the Machine is booted from the CD/DVD device first
  • Acknowledge
  • Start the Virtual Machine and the “regular” installation of Ubuntu will start

The screenshot that come with the short instructions above:

Ubuntu install

  • Boot the installation ISO
  • Choose Install Ubuntu and your language
  • Preparing to install Ubuntu – You don’t need the additions here to later install WebLogic Server and Oracle Service Bus
  • Allocate drive space – If you created a new Virtual Disk before you can safely erase the empty disk here
  • Erase disk and install Ubuntu – Acknowledge
  • Choose location and time zone
  • Keyboard layout
  • Who are you – Fill in the username, computer name and password
  • Welcome screen
  • Installation is complete – click the button to restart
  • Login as the user you just created

Watch the screenshots that come with the steps above:

Installing VirtualBox Guest Additions

  • From the VirtualBox Manager menu choose the Devices - Install Guest Additions options
  • Choose the application to start
  • Click Run
  • Authenticate with your password
  • You need to restart Ubuntu to make it work

Watch the screenshots that come with the steps above:

Stop websites from tracking you

March 29th, 2011 No comments

An earlier post on how cookies are used to track you, explained how tracking cookies work. This post will show you how to stop websites from tracking you using Firefox 4. This latest release has a Do-not-track feature that lets you tell websites you don’t want your browsing behavior tracked.

By turning on the Do-not-track feature, Firefox tells websites you visit that you don’t want your browsing behavior tracked. Please note that honoring this setting is voluntary. To put it differently websites are not required to respect it.

Turning on the Do-not-track feature in Firefox 4

  • Click the Firefox button at the top of your browser window and click options.
  • Make sure you’re on the Advanced panel.
  • Select the General tab.
  • In the browsing section check the Tell websites I do not want to be tracked.
  • Click OK to leave
Do-not-track feature

Check the Tell websites I do not want to be tracked option

Using Quartz with SOA Suite 11g

January 16th, 2011 2 comments

Already in 2006 Clemens posted on scheduling BPEL processes. More recently with BPEL in SOA Suite 11g a bug ( 8927175: PROVIDE QUARTZ SCHEDULER) was submitted. The rquest text:

The product does not have schedular to schedule BPEL processes. Need to schedule the BPEL processes through SOA11G and not through unsupported softwares(Quartz).

And the business need:

Some processes need to be scheduled at a particular time and at a particular day and should not be started Manually, increases the maintenance cost of the software.

These together indicate a clear need to schedule reoccurring processes. Although I’m not so sure that this functionality should be provided by this platform. One could see advantages in centralizing all scheduling task. There a good commercial product available for cases like that (Redwood’s Cronacle for example).

On Oracle Technet there is a good document on Configure a SOAScheduler for a composite in SOA Suite 11.

One Job, multiple Schedules

We need a Class that implements Job. Something like:

package net.deltalounge.quartzdemo;
 
import java.util.Map;
 
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.SchedulerException;
 
public class DemoJob implements Job {
    public DemoJob() {
        super();
    }
 
  public void execute(JobExecutionContext context)
     {
      Map dataMap = context.getJobDetail().getJobDataMap();
      RunMeTask task = new RunMeTask();
      String someString ="init";
      someString = context.getTrigger().getName();
      System.out.println("Quartz demo output: "+someString);      
    }
}

And we need a Class that creates and starts the Scheduler. This Class can also schedule the jobs. Here we actually see that although one Job Class is enough we need to declare mutiple JobDetails.

package net.deltalounge.quartzdemo;
 
import java.util.Map;
 
import org.quartz.CronTrigger;
import org.quartz.JobDetail;
import org.quartz.Scheduler;
import org.quartz.impl.StdSchedulerFactory;
 
public class QuartzAppCronTrigger {
  public static void main( String[] args ) throws Exception
      {
        //scheduler task details
        JobDetail job = new JobDetail();
        job.setName("someJob");
        job.setJobClass(DemoJob.class);
        //
        JobDetail job2 = new JobDetail();
        job2.setName("someOtherJob");
        job2.setJobClass(DemoJob.class);
 
        //configure scheduler time
        CronTrigger trigger = new CronTrigger();
        trigger.setName("someJobTrigger");
        trigger.setCronExpression("0/30 * * * * ?");
 
        //configure scheduler time 2
        CronTrigger trigger2 = new CronTrigger();
        trigger2.setName("someOtherTrigger");
        trigger2.setCronExpression("0/20 * * * * ?");
 
        //create the schedule
        Scheduler scheduler = new StdSchedulerFactory().getScheduler();
        scheduler.start();
        scheduler.scheduleJob(job, trigger);
        scheduler.scheduleJob(job2, trigger2);
      }
 
}

If you don’t define multiple jobs prepare for an error like:

Exception in thread "main" org.quartz.ObjectAlreadyExistsException: Unable to store Job with name: 'someJob' and group: 'DEFAULT', because one already exists with this identification.
	at org.quartz.simpl.RAMJobStore.storeJob(RAMJobStore.java:222)
	at org.quartz.simpl.RAMJobStore.storeJobAndTrigger(RAMJobStore.java:195)
	at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:732)
	at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:265)
	at net.deltalounge.quartzdemo.QuartzAppCronTrigger.main(QuartzAppCronTrigger.java:36)

A pre-JavaOne peek into the future of Java

September 16th, 2010 No comments

In this week just before JavaOne and Oracle OpenWorld the topic “the future of Java” keeps coming up again and again. Today the tweets coming out of the Oracle ACE Director briefing, that some how aren’t affected by a non-disclosure agreement, seem strong and positive: Ranging from Extremely passionate and very impressive, and incredibly passionate address to amazingly open words. Resulting in the statement Oracle is on the good side of the force… as far as Java is concerned. As close as we mere mortals can get at this point in time…

In one of the tweets Thomas Kurian is quoted:

After my keynote, there is no longer any confusion about the Java feature roadmap.

To see for yourself what the future of Java looks like, watch Thomas Kurian’s keynote live via the stream on JavaOne and Java Develop. To be continued…

Note that the Java Champions have joined the Oracle ACE Directors. As was stated here this significantly raised the number of Eclipse users ;-)

Java EE or Spring

May 4th, 2010 No comments

Recently I read an extensive blogpost by Frans van Buul on Spring and Java EE. As he points out there are some false arguments in favor of the Spring Framework. It is stated that:

Many of the arguments that have traditionally been brought forward in favor of Spring are invalid or outdated, because they target disadvantages of J2EE 1.4 and prior versions, rather than Java EE 5/6. … the original argument that this is not supported by Java EE is simply gone, and the remaining argument, if present, is much weaker.

If you’re in a position where evaluating these alternatives read the entire blogpost. Generally speaking there is no best way to go. Both are viable frameworks for writing Java applications.

The choice should be made by taking into account the particular requirements and technology strategy of the organizations building and using the application.

If there’s an opportunity we’ll see if we can come up with some rules of thumb for the selection.

Some jBPM, JPA, Hibernate insights

April 1st, 2010 No comments

jBPM

jBPM

Few days ago a colleague published an interesting blogpost on jBPM, JPA, and Hibernate. The post was noticed by Tom Baeyens, who until late March 2010 was the project lead for jBPM at JBoss.
Of course JBoss restates their commitment to advancing the jBPM project, but it will be very interesting to see what will come from Tom Baeyens’s new initiative…