The context is that we have some complex system that does only API calls but sometimes we need to do other things, such as connect to a database and do some SELECT, etc...
(we cannot extend/modify that system)
My idea, which so far seems the most popular, is to create an auxiliary REST-HTTP server and then have our system call it (and that server will perform the non-api stuff).
However, I don't know what
Java technologies to mix and match in order to build what I need.
Let me show how I imagine that application and maybe you could tell me what kind of stuff to look into:
1. User downloads the classes (has JDK-8 and JDK-11 already)
2. They come in a folder like so:
AuxServer
├── config.json
├── AuxServer.class
├── MoreClassesIfNeeded.class
├── log.txt
└── startAuxServer.bat
file | purpose |
---|
config.json | Has parameters for starting the server. For example: the port that the server is going to listen to |
AuxServer.class | Precompiled java class that contains the server logic (I will make building this distributable later. For now, I just want people to get on with their task) |
log.txt | Every server operation, data and result are logged in here for debugging (it's OK, nothing secure is being transferred) |
startAuxServer.bat | Makes running the server a one-click affair |
3. User runs startAuxServer.bat to start the server and a console shows up (console is basically a live version of the log.txt)
4. User then triggers the API system and that system will call the AuxServer when it needs to, making REST-HTTP calls on the agreed port
5. User somehow shuts down AuxServer, such that the system on which the server was running does not become screwed up (memory released, port made free, etc...)
My design goal is to be super-minimalistic in terms of avoiding unnecessary project elements. Especially things that need to be installed other than a JRE.
The reason for that is that I am not a Java expert and it will be hard for me to learn (but I do insist to thoroughly understand all the parts of things that I make available
for general use!) and I will actually have to teach a few team members who are even less familiar with Java then me!
So, anything like technologies I will need (Spring?) or how to shape that project will be appreciated!
I would be surprised if there isn't already some example project like this (but I don't know what to search for). So, if you know something, please mention.
Many thanks!