WDDX

Last updated

WDDX (Web Distributed Data eXchange) is a programming language-, platform- and transport-neutral data interchange mechanism designed to pass data between different environments and different computers.

Contents

History

WDDX was created by Simeon Simeonov of Allaire Corporation in 1998, [1] initially for the ColdFusion server environment. WDDX was open-sourced later that year. [2]

Usage

WDDX is functionally comparable to XML-RPC and WIDL. [3] The specification supports simple data types such as number, string, boolean, etc., and complex aggregates of these in forms such as structures, arrays and recordsets (row/column data, typically coming from database queries).

The data is encoded into XML using an XML 1.0 DTD, producing a platform-independent but relatively bulky representation. [4] The XML-encoded data can then be sent to another computer using HTTP, FTP, or other transmission mechanism. The receiving computer must have WDDX-aware software to translate the encoded data into the receiver's native data representation. WDDX can also be used to serialize data structures to storage (file system or database). Many applications use WDDX to pass complex data to browsers where it can be manipulated with JavaScript, as an alternative to JSON.

Example from php.net: [5]

<wddxPacketversion='1.0'><headercomment='PHP'/><data><struct><varname='pi'><number>3.1415926</number></var><varname='cities'><arraylength='3'><string>Austin</string><string>Novato</string><string>Seattle</string></array></var></struct></data></wddxPacket>


Adoption

WDDX is mainly used by ColdFusion and, as February 2022, still supported by Adobe.

Outside ColdFusion, libraries exist to read or write this format, Ruby [6] , Python [7] , PHP, Java, C++, .NET [8] , Actionscript [9] , lisp, Haskell, Perl.

PHP used to offer a comprehensive support for WDDX, which could be used as a format to store session information [10] until the version 7.4. It has been removed since from the base language, but still available through PECL. [11] . The rationale was a lack of standardization of the format, and new formats like JSON more mainstream [12] . A vulnerability was fixed in 2007. [13]

Notes

  1. Simeonov, Simeon. "WDDX: Distributed Data for the Web" . Retrieved 2007-02-05.
  2. Itoi, Nikki Goth (February 1999). "Syndicating the Web: Businesses are hoping that the ICE protocol will reduce the Web's content-sharing hassles". Red Herring. Archived from the original on October 13, 1999.
  3. Udell, Jon (1999-06-07). "Exploring XML-RPC: DCOM? CORBA? RMI? Why Not Just XML-RPC?". Byte. Archived from the original on March 4, 2000. Retrieved 2015-11-17.
  4. "WDDX White Paper by Jeremy Allaire".
  5. "PHP: WDDX - Manual". www.php.net.
  6. http://www.juretta.com/log/2007/01/31/rails_wddx_request/ Using WDDX with Ruby on Rails]
  7. Using WDDX with Python
  8. .NET plattform WDDX project
  9. Using WDDX with Flex and AS3
  10. Andrew Stopford, PHP Programming for Windows, Landmark, New Riders, 2002.
  11. "PHP: Removed Extensions - Manual".
  12. "PHP: RFC:deprecate-and-remove-ext-WDDX".
  13. "Cve - Cve-2007-0908".


Related Research Articles

In distributed computing, a remote procedure call (RPC) is when a computer program causes a procedure (subroutine) to execute in a different address space, which is coded as if it were a normal (local) procedure call, without the programmer explicitly coding the details for the remote interaction. That is, the programmer writes essentially the same code whether the subroutine is local to the executing program, or remote. This is a form of client–server interaction, typically implemented via a request–response message-passing system. In the object-oriented programming paradigm, RPCs are represented by remote method invocation (RMI). The RPC model implies a level of location transparency, namely that calling procedures are largely the same whether they are local or remote, but usually they are not identical, so local calls can be distinguished from remote calls. Remote calls are usually orders of magnitude slower and less reliable than local calls, so distinguishing them is important.

In computing, serialization or serialisation is the process of translating a data structure or object state into a format that can be stored or transmitted and reconstructed later. When the resulting series of bits is reread according to the serialization format, it can be used to create a semantically identical clone of the original object. For many complex objects, such as those that make extensive use of references, this process is not straightforward. Serialization of object-oriented objects does not include any of their associated methods with which they were previously linked.

Abstract Syntax Notation One (ASN.1) is a standard interface description language for defining data structures that can be serialized and deserialized in a cross-platform way. It is broadly used in telecommunications and computer networking, and especially in cryptography.

XML-RPC is a remote procedure call (RPC) protocol which uses XML to encode its calls and HTTP as a transport mechanism.

YAML is a human-readable data-serialization language. It is commonly used for configuration files and in applications where data is being stored or transmitted. YAML targets many of the same communications applications as Extensible Markup Language (XML) but has a minimal syntax which intentionally differs from SGML. It uses both Python-style indentation to indicate nesting, and a more compact format that uses [...] for lists and {...} for maps thus JSON files are valid YAML 1.2.

Adobe ColdFusion is a commercial rapid web-application development computing platform created by J. J. Allaire in 1995. ColdFusion was originally designed to make it easier to connect simple HTML pages to a database. By version 2 (1996), it became a full platform that included an IDE in addition to a full scripting language.

JSON is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays. It is a common data format with diverse uses in electronic data interchange, including that of web applications with servers.

JSON-RPC is a remote procedure call protocol encoded in JSON. It is similar to the XML-RPC protocol, defining only a few data types and commands. JSON-RPC allows for notifications and for multiple calls to be sent to the server which may be answered asynchronously.

In the macOS, iOS, NeXTSTEP, and GNUstep programming frameworks, property list files are files that store serialized objects. Property list files use the filename extension .plist, and thus are often referred to as p-list files.

Remote scripting is a technology which allows scripts and programs that are running inside a browser to exchange information with a server. The local scripts can invoke scripts on the remote side and process the returned information.

Thrift is an interface definition language and binary communication protocol used for defining and creating services for numerous programming languages. It was developed at Facebook for "scalable cross-language services development" and as of 2020 is an open source project in the Apache Software Foundation.

Action Message Format (AMF) is a binary format used to serialize object graphs such as ActionScript objects and XML, or send messages between an Adobe Flash client and a remote service, usually a Flash Media Server or third party alternatives. The Actionscript 3 language provides classes for encoding and decoding from the AMF format.

In computer science, marshalling or marshaling is the process of transforming the memory representation of an object into a data format suitable for storage or transmission. It is typically used when data must be moved between different parts of a computer program or from one program to another.

SOAPjr is a protocol specification for exchanging structured information in the implementation of web services in computer networks. It is a hybrid of SOAP and JSON-RPC.

BSON is a computer data interchange format. The name "BSON" is based on the term JSON and stands for "Binary JSON". It is a binary form for representing simple or complex data structures including associative arrays, integer indexed arrays, and a suite of fundamental scalar types. BSON originated in 2009 at MongoDB. Several scalar data types are of specific interest to MongoDB and the format is used both as a data storage and network transfer format for the MongoDB database, but it can be used independently outside of MongoDB. Implementations are available in a variety of languages such as C, C++, C#, D, Delphi, Erlang, Go, Haskell, Java, JavaScript, Julia, Lua, OCaml, Perl, PHP, Python, Ruby, Rust, Scala, Smalltalk, and Swift.

Apache Avro

Avro is a row-oriented remote procedure call and data serialization framework developed within Apache's Hadoop project. It uses JSON for defining data types and protocols, and serializes data in a compact binary format. Its primary use is in Apache Hadoop, where it can provide both a serialization format for persistent data, and a wire format for communication between Hadoop nodes, and from client programs to the Hadoop services. Avro uses a schema to structure the data that is being encoded. It has two different types of schema languages; one for human editing and another which is more machine-readable based on JSON.

ColdBox Platform

ColdBox is a free, open-source, conventions-based, modular web application framework intended for building enterprise applications with ColdFusion (CFML) using a Hierarchical MVC approach.

MessagePack is a computer data interchange format. It is a binary form for representing simple data structures like arrays and associative arrays. MessagePack aims to be as compact and simple as possible. The official implementation is available in a variety of languages such as C, C++, C#, D, Erlang, Go, Haskell, Java, JavaScript (NodeJS), Lua, OCaml, Perl, PHP, Python, Ruby, Scala, Smalltalk, and Swift.

Smile is a computer data interchange format based on JSON. It can also be considered a binary serialization of the generic JSON data model, which means tools that operate on JSON may be used with Smile as well, as long as a proper encoder/decoder exists for the tool. The name comes from the first 2 bytes of the 4 byte header, which consist of Smiley ":)" followed by a linefeed: a choice made to make it easier to recognize Smile-encoded data files using textual command-line tools.