New Library - Ubsub communication platform

I’d like to announce a new hobbiest-focused cloud platform for device communication over WiFi: https://ubsub.io. One of my inspirations for developing this is to give the power similar to what IFTTT/Particle already offers, but more web-friendly and a broader target.

UbSub is a Publish-Subscribe platform (much like Amazon SNS/SQS, or Particle’s own cloud), but focused on a much smaller use-case, making it significantly simpler to use. It’s not completely focused on IoT, so it’s very easy to integrate with other platforms such as IFTTT.

Key features:

  • HTTPS-based trigger/webhook driven
  • Other trigger/hooks such as: Email, device notifications, raw UDP
  • Retryable delivery (with exponential backoff)
  • Payload manipulation via javascript VM

I’ve also taken the care to write a C++ implementation that communicates securely over UDP. It features:

  • Bi-directional communication (Events and listeners)
  • NAT traversal via holepunching
  • Encrypted payload (salsa20) with HMACSha256 signature for secure communication
  • Automatic (optional) JSON payload wrapping / extraction
  • Automatic renewals/re-subscribe and retrying
  • ACK support for guaranteed delivery (with timeouts)

I’ve tested it on a Particle Photon and NodeMCU.

You can find the general docs here: https://p.ubsub.io/docs/

The IoT C++ library is here (Tested with ESP8266/32, and Photon): https://github.com/ubsub/ubsub-iot

I’d love to know your honest feedback. I personally use it for my own IoT (home-control), but I’m probably biased :wink:

Regards,
~ Chris (zix99)

2 Likes

How does this compare to MQTT? Can I use UbSub on my own server?

I skimmed the MQTT spec real quick, and these stood out to me as the key differences: (I’ll try to read in more detail later)

  • UbSub uses UDP and is stateless (MQTT is TCP and stateful)
    • This means there’s a lot more data traffic for MQTT
    • UbSub works around the issues of UDP using hashes and retries to guarantee delivery and integrity
  • UbSub has various levels of “asks”, eg, you can send a message and not “ask” for an ACK, lowering data use at the cost of reliability
  • UbSub IOT is just one part of the whole “platform”. UbSub itself can do a lot more (emails, rest API, etc)
  • The actual specification for what the protocol can do is very similar (publish, subscribe, acknowledge, ping, etc)

Using UbSub-IOT on your own server is very much on the roadmap. I definitely acknowledge the want of control and to keep messages on the local network, however, it’s not done yet.

1 Like