I have another question related to this. I'm doing pretty much the same thing. One of my coworkers brought up an interesting corner case: what if a client orders two services with the same subdomain? Is the entire order atomic, or is each service in the order atomic?
That is, if I write a callback function to ensure that the subdomain that a customer chooses is not taken, and it checks the module rows to see if such a subdomain already exists, if the hostname was not taken prior to the order being placed, will the function return the same result for both services in the same order, or will it place one order and then run validation again?
I assume that the entire order is atomic, and that if a customer orders two subdomains called "foo" in the same order, such a function won't catch this.
Is it possible to refer to other services in the order in the validation function? Is there some other way y'all would recommend going about this validation?