Event-driven is a nice concept. But business is not concerned with programming approaches, rather it expects application to be fast, robust, fault-tolerant, etc.
If I have the following process:
(ext. system) -> IData -> T1 -> T2 -> (ext. system)
I can bind T1 and T2 together, like that:
class T1 {
void consume(IData data) {
t2.consume(data);
}
}
While in the event-driven approach I need a medium, a message:
class T1 {
void accept(IData data) {
sendOut(new DataMessage(data));
}
}
So, eventually, another wrapper is created for every single piece of data. Which creates huge amount of garbage to be collected later.
Question: how to process big amount of data, without creating any wrappers at all?