Quantcast
Channel: Scratch Where It's Itching
Browsing index pages (73 articles)

Image may be NSFW.
Clik here to view.

Star Trek Anti-Pattern

In previous installments, we tried to limit the number of Threads to the minimum, even to one. But what happens if you go the opposite way? Often, we try to parallelize some process, but do not want to...

View Article


TreeMap misuse

TreeMap is a very practical class when you want your Map to keep its keys ordered. Unless you don't know how it works. I noticed this code recently in one of our projects:private Map<Double,...

View Article


Image may be NSFW.
Clik here to view.

Zebra Pattern

Last time I explained the One Ring Pattern, where only one thread handles data coming from a queue. I also explained the reasons why such a pattern might be preferred.One of those reasons is when...

View Article

Format Date with java time

An advantage of the DateTimeFormatter class from the java time package over the old DateFormat is that it is thread-safe. But if the only thing I have is a Date, how can I proceed? The...

View Article

Image may be NSFW.
Clik here to view.

One Ring Pattern

Last time, I finished talking about all my Queue Patterns. Now I’ll start with my Thread Patterns. Once you have your queues filled with tasks, the question that arises is: how many Threads do I need...

View Article


Queue Patterns

This is just a summary of all my Queue Patterns:PatternDescriptionRocket Anti PatternData cross layersParatrooper ModelSeparate threads for separate layersMarsupilami PatternIntroduce queuesIndian...

View Article

Image may be NSFW.
Clik here to view.

Opera Lift Pattern

In my last part, I presented the Godzilla Anti-Pattern, where you would merge so many messages that a monster size packet would be sent and have negative effects.In this part, I would like to present...

View Article

Create Temporary Files with NIO 2 on Linux

We have an application that had problems with memory consumption. One type of object that we were keeping in memory was kept there only in case a user would start an administration client and connect...

View Article


Image may be NSFW.
Clik here to view.

Godzilla Anti-Pattern

Last time, I presented the Santa Claus Pattern, where you would send several messages wrapped up in the same packet to lower payload and increase performance.However, if you create your packets without...

View Article


Image may be NSFW.
Clik here to view.

Santa Claus Pattern

In a previous post, I talked about the Water Drop Anti-Pattern, where the ratio of payload to data was leading to poor performances.A way to alleviate this problem is to introduce the Santa Claus...

View Article

Negating a Predicate

Often, when using Java streams, I try to replace my lambdas with Method References. For instance, when I have this code: mystream.filter(mystring -> mystring.isEmpty()) ... I tend to replace it with...

View Article

Image may be NSFW.
Clik here to view.

Water Drop Anti-Pattern

In my previous entries, I presented two patterns that allow you to limit the number of messages sent over a queue: the Indiana Jones Pattern and the Hamburger Pattern. The first one filters data while...

View Article

Hamburger Queue

In my last entry, I presented the Hamburger Pattern and talked about how you can reduce the number of events on a queue by merging them. However, I feel that I should have presented at least one way to...

View Article


Image may be NSFW.
Clik here to view.

Hamburger Pattern

Last time, I introduced the Indiana Jones Pattern, where you would filter your messages in order to send less data on your overcrowded queue.Another way to reduce the number of messages is to use the...

View Article

Image may be NSFW.
Clik here to view.

Indiana Jones Pattern

In my previous entry, I presented the Indian Train Anti-Pattern, where we added without discrimination data to be handled on our queues, leading to overcrowded queues.One possibility to alleviate the...

View Article


Image may be NSFW.
Clik here to view.

Indian Train Anti-Pattern

Last time, I talked about the Marsupilami Pattern, where we introduced queues to transport data between application layers.Now you’ve been using these queues for some time, conveying all sorts of data,...

View Article

Image may be NSFW.
Clik here to view.

Marsupilami Pattern

In my previous entry, I described the Paratrooper Model, where each application layer would have its own thread pool for handling data. And the way to implement that is to use the Marsupilami...

View Article


Image may be NSFW.
Clik here to view.

Paratrooper Model

In my previous entry, I was describing the Rocket Anti-Pattern, where one thread would handle too much work across several application layers, leading to communication buffer overflow and message...

View Article

Image may be NSFW.
Clik here to view.

Rocket Anti-Pattern

At my presentation at Devoxx Paris this year, The Thread Awakens, I introduced several Patterns related to multithreading. Since it was a quickie, I had only 15 minutes to talk about 15 Patterns. That...

View Article

Java 8 might kill doclint

Since Java 8, javadoc doclint became a lot stricter. Up to now, we had some warnings here and there. But since we moved to Java 8, our Jenkins releases are failing because doclint would throw HTML...

View Article
Browsing index pages (73 articles)


Latest Images