9 ms·
ShowHN: dweet.io – Twitter for machines
We created an amazingly simple IOT utility and are giving it away for free.
We constantly found ourselves needing an easy way to get machines, sensors, and Things online and quickly get data from them. So we built Dweet.io, a simple websocket-based utility for connecting your things to the Internet. And we're opening it up to everyone. We'd love to hear your thoughts and suggestions for it.
Http://Dweet.io
- Bug Labs
- deleted 13y ago[deleted]
- Bug_Labs 13y agoToday we are launching dweet.io, an amazing IOT utility. We are giving it away for free, so please try it. Thank you!
- jkarneges 13y agoInteresting idea. How about documenting the real-time updates protocol?
- jheising 13y agoIt's socket.io. But we can/will document more on it soon.
- josephwegner 13y agoDo you guys make any promises about latency between when a dweet is sent and when a following client will receive it? Among other things, this seems like it could be a free pub/sub system.. If the latency is low that would make this incredibly useful.
- jheising 13y agoNo promises yet, but we plan on offering paid plans that could offer SLAs on latency. Although I will say we architected it from the get-go to be high throughput and low latency— it's all using redis in-memory on the back-end.
- adamb_ 13y agoVery cool. One suggestion for the product page is some simple use-cases for why you'd use such a service. Also, are there size constraints for the dweets?
- filiwickers 13y agoYa, perhaps I am being thick, but what would this be useful for?
- jheising 13y agoBasically any device or thing that has an internet connection can publish information about itself so that it can be consumed externally. For example if you had a BeagleBone microprocessor monitoring temperatures and you wanted to share those temperatures with other people or machines on the cloud, you could do it easily with dweet.io. It's basically a really simple pub/sub platform.
- testrun 13y agoA few examples: - Public swimming pool temperature - Air quality information in city - Traffic light status - Train GPS position
- s_kennedy 13y agoSo cool. Such a simple yet revolutionary concept to enable open and extensible connectivity for IoT.
- telecuda 13y agoCool and good luck! I'd be cautious about the name sounding so close to Tweet, especially when you advertise it's "like Twitter." Less impact changing the name now than later.
- toomuchtodo 13y agobark.io? People tweet, machines bark orders at each other :D
- sheetjs 13y agowuphf.com
- primitivesuave 13y agoThat's taken by Ryan from The Office, but you can still grab wuphf.io.
- mildtrepidation 13y agoSome sort of pun on std.io might be fun, but then if you do use that, the whole normal-people denotation of "STD" is a little bit different than that of programmers.
- dclara 13y agoSo funny. You bet. It reminds me why we even make these things available online. Why do machines need to talk to each other? If they need to collaborate in order to complete some tasks, they should be controlled by human or program. You can make these things online talking HTTP as toys you are playing with your childhood friends, but not for serious business products. It becomes a trend now. Kidding. From two aspects: 1. Cost: in order to make them talk HTTP or API, you need all of them carry a web server which is installed on top of OS. It's not necessary. Machine needs very simple commands to drive them to perform certain tasks because they already know how to do it, you only need to give them instruction on what to do. 2. Security: machines at home should be controlled inside the home or by computer controlled by home users, which could be sitting in the cloud with other OS level of security instead of HTTP or HTTPS. If you are going to expose all of your device status to the internet, do you feel secure? If you do want to control remotely from home, you need to find some way to make schedule or via the cloud.
- cpr 13y agoNice, but the API seems pretty non-RESTifarian. /get/latest/dweet/for would more naturally be /get/dweet with a time parameter, or some such. /for/[device] would more naturally just be a device parameter. Etc.
- Queue29 13y agoUsing HTTP for this is ridiculous. CoAP or MQTT would have been the obvious choice, considering they were designed for exactly this use m2m use case.
- acdha 13y agoIf you want something which can be plugged into a random network somewhere in the world and be reasonably capable of phoning home HTTP is your best bet for being not being firewalled. There's also something to be said for using a well-known protocol rather than something obscure which is likely to require time to debug because it's had many orders of magnitude less usage.
- Bug_Labs 13y agoOur only use-case was ridiculously simple. I don't think CoAP or MQTT fit into that use-case, however at some point, yes we will add other protocols. Thank you.
- terabytest 13y agoExcept it would be much harder to use and understand.
- deleted 13y ago[deleted]
- dclara 13y agoYour point is valid, and you gave suggestions as well. I agree with you that machines should not talk on the HTTP level, it's over kill. Machines only need very simple protocols to exchange current state if they do need to cooperate. To me, if devices can transfer state with the controlled program should be good enough so that the program will send the states to other machines for them to determine what's going to be the next step or directly give them instruction on what the next step to go. I know it's a lot fun to build this type of cute machines, but it's not economic.
- Fasebook 13y agohttp is designed for "m2m use case"...
- angersock 13y ago"What's the catch?" The whole world sees your machines. :)
- jheising 13y agoPrivate machines are coming soon...
- angersock 13y agoWould you all be interested on hosting a contest to do something cool with this?
- Bug_Labs 13y agoWe certainly would. Please let us know what you are thinking. Thank you.
- angersock 13y agoNothing too fancy--just submit a git repo and/or sample website showing off a clever use of your software. For the prize, maybe bragging rights, maybe an API key, maybe a pet elephant; just something fun, you know? It's a pretty low-level product, right--basically a messaging fabric in the cloud that is easy to use. I can think of some delightfully perverse things to do with it, as can I imagine others.
- bdcravens 13y agoSo it's a pub-sub over HTTP. Attaching Twitter to the name makes it sound like something Web 2.0, I suppose.
- jheising 13y agoYeah that's pretty much it. We're not claiming anything earth shattering or new here— just something that is dead simple, and works.
- ChuckMcM 13y agoOh this is very cool. I am so going to plug this into my Electric Imp when I get home.
- Bug_Labs 13y agoAwesome! Please let us know it goes. Thank you.
- primitivesuave 13y agoThis is awesome! It used to be somewhat inconvenient to set up a simple message-passing backend for my Arduino Ethernet. This is exactly what I needed to eliminate that mundane task. To the creator, my eternal gratitude!
- Bug_Labs 13y agoThank you for the kind words. Please let us know how you fare.
- dchuk 13y agoThis is the first time I've come across the HAPI spec. Does anyone know of other projects that are using that style of API?
- ville 13y agoMany parts of the HAPI spec seem to be in outright conflict with the established best practices and standards. E.g. > A HAPI must support the HTTP GET verb on all operations.[1] Contrast this with HTTP/1.1 RFC 2616: > In particular, the convention has been established that the GET and HEAD methods SHOULD NOT have the significance of taking an action other than retrieval. These methods ought to be considered "safe".[2] [1]: https://github.com/jheising/HAPI#general-rules https://github.com/jheising/HAPI#general-rules [2]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
- jheising 13y agoCorrect. Damned be the HTTP specs and REST because they are such a pain in the ass :) I built HAPI precisely because the current standards only work in a world where everyone knows how and enjoys using curl. I think you should be able to paste a URL for an API anywhere and it should just work. For example: Here let me show you how to delete that resource using our API... Oh wait, damn. I can't show you because I have no way of sharing a link with you because it requires the DELETE verb. Just go read this documentation and get back to me when you're done. ;)
- sunir 13y agoAnd I can put that delete URI in an <img src=""> and have your browser or iPhone email automatically destroy your document before you can stop it.
- bluefinity 13y agoYou can do the same thing with POST by submitting a form with JS. The correct way to protect against this sort of thing is to use a CSRF token.
- terabytest 13y agoI kind of like the HAPI concept but it feels strangely redundant. Especially in the responses, where almost half of the k/v pairs are just for "decoration" purposes. I concede that it does make things a slight bit easier to read, but are you guys sure it isn't bordering on redundancy for the sake of redundancy? Very nice idea, by the way! Congrats!
- jheising 13y agoIt might seem like it, but it's actually not that different from a lot of REST APIs I know of. Most REST APIs return a status (in our case "this":"succeeded"), and some sort of wrapper for the actual data (in our case "with":{}). The only thing that might be redundant is the "by" property, but I think it's useful to have in cases where you want to make doubly sure that the API did what you thought it was going to do.
- chrissnell 13y agoInteresting idea but I would offer an alternative to JSON for device<-->dweet communication. JSON parsing on small embedded processors is often memory- and CPU-prohibitive. A small (preferably binary) protocol is lighter and faster to work with on these little microproccessors. When I built my Lightcube[1], I designed a binary protocol[2] that is easily parsed on the Arduino or even the smaller ATtiny microprocessors. Designing and implementing the protocol was a learning process for me but I ended up with something that didn't tax the CPU, leaving me more processing cycles to interact with my hardware. [1] Lightcube: https://github.com/chrissnell/Lightcube https://github.com/chrissnell/Lightcube [2] Lightcube protocol: https://github.com/chrissnell/Lightcube#lightcube-protocol https://github.com/chrissnell/Lightcube#lightcube-protocol
- c4miloo 13y agoI'm curious about why MQTT didn't work for you.
- chrissnell 13y agoI've never heard of that until now. Neat. Maybe for my next device.
- caniszczyk 13y agoMQTT indeed is nice! http://www.infoq.com/articles/practical-mqtt-with-paho http://www.infoq.com/articles/practical-mqtt-with-paho
- deleted 13y ago[deleted]
- angersock 13y agoSo, it's ugly, but just treat single-level JSON as a really oddly-padded binary blob, right? Match on opening bracket, skip forward to third double-quote, ingest string until hit unescaped double-quote, process string. EDIT: You're looking at up to like 6 bytes of overhead: {"a":"<blob>"}
- sthatipamala 13y agoWhy does the API respond with keys like this? "this": "succeeded", "by": "getting", "the": "dweets" It's cute that it's human readable but one would have to write awkward code like: if(response['this'] == 'suceeded') print response['with']
- jheising 13y agoAgreed, in the code-readability sense it's a little on the strange side, but I wouldn't call it completely nonsense either. My thinking behind the design was that developers are a lot easier to deal with than end-users/laypeople who you might rely on to help debug things. Besides, it's easy enough to write wrapper functions or use DEFINE (in the case of C/C++) to make the code more code-readability-friendly. Nothing is perfect for everyone, and I think the response is probably the least important aspect of HAPI. The biggest bang for the buck in my mind is self documenting URLs and support for only HTTP-GET verbs. Just my $0.02 :)
- sunir 13y agoI don't understand why you insist changing operations like create, update and delete should be HTTP GET. That is a security nightmare.
- carbocation 13y agoIt also limits the request size to something like 4K.
- IanCal 13y agoIt depends on what you want to support. I've done similar as I was working on platforms that didn't actually support POST/PUT/DELETE. However you then have to contend with misbehaving caching too.
- jheising 13y agoSeriously? Look at the HTTP protocol and tell me you really believe that. Their way: DELETE /something HTTP/1.1 My way: GET /delete/something HTTP/1.1 Do you really think one is more secure than the other?
- elwell 13y agoMaybe once a week does a website design make me smile. Thank you.
- alexnking 13y agoNice! One thing I would like to see is some way to reserve names so that only I can use them – right now if I'm publishing data to http://dweet.io/follow/outdoors http://dweet.io/follow/outdoors , anyone can easily override that with http://dweet.io/dweet/for/outdoors?no=temp&for=you http://dweet.io/dweet/for/outdoors?no=temp&for=you - so that'd be a neat feature. Unless the idea is that handles would be shared between devices... BTW, I'm dweeting that outdoor temperature using SmartThings and this code - https://gist.github.com/alexking/8880479 https://gist.github.com/alexking/8880479
- jheising 13y agoYes this is by design to make it easy. Being able to lock things to make them private is an upcoming feature. No promises, but probably will be available this coming week.
- psemme 13y agoJust curious - are you accessing your SmartThings device directly or via their API? Thx.
- Bug_Labs 13y agoHey, this is awesome. Would you mind if we sent a tweet about what you did and link to that code? Any chance you might be interested in writing a guest blog on how you connected?
- joeblau 13y agoWOW! Bug Labs, you guys are still around. I remember back in the Summer of 2006 when the BugBox was the hot product. I was trying to build a real-time geo-tagging service to tag speed traps using the BugBox[1]. Then 6 months later, Steven Paul Jobs came though with the hand of magic, announced the iPhone with all of the sensors that were in the bug box with a much better product and simultaneously erased the Bug Labs from my mind. As far as http://dweet.io http://dweet.io, this looks like a very good implementation of a message bus. The two things I'm worried about with this project are performance and concurrency. Lets start with performance. If you're trying to get a predicted 26 billion devices by 2020[2] on a Node.js/Socket.io Framework, you're going to need so many machines, the business case wont be viable. Socket.io is great for message passing, but at high throughput, it's going to fall short. Message busses like ØMQ (ZeroMQ) are a lot lighter and can bind to file descriptor without requiring spawning up an HTTP server. As for Node.js performance; It's great for JSON serialization (Which you're going to be doing a lot of), but it's far from the fastest. Node blows away languages/frameworks like Ruby/Rails and Python/Django in speed when it comes to JSON serialization (And almost anything else), but it's still in the 30th percentile for JSON serialization which is very low[3]. With this being one of your most performed operations, this is something that should be as fast as possible. As far as concurrency is concerned; Node.js isn't an inherently concurrent language although it does have it's non-blocking I/O callback magic. Obviously, you can use modules like cluster, the native process spawning or backgrounder[4], but the weight of threads is going to be so expensive compared to the amount of work that's needed to be preformed. Supporting concurrent paradigms like RUN.At, RUN.Until, RUN.After, RUN.Every, RUN.WithTimeout, and RUN.BatchJobs are easy to do in Node.js, but then getting those individual processes to talk to each other in an orderly fashion using callbacks and Socket.io seems like duct tape and chewing gum over just using a language that supports concurrency natively. Other than that, I love it, I understand the vision (because we're building something similar), and I'm very glad that you guys open sourced this project. [1] - http://www.vroomtrap.com/downloads http://www.vroomtrap.com/downloads [2] - http://www.gartner.com/newsroom/id/2636073 http://www.gartner.com/newsroom/id/2636073 [3] - http://www.techempower.com/benchmarks/#section=data-r8&hw=i7&test=json http://www.techempower.com/benchmarks/#section=data-r8&hw=i7... [4] - http://jolira.github.io/backgrounder/ http://jolira.github.io/backgrounder/
- 13y ago
- jchulce 13y agoWhy on earth are you not using HTTPS?
- jheising 13y agoRight now there is nothing to protect because the API is inherently open (on purpose to make it easy). But next week we will be introducing a security token mechanism to be able to "lock" machines. In this case HTTPS will be important and will be required. So yes, it's coming...
- bliti 13y agoI'm currently working on a similar system aimed at robotics. M2M is rapidly growing under the radar due to mobile phones making a lot of the technology needed cheaper. The interesting bit here is the protocol. Which still feels a bit off to me, but still works well. Designing protocols is not an easy task. Well done Bug Labs. @jheising Send me an email. I'd like to get a friendly conversation going on. :)
- jheising 13y agoWill do mate.