Patent Publication Number: US-5832275-A

Title: System for dynamically replacing operating software which provides distributed directory service after verifying that versions of new software and the operating software are compatible

Description:
This is a continuation of application Ser. No. 08,355,356, filed Dec. 13, 1994, now abandoned. 
    
    
     BACKGROUND 
     The present invention relates to the management of distributed digital network directories, and particularly to providing dynamic updates to the computer programs supporting distributed directory services. 
     Technological advances in microelectronics and digital computing systems have resulted in the proliferation of digital computer networks, enabling the distribution of networking services across a wide range of computers participating in the network and over various communications media. Advances in distributing applications have also resulted in a client-server architecture for applications. Under the architecture, the portions of the application that interact with the user are typically separated from the portions of the application that fulfill client processing requests. Typically, the portions of an application that interact with the user are called a client applications or client software, whereas the portions of the application that service requests made by the client applications are called a server applications or server software. In a network environment, the client applications and server applications are generally executed on different computers. 
     Historically, digital networks in the form of local area networks, a physical collection of personal computers interconnected with network cabling and network interface cards, comprised a single network server and multiple network clients. To manage which network clients could access the network server, as well as what files, printers, printer queues, and server applications were available to the network clients, the network server maintained information on each of the resources that were attached to the server, the identities of the network clients and users who could use the services of the network server, and the scope and nature of the services available to the network clients and users. 
     As local area networks became more popular, networks grew in size requiring several servers to service the needs of users. With increased size and complexity of networks, came the need for easier management of network servers. Users required access to an increasing number of services that were located on an increasing number of network servers. Several vendors began offering networking servers. Each vendor implemented a different scheme of providing networking services information. In addition, because of the way the server maintained information about only its networking services, each network server still required management of its resources independent of other network servers. 
     This insular method of maintaining information of networking services fueled research and development of distributed networking directories that span networking servers. Thus far, research has resulted in several potential solutions. Three technologies currently hold greater promise for replacing the large number of insular, idiosyncratic directories that now litter many an enterprise&#39;s numerous local-area networks and electronic-mail systems. One of the more popular approaches exploits the X.500 distributed network information directory services protocol developed as published by the CCIT and Open Systems Interconnect consortium. 
     However, while the X.500 protocol appears to hold the greatest promise to provide a robust, distributed directory, the X.500 protocol has been slow to gain acceptance. The X.500 protocol has been plagued from the start with management, interoperability and security problems. The X.500 protocol specification describes a technical framework, interoperability requirements and compliance criteria but does not describe specific implementations. Thus many of the details of implementation have been left up to systems providers. 
     The X.500 protocol specification describes a distributed directory. The directory provides information services to network clients. The information in the directory can be read as well as modified by users who have applicable access rights. 
     The information stored in the directory is stored in the form of a schema, a collection of objects with associated attributes or properties tied together by their relationship to each other. FIG. 1 shows an object called &#34;Computer&#34; with a few associated attributes, such as owner, operator, status, etc. The values of the properties are not shown in the figure but an example of a value for &#34;Owner&#34; might be &#34;Fred.&#34; Objects in the directory and their names correspond to things that humans relate to when dealing with computers, namely, users, printers, print queues, networks and information. Objects such as countries, organizations, networks, people and computers are objects you might find in the directory as well. 
     The directory provides information to users by giving users a hierarchical view of all of the information contained in the directory. The hierarchical view is generally in the form of a tree. FIG. 2 shows a directory. Each of the branches and terminating points or leaves represent objects in the directory. Generally, implementations of the directory organize objects in subtrees, partitions or domains. FIG. 2 also shows the directory organized into partitions or domains. Multiple copies of each partition may be stored in the directory. Software schemas define and determine the number and types of replicas of each partition. 
     Multiple replicas of a partition are needed to reduce network storage and traffic requirements and speed up directory searches. Replicas are stored in name servers. A name server is a computer in the network, usually a network server. More than one partition can be stored in a name server. Partitions stored in a name server need not be contiguous. 
     The directory tree provides a logical means of searching for information. The tree is generally patterned after logical groupings such as organizations, organizational units, computers and users. These logical groupings, while extremely useful in helping users find relevant information also creates significant problems in managing the directory. 
     Each partition forms a major subtree of the directory. Taken together, the partitions form a hierarchical tree of partitions that leads back to a root partition containing the root directory. Where boundaries of two partitions meet, the partition closer to the root is considered superior, and the partition farther from the root is considered subordinate. Thus, FIG. 2, partitions E and C are subordinate to the other partitions. 
     The present invention solves one of the problems associated with a distributed directory. As distributed directories become more popular, more and more users will rely on them for access to data and services. As user rely on directories more heavily, the time in service of the directory will be critical. Users will not tolerate even a temporary shut down of the directory or a portion of the directory. 
     SUMMARY OF THE INVENTION 
     With the present invention the computer programs that provide the services associated with a distributed directory can be dynamically updated without a significant interruption in services. Time in service of the directory will thus increase, increasing user confidence in the directory. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The present invention may be more fully understood by reference to the following Detailed Description in conjunction with the Drawings, in which: 
     FIG. 1 shows a typical directory object, a computer, with some of its associated attributes; 
     FIG. 2 shows a typical directory tree; 
     FIG. 3 shows the network protocol environment in which the present embodiment of the invention is implemented; and 
     FIG. 4 shows the software algorithm employed by the invention to dynamically update a directory services module without interruption of services. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     The present embodiment of the invention, Novell&#39;s NetWare Directory Service or NDS, supports dynamically updating the computer programs that provide distributed digital directories. NDS operates in the NetWare network operating system environment. 
     The invention is enabled through a NetWare Core Protocol verb. NDS design builds on several previously implemented capabilities of NetWare, including the NetWare Core Protocol (&#34;NCP&#34;). The first capability relevant to the invention is NetWare&#39;s native network layer protocol, IPX. IPX provides end-to-end datagram delivery over network media and over internetworks. 
     NDS allows multiple independent name trees to coexist in the same internetwork without interfering with each other. A rendezvous feature is defined allowing a client interested in a name tree to locate NDS name servers. The rendezvous feature builds on another previously implemented capability of NetWare: SAP (Service Advertising Protocol). Routers in all installed NetWare internetworks convey SAP information for client/server rendezvous. With NDS, SAP has a narrowly confined role: a client uses it to find its first NDS name server. 
     The NCP sits above the network layer. See FIG. 3. NCP supports many networking services, such as file services. Certain operations on an NCP connection are specific to NDS. Once an NCP connection exists, it can also convey NDS requests and replies. Because NDS uses messages that can be quite large, it employs a fragmentation protocol to convey an NDS message in (possibly) several NCP packets. 
     Each NCP packet begins with a small message header that carries general status information about the current state of the connection between the client and the server. The client request header is seven bytes long, while a server&#39;s reply header is eight bytes long. As shown below, the RequestType variable defines the type of network request. A type of 0×1111 is reserved for connection allocation services; a type of 0×2222 is reserved for server request services; a type of 0×3333 is reserved for server responses; a type of 0×5555 is reserved for destroying connections; and a type of 0×9999 is reserved for work in progress responses. 
     
         ______________________________________                                    
Reload Verb                                                               
0x2222 104 8                                                              
         Content               Type                                       
______________________________________                                    
Request Format                                                            
Offset                                                                    
0        RequestType  (0x2222)     WORD                                   
2        SequenceNumber                                                   
                      (LastSeq+1)  BYTE                                   
3        ConnectionHigh                                                   
                      (ServiceConn)                                       
                                   BYTE                                   
4        TaskNumber   (CurrentTaskNum)                                    
                                   BYTE                                   
5        ConnectionLow                                                    
                      (ServiceConn)                                       
                                   BYTE                                   
6        FunctionCode (104)        BYTE                                   
7        SubFuncCode  (08)         BYTE                                   
Reply Format                                                              
Offset                                                                    
0        Reply Type   (0x3333)     WORD                                   
2        SequenceNumber                                                   
                      (LastSeq+1)  BYTE                                   
3        ConnectionLow                                                    
                      (ServiceConn)                                       
                                   BYTE                                   
4        TaskNumber   (CurrentTaskNum)                                    
                                   BYTE                                   
5        ConnectionHigh                                                   
                      (ServiceConn)                                       
                                   BYTE                                   
6        CompletionCode                                                   
                      (Ccode)      BYTE                                   
7        ConnectionStatus                                                 
                      (StatusFlag) BYTE                                   
8        NDSErrorCode (NDSError)   4 BYTES                                
 12      Reserved                  4 BYTES                                
______________________________________                                    
 
    
     The sequence number maintains a numeric counter for all incoming requests to provide reply prioritization. The ConnectionLow and the ConnectionHigh numbers identify a particular service connection between the client and the server. The TaskNumber distinguishes which client process or thread is making the request to the server. 
     The present embodiment of the invention uses the Reload Directory Services NCP. The Reload Directory Services NCP allows the principal computer program that provides directory services in the NetWare environment, DS.NLM, to be replaced on disk and reloaded in a server while that server is active and while other computer programs, NetWare Loadable Modules or NLMs in the NetWare environment, of the server are actively referencing NDS entry points. 
     Three NLMs are involved. The DSLOADER.NLM contains the directory entry points to which all other NLMs actually link, including the current DS.NLM in memory and a new DS.NLM on disk which is to replace the current DS.NLM. 
     Referring to FIG. 4 and the code segments provided in Tables 1-5 the dynamic update aspect of the invention is performed by two threads of execution within the NetWare operating system. The first thread (A) is the thread that begins servicing the NCP request, the other thread (B) is started by thread (A) to complete the reload of the new DS.NLM. The replacement algorithm is as follows: 
     1. Thread (A) receives the RELOAD NLM NCP request in a function that is part of the currently loaded DS.NLM. 
     2. Thread (A) checks the client authorization. 
     3. If the client has proper authorization, usually the highest level of security clearance allowed by the system, thread (A) calls the DSLOADER and requests a reload. 
     4. Thread (A) renames the memory image of the currently loaded DS.NLM to DSOLD.NLM. 
     5. Thread (A) starts thread (B) and then waits until thread (B) reports whether or not the load was successful. 
     6. Thread (B) calls the operating system to load the new DS.NLM. This loads the new DS.NLM and then calls DS.NLM&#39;s initialization function. 
     7. While initializing the new DS.NLM, thread (B) reports the new DS.NLM version number to DSLOADER and retrieves from DSLOADER the DSOLD.NLM version number. The DSLOADER may reject the load with an error response or it may return the new DS.NLM version number. 
     8. Thread (B) will abort the load on an error from the loader, or if the new DS.NLM rejects the version number returned by DSLOADER. Thread (B) will indicate to thread (A) if it aborts or commit to continue the load. 
     9. Thread (A) detects the abort or commit state transition from thread B. If the load is aborted thread (A) renames the DSOLD.NLM back to DS.NLM in memory. It then returns from the loader. 
     10. The DSOLD.NLM replies to the NCP request. 
     11. If Thread (B) commits to continue the load it waits for thread (A) to complete the response to the NCP, then it will unload DSOLD.NLM and continue with the initialization of the new DS.NLM. 
     12. Thread B terminates itself. 
     
                       TABLE 1                                                     
______________________________________                                    
Code Segments Implementing Steps 1-3 and 10                               
______________________________________                                    
int ReloadDS(int conn)                                                    
int err = 0, managesEntry;                                                
THREADDATA td;                                                            
/* 1. begin servicing reload NCP */                                       
if (err =. DSAClientStart(TD.sub.-- CHECK.sub.-- OPEN, conn, -1, -1,      
&amp;td))                                                                     
return err;                                                               
/* 2. check client authorization */                                       
if (IsSupervisor(conn)                                                    
|| |(err = GlobalCheckManagement(ServerID(), ID.sub.--  
SELF,                                                                     
&amp;managesEntry, 0))                                                        
&amp;&amp; managesEntry)                                                          
err = DSLReload(DSModuleHandle()); /* 3. call loader */                   
else if (|err)                                                            
err = ERR.sub.-- NO.sub.-- ACCESS;                                        
/* 10. reply to the NCP */                                                
return DSAClientEnd(err);                                                 
}                                                                         
______________________________________                                    
 
    
     
                       TABLE 2                                                     
______________________________________                                    
Code Segments Implementing Steps 4-5 and 9                                
______________________________________                                    
int DSLReload(uint32 moduleHandle)                                        
/* 4. rename DS.NLM to DSOLD.NLM */                                       
struct LoadDefinitionStructure *mh = (struct LoadDefinitionStructure      
*)moduleHandle;                                                           
char savedName sizeof(mh-&gt;LDFileName)!;                                   
if (|mh)                                                                  
mh = (struct LoadDefinitionStructure *)registeredModule;                  
else if (moduleHandle |= registeredModule)                                
return ERR.sub.-- INVALID.sub.-- REQUEST;                                 
______________________________________                                    
 
    
     
                       TABLE 3                                                     
______________________________________                                    
Code Fragments Implementing Step 6 and part of 8                          
______________________________________                                    
void ReloadWorker(void)                                                   
unsigned long oldModule = registeredModule;                               
if (dslState |= DSL.sub.-- ACTIVE)                                        
return;                                                                   
/* 6. call load function */                                               
if (loadError = LoadDSNLM())                                              
{                                                                         
/* 8. indicate the abort state change */                                  
if (dslState == DSL.sub.-- ACTIVE)                                        
dslState = DSL.sub.-- ABORTED;                                            
}                                                                         
else if (dslState == DSL.sub.-- CORPSE)                                   
{                                                                         
if (oldModule)                                                            
{                                                                         
DelayMyself(18, timerTag);                                                
KillMe(oldModule);                                                        
}                                                                         
dslState = DSL.sub.-- IDLE;                                               
}                                                                         
}                                                                         
______________________________________                                    
 
    
     
                       TABLE 4                                                     
______________________________________                                    
Code Fragements Implementing Step 7 and the Remainder of Step             
______________________________________                                    
int RegisterWithDSLoader(void)                                            
{                                                                         
int err;                                                                  
uint32 dslVersion, loadedDSVersion;                                       
int i;                                                                    
/* . . . */                                                               
/* 7. negotiate versions with loader. Handle loader&#39;s rejection */        
if (err = DSLNegotiateVersions(DSVersion(), &amp;dslVersion,                  
&amp;loadedDSVersion))                                                        
return err;                                                               
if (|ACCEPTABLE.sub.-- DSLOADER.sub.-- VERSION(dslVersion))               
return ERR.sub.-- INVALID.sub.-- DS.sub.-- VERSION; /* reject the loader  
*/                                                                        
/* 8. commit to load new NLM, this changes loader state */                
if (err =. DSLRegister(DSModuleHandle(), DSVersion(), &amp;ddsFuncs,          
&amp;emuFuncs,                                                                
DSCanUnload, DSUnload, &amp;dslMemTag, dslCommandLine))                       
return err;                                                               
/* continue NLM initializations */                                        
/* . . . */                                                               
return 0;                                                                 
}                                                                         
______________________________________                                    
 
    
     
                       TABLE 5                                                     
______________________________________                                    
Code Fragements Implementing DSLoader Response to Step 7                  
______________________________________                                    
int DSLNegotiateVersions(uint32 dsVersion, uint32 *dslVersion,            
uint32 *registeredDSVersion)                                              
*dslVersion = INTERNAL.sub.-- VERSION;                                    
*registeredDSVersion = registeredVersion;                                 
dsVersion = dsVersion;                                                    
return ACCEPTABLE.sub.-- DS.sub.-- VERSION(dsVersion)?                    
0: ERR.sub.-- INVALID.sub.-- DS.sub.-- VERSION;                           
}                                                                         
______________________________________                                    
 
    
     As indicated by the above method, the computer programs providing services to a distributed directory can be dynamically updated without interruption of directory services. Thus, critical directory related services can be updated and new service enhancements can be added without interruption. 
     Although one embodiment of the invention has been illustrated and described, various modifications and changes may be made by those skilled in the art without departing from the spirit and scope of the invention.