Giter Club home page Giter Club logo

sparkplug's Introduction

Sparkplug

Sparkplug®, Sparkplug Compatible, and the Sparkplug Logo are trademarks of the Eclipse Foundation.

Sparkplug is a specification for MQTT enabled devices and applications to send and receive messages in a stateful way. While MQTT is stateful by nature it doesn't ensure that all data on a receiving MQTT application is current or valid. Sparkplug provides a mechanism for ensuring that remote device or application data is current and valid.

Sparkplug A was the original version of the Sparkplug specification and used Eclipse Kura's protobuf definition for payload encoding. However, it was quickly determined that this definition was too limited to handle the metadata that typical Sparkplug payloads require. As a result, Sparkplug B was developed to add additional features and capabilities that were not possible in the original Kura payload definition. These features include:

  • Complex data types using templates
  • Datasets
  • Richer metrics with the ability to add property metadata for each metric
  • Metric alias support to maintain rich metric naming while keeping bandwidth usage to a minimum
  • Historical data
  • File data

Sparkplug Specification v3.0.0: https://www.eclipse.org/tahu/spec/sparkplug_spec.pdf

Eclipse Tahu

Eclipse Tahu provide client libraries and compatible implementations in various languages and for various devices to show how the device/remote application must connect and disconnect from the MQTT server using the Sparkplug specification explained below. This includes device lifecycle messages such as the required birth and last will & testament messages that must be sent to ensure the device lifecycle state and data integrity.

Eclipse Tahu Project: https://projects.eclipse.org/projects/iot.tahu

Eclipse Tahu Github Repository: https://github.com/eclipse/tahu

Eclipse Tahu Binaries in Maven Central: https://search.maven.org/search?q=g:org.eclipse.tahu

Contributing

  • Make sure you submit your PR against the correct branch
    • Submit PRs against 'develop' for changes to the Sparkplug 4.0.0 specification and TCK
    • Submit PRs againt '3.x' for changes to the Sparkplug 3.0.0 specification and TCK Contributing to the Sparkplug Specification is easy and contributions are welcome. In order to submit a pull request (PR) you must follow these steps. Failure to follow these steps will likely lead to the PR being rejected.
  1. Sign the Eclipse Contributor Agreement (ECA): https://accounts.eclipse.org/user/eca
  2. Make sure the email tied to your Github account is the same one you used to sign the ECA.
  3. Submit your PR against the appropriate branch of the repository. PRs against master will not be accepted.
  4. Sign off on your PR using the '-s' flag. For example: 'git commit -m"My brief comment" ChangedFile'
  5. Make sure to include any important context or information associated with the PR in the PR submission. Keep your commit comment brief.

sparkplug's People

Contributors

ahus1 avatar alexgodbehere avatar dobermai avatar eclipsewebmaster avatar fdesbiens avatar iatraviscox avatar icraggs avatar icraggs-sparkplug avatar joshwolf-canary avatar lukasbrand avatar mbmcpartland avatar nathandavenport avatar scottmwyant avatar waynebeaton avatar wes-johnson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sparkplug's Issues

Make use of more built-in protobuf scalar types

The Sparkplug B protobuf definition only provides uint32 and uint64 types in the one-of value groups. Signed integers are forced in and out of those fields using casting which is not always obvious to implement depending on the programming language.

Additionally, sending any negative value, even small ones, immediately expands the line-size of those fields to the maximum 4 or 8 bytes.

On the next revision of the protobuf definition, I think the one-of value groups should be expanded to also provide either int32/int64 values or sint32/sint64 values. Using these should reduce the amount of casting required to get signed value in and out of the payloads. Additionally, the "sint" versions will allow small signed integers like "-1" to only take one byte of line-size data, although I am unsure if using those versions is easy in all application languages.

Add Copyright, Eclipse Foundation Specification License, and Disclaimers to start of spec

This is regarding: http://dev.eclipse.org/ipzilla/show_bug.cgi?id=22396

Now that this contribution has been approved, we will need to make an
adjustment to the file headers for the content. It is correct that the
documentation that is produced by this code is licensed under the Eclipse
Foundation Specification License, as noted in the Sparkplug.adoc file; however,
the code itself that generates the specification docs is to be licensed under
the EPL-2.0 license as the EFSL applies to the generated documentation only.

Please review the attachment and ensure that all of the file headers are
showing the EPL-2.0 license as outlined here:

https://www.eclipse.org/projects/tools/documentation.php?id=iot.sparkplug

Support for an array of basic types

It seems like it would be good to have a simple clean way of sending an array of integers or floating point numbers (or any basic scalar type) without the expense of a template or a data set. Similar to the "bytes" type, but with other base types besides a byte.

Sparkplug™

It looks like someone went overboard with a find and replace and "Sparkplug™" is everywhere in the spec, including protobuf definitions and topic names, among other places it's not likely intended:

syntax = "proto2";

package org.eclipse.tahu.protobuf;

option java_package         = "org.eclipse.tahu.protobuf";

option java_outer_classname = "Sparkplug™BProto";

message Payload {

...truncated...

Create 'original' and 'converted' copies of the original Sparkplug Spec to track what has been converted

As we port the Sparkplug specification to the new format we should create a 'converted' doc that we can use to remove content to denote what portions of the original spec have been moved to the new form.

Every time anyone copies portions from the old form of the spec to the new chapter based form the corresponding text in the 'converted' doc should be removed.

Using this method, we should be able to easily/quickly see what content has not been copied over. Some may never be copied over but this will make it easy to audit what maybe should still be moved over. After this conversion is complete the converted doc can be deleted.

Missing sections in chapter 5

I converted chapter 5 from the original specification and found items that may be missing, addressed in another section, or not completed yet. Here are the sections:

  • MQTT Enabled Device Session Establishment
  • MQTT Application Node Session Establishment
  • Data Publish
  • Commands

Review and cleanup SparkplugB metric properties

Review and cleanup SparkplugB metric properties. There is at least one discrepancy in the spec defined metric properties: 'is_historical' has instead been implemented as 'isHistorical'. This should be fixed and the other metric properties should be reviewed and updated if appropriate.

MQTT version 5.0

I think we need to define how Sparkplug relates to MQTT 5.0, not just 3.1.1. The 5.0 standard has been published for almost two years now and will see increasing adoption.

I don't think there need be any substantive changes to be able to use MQTT 5.0, as it is a superset of 3.1.1, so all it will amount to is saying that Sparkplug will work with both, and that when MQTT is referred to, it can mean either version.

It's possible that if any specific MQTT functionality is mentioned the terminology may differ between 5.0 and 3.1.1 but so far I've not noticed any. Retained messages, for instance, remain the same.

The "clean session" flag is one difference in MQTT 5.0 - it becomes the clean start flag combined with the session expiry interval. But I don't think "clean session" is mentioned anyway.

The biggest impact might be on the TCK, if we need to ensure it works on both versions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.