Chapter 7. How ESB Uses the Registry to Keep Track of Services

When you work in software engineering, you spend a lot of your time looking for new ways to solve problems. It's often the case, however, that we use similar approaches to solve different problems. One type of problem that you frequently face is locating "stuff".

When the scale of human population reached the level where it was impossible to keep track of where individuals lived, the notion of an "address" was invented. When computer networking was invented, a similar problem was solved through IP (Internet Protocol) addresses. But, since human beings have a hard time remembering numeric addresses, DNS was invented to give us a way to "map" these numeric addresses to a hierarchical system of mnemonic names.

OK. That's all very interesting, but what does all this have to do with JBoss ESB?

Remember how we described services as being "plugged into" the ESB at the service endpoints? In order for the ESB to be able to deploy, undeploy, manage, and route messages to services over the ESB, the ESB needs a way to find the services' endpoints at runtime. How does JBoss ESB do this? By keeping track of service communication channels, or "Endpoint References" (EPRs) in a registry.

In this chapter, you'll learn about how:

  • JBoss ESB makes use of a registry to keep track of services
  • Services can be published to and queried in the registry
  • Your client code can search for services in the registry
  • You can design a federated registry usage model to give you more control over who can access your services
  • To maintain and troubleshoot your registry

Let's begin by looking at just what a service registry is, how it works, and why it's a good thing.

The registry—what, how, and why?

The classic method of illustrating the operation of a registry is with a triangle-shaped diagram of a client (or "service requester"), a server (or a "service provider"), and a service registry. If you Google this set of words: "uddi register discovery" you'll find many variations of this simple diagram

The registry—what, how, and why?

In this triangle, there are three players and three actions. The actions are:

  1. The server registers (publishes) its services in the registr.
  2. The client looks for (inquires) the service in the registry.
  3. The client, once it has retrieved the service location from the registry, invokes the service.

Another classic way of describing a registry is to compare it to a telephone directory. However, instead of enabling people to find each other over the telephone network, a registry enables services to find each other.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.193.129