On 24/10/2012, at 9:30 PM, Luke Daley wrote: > Regarding this spec: > https://github.com/gradle/gradle/blob/master/design-docs/deploying-applications-for-testing.md > > I don't think the term “deployment” is right. A “deployment” is really the > activity of putting something in place, not the thing that is put in place. A > task “requires” the thing that is put in place, it largely doesn't care how > this happens. Some alternatives would be Resource, Deployable, > DeployableResource.
I don't think 'resource' quite captures what we're trying to model here. Plus I'd like to keep using the term 'resource' to represent binary content (as we do in project.resources, or in the various Resource implementations we have floating around under ExternalResourceResolver). What I want to model is the thing that provides the resource, not the resource itself. This is the interesting thing here, because it is the thing that we actually need to do things to. Gradle doesn't have anything to do with the resource - that is something between the thing that provides the resource and the thing that consumes the resource. I don't want to model this as resource consumption because I want to be able to capture more types of interaction between executable things than just resource consumption. For example, some executable things use a database instance. We can model this as an interaction between the test code and the database server, but it's a stretch to model this as resource consumption (using "resource" as defined above). The model I'd like is something like this: * There are executable things (needs a better term, obviously). * Some executable things interact via services. * A service is provided by an executable thing. * A service is consumed by an executable thing. * An executable thing runs at some location. * To run an executable thing, the executable things that provide the services it uses must also be running. This happens recursively through the service dependency graph. * The executable things that provide the services it uses must be stopped after the thing itself. * An http resource is a kind of service. * A database instance is a kind of service. * An Android application (running in an emulator) is a kind of service. * An smtp server is a kind of service. * A message queue is a kind of service. -- Adam Murdoch Gradle Co-founder http://www.gradle.org VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting http://www.gradleware.com
