For simple business processes you probably can get away with direct database access. This is especially true of "read-only" kinds of processes. For your more complex procedures I'd look into implementing a message queuing system. Clients would simply add their requests to a queue that gets processed either periodically or on demand by other servers/threads/agents.
The advantages of this approach are:
- It's a simple architecture. You don't have to write robust, long running daemons.
- You can take down part of the request processing system for updates or maintenance without losing the ability to submit new requests.
- It is easy to accommodate procedures that must be handled serially as well as those that can be handled in parallel - just decide on how many worker threads can handle each type of request.
- The queue can also serve as a log of the changes made to the system which can be helpful.
- This is especially beneficial when the request can take a long time. In this case the client gets an immediate confirmation that the request has been queued up and can check back periodically to see if it's been acted on.
There are disadvantages to this approach too, such as not getting an immediate response to your request. But it's a trade-off. In return you get more control over how your processes are executed, and you can always poll to see what the result of your request is.