Network Resources
People have concerns about how XML networking will perform once it is in widespread use, but XML networking brings big performance advantages in one area: Because it can contain arbitrarily complex structure, an XML document can batch up information and reduce the number of network transactions required. For example, a hypothetical accounting server with an XML networking interface might allow a client to request information about multiple accounts with a single XML document sent over HTTP, as in Listing 5-1.
Listing 5-1. XML Batch Request
The server could respond with all the information also in a single XML document, as in Listing 5-2.
Listing 5-2. XML Batch Response
In a non-XML system, the same information could require many request/response exchanges, and the extra latency would create major slowdowns for an application. More advanced distributed-computing protocols have mechanisms for batching information on the flycalled marshalingbut they are complex to implement and have proved less than impressive in the field. Perhaps XML's simple approach will turn out to be more robust and effective.
hot info
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar