All posts tagged: xml

XMPP or the Extensible Messaging and Presence Protocol, formerly known as Jabber, is a communications protocol based on XML (Extensible Markup Language), aimed at message-oriented middleware and applications such as near-real-time instant messaging and presence information. XMPP is designed to be extensible, and has been used for publish-subscribe systems, file transfer, and communication in embedded Internet-of-Things networks.

As XMPP is defined as an open standard and uses an open systems approach of development and application – anyone may implement an XMPP service and interoperate with other implementations. And thanks to its open protocol, XMPP implementations can be developed using any software license and many implementations of the XMPP standards exist for clients, servers, components and code libraries – both open-source and proprietary.

XMPP is well supported as an open standard under ongoing development by standards-makers and organisations such as the Internet Engineering Task Force, which formed an XMPP working group in 2002 to formalise the core protocols of XMPP. No royalties are required to implement support of these specifications and their development is not tied to any single vendor.

In addition to these core protocols standardised by the IETF, the XMPP Standards Foundation (formerly the Jabber Software Foundation) is active in developing open XMPP extensions, including a new series of extensions aimed at allowing Internet-of-Things communications of sensors and actuators using XMPP.

Furthermore, the IEEE is working to define a “Standard for a Smart Transducer Interface for Sensors, Actuators and Devices – Extensible Messaging and Presence Protocol (XMPP) Standard for Networked Device Communication” which, with the backing of the IEEE behind it, is likely to be an influential new standard.

Another advantage of XMPP is that it offers good security, since private XMPP servers can be isolated from the public Intranet, for example on a company Intranet, and strong SASL and TLS security is built into the core XMPP specifications.

XMPP2

The XMPP protocol uses a decentralised client-server architecture where clients do not talk directly to one another, but there is no central server either. By design there is no central authoritative server, but anyone can run their own XMPP server on their own domain or intranet.

Because XMPP uses the XML text format, interfacing machine-to-machine Internet-of-Things networks to machine-to-person communications, where needed, comes naturally.

XMPP features such as federation across domains, publish-subscribe communications, strong authentication and security and XMPP’s name-domain addressing scheme, which helps to navigate the huge breadth of the Internet to get the data where it is needed, are being used to develop XMPP as a powerful tool for implementing the Internet of Things.

XMPP’s easy addressing of a device is especially useful if the data going to or from a device is going between distant, mostly unrelated points, just as in the traditional person-to-person case of XMPP-based instant-messaging communication.

Most XMPP implementations use polling, or checking for updates only on demand. A protocol called BOSH (Bidirectional streams over Synchronous HTTP) lets servers push messages. However, XMPP is not designed to be extremely fast, and XMPP’s idea of near-“real time” communication is close to “real time” on human scales, on the order of a second.

Whilst consideration of timing is important in the choice of Internet-of-Things protocols, this sort of timing is suitable for most applications and is comparable to the timing overheads generally seen in practical systems with other choices of messaging protocols such as MQTT.

Some of the open XMPP specifications under development are specifically aimed at enhancing XMPP standards for Internet-of-Things applications, for example describing how to manage and get information from concentrators of devices over XMPP networks.

Concentrators are devices in sensor networks concentrating the management of a subset of devices to one point. They can be small, such as Programmable Logic Controllers managing a small set of sensors and actuators, medium-sized, for example mid-level concentrators, controlling branches of the network which may use different communication protocols, or entire large systems.

Because XMPP assumes a persistent TCP connection and lacks an efficient binary encoding, it has traditionally not been practical for use over lossy, low-power wireless networks associated with Internet-of-Things technologies. However, recent work in the development of XMPP standards aims to make XMPP better suited for the Internet of Things.

Even though many of the existing and emerging XMPP specifications relating to sensor networks are generally written and can be used by other implementations not based on sensor networks, many of the requirements used to define these specifications come from the requirements of sensor networks and Internet-of-Things applications and infrastructure. These specifications provide a common framework for sensor data interchange over XMPP networks.

One new XMPP specification aimed towards Internet-of-Things applications defines a general concentrator profile that can handle all different types of concentrators available in sensor network architectures, working with multiple data sources.

The XMPP Publish-Subscribe model, comparable to the publish-subscribe model of other protocols such as MQTT of interest in Internet-of-Things applications, describes a system where a tree structure of nodes is published and users can browse this tree structure, publish items on these nodes, and syndicate this information.

XMPP, and the standards and extensions built around it, can enable efficient publication of data collected from large sensor networks, federation of disparate platforms, service discovery and invocation, interoperability of machine-to-machine communications with machine-to-person and person-to-person communications and other advantages in addressing, security and scalability that make it a very promising technology for Internet-of-Things applications. Its strengths in addressing, security, and scalability make it ideal for consumer-oriented IoT applications.

If XMPP appeals as a protocol for your next IoT-enabled product or design revision – or you’re interested in any or all stages of the process and need a partner to help meet your goals – the first step is to discuss your needs with our team of experienced engineers that can help you in all steps of product design, from the idea to the finished product.

To get started, join us for an obligation-free and confidential discussion about your ideas and how we can help bring them to life – click here to contact us, or telephone 1800 810 124.

LX is an award-winning electronics design company based in Sydney, Australia. LX services include full turnkey design, electronics, hardware, software and firmware design. LX specialises in embedded systems and wireless technologies design.

Published by LX Pty Ltd for itself and the LX Group of companies, including LX Design House, LX Solutions and LX Consulting, LX Innovations.xmpp, internet, of, things, protocol, iot, messaging,xml, lx, group, embedded hardware

Muhammad AwaisXMPP – an extensible messaging protocol for the IoT

JSON, or JavaScript Object Notation, is a lightweight open standard format that uses human-readable text to transmit data objects in the form of pairs of attributes and values. It is used primarily to transmit data between a server and a web application as an alternative to formats and languages such as XML for lightweight, flexible formatting of data for Internet communication in a way that is both machine-readable and human-readable.

Let’s look briefly at how JSON can be used, how it compares to XML (Extensible Markup Language), and the role JSON can play as a lightweight format for information transport in Internet of Things and embedded applications. In an Internet-of-Things application, every “Thing” connected to the network should have an API that allows access to key data elements.

This data needs to be streamed at an appropriate rate over the Internet to a server directly, or to a gateway or other device in the local network. Near-real-time access to sensor data at the gateway or at the server allows contextual information derived from that data to be served up in a timely manner, so minimising network overheads is clearly valuable.

JSON

Although originally derived from the JavaScript scripting language, JSON is a language-independent data format and code for parsing and generating JSON data is readily available in a large range of programming languages, making it easy to get up and running with the language of your choice. JSON objects are human readable – they are basically freeform text documents. Whilst JSON objects contain rich information and are a highly flexible way to represent data, they are easy for programmers and database administrators to use.

XML is well established as a language of choice to describe structured data and to serialise objects, and various XML-based protocols exist to represent the same kind of data structures as JSON for the same kind of data interchange purposes. When data is encoded in XML, the result is typically larger than an equivalent encoding in JSON, mainly because of the presence of closing tags in XML.

While the API is a key consideration in implementing a RESTful solution for moving around and accessing your data, the format of the payload is also equally as important. XML is one traditionally popular language in these sorts of applications, but JSON is not as verbose as XML and does not contain detailed processing instructions. Being a more lightweight data interchange format, it is faster to use JSON to send bits of data, such as data from a sensor for example, around the Internet of Things.

JSON is promoted as a lower-overhead alternative to XML, providing similar data exchange capabilities with support for creation, reading and decoding of data in the real world with lower overhead. The increasing popularity of REST over SOAP in modern APIs also promotes greater use of and support for JSON as the preferred data exchange format, since you are no longer limited to only returning XML.

JSON-RPC is an RPC protocol built on JSON, as a replacement for XML-RPC or SOAP. It is a simple protocol that defines only a handful of data types and commands. JSON-RPC allows for notifications – information sent to the server that do not require a response – and for multiple calls to be sent to the server that may be answered out of order. This flexibility in choosing messaging options to get the data where it is needed with the priority that is needed in the most lightweight possible way is attractive in resource-constrained and bandwidth-constrained Internet-of-Things networks or embedded systems.

JSON1

Modern web browsers incorporate native JSON encoding and decoding, increasing performance due to the fact that functions no longer need to be parsed as well as eliminating potential security vulnerabilities where JSON is evaluated as Javascript. Native JSON is generally faster compared to the JavaScript libraries used in the past to parse JSON, as well as more secure.

As an example of JSON in use for an existing embedded Internet-of-Things solution, the “Razberry” platform. This adds the hardware required for the Z-wave wireless home automation protocol to the Raspberry Pi single-board computer, turning an inexpensive device into a Z-wave home automation gateway and exposing control of your home automation network via a JSON interface.

Furthermore Google BigQuery added support for JSON a few years ago, explicitly mentioning the potentially useful role of JSON in connecting data collected from sensor networks and the Internet of Things to BigQuery, bringing the power of Google’s Big Data manipulation expertise together with the Internet of Things and sensor networks as the sources for that Big Data.

JSON is one of many tools available in the Internet-of-things toolbox, and can easily be used with many applications. And here at the LX Group our engineers have an excellent understanding of the standards required for effective communciation between devices within Internet-of-things platforms, and are ready to integrate it with your new and existing products.

To get started, join us for a confidential discussion about your ideas and how we can help bring them to life – click here to contact us, or telephone 1800 810 124.

LX is an award-winning electronics design company based in Sydney, Australia. LX services include full turnkey design, electronics, hardware, software and firmware design. LX specialises in embedded systems and wireless technologies design.

Published by LX Pty Ltd for itself and the LX Group of companies, including LX Design House, LX Solutions and LX Consulting, LX Innovations.

Muhammad AwaisJSON – the Open Data Object