https://github.com/progrium/wsio
Pipe data anywhere
https://github.com/progrium/wsio
Last synced: about 1 year ago
JSON representation
Pipe data anywhere
- Host: GitHub
- URL: https://github.com/progrium/wsio
- Owner: progrium
- License: mit
- Created: 2010-05-04T19:42:49.000Z (about 16 years ago)
- Default Branch: master
- Last Pushed: 2010-05-09T03:58:16.000Z (about 16 years ago)
- Last Synced: 2024-05-08T22:01:46.785Z (about 2 years ago)
- Language: Ruby
- Homepage:
- Size: 96.7 KB
- Stars: 22
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
wsio -- web stream input/output tool
Dependencies: Ruby (dev version to compile extensions) and Rubygems
Install: sudo gem install wsio
Usage: wsio [options] [user[:pass]@][hostname][path]
-l Listen to stream and print to STDOUT
-s Use HTTPS
-k Ignore SSL verification (like curl)
By default, wsio listens to STDIN and does an HTTP POST for each line.
This tool is similar to netcat in that it's intended to be used with STDIN and
STDOUT, making it perfect for command pipelining. However, instead of direct
point to point TCP/UDP connections, it uses HTTP. Coupled with a server that
provides realtime pubsub over HTTP and you have one of the most magical tools
ever. Here's a toy log aggregation example:
Run this on one or several machines:
tail -f /var/log/something | wsio somehost/log
Run this on your central aggregator:
wsio -l somehost/log > /var/log/aggregate
Run this on your *laptop behind NAT* to watch the logs:
wsio -l somehost/log
Obviously there is a server-side component to this. It's not that complicated
and there are some servers that already implement streams this way.
For example, Twitter's Stream API:
wsio -l :@stream.twitter.com/1/statuses/sample.json
However, wsio was made with a particular server-side component in mind. If you
are interested in this, please email me.