Thursday 31 May 2012

Version Numbering


So many times I hear developers arguing about how to label versions so here is the "right" way to do it ... well a widely accepted way!

Software should be released with a version number based on the Apache Portable Runtime Project version guidelines. In summary, the version is denoted as three integers in the format of MAJOR.MINOR.PATCH.

Major versions are incompatible at the API level, as they can include any kind of change.
Minor versions are compatible with older versions at the API and binary level, and they can introduce new functions or deprecate old ones.
Patch versions are perfectly compatible, and they are released to fix defects.

Here are some examples to demonstrate the compatibility:
Original VersionNew VersionCompatible?
2.2.32.2.4Yes
Compatibility across patch versions is guaranteed.
2.2.32.2.1Yes
Compatibility across patch versions is guaranteed.
2.2.32.3.1Yes
Compatibility with later minor versions is guaranteed.
2.2.32.1.7No
Compatibility with prior minor versions is not guaranteed.
2.2.33.0.0No
Compatibility with different major versions is not guaranteed.
2.2.31.4.7No
Compatibility with different major versions is not guaranteed.
Note: while some of the cells say "no", it is possible that the versions may be compatible, depending very precisely upon the particular APIs used by the application.

Patch Versions

To retain perfect source and binary compatibility, a patch release can only change function implementations. Changes to the API, to the signatures of public functions, or to the interpretation of function parameters is not allowed. Effectively, these releases are pure bug fix releases.

Minor Versions

Minor releases can introduce new functions, new symbolic and enumerated constants, and deprecate existing functions. In practice, this will not be a problem since upgrading to newer versions is always safe.

Major Versions

Any kind of change can be made during a major version release. Particular types of changes that might occur:
  • remove or change constants
  • remove (deprecated) functions
So you might find that your code stops working completly.

Minor Versions

Minor Versions
Minor 

Data Replication for Stores

(Extract from an article on Oracle's Blog)

A tough problem for store systems is reliably moving data between the home office and stores in both directions. There are many solutions to this problem, each with its own positives and negatives. One solution is using the open-source software SymmetricDS, which was created for this very problem during the Oracle Retail POS implementation at BigLots. The original developers formed JumpMind, a company specializing in helping retailers use open-source to solve difficult problems.

SymmetricDS is an open-source, web-enabled, database independent, data synchronization software application. It uses web and database technologies to replicate tables between relational databases in near real time. SymmetricDS is database agnostic and can even synchronize data between different types of databases.
The idea of  SymmetricDS came from the need to synchronize many small, inexpensive databases at stores to a single, large, more expensive one at a corporate location. We needed something that would trickle sales data over a slow network and survive outages

It is possible to host SymmetricDS under Tomcat but it runs very nicely under Jetty as a single command line task.

(More..) (And on facebook...)

Log4j - Tricks

This post will grow as I find more little tricks and gotchas...

  1. Changing the timestamp format in the appender.
    Add %d{dd MMM yyyy HH:mm:ss,SSS} sooner than just %d and then edit the bits out you don't like.

Log4j manual...

Wednesday 23 May 2012

"Cmd here" in windows 7

In Win XP I found very useful the power toy CmdHere to open a command window in the current folder.

Q: So what is the equivalent in Windows 7?
A: Hold the Shift key down while right-clicking.  You should see an entry "Open Command Window Here" appear.