4.6.2 When to Bundle Services
You must bundle services for the following reasons:
- Functional similarity—if some services are similar in
their role in the application, you can bundle them in the same
server. The application can offer all or none of them at a given
time. An example is the
bankapp
application, in which theWITHDRAW
,DEPOSIT
, andINQUIRY
services are all teller operations. Administration of services becomes simpler. - Similar libraries—for example, if you have three services that use the same 100K library and three services that use different 100K libraries, bundling the first three services saves 200K. Often, functionally equivalent services have similar libraries.
- Filling the queue—bundle only as many services into a server as the queue can handle. Each service added to an unfilled MSSQ set may add relatively little to the size of an executable, and nothing to the number of queues in the system. Once the queue is filled, however, the system performance degrades and you must create more executables to compensate.
- Placement of call-dependent services—avoid placing, in the same server, two (or more) services that call each other. If you do so, the server will issue a call to itself, causing a deadlock.