Beta

Slashdot: News for Nerds

×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Book Review: Camel In Action

samzenpus posted more than 3 years ago | from the read-all-about-it dept.

Programming 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.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.

cancel ×

55 comments

Camel Book (5, Informative)

Anonymous Coward | more than 3 years ago | (#36242204)

There is only one Camel Book [oreilly.com]

Mod up (0)

Anonymous Coward | more than 3 years ago | (#36242368)

Exactly the first thing that crossed my mind.

MOD PARENT UP (1)

Anonymous Coward | more than 3 years ago | (#36242458)

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. :)

Re:Camel Book (1)

Attila Dimedici (1036002) | more than 3 years ago | (#36242546)

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.

Re:Camel Book (0)

Anonymous Coward | more than 3 years ago | (#36243122)

Manning has a tradition on getting the cover illustrations out of an old book purchased from a Turkish street vendor.

Re:Camel Book (0)

Anonymous Coward | more than 3 years ago | (#36245308)

And in the process, most likely violating someone else's copyright.

Re:Camel Book (1)

Anonymous Coward | more than 3 years ago | (#36242566)

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

Stupidest attempt at a meme hijack ever.

Re:Camel Book (1)

Captain Spam (66120) | more than 3 years ago | (#36242748)

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.

Re:Camel Book (1)

Anonymous Coward | more than 3 years ago | (#36242818)

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

Re:Camel Book (1)

DudeTheMath (522264) | more than 3 years ago | (#36244068)

Why in the world would you post this anonymously? Mod parent funniest post on this page!

Re:Camel Book (1)

VortexCortex (1117377) | more than 3 years ago | (#36243172)

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.

Re:Camel Book (2)

dmmiller2k (414630) | more than 3 years ago | (#36242920)

There can be only ONE!

Re:Camel Book (1)

spads (1095039) | more than 3 years ago | (#36243108)

Totally, like "duh!" How about The Jaba Book? I don't think that animal is taken yet.

Re:Camel Book (1)

rduke15 (721841) | more than 3 years ago | (#36244188)

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

Re:Camel Book (0)

Anonymous Coward | more than 3 years ago | (#36244548)

Besides, this one has a raghead with his bedsheets around him on the cover.

One hump, or two? (4, Informative)

Anonymous Coward | more than 3 years ago | (#36242226)

Ok when I heard Camel I was thinking Perl.

Re:One hump, or two? (1)

lpaul55 (137990) | more than 3 years ago | (#36242340)

You are not the only one who thought that.

Re:One hump, or two? (0)

Anonymous Coward | more than 3 years ago | (#36242402)

I was thinking of caml

Re:One hump, or two? (0)

Anonymous Coward | more than 3 years ago | (#36243854)

yeah, me too. the REAL "camel."

Re:One hump, or two? (2)

laejoh (648921) | more than 3 years ago | (#36242562)

Larry should sue them!

Re:One hump, or two? (0)

Anonymous Coward | more than 3 years ago | (#36243144)

No the camels should sue them all!

perl? (1)

Anonymous Coward | more than 3 years ago | (#36242318)

"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!

Re:perl? (-1)

Anonymous Coward | more than 3 years ago | (#36244914)

Ah yes, Perl: there's more than one wrong way to do it.

Nice explanation (1)

vlm (69642) | more than 3 years ago | (#36242362)

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.

Re:Nice explanation (1)

0racle (667029) | more than 3 years ago | (#36242576)

I have no idea what it is, but I really hope this project takes off

What is a Camel-TOE [apache.org]

Re:Nice explanation (1)

eln (21727) | more than 3 years ago | (#36243330)

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?

Re:Nice explanation (2)

d'fim (132296) | more than 3 years ago | (#36243566)

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.

Re:Nice explanation (1)

flibuste (523578) | more than 3 years ago | (#36243474)

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 top of the Camel cake is that "message" can be any object you want. So you can carry and massage any data coming in and spit it in various forms and ways to various destinations.

An example I can give is taken from RL experience: implementing a SMS router/proxy using Camel: a SMS comes in; a SMS count is sent (by Camel) to a customer DB to bill him later, while this SMS goes through a (Camel) filter that finds out which carrier it should go to. The SMS is then forwarded (by Camel) to its actual transport destination....etc.

The beauty of Camel is that, besides having a full-blown implementation of Enterprise Patterns, you can do other things than just handling messages. I actually wrote a Wikipedia Dictionnary parser with it...
Get a dictionnary entry from an URL ->Filter bad chars->XML-ise it -> Send into DB and record to log...

If your company is SOA oriented or your applications are workflow-based, Camel is a GREAT solution.

Re:Nice explanation (3, Informative)

Korin43 (881732) | more than 3 years ago | (#36242802)

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

Re:Nice explanation (1)

Splab (574204) | more than 3 years ago | (#36242986)

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...

moar shill reviews! (0)

Anonymous Coward | more than 3 years ago | (#36242370)

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.

I'm pretty certain this is a shill review by RickJWagner, destined to be referred to as the 'Shill Boy' by ./ers for a long time.

I hate camel (0)

Anonymous Coward | more than 3 years ago | (#36242432)

a camel once kicked me in the crotch

Re:I hate camel (0)

Yvan256 (722131) | more than 3 years ago | (#36242538)

A moose once bit my sister...

Re:I hate camel (0)

Gilmoure (18428) | more than 3 years ago | (#36242988)

No, really! She was carving her initials into the moose with the sharpened end of a toothbrush given to her by Sven, her brother-in-law.

Re:I hate camel (1)

TheLink (130905) | more than 3 years ago | (#36242788)

These bunch like camels, but they might not mind taking revenge on the camel for you: http://shw.abakim.fotopages.com/14265650.html [fotopages.com]

I believe the yellow stuff is rice.

Re:I hate camel (1)

theshowmecanuck (703852) | more than 3 years ago | (#36242810)

Speaking of which, which chapter is about camel toes? This is the new porn framework, isn't it?

It seems unlikely to take over one of (4, Insightful)

nedlohs (1335013) | more than 3 years ago | (#36242440)

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

Re:It seems unlikely to take over one of (1)

cant_get_a_good_nick (172131) | more than 3 years ago | (#36242618)

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.

Re:It seems unlikely to take over one of (1)

coinreturn (617535) | more than 3 years ago | (#36242690)

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.

Re:It seems unlikely to take over one of (0)

Anonymous Coward | more than 3 years ago | (#36242968)

Definitely a troll.

Re:It seems unlikely to take over one of (0)

Anonymous Coward | more than 3 years ago | (#36242908)

so since you don't know about something then no one else does even though it's basically one of the most important message brokers available? you are either a scrub or a not-invented-here ostrich.

Programming Perl (4, Informative)

buglista (1967502) | more than 3 years ago | (#36242452)

has been "the Camel book" since at least 1997, which is when I acquired my copy. Now get off my lawn.

Re:Programming Perl (1)

eln (21727) | more than 3 years ago | (#36243400)

1991 [wikipedia.org]

Re:Programming Perl (0)

Mindcontrolled (1388007) | more than 3 years ago | (#36243490)

Indeed. We have some positively heretic shit going on here. Burn em at the stake!

Apress products are highly suspect (0)

unil_1005 (1790334) | more than 3 years ago | (#36242584)

If my previous experience with "Pro Drupal 7 Development" is any guide, Apress prints up the developer's notes directly without any editing or proof-reading. The text and illustrations and intellectual content were of sub-standard quality throughout. Thus I found it almost completely useless.

Thus I found it almost completely useless.

O'Rielly, on the other hand, always produces a very good product.

The only way a book from Apress could be the best reference on anything would be if it was the only one.

Re:Apress products are highly suspect (1)

cc1984_ (1096355) | more than 3 years ago | (#36245032)

Apress prints up the developer's notes directly without any editing or proof-reading. The text and illustrations and intellectual content were of sub-standard quality throughout. Thus I found it almost completely useless.

Thus I found it almost completely useless.

You might want to proof-read your own posts before posting.

Also, where's the relevance to Apress in this review? It is Manning Publications who are publishing Camel in Action

Ambiguous naming makes me sad (2)

Script Cat (832717) | more than 3 years ago | (#36242892)

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.

camel! (0)

Anonymous Coward | more than 3 years ago | (#36243552)

this site should move over to camel....http://www.camelcamelcamel.com

disappointed (1, Funny)

larry bagina (561269) | more than 3 years ago | (#36243750)

I was hoping for some camel toe in action.

Middle Finger (0)

Anonymous Coward | more than 3 years ago | (#36244096)

What a big middle finger to Perl. It's like they're saying "Get out!" of Apache.

I'd have thought that Perl fans (1)

Ukab the Great (87152) | more than 3 years ago | (#36244280)

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.

Re:I'd have thought that Perl fans (1)

laejoh (648921) | more than 3 years ago | (#36248392)

A sigil would come in handy :)

Why Camel? (4, Informative)

illtud (115152) | more than 3 years ago | (#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!

Re:Why Camel? (0)

Anonymous Coward | more than 3 years ago | (#36247364)

I love Camel, but my biggest criticism is that the components are of totally random quality. For instance, the Jetty endpoint is nothing short of amazing. You have an HTTP listener with asynchronous request handling where you can forward the request off to another http request, fire off a message on a queue, and wait for a file to appear on the filesystem, and it always gets the reply back, and you can do it in one line of code. Hell, it's not even code, it's just a string naming the endpoint. And from what I can tell, it never breaks.

On the other hand, you have the DNS component which loses message headers for no reason, and you have the file component which can't deal with threading and deadlocks and/or leaves stale lockfiles all over the place. Then there's the wonderful precedent of encoding API versions into the components, like the http component vs the "http4" component. Yes, I get that httpclient 4.0 is vastly different than 3.0, but why did they make this my problem?

Then there's the rather unpredictable behavior of property resolution, where {{property.name}} may work in some places, but you find you need simple("${property:property.name}") elsewhere.

Let's not even talk about seda components. The damn things don't even block, which sort of flies in the face of the SEDA design in the first place. I had to design my own processor to make them behave like real SEDA queues, and in the process I discovered that they don't even set a size for their internal BlockingQueue, which would seem to defeat the purpose of using them.

Camel lets me do complex things with very little code, but I'm finding Camel doesn't manage its own complexity very well.

/. on snooze? (1)

sgt scrub (869860) | more than 3 years ago | (#36246416)

where is the camel jockey jokes?

Check for New Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Create a Slashdot Account

Loading...