Skip to content

Instantly share code, notes, and snippets.

@gulench
gulench / processing-messages-in-sequence-parallelly.md
Created December 28, 2013 22:22
Process messages in parallel with the option of processing messages in a "certain group" in sequence. The solution needs to work in a cluster.

Problem Statement

You want to process a stream of messages in parallel, which would mean processing messages out of sequence. That would be fine in general, but you would want to process messages in a group sequentially in order. For example, you might process orders in parallel and sequencing might not matter between differen orders. But would like to process amendments to the same order in sequence.

Solution

Spring Integration Resequencer

Locking mechanism in the Resequencer is local to the JVM and will not work in the cluster; possible alternatives could be (as mentioned in Resequencer MessageGroup Lock

  • Use a database level lock

References

@gulench
gulench / service-component-architecture.md
Created December 25, 2013 22:33
"Service Component Architecture", SCA; is it worth it; at this time?

Popularity and Adoption of SCA

Adoption has been limited to the supporters of the specification. To make matters worse, IBM, Oracle (BEA) ended up building their own proprietary SCA implementations (runtimes and extensions to the SCA programming model) to run their own SOA-related product offerings. So, if you build on top of these proprietary implementations, vendor lock-in is a given and you compromise portability of your composites/services.

Contrary to the above, there are some open implementations like Fabric3 and Apache Tuscany. Portability remains a question even with these open implementations because of non-standard extensions to the OASIS SCA specifications.

Google searches on SCA return results that are dated (pre-2009).

Open Implementations

Runtime

@gulench
gulench / WebLogic-SCA.md
Last active May 17, 2018 06:45
All about WebLogic SCA
@gulench
gulench / Customer.java
Created September 4, 2011 14:57
POJO with Lombok
@Data
public class Customer {
private String name;
private String surname;
private String nickname;
}