node-etpdeprecated

This is a javascript serialization implementation for the Energistics Transfer protocol (ETP).

Usage no npm install needed!

<script type="module">
  import nodeEtp from 'https://cdn.skypack.dev/node-etp';
</script>

README

Node ETP

This is a javascript serialization implementation for the Energistics Transfer protocol (ETP).

ETP is a proposed specification for streaming real-time data from oil field drilling and production facilities. It uses websockets for transport and Apache Avro for serialization. This node package contains:

  1. A set of routines for serializing and deserialing binary Avro messages in javascript.
  2. An array of the all of the ETP protocol message schemas in javascript form (i.e. a parsed version of the JSON message schemas) which can be passed to the Avro serializer to parse an incoming message.

Prerequisites

  • Install Node from nodejs.org - v0.10 min required.

Installation

To install from npm

npm install node-etp

To install from source

Clone the node folder from bitbucket.

c:\energistics\src\node-etp git clone https://bitbucket.org/energistics/node-etp.git

Install into your project directory c:\ralfdemo>npm install c:\energistics\src\node-etp

Using the library.

Create test.js

var avro = require("node-etp").Avro;
var schemas = require("node-etp").Schemas;

console.dir(schemas);

Run the file under node

c:\ralfdemo>node test
{ namespace: 'energistics',
  protocol: 'exp',
  version: '',
  types:
   [ { type: 'record',
       namespace: 'Energistics.Datatypes',
       name: 'ArrayOfDouble',
       fields: [Object],
       fullName: 'Energistics.Datatypes.ArrayOfDouble',
       depends: [] },
     { type: 'record',
       namespace: 'Energistics.Datatypes',
       name: 'DateTime',
       fields: [Object],
       fullName: 'Energistics.Datatypes.DateTime',
       depends: [] },
     { type: 'record',
       namespace: 'Energistics.Datatypes',
       name: 'DataValue',
       fields: [Object],
       fullName: 'Energistics.Datatypes.DataValue',
       depends: [Object] },
etc...