If the table has few elements or the application lacks stringent QoS requirements, linear search can be an acceptable demultiplexing strategy. For real-time applications, however, linear search is undesirable because it does not scale up efficiently or predictably to many servants or operations. However, insertions and deletions can be complicated, because data must be sorted for the binary search algorithm to work correctly. Therefore, binary search is primarily applicable for ORB operation demultiplexing, when an IDL compiler can perform all insertions and sorting off line. Using binary search to demultiplex requests to servants is more problematic because servants can be inserted or removed dynamically at runtime.
Many ORBs use dynamic hashing as their object adapter demultiplexing strategy.
Moreover, depending on the hash algorithm, dynamic hashing can incur a fairly high constant overhead. A demultiplexing strategy based on perfect hashing executes in constant time and space. This property makes perfect hashing well suited for deterministic real-time systems that can be configured statically 9 that is, if the number of objects and operations can be determined off line. Although an IDL compiler can know the number and names of operations a priori, the number and names of servants are generally more dynamic. In such cases, it is possible to use the object ID and POA ID stored in an object key to index directly into a table managed by an object adapter.