abstraction library to normalize data streaming types and give them a common interface
supported streaming:
- websocket
- pubnub
- socket.io
- pusher
- sock.js
- http json stream
adapted streaming
- api polling
- csv stream
todo:
- abstract out of ohm.ai
- add api polling from api2stream lib
- add webrtc: http://peerjs.com/
Pass in a config get back an object to control the stream;
//set config
var objConfig={
type:'websocket'
,addr:'wss://ws.blockchain.info/inv'
,sendOnConnect:'{"op":"unconfirmed_sub"}'
,channels:['pubnub-twitter']
,fnResults=function(results){ console.log(results); }
,fnError=function(results){ console.log(results); }
,fnClose=function(results){ console.log(results); }
,fReconnect=true
}
//instantiate
var objStream = new metaStream(objConfig);
// go
objStream.go();
// stop
objStream.stop();