I am investigating writing web services for an application. Within this application we do everything within transactions as "units of work" are often not single entities but multiple entities spanning multiple tables. There are situations where we want "All or nothing" and a transaction makes perfect sense. I am not really sure how to do this in a web-service however, nor if I even should.
I feel like web services should be stateless and the provided API should be built on a per-entity basis, yet I am unsure how to handle the "units of work" that should one part fail, a rollback should occur.
Should Web services be transactional? How would you implement transactions, would it be something along the lines of sending a "BEGIN TRANSACTION" and ending with an "END TRANSACTION"?
If web-services are stateless how do you deal with "units of work" that are not independent? Is there any definitive literature around that I can read on the topic?
thanks,