Welcome!

Microservices Expo Authors: Derek Weeks, Elizabeth White, Gopala Krishna Behara, Sridhar Chalasani, Tirumala Khandrika

Related Topics: Microservices Expo

Microservices Expo: Article

Replication: The Single point of entry to the UBR Cloud

Replication: The Single point of entry to the UBR Cloud

Replication is a process of synchronizing data among the participants (or entities) in the operator cloud. The cloud acts as a single logical entity or entry to the outside world. The goal of replication is to facilitate uniformity and consistency in the data present in the UBR. This can be achieved by the set of replication messages defined in the UDDI Version 2 Replication Specification. Nodes represent operators and are used synonymously in the replication specification. Identified sets of entities form the operator cloud.

This article looks at the importance of replication and its coexistence with the UDDI service. I'll also cover the replication APIs that are implemented by the operators and will discuss the business advantages. I assume you are familiar with XML, SOAP, and UDDI.

UDDI Business Registry Cloud
Figure 1 shows the UBR cloud with the operators replicating each other. Currently, IBM, Microsoft, NTT Communications, and SAP are the public operators of the UDDI registry and form the cloud. The process of adding a node to the cloud is bound to the UDDI Operators council, a governing body within the UDDI.org project. All the public operators should implement the UDDI Specifications as mandated by UDDI.org. Replication as the major functionality is operational with all the operators. With this, Web services clients can query any registry for their businesses, services, tModels, etc., irrespective of their publisher accounts that are bound to a single registry.

 

Replication Business Model
Consider the ACME Company, which specializes in providing consulting related to wealth management for its customers. Assume that ACME registers itself with any of the UBRs (IBM, Microsoft, NTT Communications, or SAP). Suppose that it holds a publisher account with IBM. ACME publishes its business ("ACME Consulting Business") with IBM Business Registry. Now the business, which was published in the UBR, will be visible across the nodes in the UBR through replication. The content of ACME business will also reside in the Microsoft, NTT Communications, and SAP business registries, considering that these entities are involved in replication. These registries will have an entry in their data store that corresponds to "ACME Consulting Business," with IBM as the primary custodian of this business. Likewise, all the services, tModels registered to "ACME business," are replicated across all the UBRs within the cloud. Publisher accounts are not replicated across the registries, only the content or the data in the registry is replicated.

The custodian is the only authoritative person to modify or update the content of the registered business.

Business Search Using UDDI4J
The find_business call of the UDDI4J APIs helps find the replicated business with the operator as IBM, using the Apache Axis as the transport. The snippet of the FindReplicated Business.java is shown in Listing 1 (the listings and sample code for this article can be found online at www.sys-con.com/webservices/sourcec.cfm).

To run this UDDI4j sample, you need to set the classpath which has the following JARs :

SET CLASSPATH=
C:\xerces-2_3_0\xmlParserAPIs.jar;
C:\xerces-2_3_0\xercesImpl.jar;
C:\uddi4j-2_0_1\lib\uddi4j.jar;
C:\uddi4j-2_0_1\samples;
C:\ axis-1_1RC1\lib\axis.jar;
C:\ axis-1_1RC1\lib\commons-discovery.jar;
C:\ axis-1_1RC1\lib\commons-logging.jar;
C:\ axis-1_1RC1\lib\saaj.jar;
C:\ axis-1_1RC1\lib\jaxrpc.jar;

If you are behind a firewall, run this sample with your proxy details :

C:\uddi4j-2_0_1
java -Dhttp.proxyHost=yourProxyHost
-Dhttp.proxyPort=yourProxyPort FindReplicatedBusiness

The output in Listing 2 is the result of a UDDI4J find_business call made to IBM registry. The other UBRs result in similar output with the operator attribute pointing to the respective UBR.

Replication Data Structures
The UDDI Replication Specification defines a set of data structures that are used by the replication APIs.

Update Sequence Number (USN)
The UDDI node participating in the replication process shall assign an increasing number to each of the change records created at that node. This is the originating USN for that particular change record. The originating USN value should be in the increasing order. There can be gaps in the node's originating USN sequence that may be caused by abnormal system failures.

As a result of performing replication, the node has to process all the replicated data, and must assign an additional unique local USN for that particular change record. To avoid the outage of USN values, the replication specification mandates that the nodes should implement a USN with a size exacting to 63 bits. An originating USN of value "0" will be used to represent that no change records have been seen or applied from a node. So, the nodes will skip this USN during replication processing.

Change Records
When a publish call is made to specific datum at a node, the node will create a change record that describes the details of the change. Suppose that when a service is added to a business that exists already, a change record will be generated as a result of this process. The change record will hold the following information:

  • nodeID: Where the change record was initially created
  • Originating USN: Assigned to the change record at its creation by its originating node
  • Data: Conveys the semantics of the change in question.

    Change Record Journal
    Whenever a node receives change records from other nodes, it should create an entry in the change record journal. The journal stores the XML text of the change records. This helps to verify that the transmitted data has not been altered by the intermediary nodes during the course of replication. The change record journal is maintained in the data store of the UBR.

    High Water Mark Vector
    Each UDDI node maintains state information such as the originating USN of the most recent changes that have been successfully processed by each node of the registry as a high water mark vector. The high water mark vector has one entry per node with each entry holding the following information:

  • operatorNodeID: The UUID of the node
  • originatingUSN: The originating USN of the most recent change associated with the node that has been successfully consumed

    Replication APIs
    Replication involves change notification and retrieval of those changes from nodes in the registry. This is done by broadcasting that information from the node in the registry to its peers. The node, which is interested in those changes, will subsequently make a call to retrieve those changes. In order to achieve this functionality, UDDI Replication defines the following APIs:

    • get_changeRecords
    • notify_changeRecordsAvailable
    • do_ping
    • get_highWaterMarks
    get_changeRecords
    This UDDI API call is used to initiate the replication of change records from one node to another. The requestingNode is the node that initiates get_changeRecords and will provide information such as chan gesAlreadySeen as part of the high water mark vector. This information is used by the callee to determine the change records needed by the caller.

    The get_changeRecords Schema is shown in Listing 3. An example message is shown in Listing 4.

    notify_changeRecordsAvailable
    Nodes can inform others that they have new change records available for consumption by replication by using this message. The notify_changeRecordsAvailable message is the predecessor to the get_ chan geRecords message. The schema for this is in Listing 5 with an example message in Listing 6.

    do_ping
    This UDDI API call provides the means to verify the connectivity of a node that wishes to start replication.
    Schema

    <element name="do_ping">
    <complexType final="restriction">
    <sequence/>
    </complexType>
    </element>

    Example Message

    <?xml version="1.0" encoding="UTF-8"?>
    <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
    <Body>
    <do_ping xmlns="urn:uddi-org:repl_v2"/>
    </Body>
    </Envelope>

    get_highWaterMarks
    This UDDI API message provides a means to obtain a list of highWaterMark elements containing the highest known USN for all nodes in the replication communication graph.

    Schema

    <element name="get_highWaterMarks">
    <complexType>
    <sequence/>
    </complexType>
    </element>

    Example Message

    <?xml version="1.0" encoding="UTF-8"?>
    <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
    <Body>
    <get_highWaterMarks xmlns="urn:uddi-org:repl_v2" />
    </Body>
    </Envelope>

    Replication Processing
    Replication processing involves the API calls that are made to and from the replicating nodes. This follows a simple life cycle. Consider that nodes A and B (see Figure 2) are participating in a replication scenario. Assume the nodes are configured for replication processing. For instance, Node A initiates the process and makes a "do_ping" call to Node B to check for its availability. Node B makes a similar call to check for Node A's availability. If the "do_ping" call of Node A is successful, then Node A makes a "notify_change Records Available" call to Node B. This call tells Node B that Node A has some changes that are unseen by Node B. In response to this call, Node B makes a "get_changeRecords" call to Node A. Node A sends back all the unseen changeRecords to Node B. Node B processes all the change records from Node A and updates its local repository. This completes a single replication cycle, assuming everything goes fine during this process. The replication specification defines a detailed section on the failure scenarios and how to handle them during replication processing. Figure 2 shows the interaction between the replication APIs in case of a two-node scenario.

     

    Replication Configuration
    Replication Configuration File

    The replication functionality implemented by an operator should be configurable as mandated by the UDDI Replication Specification. This is done through the Replication Configuration File (RCF), which may be located centrally, and can be accessed by the operators. It typically resides in the following URL: https:// www.uddi.org/operator/ReplicationConfiguration.xml and can also be stored within the operator's Web server. In the latter case, each operator has to maintain the same copy of the RCF in order to maintain the consistency of the nodes. UDDI data replication is governed by the set of parameters that form this RCF. This file maintains the necessary information about the operators in the replication process.

    The following are the parameters defined in the RCF:

  • serialNumber: Value of this element changes whenever the RCF is updated or changed.
  • timeOfConfigurationUpdate: Gives you the timestamp of the RCF.
  • councilContact: Provides information about the person who maintains or updates the RCF.
  • maximumTimeToSyncUBR: Allows you to specify the maximum amount of time (in hours) that a node in the UBR can sync with all nodes in the UBR. The change made at any single node in the UBR is expected to be visible at all nodes in the UBR within this time limit.
  • maximumTimeToGetChanges: Allows you to specify the maximum amount of time (in hours) that an individual node may wait to request changes. The nodes must perform get_change Records within this time limit.
  • operator: Provides the list of nodes that are part of replication topology.
  • communicationGraph: Provides the communication paths of the nodes and their replication topologies.

    Sample Replication Configuration File
    The RCF shown in Listing 7 represents a four-node scenario in the communication graph. This RCF holds information about the nodes that take part in the replication process.

    Replication Business Advantage
    Currently, replication is used in synchronizing the data in the registry among public operators. In the near future, replication as a functionality will be used to synchronize data across geographical locations. Nodes can selectively replicate data based on their requirements. For example, an operator hosting a registry in Japan will be able to replicate only the services that are located in their region based on their language. This filtering helps consumers to avail the services at their doorstep.

    Filtering can also be done based on categories, which might be helpful to promote shared businesses. For example, Company A and Company B can host their individual registries, but they can share a specific business segment between them. This business segment has to be replicated between them in order to keep them in sync. Thus, businesses collaborate with each other in a secure manner that benefits their customers.

    Private registries that are deployed within the enterprise can be promoted to public registries with the help of replication. Part of the data can be in a private registry and part of it can be in a public registry. For example, you could have a bindingTemplate in a private registry that points to a tModel in public registry. The UDDI v3 Specification details the concept of entity promotion, whereby the test registries can be promoted to production mode retaining their keys.

    Summary
    As the UBR cloud has become online and operational, the replication functionality of the UDDI registry will make it more adoptable in the Web services community as a standard service discovery protocol. This business-rich feature marks a milestone in the history of UDDI. More businesses should register their meaningful services in the UBR in order to add value to the registry data, which in turn benefits the service consumers.

    References

  • UDDI Version 2.0 Replication Specification: Version 2.03 Specification: http://uddi.org/pubs/Replication-V2.03-Published-20020719.pdf
  • UDDI Version 2.0 XML Replication Schema: http://uddi.org/schema/uddi_v2replication.xsd
  • UDDI Version 2.0 Operator's Specification: http://uddi.org/pubs/Operators-V2.01-Published-20020719.pdf
  • UDDI4J SDK: http://uddi4j.org
  • More Stories By Arulazi Dhesiaseelan

    Arulazi Dhesiaseelan holds Master of Computer Applications degree from PSG College of Technology, India. He has been involved in designing and building Java based applications and SDK for more than three years. He was also involved in the API development of UDDI4j project hosted at http://uddi4j.org. He's working with Hewlett Packard Company (India Software Operations), Bangalore. Currently he is involved in the development of an open service framework for mobile infrastructures. He can be reached at [email protected]

    Comments (0)

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


    @MicroservicesExpo Stories
    Some people are directors, managers, and administrators. Others are disrupters. Eddie Webb (@edwardawebb) is an IT Disrupter for Software Development Platforms at Liberty Mutual and was a presenter at the 2016 All Day DevOps conference. His talk, Organically DevOps: Building Quality and Security into the Software Supply Chain at Liberty Mutual, looked at Liberty Mutual's transformation to Continuous Integration, Continuous Delivery, and DevOps. For a large, heavily regulated industry, this task...
    DevOps promotes continuous improvement through a culture of collaboration. But in real terms, how do you: Integrate activities across diverse teams and services? Make objective decisions with system-wide visibility? Use feedback loops to enable learning and improvement? With technology insights and real-world examples, in his general session at @DevOpsSummit, at 21st Cloud Expo, Andi Mann, Chief Technology Advocate at Splunk, explored how leading organizations use data-driven DevOps to clos...
    The goal of Microservices is to improve software delivery speed and increase system safety as scale increases. Microservices being modular these are faster to change and enables an evolutionary architecture where systems can change, as the business needs change. Microservices can scale elastically and by being service oriented can enable APIs natively. Microservices also reduce implementation and release cycle time and enables continuous delivery. This paper provides a logical overview of the Mi...
    The notion of improving operational efficiency is conspicuously absent from the healthcare debate - neither Obamacare nor the newly proposed GOP plan discusses the impact that a step-function improvement in efficiency could have on access to healthcare (through more capacity), quality of healthcare services (through reduced wait times for patients) or cost (through better utilization of scarce, expensive assets).
    Our work, both with clients and with tools, has lead us to wonder how it is that organizations are handling compliance issues in the cloud. The big cloud vendors offer compliance for their infrastructure, but the shared responsibility model requires that you take certain steps to meet compliance requirements. Which lead us to start poking around a little more. We wanted to get a picture of what was available, and how it was being used. There is a lot of fluidity in this space, as in all things c...
    Gone are the days when application development was the daunting task of the highly skilled developers backed with strong IT skills, low code application development has democratized app development and empowered a new generation of citizen developers. There was a time when app development was in the domain of people with complex coding and technical skills. We called these people by various names like programmers, coders, techies, and they usually worked in a world oblivious of the everyday pri...
    The “Digital Era” is forcing us to engage with new methods to build, operate and maintain applications. This transformation also implies an evolution to more and more intelligent applications to better engage with the customers, while creating significant market differentiators. In both cases, the cloud has become a key enabler to embrace this digital revolution. So, moving to the cloud is no longer the question; the new questions are HOW and WHEN. To make this equation even more complex, most ...
    Some journey to cloud on a mission, others, a deadline. Change management is useful when migrating to public, private or hybrid cloud environments in either case. For most, stakeholder engagement peaks during the planning and post migration phases of a project. Legacy engagements are fairly direct: projects follow a linear progression of activities (the “waterfall” approach) – change managers and application coders work from the same functional and technical requirements. Enablement and develo...
    Admiral Calcote - also known as Lee Calcote (@lcalcote) or the Ginger Geek to his friends - gave a presentation entitled Characterizing and Contrasting Container Orchestrators at the 2016 All Day DevOps conference. Okay, he isn't really an admiral - nor does anyone call him that - but he used the title admiral to describe what container orchestrators do, relating it to an admiral directing a fleet of container ships. You could also say that they are like the conductor of an orchestra, directing...
    The past few years have brought a sea change in the way applications are architected, developed, and consumed—increasing both the complexity of testing and the business impact of software failures. How can software testing professionals keep pace with modern application delivery, given the trends that impact both architectures (cloud, microservices, and APIs) and processes (DevOps, agile, and continuous delivery)? This is where continuous testing comes in. D
    Modern software design has fundamentally changed how we manage applications, causing many to turn to containers as the new virtual machine for resource management. As container adoption grows beyond stateless applications to stateful workloads, the need for persistent storage is foundational - something customers routinely cite as a top pain point. In his session at @DevOpsSummit at 21st Cloud Expo, Bill Borsari, Head of Systems Engineering at Datera, explored how organizations can reap the bene...
    The dynamic nature of the cloud means that change is a constant when it comes to modern cloud-based infrastructure. Delivering modern applications to end users, therefore, is a constantly shifting challenge. Delivery automation helps IT Ops teams ensure that apps are providing an optimal end user experience over hybrid-cloud and multi-cloud environments, no matter what the current state of the infrastructure is. To employ a delivery automation strategy that reflects your business rules, making r...
    Gaining visibility in today’s sprawling cloud infrastructure is complex and laborious, involving drilling down into tools offered by various cloud services providers. Enterprise IT organizations need smarter and effective tools at their disposal in order to address this pertinent problem. Gaining a 360 - degree view of the cloud costs requires collection and analysis of the cost data across all cloud infrastructures used inside an enterprise.
    SYS-CON Events announced today that Synametrics Technologies will exhibit at SYS-CON's 22nd International Cloud Expo®, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Synametrics Technologies is a privately held company based in Plainsboro, New Jersey that has been providing solutions for the developer community since 1997. Based on the success of its initial product offerings such as WinSQL, Xeams, SynaMan and Syncrify, Synametrics continues to create and hone in...
    Kubernetes is an open source system for automating deployment, scaling, and management of containerized applications. Kubernetes was originally built by Google, leveraging years of experience with managing container workloads, and is now a Cloud Native Compute Foundation (CNCF) project. Kubernetes has been widely adopted by the community, supported on all major public and private cloud providers, and is gaining rapid adoption in enterprises. However, Kubernetes may seem intimidating and complex ...
    You know you need the cloud, but you’re hesitant to simply dump everything at Amazon since you know that not all workloads are suitable for cloud. You know that you want the kind of ease of use and scalability that you get with public cloud, but your applications are architected in a way that makes the public cloud a non-starter. You’re looking at private cloud solutions based on hyperconverged infrastructure, but you’re concerned with the limits inherent in those technologies.
    For DevOps teams, the concepts behind service-oriented architecture (SOA) are nothing new. A style of software design initially made popular in the 1990s, SOA was an alternative to a monolithic application; essentially a collection of coarse-grained components that communicated with each other. Communication would involve either simple data passing or two or more services coordinating some activity. SOA served as a valid approach to solving many architectural problems faced by businesses, as app...
    Many IT organizations have come to learn that leveraging cloud infrastructure is not just unavoidable, it’s one of the most effective paths for IT organizations to become more responsive to business needs. Yet with the cloud comes new challenges, including minimizing downtime, decreasing the cost of operations, and preventing employee burnout to name a few. As companies migrate their processes and procedures to their new reality of a cloud-based infrastructure, an incident management solution...
    Cloud Governance means many things to many people. Heck, just the word cloud means different things depending on who you are talking to. While definitions can vary, controlling access to cloud resources is invariably a central piece of any governance program. Enterprise cloud computing has transformed IT. Cloud computing decreases time-to-market, improves agility by allowing businesses to adapt quickly to changing market demands, and, ultimately, drives down costs.
    Recent survey done across top 500 fortune companies shows almost 70% of the CIO have either heard about IAC from their infrastructure head or they are on their way to implement IAC. Yet if you look under the hood while some level of automation has been done, most of the infrastructure is still managed in much tradition/legacy way. So, what is Infrastructure as Code? how do you determine if your IT infrastructure is truly automated?