Challenge: What is the problem?
This code is part of a DSL that is used to generate quotes. In particular, this bit is used to build the dependency graph for the engine to run on.
specification @vacations: requires @scheduling_work requires @external_connections
There is a serious design issue with this bit of code. Can you figure it out?
Hints:
- It has nothing to do with the implementation.
- It has nothing to do with the actual engine running this.
- Look for what isn't there.
- It is only a problem when you scale up.
- And no, there are no performance problems whatsoever.
Comments
OK, I'll bite since no one else has taken the bait.
Your calls to external connections in large systems should be asynchronous and not part of a local specification.
This is a DSL that builds the model, not run it, there are no external calls
How do you determine precedence of the dependencies? Precedence of dependencies could cause a NP problem as the system scales up if there are not rules about it.
I doubt this what you are looking for though since you said it's not a performance related issue.
namespaces?
Shouldn't the work scheduling have a dependency on vacations rather than the other way around? When you schedule work, you have to take into account existing vacations.
What is this external_connections thing? It doesn't sound anything like a business concern. It sounds like some sort of data access system using IPC.
@Chris,
It is a module, its inclusion is a business concern.
@Mike,
Stranger business rules have exists in the past :-)