Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Image

Book Review: Camel In Action 55

RickJWagner writes "I'm pretty certain this is the definitive guide to Apache Camel, destined to be referred to as 'The Camel Book' by Camel users for a long time. It covers Camel inside and out, upside and down, 550 pages worth of gritty detail that takes the reader from level zero to monitoring of your production applications. If you use Camel, or think you might want to, you need to pick up a copy of this book." Read below for the rest of Rick's review.
Camel In Action
author Claus Ibsen, Jonathan Anstey
pages 552
publisher Manning Publications
rating 9/10
reviewer RickJWagner
ISBN 1935182366
summary A Camel tutorial full of small examples showing how to work with the integration patterns.
If you haven't used Camel, it's known as an "Integration Framework", a phrase that I like to equate to "ESB Lite". By that I mean if you want to route messages or transform them, this is a tool you might consider. Still not quite sure what I'm describing? Here's a couple of examples. If you want to read messages from a JMS queue, use the contents to invoke a web service and put the results of the web service call in a database, Camel's a good tool. If you want to read in a flat file, split it into individual lines, take a part from each line to call a web service, Camel's a good tool. Camel does all this and more, acting as a sort of universal router and message transformer. Camel aims to implement the famed "Enterprise Integration Patterns", which are easily understandable descriptions of processing snippets that provide functionality in likely scenarios when you're using messaging. If you're brand new to this type of programming, I'd encourage you to use Google to check out "Enterprise Integration Patterns"-- you'll quickly get a feel for the workspace Camel lives in.

The book is exhaustive in it's coverage of Camel. It shows the reader how to configure Camel using both Java code and Spring configuration snippets. It's meant to be progressive in nature, showing the reader simple uses to start with, then progressing to more advanced scenarios as the book gets into the latter chapters. (More about this later, it involves my only complaint about the book.) Along the way, the authors address real-world topics like transactions, production monitoring, and deployment to different hosting containers. All told, the book reflects the concerns of someone who has actually used Camel for real-world work, and as such will prove to be an invaluable resource for anyone moving Camel to production.

The source code that goes with the book is clean, easy to read, and above all it works right out of the box. It's all Maven-centric, so if you're not a Maven user yet you will be at least partially practiced in it by the time you're done with this book. The examples are straight out of the chapters, so you can look to the book for a detailed explanation of what you're running. (You can also run what's being described, and monkey with it to learn new things. Very handy.) I offer no improvement for the sample code, it works as advertised.

I was especially impressed by the care the authors took to explain the really nitty-gritty stuff that a real-world user is going to need. Concurrency and transactions fall into this category. All the sample examples in the world won't help you if the book doesn't help you scale you app and make it safe for production use, considerations you sometimes don't find in tech books. They're here, though, and covered in sufficient detail to meet your go-to-production needs.

This is a big book, and the text it contains is as simple as it should be but no simpler. The illustrations are simple and relevant. If you're brand new to Camel and want to read it front to back, be prepared to allocate a good number of hours for this task. This is because there's just a lot of material covered here, none of it fluff. If you're already an established Camel user, this book will serve well as a desktop reference for when you want to venture off into more of Camel's abundant functionality.

So what's not to like? The only criticism I have for this book is that the ordering of the chapters is not quite to my liking. It starts out with the simple canned examples, and they get progressively harder, 'till the reader is finally given the knowledge to write their own applications way out in chapter 11. If you're like me, you like to see an example or two, then you like to start hacking out your own "Hello World" apps to get a feel for how to build the artifacts you need to get things running. I thought chapter 11 was too late in the game for that knowledge. In fairness, if you're a reader who doesn't mind skipping around as you read, then just skip to chapter 11 right away and you needn't worry about this tiny nit.

So who's this book good for? Camel users of all types, from beginners to those who already own running Camel apps will benefit from this book. You won't be sorry-- you'll never wish you'd held out for a better book, because there just flat isn't going to be one, at least not for a long, long time.

You can purchase Camel In Action from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

*

This discussion has been archived. No new comments can be posted.

Book Review: Camel In Action

Comments Filter:
  • Camel Book (Score:5, Informative)

    by Anonymous Coward on Wednesday May 25, 2011 @01:47PM (#36242204)

    There is only one Camel Book [oreilly.com]

    • by Anonymous Coward

      Beat me to it. Yes, indeed, there is only one book that is The Camel Book, and no book about (Apache) Camel will be able to change that. Sorry, guys. :)

    • My first thought was that this looks like the "Arab" book, or the "Bedouin" book since all of the computer books I know of that are called the "animal" book have a picture of that particular animal on the cover.
    • by Anonymous Coward

      You saw the cover, right? The only nickname this book is getting is "The Taliban Book".

      Stupidest attempt at a meme hijack ever.

    • Can they call it the Camel Camel Book?

      Then all they'd need is a Perl book with a picture of a string of pearls worn by Minnie Pearl. Then we could have the Minnie Pearl Pearl Perl Book.

      • by Anonymous Coward

        They could then sell an abridged version as the Mini Minnie Pearl Pearl Perl Book.

      • Can they call it the Camel Camel Book?

        Then all they'd need is a Perl book with a picture of a string of pearls worn by Minnie Pearl. Then we could have the Minnie Pearl Pearl Perl Book.

        Surely you jest; Everyone knows that the only sensible response to a "Camel in action" is a purse wearing Bedouin wielding a club.

        Hence, when presented imagery of such an attired person, one immediately concludes: Oh snap! A Camel got loose.

    • There can be only ONE!
    • by spads ( 1095039 )
      Totally, like "duh!" How about The Jaba Book? I don't think that animal is taken yet.
    • by rduke15 ( 721841 )

      Yes, there is only one, but that's for Perl 5. The new Perl 6 book [bahut.alma.ch] is almost ready.

  • One hump, or two? (Score:4, Informative)

    by Anonymous Coward on Wednesday May 25, 2011 @01:48PM (#36242226)

    Ok when I heard Camel I was thinking Perl.

  • by Anonymous Coward

    "The Camel Book" is already a taken name; turn in your geek card :)
    http://oreilly.com/catalog/9780596000271

    Though admittedly, Netcraft confirms perl is dieing!

  • Nice explanation in the first paragraph of what the book is about. This is missing far too often in other /. reviews.

    The main camel website is apparently http://camel.apache.org/ [apache.org]

    However, I have been unsuccessful in figuring out how this would fit into my workflow.

    • by 0racle ( 667029 )
      I have no idea what it is, but I really hope this project takes off

      What is a Camel-TOE [apache.org]
      • by eln ( 21727 )
        Okay, let's be honest here: The entire Camel project was started specifically so they could call some part of it "Camel Toe", wasn't it?
        • by d'fim ( 132296 )
          No, it was so someone could publish a book with no camels on the cover so we could all then call it the 0-Camel Book.
      • I am going to risk answering your question....

        Camel is an implementation of Enterprise Integration Patterns [enterprise...tterns.com] in Java.
        If you use a message-oriented architecture for your application(s) or systems in your company, it is a great API to easily use any kind of transport / filtering / interception mechanism and carry messages from one point to another with many possibilities. Camel supports Spring, which allows for very few code in an application and a LOT of possibilities in handling messages. And the cherry on

    • Re:Nice explanation (Score:4, Informative)

      by Korin43 ( 881732 ) on Wednesday May 25, 2011 @02:31PM (#36242802) Homepage

      It took me a while to get through all the enterprisey buzz-words, but what Camel does is it takes things from one place and puts them in another. For example, it can read messages from a JMS queue, process them, then write the result to the file system. The advantages I've found with it are:

      1. It handles threading for you. You define what the process does, and Camel deals with scaling the number of threads as needed.
      2. It has a lot of built-in endpoints (JMS, file system, (S)FTP, S3, etc.)
      3. It's much shorter than normal Java code

    • by Splab ( 574204 )

      Are you joking? My filter might be off, but after reading the first paragraph I had no idea what Camel was, then I read the review and still have no clue what it is or what it's trying to solve...

  • by nedlohs ( 1335013 ) on Wednesday May 25, 2011 @02:07PM (#36242440)

    the most well known book nicknames in the unix/web domain.

    • I thought this too. And the second thing I thought of it was a typo for OCAML. Then I realized there must be a thing called Apache Camel that I don't know anything about, and I doubt if others would. Then I stopped caring.

      • I thought this too. And the second thing I thought of it was a typo for OCAML. Then I realized there must be a thing called Apache Camel that I don't know anything about, and I doubt if others would. I posted some inane commentary. Then I stopped caring.

        There, I fixed that for you.

  • Programming Perl (Score:4, Informative)

    by buglista ( 1967502 ) on Wednesday May 25, 2011 @02:09PM (#36242452)
    has been "the Camel book" since at least 1997, which is when I acquired my copy. Now get off my lawn.
  • Caml http://caml.inria.fr/ [inria.fr]

    Caml http://en.wikipedia.org/wiki/Collaborative_Application_Markup_Language [wikipedia.org]

    Camel: http://en.wikipedia.org/wiki/Customised_Applications_for_Mobile_networks_Enhanced_Logic [wikipedia.org]

    Camel:
    http://en.wikipedia.org/wiki/Apache_Camel [wikipedia.org]

    I've invented a wonderful new programming language let's name it Camel. And I'll name my compant MicroSwoft or Son microsystems.

  • I was hoping for some camel toe in action.
  • would have appreciated that "Camel Book" has two very different meanings depending upon whether you are in the Apache context or in the Perl context.

  • Why Camel? (Score:5, Informative)

    by illtud ( 115152 ) on Wednesday May 25, 2011 @07:20PM (#36246030)

    Let me put my cards on the table - I really like camel. Camel will get your kids up in the morning, iron your shirts and make your tea. Camel is great, but those of you running a full-blown ESB are all going 'meh'. I'm going to ignore you, because I'm going to have to explain what camel is to other folks.

    Apache Camel describes itself as an 'integration framework'. That means nothing to me, but I was looking for a solution in their problem space so I tried it.

    In a nutshell, you configure camel to run 'routes', which take a single input, optionally processes it, and outputs it to one or more outputs. The good thing is that the input & output endpoints can be files, messages, db data, atom feeds, DNS lookups, FTP, HTTP, email... oh, look for yourself: http://camel.apache.org/components.html [apache.org].

    The processing can be handing it to Java code, xml transforms, system execs, making decisions based on the content it's handling, splitting, merging... there are recipes for doing any of the classic Enterprise Patterns mentioned in the article.

    Team camel with a messaging broker (a server for queues that can safely queue and deliver messages - any data packet really) and you have a reliable and quick way to build complex workflows and process pipelines. Luckily, if you install Apache ActiveMQ, a very capable messaging broker, you get camel bundled-in, and you can just go ahead and add your routes a single XML file. You can very quickly be developing a camel-driven workflow/pipeline.

    So if you have defined processes that you'd like to automate, I can't recommend camel enough. And this book is pretty much essential. I didn't grok where to start with camel from the extensive project documentation.

    And this is my one criticism of camel (and a failure for me, I should be stepping up) - the beginner documentation isn't great, and it isn't at all clear how you'd go about running camel as a stand-alone process. The examples all use maven, and the review is correct in that you've got to have a handle on that to run it standalone. I've had much more mileage in using the version shipped with ActiveMQ, since I've always wanted to use it with a message broker (I'd recommend just for debugging and HA purposes - give each camel route an in & out queue to decouple and give you a chance to examine & inject data in & out of each).

    Confession time - I have no java. Yes, I can read the code, but I've never understood the development environment, nor have I really had reason to. Luckily, I work with java developers who quickly understood camel from its documentation and could produce the java beans for complex processing within a route.

    And my lack of java brings me to one problem that I've had with camel. It can be configured and driven best if you do it in java. But luckily for me, you can do 90% in a straightforward spring XML configuration. Routes that do a lot of work (eg, watch an email account, process messages to it that match a certain subject, lookup the from address in a db to get a uid, get that person's order history, split it into separate orders, email them a copy of each, send a PDF of the order to a remote printer, log the request) can be expressed in less than a dozen lines.

    I think it appeals to me a lot because of my familiarity with shell pipelines and using those to do a lot of heavy lifting. Camel is similar in building pipelines, but it handles all the endpoint transformations for you (RSS->email, one line - sure you've got an application or script that does the same, but if you want to change it to RSS->ftp, it's not a simple change).

    The camel documentation, like the book, treats the spring XML configuration as an afterthought. Fair enough, really, I'm just really glad it's there as an option for us java-impaired. I should be documenting the undocumented as I go and contributing back to this truly impressive project.

    I had mod points, but I couldn't see anything worth modding when I started this spiel, I hope it's been useful if there's anybody still reading this story!

  • where is the camel jockey jokes?

Put your Nose to the Grindstone! -- Amalgamated Plastic Surgeons and Toolmakers, Ltd.

Working...