Monday, April 28, 2008

Jim Webber = SOA - ESB

Just listened to a classic talk from Jim Webber about SOA and ESB. Jim Webber is a big name in the SOA space and is coming to Australia shortly to talk at the JAOO conference. In this talk he explains why SOA is good and why ESB is bad. It is very thought-provoking and entertaining. He thinks that your integration should be web services, but you don't want a big proprietary piece of middleware sitting in the middle of your enterprise.

My favourite quote is his response to a question about orchestration at the end:

Orchestration is just a programming language. So if you want to build a service using a visual orchestration language, you're entirely entitled to do that. Provided you don't pollute the rest of the service ecosystem, that's great. I caution you that probably Java, C# or VB, or for heavens sake Haskell, will be a more productive environment for you to work in than sticks and boxes and lines - but if you're insistent you want to do that, that's great. Just don't think that you can draw a picture and then hit the button and get deployed into production. Because that's crack smoking fantasy time!

Tuesday, April 15, 2008

Go To Definition shortcuts

Across the IDEs I'm using at the moment, the "Go To Definition" short-cut (drill-down on method to see the code) is:

  • Eclipse: F3

  • VB6: Shift-F2

  • Visual Studio: F12 re-mapped to use the VB6 settings because F12 gives the Dashboard on Mac

Monday, April 14, 2008

Log4j Root Logger

I just found out that with log4j I can set-up a "root" logger. This is a catch-all logger that writes everything, regardless of the package. Seems pretty obvious, but I hadn't seen it before. If you use this in conjunction with a package logger, and you are outputting to the same file, then use the additivity="false" attribute on the package logger to stop lines appearing twice. My example log4j.xml file is below. Note that I output everything to stdout when developing, and then switch over to the rolling log file when I deploy it.

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="">
<appender name="stdout" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<!-- Print the date in ISO 8601 format -->
<param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />
<appender name="file" class="org.apache.log4j.RollingFileAppender">
<param name="file" value="/var/tmp/logs/myapp.log" />
<param name="MaxFileSize" value="10000KB" />
<param name="MaxBackupIndex" value="3" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />
<logger name="org.apache.fop" additivity="false">
<level value="info" />
<appender-ref ref="stdout" />
<logger name="com.example" additivity="false">
<level value="debug" />
<appender-ref ref="stdout" />

<!-- root logger -->
<level value="info" />
<appender-ref ref="stdout" />

Friday, April 11, 2008

File Transfer between Machines using Remote Desktop over Cisco VPN

I access my work PC using Remote Desktop over a Cisco VPN. The VPN shuts down internet access on my PC while it is connected. I needed to get a large file from my work PC to my home PC over the VPN. For small files I'll use email with attachments but this doesn't work with bigger files due to size limits. The solution was to set-up a FTP Server on my home PC and use ftp from my work PC to put the file onto my home machine.

Setting up an FTP server on my home Windows XP machine was pretty straight-forward. It can be done through Add/Remove Programs, selecting Windows Components and then drilling down into IIS. Follow these steps here for more details. I set mine up with anonymous write access to keep it simple.

Once the ftp server was installed, I connected to my work PC went to the command prompt. The "ipconfig" command revealed the IP address of the VPN. It was then a matter of using "ftp" to connect to that IP address and put the file across. Use a login of "ftp" for anonymous access.

The only other thing to remember was to shutdown the ftp server (along with anonymous access privileges) at the end of it all. Don't want that running with anonymous write access all the time!

Thursday, April 10, 2008

Source Control under JumpBox

I've been doing .Net and VB6 development under Parallels on my Mac, and using Subversion mounted on a shared Parallels folder for source control (see this post). This gave me regular time machines backups...but the performance sucked! Checking at the trunk would take forever! And, of course, my Mac development work (Java, Cocoa, Grails etc) couldn't use the same repository.

So I've moved to Plan B - a Trac Jumpbox. This runs under Linux on Parallels and takes pretty much no set-up at all. You download it, fire it up and on the Trac home page you'll see the URL to use for Subversion access. I can now use this repository for both my Mac development and my Windows (parallels) development and it is all stored on the same machine. Plus I get the Trac source control viewer, diff tools etc which I've always loved (and a Wiki and bug management tool which I'm not going to use). It all runs right here on this machine, so I can do my dev work and check stuff in, without internet access.

There are a few hassles with this solution, so it might not be the final answer:

1. I need to remember to start-up the Trac Jumbox when I need source control. I could have it auto-start but I'm a big fan of a quick-starting machine. That's why I went to Mac in the first place! And I need to shut it down when I've finished.

2. When I'm doing Windows dev work I now have two virtual machines running. This performs fine as long as I don't sleep the machine. Waking it up is patchy at best and on several occasions I've had to reboot the Mac to get it working properly again. (Forget Fusion - I've tried it and I didn't like it!)

3. Time Machine doesn't back up virtual machines well (it backups the whole machine up every time), so it doesn't back my source control up. So I'm only backing up once a week via SuperDuper. This is not ideal!

4. This doesn't help me to develop on other machines in the house, or off-site. Should I be using a server, or perhaps hosted source control?

We'll see.