Hot answers tagged design
I would Check Availability on Failed Action. Just issue your calls normally and if you get a failure, then call the Service Availability function to verify. Assume service is up, if one gets and error, then issue the additional call to verify availability.
It happens to be that service is your resource and for some reason it may not be available. What would you do if your client application talks directly to the database. Would you check availability of the database before trying to query it? I would not. I think service not being available is an exceptional circumstance. I would expect my service to be ...
Just because a http-ping at time t gets a response, you've still got a large uncertainty that a request at time t' will complete. I suggest you not ping the server if it can be avoided because it is a poor proxy measure of actual availability in the future. If a request is made and no response is received, retry with an exponential back-off interval.
there is problem in ur requirement gathering 1st u said "...(its the independent record) and then I can proceed with the person_id to create Phone,Email and Address" then u said : If the person creation succeeds but one or more preceding record creation fails then actually Employee creation fails" means it is not independent. lets assume its independent ...
Only top voted, non community-wiki answers of a minimum length are eligible