0

I'm making an application build on Docmosis, and since we'll be running on Docker anyway, I'd like to run the converters in separate containers. Basically I just download the library and dependencies in the Dockerfile and run the converter with java -cp.

This works fine for one converter, and the core application connects fine. However, there is no easy way to connect to four converters. I've configured the server to simply search for the service name on the default port, and connects fine. Then it naturally stops searching for 2-4, since it was only told to look for 1. I tried just adding four converters with the same address, but I never really thought that would work...

So what should I do? I don't know how to set up a discovery service, and even if I did, how would I tell a library that's mostly just configured using properties to contact that service to get converters?

tofagerl
  • 95
  • 10
  • 1
    Is your question about Docker, or about Docmosis? It's not clear what you are configuring when you say "the server to simply search for the service name". If you can clarify that would be good. – Paul Jowett May 26 '18 at 05:20
  • Well, it's about the interaction of the two. When I configure the server to search for the service name, I'm literally putting the service name and the default port in the relevant bean in Docmosis. So it finds one of the converters, but the next time it looks for it, it might get one of the other three, so any jobs it starts it has a 3/4 chance of never finding, since the converter it connects to to check if the job is done might never have heard about that job. The workaround is to run the converters in the same container. Which is workable, but not perfect. – tofagerl May 27 '18 at 08:27
  • Docmosis Core uses a pool of converters. You submit tasks to the Docmosis Core and it deletegates some of the work to the coverters. The job you submit is done when the request to the Docmosis Core completes. There is no obvious reason to check with the converters themselves whether the job is done. – Paul Jowett May 28 '18 at 00:50
  • Sure, my problem is more that the jobs won't complete because of NoConvertersAvailableException :) I've moved to naming the converters individually in docker-compose and converterPoolConfig, which works, but won't scale indefinitely. But it's at least better than having them in the same docker container. – tofagerl May 28 '18 at 07:43

0 Answers0