Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
nats-account-server
A simple HTTP/NATS server to host JWTs for nats-server 2.0 account authentication.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Uhhh, you might have missed looking at the handlers I'm using - I'm exposing via WebSocket as well, but I work primarily on TCP too. Moreover, adopting MQTT would squeeze more performance since it's already a binary protocol while NATS's is text based.
Give me a while to switch the protocol to MQTT, though. Then you can plug the awesome Eclipse Paho client in seamlessly.
well, there is https://github.com/allegro/hermes
NATS has it's own custom text based protocol, and the client ecosystem is not as mature as others', like MQTT. In fact, I developed the NATS Dart client initially to be used from Flutter apps, but now can be used on Dart servers as well. Ivan from NATS is currently working on native MQTT v3.5 support (releasing sometime soon) and v5 support landing in Q1 2021 (Source: NATS Roadmap). I see here that they're building the Go implementation from scratch, which is interesting. They also seem to be converting every MQTT topic to a NATS topic for backward compatibility (obviously, duh) - I'm not sure if this brings any challenges down the line.
NATS (at least until recently) had a very rigid authentication mechanism (just tokens and basic auth) directly configured on the server. This would be okay for hobbyists, but pales in comparison with the likes of Kafka which support LDAP atop a myriad of IDPs. NATS right now supports a form of JWT using external account providers, but this provider server should also be according to a custom spec - general purpose OAuth servers cannot be used.