About Name Directory Service (In English)

zhaozj2021-02-16  50

About Name Directory Service

This Article is contributed by Wang Hailong.

Introduction

IT Seems That All The C / S Based Systems Have Similar Architectures and Work According To Similar Rules:

1. There Are Usually 3 Parts - Client, Server, Name Directory Service.

2. Server Registers Itself in a name directory.

3. Client Locates Server IN A Name DIRECTORY.

This Article Lists Such Scenarios from Aspects of Middle Ware and NetWork.

Middle ware

COM

A Component Registers Itself in The Registry Table, While Clients Locate It from Registry Table.

An Active Component Registers Itself with a moniker in Rot (Running Object Table), While a Client Uses The Moniker to Find The Active Component from Rot.

Corba

Clients Can ask Services from interface repository.

The Following Code Is Extracted from << Core Java 2 Volume II: Advanced Features >>.

ORB ORB = Orb.init (args, null);

String [] Services = orb.list_initial_services ();

Org.omg.Corba.Object Object = orb.resolve_initial_references ("Nameservice");

NamingContext NamingContext = NamingContextHelper.Narrow (Objcet);

EJB

JNDI.

RMIREGISTRY FOR RMI.

The Following Code Is Extracted from << Core Java 2 Volume II: Advanced Features >>.

String Url = getCodeBase (). Gethost ();

URL = "RMI: //" URL;

Centralwarehouse = (warehouse) Naming.lookup (url "/ central_warehouse);

NetWork

Socket

A Server Needs to Bind Itself to Port Number Before A Client CAN Connect IT.

Name registration and resolution

NetWork Programming Concerns Address Families, Name Registration and resolution.

The Following Table Is from << Network Programming for Microsoft Windows >>.

Name Space Description Typens_sap Service Advertising Protocol (SAP) Name Space; Used On IPX Networks Dynamic

NS_NDS NetWare Directory Services (NDS) Name Space; Also Used ON IPX Networks Persistent

NS_DNS DOMAIN Name System (DNS) Name Space; MOST Commonly Found on TCP / IP Networks and On The Internet Static

ND_NTDS Windows Nt Domain Space; Protocol-Independent Name Space Found On Windows 2000

Reference

<< Core Java 2 Volume II: Advanced Features >>

<< NetWork Programming for Microsoft Windows >>

转载请注明原文地址:https://www.9cbs.com/read-23525.html

New Post(0)