-
Notifications
You must be signed in to change notification settings - Fork 520
Is there are way to set service dependencies #947
Comments
Nope we discussed it but why do you need it? |
@davidfowl I think it is a common scenario where an application service is depend on to an infrastructure service (redis, rabbitmq, mongodb, sqlserver etc) so the infrastructure should be guaranteed to run before app services. Since there is no way to start/stop/restart individual services (oh there is already a PR #948 about it happens to be waiting your review 😜) it will be hard to master the chaos. |
@davidfowl I have a start-up scenario in which service A sends across registration-type data to secondary service. I currently have this handled via a strong-consistency operation using intra-service communication. It is possible to instead follow an eventual consistency pattern through event notification however my original thought was that if any registration operation failed, we would fail the service which would see it recycled and thus inherently retry as many times as would be necessary to complete the work. The registration data in this case is Business Rule Definitions per each domain command. The secondary service provides a centralized query point for authoring business rules for any command and any service. The actual business rules are stored within each service but are also added/updated or deleted on the secondary service so they can be easily queried for editing. At a very high-level Service A/B will create Business Rule Definitions saved locally within the service and as well sent across into the Domain Rules service within a back-ground task shortly after start-up. |
The reason we didn't do dependencies and startup order is because we didn't think it would be replicated in the production environments so giving people that false sense that it works locally is bad. |
I suppose that somewhat makes sense. More importantly, we are way more productive having Tye and Dapr than without, and so for that, many thanks! Tye & Dapr Rock! |
Sorry for bumping the issue, but another great benefit for dependencies would be to enable starting single or multiple services and their dependencies this would bring up the two services and their dependencies |
@davidfowl I guess that makes sense to not give the wrong impression. I'm thinking that dependencies allow one to emulate what's in production since we'd expect a few services to already exist such as a database, rabbitmq, etc. Not having the opportunity to do dependencies makes the application restart until the service is available, which is a bit annoying. |
Within Docker compose we can set service dependencies to control start-up order.
Is that something that is also available in Tye.yaml?
The text was updated successfully, but these errors were encountered: