Question

My use case is to develop a telecom billing in Java. Knowing that i must calculate 60 000 bills per day, i need to distribute the load of the calculation on several(three or four) servers. That is called Clustering ( correct me if it's wrong). My Solution is to develop a middleware that will distribute for each server a list of client who should be charged, and then each server will calculate the bill and generate a PDF file.

Could you give me some more ideas, for example which Java class do i need, or which methods shall i use.

Thank you

Was it helpful?

Solution

if you use jms (maybe as part of using j2ee?) you could simply use a jms queue for this - have several consumers (mdbs in j2ee) on every node, and send the list of clients to process to the queue.

the queue will guarantee that every message (==client) will be handled by one and only one listener, and since each node will have a limited number of listeners you get work distribution this way.

OTHER TIPS

try apache hadoop.

http://hadoop.apache.org/

It will be perfect for this kind of divide and conquer tasks.

Spring batch will be a good fit for that: http://projects.spring.io/spring-batch/

It has support for automatic restart of jobs and partitioning ( distribution over many machines ).

There is an entire chaptr in the docs dedicated to scaling/distribution: http://docs.spring.io/spring-batch/2.2.x/reference/html/scalability.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top