Energy-Efficient Transaction Serialization for Iot Devices

Energy-Efficient Transaction Serialization for Iot Devices

Journal of Computer Science Research | Volume 02 | Issue 02 | April 2020 Journal of Computer Science Research http://ojs.bilpublishing.com/index.php/jcsr ARTICLE Energy-Efficient Transaction Serialization for IoT Devices Daniel Evans* Pace University, United States ARTICLE INFO ABSTRACT Article history This article presents two designs, the Transaction Serial Format (TSF) Received: 6 January 2020 and the Transaction Array Model (TAM). Together, they provide full, ef- ficient, transaction serialization facilities for devices with limited onboard Accepted: 20 January 2020 energy, such as those in an Internet of Things (IoT) network. TSF pro- Published Online: 31 May 2020 vides a compact, non-parsed, format that requires minimal processing for transaction deserialization. TAM provides an internal data structure that Keywords: needs minimal dynamic storage and directly uses the elements of TSF. Energy efficiency The simple lexical units of TSF do not require parsing. The lexical units contain enough information to allocate the internal TAM data structure Data serialization efficiently. TSF generality is equivalent to XML and JSON. TSF rep- IoT serialization resents any XML document or JSON object without loss of information, XML equivalence including whitespace. The XML equivalence provides a foundation for the performance comparisons. A performance comparison of a C refer- JSON equivalence ence implementation of TSF and TAM to the popular Expat XML library, also written in C, shows that TSF reduces deserialization processor time by more than 80%. 1. Introduction ization contributes to an increase of the deployed lifetime of an IoT device. This work describes the Transaction he rapid development of the Internet of Things Serial Format (TSF), whose primary goal is to use as little (IoT) has renewed interest in transaction process- energy as possible to perform the serialization/deserializa- ing efficiency. The paper “Energy Efficiency: A tion tasks. The Transaction Array Model (TAM) supports T [1] New Concern for Application Software Developers” re- the efficiency of TSF. Although a dynamic data structure, cently detailed the interaction between energy issues and TAM directly integrates information from the TSF format. software in IoT and mobile devices: “… wasteful, poorly optimized software can deplete a device’s battery much 1.1 Serialization Overview faster than necessary.” The initial energy supply of many The need for serialization and deserialization, converting IoT sensor devices limits their deployment lifetime. These data to and from serial media such as communications devices sense information and transmit the results of networks and long-term storage devices, has spawned sensing. They receive instruction from remote controllers. many designs. Wikipedia lists 35 different formats in its They continually serialize and deserialize transactions to “Comparison of Data Serialization Formats” page. The and from a communications medium. Any reduction in differences are many and the reasons for development of processor time used by transaction serialization/deserial- each are not always clear. However, they have a common *Corresponding Author: Daniel Evans, Pace University, United States; Email: [email protected] Distributed under creative commons license 4.0 DOI: https://doi.org/10.30564/jcsr.v2i2.1620 1 Journal of Computer Science Research | Volume 02 | Issue 02 | April 2020 feature: the need to preserve data structure. The data struc- munications industry when transmission speeds were turing facilities of random access memory are not feasible much slower than they are today. The International Tele- when accessing data sequentially from beginning to end communications Union (ITU), the standards body for one byte at a time. international telecommunications, released in 1984, as Serialization formats generally fall into two categories: part of CCITT-X.409, the Abstract Syntax Notation, ver- formats specific to an application, and general formats sion 1 (ASN.1), an interface description language (IDL). intended for use by any application. Examples of appli- In 1988, ASN.1 became a separate standard, X.208 [14]. cation formats are Apache Avro [2] and Apache Parquet [3] ASN.1 has gone through several revisions and is currently both designed for the Hadoop parallel processing system. at Revision 5, but has not lost its original name, ASN.1. Binary JSON (BSON) [4] adds binary representations and ASN.1 is a declarative language (also called a schema extensibility to JSON-structured data in the MongoDB language) for describing messages as general structures of database system. Also in this category are language-spe- arbitrary data types. A schema is a description of the seri- cific serializations such as Java Object Serialization [5], alization format, which both sender and receiver have. An Python Pickle [6], and Perl’s DataDumper module [7], the ASN.1 schema declares data types first, and then declares first of many PERL serialization modules. Remote Proce- messages as structured sequences of previously declared dure Invocation produced a number of formats designed data types. ASN.1 provides an extensive set of built- to marshal parameters for a remote procedure call and to in type constructors as a foundation for complex types. return the results. The Common Object Request Broker Every defined type has an unambiguous serial encoding, Architecture (CORBA) specifies the InterORB Protocol commonly known as type-length-value encoding. ASN.1’s [8] for communication between clients and object request Basic Encoding Rules (BER) define the rules for serializ- brokers. The Java library provides the Remote Method ing data using bit- and byte- aligned fields. Initial imple- Invocation (Java RMI) [9] for Java programs to invoke re- mentations of ASN.1 compiled a schema of data types and mote methods available on any machine running an RMI message declarations into source code in a language such server. D-Bus [10] is designed for both interprocess control a C, providing both encoding and decoding functions. The on a local machine and remote invocation. Apache Thrift generated encoding and decoding functions, specific to the [11] is a design for cross-platform RPC. XML-based RPC described messages, could in turn be included as source serialization came from Microsoft in the form of XML- code, or compiled and linked as a library, into application RPC [12], the ancestor to the World Wide Web Consortium programs that sent and received the messages. ASN.1 (W3C) SOAP standard [13]. found wide use within the telecommunications industry. General serialization formats are for any application, A subset of ASN.1 became the Simple Network Manage- and TSF is in this category. In addition to the basic re- ment Protocol’s language for describing SNMP’s MIBs quirement of preserving data structure, many formats in- (Management Information Base) [15], which are abstract corporate additional features that: descriptions of network devices subject to management (1) Reduce the size of serialized data to minimize data by the protocol. ASN.1 also found use in applications that transmitted use some form of the X.500 series of standards from the (2) Use an external schema to describe the serial for- CCITT, such as the exchange of cryptographic metadata mat(s) with X.509 certificates [16]. (3) Work with multiple character encodings, such as ASN.1 uses type codes and a schema to define and pre- UTF-8, UCS-2, and UCS-4 serve structure. Another common structure-preservation (4) Use only characters recognized by a text editor technique is the use of delimiters that signify the begin- so that the serialized data is human-readable or easily ning and end of data and provide for data nesting. XML changed [17] and JSON [18], two of the most popular formats in use (5) Address some additional need, such as machine-in- today, both use this technique. XML uses named parenthe- dependent data definitions that could be exchanged by ses, called open and close tags, to delimit and nest data. machines of different architecture, or the restriction to 7-bit JSON uses two types of structure delimiters, the charac- or 8-bit clean so that data can be transmitted through gate- ters “[“and”]” for arrays, and the characters “{“and”}” ways and across networks with differing characteristics for collections, which are named sequences of data. Col- In the following, we examine serialization formats that lections synonyms are associative arrays, maps, hashes, incorporate one or more of these features, and note how or dictionaries in other computer languages. The YAML TSF compares to them. format [19] uses indentation and the natural delimiting pro- Data compaction was an early issue for the telecom- vided by line end characters to preserve data structuring. 2 Distributed under creative commons license 4.0 DOI: https://doi.org/10.30564/jcsr.v2i2.1620 Journal of Computer Science Research | Volume 02 | Issue 02 | April 2020 The lines in the YAML format have additional syntax, MicroXML simplified XML by, among other things, which may optionally include “flow” formats, close to the eliminating DOCTYPE’s, namespaces, processing in- delimited design of JSON. YAML is also user editable structions, CDATA sections, and character set options. with any general text editor program. Another delimited, However, as MicroXML is a subset of XML, no alternate editable format is “s-Expressions”, originally designed serialization format was proposed. by John McCarthy, the inventor of Lisp, and described in Improved

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    16 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us