Modules pattern

A module is a foreign subroutine, where an operation calls on a solicit or notify on a different service. The other service, and the called solicit or notify this service is a client on, is in another configuration tree.

In the example in Table 1, there are two mixes in different configuration trees, with a key-based matching between the services.

Table 1. svc_subr - Modules
Example Description
<!-- CLIENT SIDE -->
 <mix name="Client">
   <service name="Subr" 
     <prop name="subr.import"
   <request name="myOperation"  

<!-- SERVER SIDE (user -->
 <mix name="Server">
   <service name="Subr2" 
     <prop name="subr.export"
   <solicit name="myOperation" 
The operations are identical to the ones in the Subroutines example, except for the different services.
The caller operation is supported by the Subr service, that specifies:
  • The user,, in whose account it looks for services with matching keys
    Important: A user can only import another user's SPARKL resources if he has execute rights.
  • The key, any_key, that a foreign service should match
The called operation is on the Subr2 client, that specifies:
  • The key, any_key, that should match the import key defined by the service supporting the caller request/reply
Note: If more than one subroutine service is exported with the same key, it is undefined which one will be matched by an import.