Velours de Mangue
We bought a siphon for cooking some time ago and are having fun with it to prepare desserts and starters (we made a mousse de foie gras that was awesome). Yesterday, we prepared a velours de mangue (velvet of mango).
We bought a siphon for cooking some time ago and are having fun with it to prepare desserts and starters (we made a mousse de foie gras that was awesome). Yesterday, we prepared a velours de mangue (velvet of mango).
JMS 2.0 has been released a few weeks ago. We are working hard to support it in HornetQ and WildFly and I plan to write a few articles about it.
The main features are described on Oracle Web site in What's New in JMS 2.0, Part One: Ease of Use and Part Two: New Messaging Features.
One of the most important new features is Shared Subscription.
Let's assume you are using a topic to send messages. There are several components subscribed to this topic that are processing the messages in different fashion (for example to process jobs A and B).
When a message M
is sent to the topic, all consumers subscribed to the topic receive it:
M +--------------+
---> | consumer CA1 | < a consumer for the job A >
+----------+ M +-------+ / +--------------+
| producer | ---> | topic |
+----------+ +-------+ \ M +--------------+
---> | consumer CB1 | < a consumer for the job B >
+--------------+
The consumer CB1 is subscribed to the topic. Every time, it receives a message, it processes the job B.
Unfortunately, this job is time-consuming and we would like to scale it out by having several consumers for the job B running on different machines.
We can not have several consumers on the topic for this job, otherwise they would all receive copies of the same message and process it several times. What we need is a set of consumers that receives a single message from the topic amongst them.
If the component is running inside a Java EE application server, you can use a Message-Drive Bean for that. If the component is a Java SE application, you are out of luck.
Before JMS 2.0, each messaging brokers has different ways to provide this feature.
With HornetQ, the workaround is to use a divert:
Diverts allow you to transparently divert messages routed to one address to some other address, without making any changes to any client application logic.
We use a divert to route the messages sent to the topic to another queue (let's called it Queue_B
since it's for the processing job B). Everytime a message is sent to the topic, a copy is also routed to the queue. Our divert is non-exclusive since we want it to still be received by the topic consumers.
We can then create as many consumers we want for Queue_B
. Since this destination is a queue, only one of them will receive a message that was initially sent to the topic:
M +--------------+
---> | consumer CA1 |
+----------+ M +-------+ / +--------------+
| producer | ---> | topic |
+----------+ +-------+
\ +--------------+
\ M ---> | consumer CB1 |
divert \ / +--------------+
\ +---------+ / +--------------+
| Queue_B | -- ---> | consumer CB2 |
+---------+ \ +--------------+
\ M +--------------+
---> | consumer CB3 |
+--------------+
Among CB1, CB2 and CB3, only CB3 received the message sent to the topic.
There are still many shortcomings of using diverts (or similar features) to share consumers of a topic.
Enter JMS 2.0 and its "shared subscription".
A non-durable shared subscription is used by a client which needs to be able to share the work of receiving messages from a topic subscription amongst multiple consumers. A non-durable shared subscription may therefore have more than one consumer. Each message from the subscription will be delivered to only one of the consumers on that subscription.
The basic idea behing sharing a subscription is to have a set of consumers (identified by a shared subscription name) receiving exclusively a message from a topic.
That solves all the issues we originally had in a standard fashion. We can now create many shared consumers with the shared subscription name << sub B >>
to have them process messages for the job B and scale out nicely:
M +--------------+
----------------> | consumer CA1 |
/ +--------------+
/ +--------------+
+----------+ M +-------+ / ---> | consumer CB1 |
| producer | ---> | topic | / +--------------+
+----------+ +-------+ \ / M +--------------+
<< sub B >> -- ---> | consumer CB2 |
\ +--------------+
\ +--------------+
---> | consumer CB3 |
+--------------+
Among the shared consumers CB1, CB2 and CB3, only CB2 received the message sent to the topic.
The JMS 2.0 API adds new methods to create shared consumer:
JMSContext.createSharedConsumer(Topic topic, String sharedSubscriptionName)
JMSContext.createSharedConsumer(Topic topic, String sharedSubscriptionName, String messageSelector)
It is also possible to create shared durable consumers:
JMSContext.createSharedDurableConsumer(Topic topic, String name)
JMSContext.createSharedDurableConsumer(Topic topic, String name, String messageSelector)
Sharability and durability of subscriptions are two orthogonal notions and all the combination are possible:
JMS 2.0 is an incremental update to JMS that should simplify any Java application using messages. Shared subscription is one of this interesting new features.
Insightful portrait of Tim Duncan on the cusp of his 5th NBA finals (he won his first fours):
Sometimes people will mention the swimming when trying to pinpoint the origin of Duncan’s remarkable discipline and relentless consistency. Duncan swam until he was 14 and seemed on a path toward the Olympics like his sister, Tricia. That was when Hurricane Hugo roared through the Island and wrecked the swimming pool. More, that was the year his mother, Ione, died of cancer. She had been his greatest fan, the loudest cheers at the pool, the voice inside his head. He would talk about the little nursery rhyme that she would repeat to him over and over and over …
Good, better, best
Never let it rest
Until your good is better
And your better is your bestYou can’t help but think that if you cut Tim Duncan open, those words would be etched on his heart.
There has never been a basket-ball player so consistent for the whole span of his career (stats per 36 minutes):
I am rooting for the spurs for these finals! #GoSpursGo
(via kottke)
This sunday was held the 2013 edition of Uriage Cabriolet Classic, a large gathering of classic (and more recent) cars.
I am not a connaisseur of cars but I can recognize a beautiful one when I see it. I really enjoy the attention to details of these cars and the love and care of their owners (the engines were all shining!).
This gathering is an opportunity to appreciate all the shapes and colours of cars. Even the most modest cars look fantastic with out of the ordinary colours.
We were lucky having a beautiful weather for the gathering and enjoyed the familial atmosphere.
My girlfriend and I spent one week in Tuscany. We loved every moment of it.
Spoiler: he loves the camera and, unsurprisingly, makes beautiful pictures with it.
I bought his book, The Print and the Process, this week-end. It is a beautifully crafted book composed of 4 sections, Venic, Iceland, Kenya, and Antarctica providing a variety of scenes (it's mostly landscapes and portraits though, it's a David duChemin's book after all :) Each section is composed of a set of 20-30 images without any text that helps appreciate the flow of pictures without any interruption. At the end of each section, there is a text for each images where the author describes what his intent or feeling was when he took the picture.
The book is bound along the short edge in landscape mode. This design makes the beautiful landscape images really stand out.
Beautiful book, gorgeous photos and instructive reading. Heartily recommended.
After a long wait, it was announced at JUDcon Brazil that the JBoss Application Server has been renamed and is now WildFly1.
Onwards with WildFly!
The new weather app from Yahoo! looks gorgeous and is a pleasure to use with an intuitive navigation.
The photos are geolocated and taken from Flickr photo pool. That's a great way to leverage Flickr.
With the updated Flickr app and this new weather app, Marissa Meyer is on the right track to hold her promise to make Flick awesome again.
With the release of the 55-200mm ƒ/3.5-4.8 telephoto lens, the Fuji X system gains enough reach to build a complete system and the announced 56 ƒ/1.2 will make an awesome portrait lens.
It's getting harder and harder to resist getting a X-E1...
Last month, my girlfriend offered me for my birthday a cooking class with a chef to make macarons. We already tried several times to make them without much success. The recipe is simple but not forgiving: one has to pay attention to a lot of details to cook macarons that please both the eyes and the palate.
This week-end, we had the cooking class with the chef and made macarons garnis à la pâte d'amandes et au caramel au beurre salé
The chef was friendly and gave us lot of explanation to make the best macarons and we are quite happy with the results. They look good and taste even better!
We heartily recommend anyone in Rhône-Alpes, France who is interested to improve its cooking craftsmanship to take a class with Jean-Luc at http://www.coachculinaire.fr.