Keywords: doc

Next: The MICO Binder (CORBA Up: Separating client and server Previous: Stringified Object References

### Naming Service

What we have actually done in the last section is to implement some very simple kind of naming service on top of the file system. A naming service is a mapping between names and addresses which allows you to look up the address for a given name. For example a phone directory is a naming service: it maps people's names to phone numbers.

In the CORBA context a naming service maps names to object references. The simple naming service we implemented in the previous section maps file names to stringified object references. The OMG has defined a more elaborate naming service as a set of CORBA objects, an implementation of which is now shipped with MICO. To use the name service you have to

- run the name service daemon `nsd`
- tell server and client the address of `nsd` using the `-ORBNamingAddr` option (see section 4.1.1 for details)
- make the server register its offered objects with the name service
- make the client query the name server for the server

There is a program called `nsadmin` that can be used to browse and change the contents of the naming service. The `demo/naming` directory contains an example how to use the name service.