Archive for the ‘Java’ Category

Can’t Wait! Raspberry Pi!

In Automation, Embedded Computing, Java, Linux, Raspberry Pi on July 1, 2012 at 7:27 am

Sent off a reservation for a Raspberry Pi, a credit card-sized bare bones working computer that runs off an SD-card loaded Linux OS.  At $35 a pop, its a steal considering the hours of fun making apps for that thing =)

A good starting point for embedded and automation projects!

The Pi:



HeidiSQL alternative for Linux

In Database, FlexOODB, Java, Linux, MySQL on October 30, 2011 at 8:40 am

Aside from Netbeans, an SSH client and a good text editor,  a  good database manager always comes in handy when developing apps.

I’ve been using HeidiSQL  previously to manage my MySQL databases when my laptop was on XP, in its current incarnation as a Fedora 15 development machine, I’ve been hard pressed looking for an alternative, HeidiSQL on Wine is simply unusable.   I had to content myself with MySQL’s WorkBench Tool.   WorkBench is free but I find the interface clunky.

Then I ran into DBeaver, its a Java app that has the familiar interface of HeidiSQL with the added difference that it works across platforms (of course).  Plus, unlike HeidiSQL which can only connect to MySQL (although I understand there’s work in making it work for MS SQL too),  DBeaver can also connect to other popular RDBMS:  Oracle, Cache, DB2, Firebird, Derby, H2, HSQLDB, MS SQL, Postgres, Sybase, SQLite etc.

Here’s a screenshot:

DBeaver Snapshot

DBeaver Console

Here’s a quick how to to install in your Linux box:

  1. Download DBeaver and extract in your drive (e.g. /home/<username>)
  2. Right-Click on an empty spot on your desktop and select ‘Create Launcher’
  3. Type in ‘DBeaver’ (or any name for that matter) click on ‘Browse’ and go to the /home/<username>/dbeaver directory and double click on the dbeaver file.
  4. To replace the default icon, you can click on the icon link of the create launcher window and select the file /home/<username>/dbeaver/icon.xpm. That’s it.

Thanks for a great tool DBeaver Team! =)

FlexOODB Prototyping ‘new look’

In Database, FlexOODB, Intigrix, Java on March 1, 2011 at 7:13 pm

Ok I finally found time to work on making major improvements on  FlexOODB’s Intigrix-centric  prototyping tools.  I’m satisfied with the build today as we we’re able to finally fix some nagging interface issues.

Some new notable features:

  1. All child elements are tabbed after the parent (instead of automatically appearing at the bottom of the main element’s data).
  2. All child elements have working scoped (ie within the parent) searches.
  3. Moved menu on top (its used to be on the left which turns out to be a real waste of space).
  4. Added ability to define labels in the user interface config file (ie ui.xml)  to allow better labeling for titles, column names etc.
  5. In relation to 3, added jscript controls for data field entries (e.g. user will be prompted if a required field is empty or email address has the wrong format for example — really nice script ) — this fits nicely with Intigrix’s validation engine acting as a front-end validator.
  6. Extensive use of JQuery for interface controls, UI, themes etc.
  7. Better and more intuitive controls (e.g. multiple deletes for lists, row click to view item etc).

Looking forward to building new projects with this one!

jetty 7.01 minimum jar requirements

In Intigrix, Java on February 20, 2010 at 11:50 am

i’ve finally upgraded Intigrix’s HTTP engine from 6.1.22 (Jetty) to 7.01, the latter already being hosted in eclipse.org and (necessarily?) changing its packaging. This means some minor changes to Intigrix’s content handler.   I dont know if this will solve our NIO issue with 6.1.22 (Jetty developers say its a JVM issue) but the performance seems to be impressive.  From a typical  load factor of 4-5 (just a few minutes from startup–it is a very busy server), with Jetty 7.01 its just 0.45-1.0.  I’ll know for sure next week during a business day load what the load profile will be like with this update.

Anyway, as usual sans documentation we have to look for the minimum jars to use.   To run Jetty 7.01 as an embedded webserver you’d need the following jars:


JRockit and JVM integration possible

In Java on February 17, 2010 at 12:52 pm

looks like people are hunching down to make sense on the future of the two  JVM’s.  According to a JavaLobby post..Mark Reinhold (Sun’s principal engineer)..

“..has been in several meetings with developers from Sun, Oracle, and other sources to discuss the possible integration of HotSpot and JRockit.  They’re very much in the exploratory stages right now, seeing how the two JVMs will fit together.”

well its a good thing to know that that’s being contemplated, add to that the impending release of JDK7 at least I have something to look forward to.

Oracle: Sun’s JVM or JRockit?

In Java on February 16, 2010 at 10:42 am

our production web services have been bedeviled with serious performance issues  largely due to documented issues with NIO (we’re using Jetty for its http engine).  As its a known JVM bug, our options are really limited to a) hacking Java and fix the bug ourselves, b) wait for a new release of Java and ‘hope’ they’ll finally fix this particular bug or c) look for a different JVM.   I dont have the patience to do A. Considering that this bug was reported in 2006, option B may take a long time coming.. option C: an alternative JVM poses an interesting scenario as there’s really only 4 JVM implementations out there: Sun’s Java Implementation (the de facto of course), OpenJDK (same code base really as Sun’s), IBM’s implementation and BEA’s JRockit (bought by Oracle in ’08).   IBMs implementation seems to be stuck at 1.5 version of the Java API and I cant find any new developments there so that leaves me with Oracle’s  JRockit.   Unfortunately, JRockit is not free (as in install anywhere to anybody’s production server) anymore, according to its FAQ:

All Oracle JRockit products are free of charge for evaluation and development .

So the question is.. now that Oracle has purchased Sun/Java/MySQL and they have their own money making JRockit/OracleDB what’s the incentive for them to continue on developing the erstwhile de facto Java implementation? Goodwill? its not far-fetched to imagine that one day the current Sun- Java implementation will have similar license terms.

On the other hand, Oracle can just be subtle about it and will just slowly starve the Sun-Java effort of development resources as Oracle peddles a ‘better’ (and paid)  JVM in JRockit.  This remains to be seen of course.. meanwhile I’m stuck with this bug.. option A looks attractive all of a sudden.

Oracle shuts down ex-Sun open source site kenai.com

In Java on February 5, 2010 at 3:27 pm

Oracle will shutdown kenai.com by April 2010.  Kenai is an open source hosting site operated by Sun.. havent really used it although I know Netbeans 6.8 has close integration with it.  This is probably the first of Sun’s assets (if you can call it that — certainly not in the eyes of Oracle) that Oracle is dissolving.  While Oracle will continue to use the project ‘internally’ they will already stop accepting new postings and will delete all its contents in April.  Boy.. they really work fast.

What’s next for Oracle? Netbeans?  I certainly hope not, although that might be wishful thinking as they’ve got their own JDeveloper IDE which is closely tied to their (revenue-generating) products.  So far, according to an Oracle-Sun Exec presentation they’ll be treating Netbeans as a ‘light weight’ IDE and will continue to support it.. we’ll see.

FlexOODB milestone screen snapshots

In Database, FlexOODB, Java on February 5, 2010 at 9:48 am

here’s some snapshots of the generated prototype (all generated screens use AJAX):

Image 1: splashpage

Image 2:  Listing the ‘Account’ records.

Image 3:  Viewing an ‘Account’ (includes export to XML and Printer icons)

Image 4: Child classes of ‘Account’

Image 5: Viewing ‘Account’s child elements ‘Subscriptions’

Major milestone for FlexOODB API

In Database, FlexOODB, Java on February 4, 2010 at 6:19 pm

Whew! just finished the second major milestone of  the (then proof-of-concept) FlexOODB API .

In a nutshell, the motivations  for developing FlexOODB are to a) replace “mainstream” clunky and rigid persistence API’s (no inheritence or abstraction capabilities, can’t extend it, quirky must-be-embedded configuration requirements just to cite some reasons)  b) develop a platform where ‘I-dont-have-to-manually-create-the-tables-for-my-apps!’  and c) provide Rapid Application Development (RAD) utilities for the Intigrix Platform.  My goal is to minimize (if not take out!) the tedious and time consuming user interface<->data and data relationship binding from systems development, doing so will allow developers to focus on the more esoteric requirements of the system. This also means that software is easier to manage and time-to-market is a lot faster.

I’m satisfied with this milestone version: given a Schema (ie XSD) as the system’s data definition, the API can already generate a User Interface definition file (where we can set things like should a field be editable, updateable, auto-increment etc), generate the class entities then finally create the necessary java code, html and application files for CRUD (plus XML exporting and print friendly versions of the data).  The API fully supports and generates the necessary CRUD code for multi-generational (ie parent-child-grandchild…ad infinitum) data structures, at this point though, each generation has to be of different class types — not really an issue for majority of apps.

In practical terms, using the old API, I was able to develop a working prototype (includes user management and authentication) of a personal healthcare system in a week (5 working days).  I expect to improve on this by at least 25% as pages I had to manually make before (e.g. paging of items, child templates etc) are already created by default with this milestone version.

Oracle to end MySQL in 2015?

In Database, Java, Networking on January 30, 2010 at 8:51 am

Finally, Oracle has finalized the purchase of Sun..frankly despite the assurances of Oracle, this whole thing is making me nervous about the future of these two technologies.   Ok so they’ve open sourced Java however Sun (or now Oracle) still has a say on what goes in in the final versions.. some people say that its in the interest of Oracle to continue the development of the Java programming language and its API’s because a big chunk of its middleware is written in Java… what worries me though (and believe me I’m not the worrying type)  is the licensing part and whether Oracle will continue the path of open sourcing Java?  Oracle is not exactly the poster boy of open source.

As for MySQL , according this:


while Oracle will continue to support MySQL in the foreseeable future and even agree to not release a new version of MySQL unless it also releases (in parallel I suppose) the community version.. it will only commit to do so only..

..until the fifth anniversary of the closing of the transaction“.

that closing happened on the 28th of January 2010, therefore it is reasonable to expect that after January 28 2015, Oracle can do whatever it wants with the licensing of MySQL.  My guess is, the strategy is to put some kind of doubt into the future of MySQL making people think twice when choosing between open source (MySQL is the de facto afterall) or getting a commercial alternative.  Companies do not like uncertainty, chances are CFO’s and CTO’s would find this ‘uncertainty factor’ worrying enough to instead buy a commercial DB rather than using OSS.  So nobody can really claim they’re out to kill MySQL (they promised the EU Commission afterall) but in the same breath they say we cant really say for sure what happens after 2015.

Time to explain all of these to my customers. =(