Sunday, October 25, 2009

NFJS Conference Atlanta 2010 - Day 3

The last day is over. It's been a great conference. Without a doubt, JVM language alternatives dominated the conference sessions. Since I won a book on Scala yesterday, I will checkout that language out next :-)

Today, I attended two sessions by Ken Sipe: "Architecture and Scaling" and "So you want to be an Architect". I particularly enjoyed the latter one, as Ken gave a very pragmatic overview of his view on what the qualifications of an architect ought to be. I had to smile when somebody from the audience asked Ken how as an architect you can possibly keep up with the constant technical innovations and the sheer breath of required knowledge and Ken responded that he doesn't watch any TV. Well, I catch myself weekly listening to the Java Posse, SE Engineering Radio, Parleys.com etc. while doing the dishes, cleaning up etc. And with planning for AJUG meetings, the next Devnexus conference etc. there is not much time left for TV either (Although I still leave some space for my weekly dose of Southpark ;-)

I guess you really have to like what you're doing in order to fulfill the requirements of an Architect.    

During the Birds of Feather (BOF) session I asked the panelists on their opinion about Python, which was never even mentioned at the conference but which at the same time is heavily used in computer science teaching at colleges in Georgia. Their opinion was, that it's white-space issue is just too much of a limiting factor for using it in HTML scripting, using it as a DSL etc. and also that there are some issues with the user community itself. And thus, they said, there were just better alternatives at this point.

During the afternoon I attended 2 sessions by Ted Neward
  • The Busy Java Developer's Guide to Advanced Collections
  • The Busy Java Developer's Guide to Hacking with the JDK 
Both sessions were interesting but I wish Ted had given some more real world examples for use cases of Apache Commons Collections and the Google Collections Library. In his latter talk he showed an example of how to add functionality to core JVM classes. Interesting, but talking about "experimental and highly hacky stuff".

Overall, this was an absolutely wonderful conference. Looking forward to the next one! As always: Jay keep up the good work!

Saturday, October 24, 2009

Don't use Java for New Projects - NFJS Day 2

Day 2 of the No Fluff Just Stuff (NFJS) conference here in Atlanta is over - It's been a good day. It has been another day of excellent speakers and topics. One thread you can see clearly throughout the presentations is:

Java's days are numbered as a language for new development - Viva la JVM!!

I got the sense that you should at least start thinking about an exit strategy. Stuart Halloway was even more outspoken: "Don't use Java for new greenfield development." (Saying that any of the talked about alternatives are better - Scala, Clojure, Ruby and Groovy).

After going to a few sessions that dealt with concurrency, I am certainly not inclined (border-lined scared) to do that kind of stuff in Java. The two languages most talked about at the conference were Scala and Clojure.

The nice thing is, that both language run on the JVM, so you can use the new language features, but are also able to use the vast power of Java libraries, if needed. Once drawback I saw is the fact that both Scala and Clojure can be fairly cryptic, which was an issue that was raised repeatatly by the audience and as well during conversations with fellow developers in between session breaks. Scala at least gives you the ability to write Java like code and then later on as you gain proficiency, you can make your code more concise . From a "power perspective", Scala looks awesome, though.

The sessions I atended to today were:
  1. Tackling Concurrency on the JVM (Venkat Venkat Subramaniam)
  2. Advanced Topics in JMS (Mark Richards)
  3. Java.next: Clojure, Groovy, JRuby, and Scala (Stuart Halloway)
  4. What's New in Spring 3 (Ken Sipe)
Onto the last day now...

NFJS Conference Atlanta 2010 - Day 1

Today was the first day of the NFJS conference here in Atlanta. It's my third time and it is always a great experience in terms of sessions but it is also a good opportunity to network.

First I went to two sessions of Venkat Subramaniam: "Effective Java" and "Programming Scala", both excellent sessions. I get the feeling, it is really time to look beyond Java, particularly if you do anything around concurrency. Not sure if Scala will be it, there seemed to be some contention in the crowd regarding Scala's more cryptic syntax. Although, it looked manageable in my opinion. Nevertheless, I need to check out the Clojure talk tomorrow.

The third session I attended was "Transaction Pitfalls and Strategies" by Mark Richards. At first I was a bit hesitant attending the session but I was glad I did. A related article can be found at IBM DeveloperWorks. The presentation contained some really good stuff.

The first day ended with a very good keynote by Ted Neward on Iconoclasm. Oh well, it is 1am already...better get some sleep for day two of the conference.

Friday, October 23, 2009

How to Teach CS to Children

At the Atlanta Java Users Group (AJUG) we had an awesome presentation by Barbara Ericson on how to inspire children to learn more about computer science (CS). It was a really informative session. As director of Computing Outreach at Georgia Tech University she helps prepare curricular materials for high schools.

As such, she gave us a detailed overview of the state of CS teaching in Georgia and the nation as a whole. Furthermore, she gave us an overview of all the cool software tools that help teach CS concepts including:
She also talked about some interesting robotic toys that help in her efforts:
I wish I had had the stuff when I grew up...

There is even a website out there that provides free information on activities that teach CS concepts without a computer: http://csunplugged.org/

Lastly, if you have children of your own, you should certainly check out Barbara Ericson's presentation and you can also find many more resources on her website: http://coweb.cc.gatech.edu/ice-gt

Saturday, October 17, 2009

Apache Camel Alternatives

In part one of my mini series I provided a quick introduction to Apache Camel and in part two, I continued with a simple example illustrating the very basics to get you started (which I extended a bit in part three)

In this posting, I would like to talk about some of the alternatives that I see might be interesting for you to investigate, when considering an open-source enterprise integration framework. Hereby however, things always get a bit fuzzy in my opinion, depending on your business requirements.

On one side, you want to have components which allow you to communicate with other services, but on the other side you also want to have some sort of workflow-capabilities in order to orchestrate your business processes. Furthermore, you may be interested in monitoring and reporting functionality.  From a different view-angle, you may desire a higher-level solution versus a solution that embeds easily into existing code using plain Java APIs. The list could probably be expanded considerably, but I hope you get the picture.

Ergo, depending on your specific business requirements, the following list of frameworks may or may not provide a better choice compared to Apache Camel:    
  • Spring Integration
  • Spring Batch
  • JBPM
  • nexusBPM
  • Drools
  • Hadoop/Cascading
  • Full ESBs such as Service Mix, Mule ESB, OpenESB, JBossESB
Actually, in my opinion the closest alternative to Apache Camel is Spring Integration.

Spring Integration

Before I was even aware of Apache Camel, I learned about Spring Integration at the No Fluff Just Stuff (NFJS) Java conference one year ago. Back then I thought that Spring Integration was the best thing since Nutella. Then a little later I learned about Apache Camel and tried to figure which one to take for a spin. As it turns out, comparative information on Google is rather sparse:
Interestingly, Apache Camel provides a component that allows you to integrate Apache Camel with Spring Integration.

To me a good argument for Apache Camel was the greater availability of components compared to Spring Integration, as well as its adoption by other frameworks such as ActiveMQ and ServiceMix


Spring Batch

If your business requirement is to process large amounts of data, you may also want to look at Spring Batch which is specifically designed for batch processing requirements. There are some pointers on the Spring Batch website for integrating it with Spring Integration. I considered it for one of my past projects, but unfortunately I do not have massively deep experience with it as we ultimately chose JBoss jBPM.

jBPM

In my opinion another option worth considering is jBPM from JBoss. I used it in one of my past projects. Integrating it back then with Spring was certainly a  bit tricky (especially asynchronous execution of Nodes), but it is doable. Interestingly, starting with version 4.0, JBPM provides native Spring integration. Unfortunately, I did not have any opportunity, yet, to try out JBPM 4.0.  JBPM is certainly much heavier compared to Apache Camel or Spring Integration. I would say that its focus is also slightly a different one. While it provides support for human task management during workflow executions, managing the state of your workflow nodes etc., it totally looses out compared to the available components, which are provided by Apache Camel.


nexusBPM

A little bit jBPM on steroids is nexusBPM (An older blog post of mine about it is here). Developed by Intercontinental Hotels Group here in Atlanta, it is open-sourced at Sourceforge and provides a set of useful components in addition to the original JBpm distribution.

Drools

You probably would not necessarily think of Drools being a Workflow solution but what originally started out as a rules engine seems to venture increasingly into other areas as well. In fact, at least from a 30k foot view, it pretty much provides similar functionality as JBPM (Workflow, human task management etc.) and also provides a few components such as FTP, mail, executing system commands, etc.

What kind of baffles me is the fact that JBoss is maintaining 2 very similar products...

Cascading and Hadoop

If you need to process large amounts of file-based data, then Cascading might also be an interesting alternative. Cascading uses MapReduce to handle chunks of data. Interestingly, you can also use it for creating workflows. Not too long ago I attended an interesting presentation on that subject at AJUG. The presentation can be found here.

ESB like ServiceMix, Mule, OpenESB

Last in my list of alternative frameworks to Apache Camel is an entire category of solutions: Enterprise Service Buses (ESB). Enterprise Service Buses are basically stand-alone products, and as such, have a much heavier foot-print than for example Apache Camel which is basically just a set of light-weight Java APIs. In fact Apache Service Mix 4.0 is using Apache Camel under the hood in order to provide message routing. Besides Apache ServiceMix, you may also look into these OSS products:
This concludes my VERY high-level overview of frameworks/products that allow you to implement worklow and/or enterprise integration-based solutions. This whole subject could easily be extended into a more comprehensive article. Nevertheless, I hope I was able (within the limits of a blog post) to provide you with some good starting points.

¡Hasta la próxima!

Sunday, October 4, 2009

Camellos III - Zipping Files with Apache Camel Example

I played a bit more with Apache Camel and I extended my little Camellos project (See this blogpost for details, including for directions to get to the source code) by another simple Example:
  1. poll directory zip-input for any type of files
  2. pack the files using the Zip data format
  3. output files to the zip-output directory
I thought this would be an easy example to get my feet a bit more wet with Camel. Apache Camel provides 2 data formats for zipping files:
Interestingly, using the marshaller for the Zip data format, you're unable to generate standard zip file. Looking through the source code of the Zip daa format, it turns out that Apache Camel is using a DeflaterOutputStream to created the compressed data versus using a ZipOutputStream. A bug??

Thus, what a great opportunity to create my fist customized Camel Data Format implementation :-) I basically just took the existing ZipDataFormat class and converted it to using a ZipOutputstream, and by adding a single ZipEntry for my file. This works quite well.

I also added a reverse route for unzipping a file. One limitation exists. The zipfile can contain only one file. I am not sure, yet, how to solve the issue when you have more than one file in your zip file...I guess this may be a task for the Splitter or Aggregator components.