Screems is a web socket based file streamer.
Getting a file is easy, you can:
- Download the file over http
- rsync
- scp
- etc
But sometimes you don't want a copy of a file, you want to watch log files being updated in real time. Maybe you don't have access to the server that contains the log files. Now you can stream the file and see all the updates.
Screems uses Tornado for web sockets and http communication:
Client --> WebSocket Connection ----> Server
Client --> JSON { filename: bla_bla } --> Server
Client <---- File streamed <---- Server
On the server:
python screems.py --dir /home/usertest --file /var/log/httpd/access.log
Then on a client machine:
wsdump.py ws:/:8888/ws
and send a JSON message requesting a certain file, like:
- { "filename":"testfile.txt" }
- { "filename":"/var/log/httpd/access.log" }
The system will look for testfile.txt in all the directories specified by --dir on the server.
There is a Javascript websocket streaming app available at :/jsviewer that you can point a browser to and watch it update.
