I was thinking of ways to stream pipes through ipc, and came across this which redirects stdin/out through websockets. Maybe some of you find it interesting.
https://github.com/joewalnes/websocketd
$ ./websocketd --port 8080 curl “http://stream-sandbox.oanda.com/v1/prices?accountId=12345&instruments=AUD_CAD%2CAUD_CHF%2CGBP_USD%2CUSD_EUR” -N
Fri, 10 Oct 2014 21:07:02 +0200 | INFO | server | | Serving using application : /usr/bin/curl http://stream-sandbox.oanda.com/v1/prices?accountId=12345&instruments=AUD_CAD%2CAUD_CHF%2CGBP_USD%2CUSD_EUR -N
Fri, 10 Oct 2014 21:07:02 +0200 | INFO | server | | Starting WebSocket server : ws://:8080/
Fri, 10 Oct 2014 21:07:08 +0200 | ACCESS | session | url:‘http://host:port/’ id:‘1412968028000414119’ remote:‘localhost’ command:‘/usr/bin/curl’ origin:‘file://’ | CONNECT
Fri, 10 Oct 2014 21:07:08 +0200 | ERROR | stderr | url:‘http://host:port/’ id:‘1412968028000414119’ remote:‘localhost’ command:‘/usr/bin/curl’ origin:‘file://’ pid:‘35749’ | % Total % Received % Xferd Average Speed Time Time Time Current
Fri, 10 Oct 2014 21:07:08 +0200 | ERROR | stderr | url:‘http://host:port/’ id:‘1412968028000414119’ remote:‘localhost’ command:‘/usr/bin/curl’ origin:‘file://’ pid:‘35749’ | Dload Upload Total Spent Left Speed
Fri, 10 Oct 2014 21:07:12 +0200 | ACCESS | session | url:‘http://host:port/’ id:‘1412968028000414119’ remote:‘localhost’ command:‘/usr/bin/curl’ origin:‘file://’ pid:‘35749’ | DISCONNECT
and then in kdb+
q).z.ws:{0N!x;} / just print incoming
q)r:(`$“:ws://127.0.0.1:8080”)“GET / HTTP/1.1\r\nHost: host:port\r\n\r\n”
q) / updates printed below
“{"tick":{"instrument":"AUD_CAD","time":"2014-10-10T19:07:40.359506Z","bid":0.93824,"ask":0.93875}}”
“{"tick":{"instrument":"AUD_CHF","time":"2014-10-10T19:07:38.362939Z","bid":0.97566,"ask":0.97603}}”
“{"tick":{"instrument":"GBP_USD","time":"2014-10-10T19:07:37.750485Z","bid":1.4758,"ask":1.47598}}”
“{"tick":{"instrument":"USD_EUR","time":"2014-10-10T19:07:39.219876Z","bid":0.79621,"ask":0.79627}}”
“{"tick":{"instrument":"AUD_CAD","time":"2014-10-10T19:07:41.062111Z","bid":0.9383,"ask":0.93881}}”
“{"tick":{"instrument":"USD_EUR","time":"2014-10-10T19:07:41.660565Z","bid":0.79624,"ask":0.7963}}”
“{"tick":{"instrument":"AUD_CHF","time":"2014-10-10T19:07:41.901723Z","bid":0.9757,"ask":0.97607}}”
“{"tick":{"instrument":"USD_EUR","time":"2014-10-10T19:07:41.964353Z","bid":0.79626,"ask":0.79632}}”