Posts

Support Open Source Initiatives

Image
A survey by Boston Consulting Group in of developers using SourceForge found that respondents were, on average, 30 years old and had 11 years of programming experience. These were experienced professionals contributing to quality software products for free. Open Source is so pervasive now that people don’t talk about it or discuss it anymore. The assumption is that quality software will continue to be available for free. Without donations and support this is not possible, especially in tough economies. I have been an active user of OSS at work for almost every single project. Software development projects utilize a plethora of components that are open source. Open Source Object Relational Mapping frameworks, Model-View Controller frameworks to full scale operating systems, application servers and databases are used across business applications everywhere. So what is the basic idea behind the open source movement ? “The basic idea behind open source is very simple: When pr...

Setting up Apache Ant 1.8 in Ubuntu 10.04

There seems to be a lot of incomplete tutorials out there relative to installation and configuration of Ant on Ubuntu. Here is how to do it correctly. Open .bashrc and add the following lines #Setting some paths export ANT_HOME=$HOME/tools/apache-ant-1.8.1 export JAVA_HOME=/usr/lib/jvm/java-6-sun # Add stuff to the path and export it in one step export PATH=$PATH:$ANT_HOME/bin:$JAVA_HOME   Prerequisites: download ant and expant that into a folder (I use $HOME/tools) for all my tools. rohit@lenovo:~$ ant -version Apache Ant version 1.8.1 compiled on April 30 2010 Done.

Point-to-point SOA

Image
p, li { white-space: pre-wrap; } Service Oriented Architectures realizations are coupling departments within large organizations. Web-Services are being developed without compliance or guidance from any actionable enterprise architecture design. Without a full soup-to-nuts solution architecture template available to teams, well-intentioned developers are unfortunately creating a web of point-to-point systems architectures with SOA tools and technologies. Vendors, marketing, tooling and technology isn't helping integration architectures evolve and arrive at the optimal quality attribute tradeoffs. Most quality attributes, like loose coupling, high cohesion, performance, scalability etc are skewing negatively. It cannot be stressed enough that SOA is more dangerous with out a proper design in place, than no SOA at all. WSDL, SOAP, XSD, REST etc are still not properly understood or realized appropriately in many organizations. Basic systems architectures are unable to evolve due to a ...

A Combination Algorithm

The problem: Write an algorithm that can provide combinations of a given word. The combinations need not contain a new word with the same letters. Input: ABCDE OUTPUT: ABCDE, ABCD, BCDE, ABC, BCD, CDE, AB, BC, CD, DE etc. There are several algorithms out there that describe how to create effective combinations, SEPA does permutations, bubble sort and nested loops etc. After spending some time looking for what’s been done - the one I liked the most was as follows: [0,0,0], [0,0,1], [0,1,1] [1,1,1]: null, A, AB ABC etc. Incrementing decimals, start with zero, get a binary representation and map it to the array positions. This will give the combinations in constant time. A very efficient algorithm.    /**     * Take a word and return a collection of combinations     * @param sortedWord     * @return     */    public Collection<String> generateCombinations(String sort...

Tomcat, Struts, Tiles and Hibernate Migration

I had an old ‘home’ project that was based on the following technologies: (1) Tomcat (2) Hibernate (3) MySQL (4) Struts 1x (5) Tiles 1x I had developed this in 2004-2005 for a user-experience experiment I had designed. I just decided to upgrade the technologies to : (1) Geronimo (2) OpenJPA (3) MySQL (4) Struts 2 (5) Tiles 2.2x Why ? Mainly to experience what a migration path might be. As I go through the effort – it turns out that there is no easy migration path. OpenJPA is vastly different from Hibernate. Struts 1x and Struts 2x have very little in common. It is a full rewrite. Tiles 2x has the most common features deprecated, and it too is a rewrite – given the jsp pages need to be updated. The latest version of Tiles is incompatible with the latest version of Struts (as of May 2010).   java.lang.NullPointerException org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory.getDefinition(UnresolvingLocaleDefinitionsFac...

Debate over Domain Agnostic Connections

Image
I recently introduced after a proof of concept and technology Service Integration Bus to enable Event Driven Architecture style integration across the commercial enterprise. The first team implemented it exactly as the POC specified. The second team that was responsible to be the durable subscriber raised concerns about Domain Agnostic Connection factories. The claim was that using domain Specific Connection Factories makes life easier. The basic difference between the two is that one uses for example TopicConnectionFactory to create a TopicConnection, whereas the domain independent connection factory lets you look up a ConnectionFactory to create either a TopicConnection or a QueueConnection. This lets you get flexibility in the app and is basically a new feature in JMS specs. Anyway the second team was up in arms about using domain agnostic connection factories. “Why is architecture recommending this? It’s making life difficult for us!”. Of course the first thing you learn in s...

Are DSLs simply XML Hell?

DSL : what is it ? You have used a Domain Specific Language. Trust me. Demystify DSL: it simply a narrowed and specific semantic problem that solves a narrow set of problems. Model-View-Controller (MVC) is a common pattern for Web development, Apache Struts has come to the rescue in the past. Each Struts application uses a configuration file (XML). The language (dialect) of the XML specifies exactly how the MVC pattern would be implemented for the specific implementation this is DSL. Object Relational mapping was a common problem made worse by general purpose languages and APIs(e.g. Java and JDBC), along came the a natural ORM (e.g. Hibernate) with specific configuration files that mapped POJOs to Tables. The configuration file (XML) supported a dialect (ORM DSL), of course it was not called DSL back then they were simply configuration files (aka XML Hell). DSLs don’t necessarily mean XML. For example, running rules in Java was ‘simplified’ by a Rules Engine implementation e.g. J...