XML is a key element in a peer-to-peer information sharing scheme, including Grid Computing, Instant Messaging, and Web Services. This article explores the cutting edge of the unified P2P constructor based on adapting to existing XML technology.
Sharing the information in a networked device to another device is not a new idea. After all, the remote access software like Laplink has been introduced for nearly 20 years, and can move files and folders from remote computers, transfer application settings and directories, and update files stored on another PC.
However, today's peer-to-peer communication requires another advanced level. The program like Laplink is mainly designed to push file-level information from a PC to another, while the P2P platform is further: sharing data and linking applications that may be incompatible.
The engine drives the P2P communication is driven by XML communication. In fact, all emerging P2P platforms rely on XML to make data more digested, which is the necessary steps necessary in the desktop, laptop, PDA, Pocket PC or even on the world. And XML communications and protocols are built in many recommended standards, and these standards are quickly accepted in the P2P development community.
Below, we will provide some XML how to make the next generation of information sharing applications a possible example. We will also provide some application-specific sample code, and clearly explain how these code supports core P2P functionality.
Project JXTA is one of the main work of the P2P developer's world definition standard, "Project JuxTapose" (commonly referred to as JXTA), is based on XML messaging. When starting this project funded by Sun Microsystems, engineers analyze existing P2P applications to determine which public elements are available in these platforms. Then they planned a set of protocols to design a layer that can build services and applications on it. JXTA designers want to make these layers and small, becoming a unopened link technology similar to TCP / IP. Here is some examples of how to achieve this.
One of the core concepts of JXTA is an XML structured document that advertising, naming, description, and release of P2P resources. The resource can be a peer, a peer group or a service. The JXTA specification contains a basic ads, each of which can be broken down into multiple subtypes using XML mode.
Equipment for communication by such advertising does not have to have the ability to analyze and create an XML document by themselves; I hope that developers who contain low power devices (such as mobile phones) in the JXTA network can be performed with a limited series of standard XML messages. Pre-programming.
Listing 1 is a pipeadvertisement that describes a pipe. In a JXTA environment, the pipe is a communication channel for transmitting and receiving messages. Processing the message asynchronously. Because the pipeline is unidirectional, there is input pipe and output pipe.
Listing 1. PipeAdvertisement
XML Version = "1.0" encoding = "UTF-8"?>
jxta: pipeadvertisement>
The next example is a peer group advertisement. In JXTA, the aliquot group is a collection of collaborative peers for a set of public environments. This group knows how to use this group of specified group protocols.
Listing 2. Peer group advertisement
Maxoccurs = "unbounded" /> xs: complexType> Other key JXTA entities defined by XML include peer, that is, any entity that can represent another peer-to-equal desired protocol; designed as a data report, including an envelope and protocol head stack of the main body; and use UUID The identification of 128-bit data is referenced to entities such as peer points, advertisements or services. The Globus project defines another attempt to come from the Globus project, which is an organization that is committed to making computing grids worldwide through sharing standards. The definition of "grid calculation" is different because this technology is still emerging. Definitions of Globus are "enabled software applications" to integrate the persistent environment of tools, monitors, computing, and information resources throughout the organization. In other words, the grid is any complete collection of computers and software that can share information and processes as a single entity. While hoping to pay attention, some companies are beginning to tend to tend to emerging standard subjects. Various main computer industry vendors, including IBM, Compaq, Cray, SGI, Sun, Fujitsu, Hitachi, NEC and Microsoft, support Globus standards. Platform computing, a grid computing company has released a commercial version of Globus Toolkit, Platform Globus. The Open Grid Services Architecture, OGSA is an attempt to define how Web services should work in computing grids. This architecture uses a gradually popular XML-based protocol, and these protocols are supported by entities such as W3C. These protocols include Web Services Description Language (WSDL), SOAP, and WS-INSPECTION, WS-Inspection is an XML language for locating service providers. The Web Service Description Language (WSDL) is especially important for the Globus, which defines a mode for the XML document to describe the web service as an endpoint that operates on the message. The message can contain a payload or RPC payload for a document. WSDL allows for a variety of message formats and network protocols to describe both endpoints and messages representing them. The binding agreement of WSDL is also defined with SOAP 1.1, HTTP GET / POST, and MIME. WSDL is the core of the OGSA framework. OGSA defines the connection between services as a grid service interface, which is called PortType in WSDL. Specify a group of porttypes supported by Grid Services in ServiceType in the grid service. OGSA defines ServiceType as a WSDL scalability element. Below is a WSDL document of ServiceType: List 3. ServiceType WSDL Document Targetnamespace = "http://gridexample/aggregate3.wsdl" XMLns: TNS = "http://gridexample/aggregate3.wsdl" XMLns: gsdl = "http://schemas.gridforum.org/gridservices/" XMLns: wsdl = "http://schemas.xmlsoap.org/wsdl/" XMLns: ns1 = "http:// Gridexample / Somenamespace" XMLns: ns2 = "http:// gridexample / someoThernamespace" XMLns: Comp = "http://gridexample/mycompatically" XMLns = "http://schemas.xmlsoap.org/wsdl/"> Steve's First ServiceType wsdl: Documentation> The Jabber Jabber message delivery framework is also another example used in an emerging P2P environment. Instant messaging is one of the most widely deployed technologies in the existing P2P environment. Jabber has been an independently existence of non-commercial open source projects, and later formed a business framework for developing "Extended instant messaging" (Jabber Inc.). This frame includes its own communication protocol and server architecture, and is a concept of exchanged XML document content based on multi-location. All messages in the JABBER Inc. include instant messaging content, presence changes, and configuration updates, are passed as XML segments. Business Jabber Software Enables Server API and Protocol Environments - XML-based messaging and existence protocol (XML-Based Messaging and Presence Protocol, XMPP) can be used by developers. Jabber's dependence on XML allows it to integrate its clients with the web page content. With the commercial version of Jabber, companies that pass instant messaging WebClient embedded in their pages can change the content of the page through the Jabber XML message without having to download and refresh the page. The XML contains a URL that points to a location on the content server. To obtain external services - especially certified services - Jabber provides its XML database extension (XDB). XDB makes privileges that verify and establish IM users. The information shared by the user is stored in the external SQL or LDAP database. The XDB component uses an external database and uses standard XML back to communicate with the Jabber server. XML Web Services, despite this, another pair of P2P methods - and increasingly a variety of company developers - extension applications into the Web service framework. According to the IT analysis company in Massachusetts Cambridge, IT, the company's IT department will gradually use Web services to make internal and external business partners next year. Microsoft's view (according to its views held in 2001) is: XML web service is suitable for enterprise applications, trying to cooperate with partner applications through public Internet, and establish link partners, suppliers and backend enterprise systems Enterprise Ecosystem. However, according to Microsoft's white paper about "Global XML Web Services Architecture" topics, the current XML Web service is still missing. In particular, Microsoft's authors pointed out that the current XML Web service standard failed to provide: a persistent end-to-end security architecture; key routing capabilities, such as an appropriate way to specify the message path, and dynamically configure those paths; messaging End-to-end guarantee; and the flexible process of business between companies and compensation-based transactions. Microsoft releases its "Global XML Web Services" framework to build four specifications on SOAP. Two of these specifications WS-Security and WS-license are designed to ensure communication security of web services. Other two, WS-Routing and WS-Referral provide a method of addressing and transmitting SOAP messages on various communication systems. WS-security is a stateless SOAP extension, and how should be placed within the SOAP message and how to associate the credentials to ensure message integrity and confidentiality. The sample message below illustrates the use of credentials in WS-Security: Listing 4. Using the credentials in WS-Security XML Version = "1.0" eNCoding = "UTF-8"?> XMLns: xsd = "http://www.w3.org/2001/xmlschema" XMLns: xsi = "http://www.w3.org/2001/xmlschema-instance"> m: PATH> XMLns: wss = "http://schemas.xmlsoap.org/ws/2002/01/secext"> WSSE: valueType = "WSSE: X509V3" WSSE: EncodingType = "XSD: Base64Binary" XSI: Type = "WSSE: Base64_binary_License"> Miiezzcca9cgawibagiqEMTJZC0RQRKH5I ... Rnsnbe8dqveqd6a3guacyz6xve3u wsse: binaryLicense> wsse: Credentials> S: header> XMLns: TRU = "http://fabrikam.org/payloads"> QQQ TRU: StockSymbol> S: body> S: envelope> WS-license describes how to use public license formats (eg, X.509 and Kerberos tickets as WS-Security credentials. At the same time, WS-Routing is a stateless SOAP extension to send SOAP messages asynchronously through transmission (eg, TCP, UDP, and HTTP). WS-Referral is SOAP extension that is capable of dynamically configuring routing between SOAP nodes on the message path.