Hello everyone, what's the correct / best way of running long term services? I'm consideting core.async/thread
If you're already using core.async for that and simply want to do something long-running in a go block, then yes, thread is the right tool for that.
Depends.
A regular future might be enough.
Even if the service is high in I/O?
How is having a separate long-running thread related to I/O?
Note that core.async/thread also takes up a thread for its work. You simply get a channel back, and the thread and future functions use different thread pools. Those are the only practical differences.
At work, we have our "long-running services" as separate JARs that run independently. So maybe I'm not understanding your requirements here?
I have many small projections running, basically they pull events and write to different databases. I wanted to avoid running multiple JARs to save on ram and resources used by the JVM.