Wednesday, May 20, 2009

FUSE Integration Designer 1.2 is out!

FUSE Integration Designer 1.2 has released. This product marks a significant improvement in the capabilities from the preview release. The product is designed specifically for development on the Progress FUSE products which are based on the Apache Camel, ApacheMQ, Apache ServiceMix and Apache CXF products.

I am very proud of this release. We have built this product from scratch at Progress Software India (amongst many others) but what has been achieved in this product in the short time that we have worked on it makes it special!

The product is an Eclipse SOA development toolkit focused around the FUSE product set and includes a full-featured Enterprise Integration Patterns editor specifically meant for FUSE Mediation Router (Apache Camel). Here's a screen shot of how a route will look. The editor now supports almost all the processors and patterns in Camel. We are actively working on adding additional endpoint support and enhancing it via usability tests and other feedback.

We also have a host of features and improvements we are planning in the coming releases. In addition to creating routes and exporting them to Spring you can also -
a. Deploy them to FUSE ESB (ServiceMix)
b. Run and Debug them - we have full Eclipse debug integration.
c. Import existing routes from Spring into the editor and view/edit them

In addition to the center piece EIP editor the product has some key features for FUSE developers -
a. Support for Java DSL based development
b. Support for ESB 4.x and 3.x deployment (all JBI packaging aspects are taken care of automatically)
c. Support for CXF deployment on ESB in addition to Tomcat
d. JMS Tooling for ActiveMQ (this is actually based on a completely extensible framework so it can support any JMS vendor - more on this in another blog).
e. Improved documentation to help you along with cheat sheets and stuff!

Give the product a spin and let us know what you think here.

Tuesday, January 13, 2009

Eclipse Development at Progress Software India

I keep seeing google keyword searches for jobs at Progress land at this site. My group is hiring and we are looking for smart and capable Java people who would love to make a dent in the Eclipse world. We are working on FUSE tooling amongst many other things. If you like being challenged and would like to work in a high caliber team - We are hiring!

Some of the things we have worked on in the recent past - SDO, DAS, XSL/XQuery Mapper tools, Refactoring tools, JMS Tooling, Distributed Debugging, Tracking tools, Camel, BPEL, Asynchronous Web-Services, Actional. My group is very active in the local Hyderabad Eclipse community with frequent talks and demo-camps.

We do some pretty amazing ActionScript and Web development work here at PSI (Progress Software India). So if you are a top-notch web developer, we would love to talk to you.

We are based in Hyderabad, Andhra Pradesh. The Progress bill board above is up on a uni-pole on Road# 36 Jubilee Hills all this month. Look at my blog on our previous job posting for some additional details.

Check out Ramesh's blog while you are at it.

Interested? Apply here.

Sunday, January 11, 2009

Extending the Java Console

The lack of a good way to be able to interact with the console in Java is extremely annoying. I have been working on a small project (hopefully the content of another blog eventually) which would work best if it had good access to the console. It is frustrating that even after all these years, Java has no good way of writing a decent console based application. I can only guess that the reason for this is perhaps WORA goals are compromised? I have created an extension to the Console API which allows for better access and additional features. This blog entry is about that project.

The limitations
Java has no equivalent of the C getch() API which allows you to read a single character from the input buffer. The only way to get System.in.read() to return is to hit enter after typing in your input which makes it an extremely clunky way to read characters and every character is then on a new line – like a newbie Java program. Java is just not meant for console input unless you are doing simple things like “Enter Name : “.


If you did somehow get past the lim
itations (and if you know a way how to do this with plain ol’ Java 6.0, please educate me) you get stuck with the lack of ability to be able to control your output. The introduction of Console.printf does add some significant output formatting capabilities, however there is no ability to move the cursor around to position your text right. Say you wanted to overwrite the current word under the cursor when Tab is pressed (like the command prompt does when you want to complete paths) – you can’t do that.
There have been a couple of solutions to these problems - there is a hack which partially works. Maven does this neat thing when downloading anything significant from a repository where it shows the download progress.

Maven does this by using \r at the end of the System.out.print() which allows it to overwrite the previous line. Another hack - If you wanted to do the Tab-should-overwrite-current-word-under-the-cursor thing you could do System.out.print(“\b”) as many times are required to overwrite the letters under the cursor. This would work BUT both these techniques are limited by the start of the current line – i.e. they are unable to go to the previous line which limits their usage.


What is really required is an addition to the Console API in Java. The Console API was introduced in Java 6.0 and provides some much needed additions to Java’s capabilities to deal with character based applications. Console introduces methods to read passwords (without echo) and adds the printf method I talked about earlier. However, it still lacks the ability to read individual characters and to position the cursor and therefore was still insufficient for me.

The solutions

Like every lazy developer, I did Google away for a Java curses or Console implementation. The most promising one I found was JCurses – a Java Curses implementation for Windows and Unix (using JNI).


This is a nice little project that provides the curses API in Java. It provides a bunch of widgets and layouts and containers for creating UI in character mode. It’s nice but that’s not what I wanted. However, it did have a lower level API (that was not recommended for use but that’s just an invitation, isn’t it?) that allowed character input and character output. The input could be retrieved one character at a time just like I wanted but the output forced me to provide an x, y location. That in it self would be fine if I had an idea of where I was on the screen. The API lacked the ability to get and set the cursor location – basically I think the idea was to create character UIs (probably full-screen) so it wasn’t that important in the context of the JCurses project. Also, the output methods did not move the cursor which made the whole thing look and feel rather weird. I wanted something that will make the user retain his feel of the command line – not a character mode UI.

There has been a similar project in the past which seems to have moved or died - at least I couldn't find it - here's the link.
Sun has been introducing features bit by bit as mentioned above. Here's the link to the discussion on the password entry. This is nothing close to what I want and continues to have the clunky enter-for-input behaviour.

Then I figured what I only wanted was really a small Console API with supporting classes. I got the Windows SDK and looked up the Console support and Windows has Console API that did exactly what I wanted that would work just fine. Writing the JNI library to get the basic console API wasn’t that hard.

The next step was to have the Java API that provided basic extensions to the Console. It has very few methods –

  • to read characters with or without echo
  • to output characters at the cursor location or at a specified location
  • to retrieve the current cursor location
  • to set the cursor location
  • to retrieve the screen size.
The Console library has all capabilities to let me do console input and output. What I have is lean and does exactly what I want – a useful Console extension that provides basic capabilities that were missing.

Project - help wanted!
The project is available on Google Code here. I will try contributing back to the JCurses project when I am done. If you are interested look at console.Console. console.ConsoleBuffer provides a higher level abstraction allowing the console to be treated as a text field with an index into the text instead of dealing with the row-column nature of the cursor.

I would like some help with a few things though –
  1. I used to be a good C programmer but am significantly rusty so my C code could use a good code review to look for leaks and such or any suggestions on doing thing better.
  2. I am basically on Windows so I didn’t write anything for Linux – so someone to provide a Linux port and build would be great.
  3. I need to get the Maven build working completely. It builds the Java part but I had trouble with the native-maven-plugin to get it compile the native parts. So that is done as a bunch of batch files right now :-(
If someone would like to help me with these please drop me a line. The project is using Apache License 2.0 so is available for re-use in other projects.

If you do use the library and have any feedback, I would love to hear it.


I really think functionality should be added to the Console class in Java. There are a couple of RFE’s in the Java Bug Database that request for more capabilities in the Console API – 6672641, 6552816, 4050435.

Tuesday, December 30, 2008

Pure Idea Joy

One of the reasons why I love IntelliJ Idea. Look at the text in red below.

package com.msh.ui;

import java.util.ArrayList;
import java.util.List;

/**
* User: sachinh
* Date: 28-Dec-2008
* Time: 17:22:38
*/
public class ParsedCommand {
private List<Property> props = new ArrayList<Property>(5);
private List<PluginInfo> mojos =
new
ArrayList<PluginInfo>(5);

public ParsedCommand(String cmd) {
parseCommand(cmd);
}

public List<Property> getUnusedProperties() {
for (PluginInfo p : <ctrl+shift+space> fills in mojos) {

}


Just brilliant - the fact that it picks up the right collection field
based on the Iterator's type. I think its called Smart Code Completion.

Thursday, August 02, 2007

Rising to the top

Recently, I posted a one line, grammatically incorrect (actually it just had a typo - a missing 'of') blog in which all I did was praise Seth Godin's article and point to it. I didn't think anything I had to say about the topic could really add any additional value so I refrained from putting in any of my comments. I didn't think much about it then but afterwards I found out, interestingly, this article had reached the top of the Popular Entries for the last 24 hours at JavaBlogs.com. This is not really such a big deal but I have an RSS feed to the popular entries and it is always interesting to see what rises to the top in that list. Because Mozilla's Live Bookmarks shows only the title, I have to judge whether I want to read the article based on the title.

Despite it being a collection of Java blogs, it is infrequent that anything seriously technical about Java manages to hold popular attention. It is always the more interestingly worded title that starts to move up rapidly (perhaps the only exceptions are the latest buzzwords and the word 'performance'). More technical titles generally languish somewhere in the middle of the list which at the top is crowded by articles that are inflammatory in their title or simply very vague about their content. The advantage of the latter (which mine must've inadvertently become) is that you have to click on the link to find out what's in the blog. This makes the blog more 'popular'. This, of course, makes it go up higher in the list allowing reaching more people and setting off a chain reaction.

So, here's (deliberately this time) a rather vague title for this blog to test this theory :-)

Tuesday, July 31, 2007

Managing Expectations

Seth Godin has this truly wonderful blog which is always very interesting to read and this piece advice is true gold.

Wednesday, July 18, 2007

Another reason to have X-GOOGLE-TOKEN?

In my previous post here about XMPP I had linked to a blog (here) that describes the X-GOOGLE-TOKEN mechanism of authentication. dJOEk asks a question "Why does Google use a proprietary authentication mechanism" and then goes on to make a point about how X-GOOGLE-TOKEN could be one of the first steps twoards a Single Sign On solution from Google. This point of view has received a lot of coverage with a several people commenting about the merits of this idea or its feasibility.

I have recently noticed another possible reason for X-GOOGLE-TOKEN to be made available and this is what I am putting forth here -
I had written in my blog that when I tried to sniff out the conversation between Google Talk and the server using Ethereal I found that it was using TLS and not X-GOOGLE-TOKEN and therefore all conversation was encrypted. Several people have since asked for ways around this but the whole point of TLS is to prevent such sniffing and decryption is practically (at least to me) impossible.

Since then my current company has installed an auditing software (I know :-() for compliance reasons and interestingly Google Talk is back to using X-GOOGLE-TOKEN. When using X-GOOGLE-TOKEN only the authentication part goes over TLS while the rest of the conversation does not which means that conversations are in plain text and can be intercepted, audited and archived. So, another possible reason for supporting a different authentication mechanism could be to be able to support auditing and monitoring software?