Calling a job from another service #34
-
I am trying to write an application with micro service using lucid. However I have quite a problem getting which code I need to put in the job from a Service that call a job from another service. Do I need to repeat the same code or is there something to write inside it that send it directly to the queue? Sorry by advance if the question seems stupid but I didn't found my answer by reading the documentation. Edit: I found a video explaining Lucid and I found my way to see services was wrong. However I have now another question in my head: Are all services on the same database? If it is the case how to handle migrations? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
First of all, no question is stupid. Please ask anything that comes to mind 🙂 Preface Use Case The questions are:
I am not sure whether this will be enough to answer your question, so to get more concrete with the answer I would appreciate more details, if possible. |
Beta Was this translation helpful? Give feedback.
First of all, no question is stupid. Please ask anything that comes to mind 🙂
Preface
To get to your question, please keep in mind that when building microservices, in most cases a single service will be an application carrying a single responsibility. Services in Lucid are preferably used with monolith application but you can surely still work with them in a microservice.
Use Case
Before deciding to call a job from different services, there are some questions to ask your current structure to determine whether it is a valid case in the first place. Answering these questions would give you a better indication on the direction you should take. Also remember that there is no one-size fits al…