Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aaU, I want to use the NATS messaging protocol to send sensor data to the cloud #1969

Closed
zephyrbot opened this issue May 28, 2016 · 6 comments
Labels
Enhancement Changes/Updates/Additions to existing features priority: medium Medium impact/importance bug
Milestone

Comments

@zephyrbot
Copy link
Collaborator

zephyrbot commented May 28, 2016

Reported by Anas Nashif:

As a User, I want to use the NATS messaging protocol to send data from a sensor node to the cloud or the local network.

From http://www.nats.io/:

NATS is an open source, modern and secure messaging system for distributed systems and scalable cloud applications. NATS is ideal for cloud native applications, IoT device messaging and microservices architectures.

The NATS wire protocol is a simple, text-based publish/subscribe style protocol. Clients connect to and communicate with gnatsd (the NATS server) through a regular TCP/IP socket using a small set of protocol operations that are terminated by newline.

Unlike traditional messaging systems that use a binary message format that require an API to consume, the text-based NATS protocol makes it easy to implement clients in a wide variety of programming and scripting languages.

(Imported from Jira ZEP-415)

@zephyrbot
Copy link
Collaborator Author

by Flavio Santes:

NATS is an IoT protocol!

@zephyrbot
Copy link
Collaborator Author

by Flavio Santes:

Client-side library is still WIP. So far, 40% is completed. Code is being migrated to use ZEP-468.

@zephyrbot
Copy link
Collaborator Author

by Lei Liu:

Publish log
{code:title=Zephyr NATS Client|borderStyle=solid}
shell> test_nats_publish sensors HD /home/door/open

NATS PUB: OK
Publishing subject: sensors, reply_to: HD, payload: /home/door/open
shell> test_nats_publish sensors HD /home/door/open

NATS PUB: OK
Publishing subject: sensors, reply_to: HD, payload: /home/door/open
shell> test_nats_publish sensors HD /home/door/open

NATS PUB: OK
Publishing subject: sensors, reply_to: HD, payload: /home/door/open
shell> test_nats_publish sensors HD /home/door/close

NATS PUB: OK
Publishing subject: sensors, reply_to: HD, payload: /home/door/close
shell> test_nats_publish sensors HD /home/door/open

NATS PUB: OK
Publishing subject: sensors, reply_to: HD, payload: /home/door/open
shell> test_nats_publish sensors HD /home/door/close

NATS PUB: OK
Publishing subject: sensors, reply_to: HD, payload: /home/door/close
{code}

{code:title=Reference client|borderStyle=solid}
root@alvin:~/go/src/github.com/nats-io/nats/examples# go run nats-sub.go sensors
Listening on [sensors]
[#1] Received on [sensors]: '/home/door/open'
[#2] Received on [sensors]: '/home/door/open'
[#3] Received on [sensors]: '/home/door/open'
[#4] Received on [sensors]: '/home/door/close'
[#5] Received on [sensors]: '/home/door/open'
[#6] Received on [sensors]: '/home/door/close'
{code}

Subscribe log
{code:title=Zephyr NATS client |borderStyle=solid}
shell> test_nats_subscribe sensors HD
Subscribe subject: sensors, sid: HD

-------------------------------- 0

-------------------------------- 7
Subject: [7] sensors
Sid: [2] HD
Reply-to: not found
Payload: [4] open

-------------------------------- 8

-------------------------------- 14
Subject: [7] sensors
Sid: [2] HD
Reply-to: not found
Payload: [4] open
shell> test_nats_unsubscribe HD
Unsubscribe sid: HD, max_msgs: 0
shell> test_nats_subscribe sensors HD
Subscribe subject: sensors, sid: HD

-------------------------------- 0

-------------------------------- 7
Subject: [7] sensors
Sid: [2] HD
Reply-to: not found
Payload: [4] open
{code}

Two major NATS features work. Close this story. If other problems occurs, will track them as bug.
Zephyr: v1.5.0-rc1

@zephyrbot
Copy link
Collaborator Author

Related to ZEP-573

@zephyrbot
Copy link
Collaborator Author

Related to ZEP-596

@zephyrbot
Copy link
Collaborator Author

Related to ZEP-597

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Changes/Updates/Additions to existing features priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

1 participant