Author: Jakub
-
Batching JMS messages for performance; not so fast
Recently an idea had crossed my radar around speeding up performance of messaging producers; batching messages into a single transaction. The idea being that there is overhead in the standard behaviour of a message bus that can be optimised out if you group messages into a single transaction. My initial thoughts about this were that…
-
Configuring ActiveMQ transactions in Spring
It’s easy to configure Message Driven POJOs over ActiveMQ with Spring, but slightly more involved once you want to get transactions working correctly; here’s how to do it. Start with a basic DefaultMessageListenerContainer config. An embedded broker is started, and a MessageListener (CountingMessageListener) is set up to pick up messages from a queue (sample.messages). MessageListenerContainers…
-
Give your DB the love it deserves
Pity the poor database. As critical to most apps as a foundation to a building. And as interesting as an accounting seminar at a nudist colony. Not sexy enough for the attentions of the senior dev, or considered to be “well understood”, DB work frequently end up getting handed off to the junior guys on…
-
Fashion!
Read this and chuckled. “Our industry, the global programming community, is fashion-driven to a degree that would embarrass haute couture designers from New York to Paris. We’re slaves to fashion. Fashion dictates the programming languages people study in school, the languages employers hire for, the languages that get to be in books on shelves. A…
-
Goldilocks actors: not too many, not too few
After my last post on parallelism with Scala actors, I had a thought: when doing a calculation like this, am I actually making the most of my resources? If as in the Pi example, more cycles will generally lead to a better result, surely if I have a limited amount of time to get the…
-
Better living through parallelism
Judging by the interest to my last actors post, I thought I’d throw up a piece of code that uses actors anonymously to parallelise a long running operation. Not every operation can be parallelised, most things we work on tend to be fairly sequential. However, sometimes if you can split up the work to perform…
-
Why I dig Scala: Concurrency and the Dining Philosophers
I am occasionally asked what the big deal is about Scala. For me, to decide whether a programming language is worthwhile is dependent on two practical questions: does it aid comprehension, and does it reduce code. The two are not necessarily interchangeable. Terseness, after all, does nothing to aid comprehension. Scala scores points on both…
-
Bored with software?
What’s interesting right now in software isn’t the new shiny thing. We already have the tools to do most of what we want. What’s interesting is scale and change. You build a system. Then you realize you need to break out and share functionality via modules. Then you want to manage them independently in live…
-
Mezzo D9 Folding Bike Review
Update 24/02/12: It has been nearly two years since I put up this article, and it’s still one of the most visted posts on the site. In that time I have received a number of comments on and offline about it. I posted it originally because I felt that it was the best way to…
-
Expressive or just terse?
This Scala code populates a list with objects: So does this. If you’re a Java programmer and just balked, you’re probably not alone. I know what it does and I have to read it from left to right to left to right again. In this case the shortcut’s a Scala mental snag equivalent to Java…