I've been playing around with the idea of creating a program that can perform multiple different tasks while being monitored by a central thread. The idea is to create a core program that will look for and load separate modules when it runs/while running. These modules will perform their own tasks before passing the finished object(s) off to another module which will handle something such as uploading the finished product to a web server or organizing the resulting data into a pre-determined file/folder structure (see image for basic concept).
I've never really worked with the modular design in Java before; all my past programs have been fully self contained, so I have almost no clue where to even start.
My goal is to store external libraries in the core program (for example, AWS SDK for Java, which can shoot the .jar up to about 18MB itself) so that the separate modules can be distributed almost instantly when an update is made, rather than having to re-distribute the entire, 18MB+ self-contained program just to fix a 1-line bug. Additionally, I'd like to be able to update individual modules, when necessary, without having to restart the entire program, allowing other modules to continue working while one is being updated, reducing overall downtime so that the only time the program is required to shut down entirely is when an update to the core is made.
What I want to know is, is this possible (I'm assuming so), and if so; what should I look into/how would I go about setting it up? (Am I trying to reinvent the wheel? If so, where can I find said wheel?)
I looked into using a ServiceLoader
and played around with the example here, but I'm not sure how I could go about pointing one module to another with it or if it can retrieve the library classes from the core, nor if it can do the "active updating" mentioned. All I've seen, so far, is that (in my example) the core could access the module, but I am not sure if/how the module might access the core.
Not sure if it's relevant to the post, but I do all my work inside of Eclipse (figured worth mentioning in case there is an IDE-specific tool available).