Open changtimwu opened 9 years ago
setup crossbar(the router) Dockerfile for python based env
FROM ubuntu
RUN apt-get update
RUN apt-get install python python-pip
RUN apt-get install python-dev python-cffi libffi-dev
RUN apt-get install libssl-dev
RUN pip install --upgrade cffi
RUN pip install cryptography
RUN pip install crossbar
setup 8266 toolchain on OSX http://www.esp8266.com/wiki/doku.php?id=setup-osx-compiler-esp8266
https://ripple.com/build/rippled-apis/ something alike
json-rpc over websocket example http://wenzhixin.net.cn/2013/10/27/nodejs_json_rpc_aria2
what is mask http://stackoverflow.com/questions/14174184/what-is-the-mask-in-a-websocket-frame
In wss, no need to mask.
complete example of tls cert generation https://gist.github.com/sandfox/1831932
This is probably the way how ovrc
implement websocket router.
https://github.com/theturtle32/WebSocket-Node/blob/master/test/scripts/libwebsockets-test-server.js#L157 https://github.com/theturtle32/WebSocket-Node/blob/master/test/scripts/libwebsockets-test.html#L93
done: wss client/server nodejs examples work with self-signed certificates.
for our certificates:
we got this problem. http://stackoverflow.com/questions/9380403/what-does-ssl-ctx-use-privatekey-file-problems-getting-password-error-indica
todo: try on nginx: good tutorial http://billpatrianakos.me/blog/2015/02/28/installing-comodo-positivessl-certificates-on-nginx/
how to handle end-to-end rpc?
params
must contains deviceID
.deviceID
field.(validation can be done in the future)ID
field should be filled with the value in the incoming request.ID
field.server data structure
an easy rpc call/registration apis should be developed registeration
getfwver = (params, retcb)->
retcb 'V1.433'
wsrpc.register 'getfw', getfwver
call
wsrpc.call 'getfw', (ver)->
console.log 'ver is ', ver
websocket in C supports SSL. https://libwebsockets.org/trac/libwebsockets
This seems a good idea combining ELK & openwrt's collectd to cloud multi-site monitoring. http://wiki.openwrt.org/doc/howto/statistic.collectd https://www.elastic.co/guide/en/logstash/current/plugins-codecs-collectd.html https://mtalavera.wordpress.com/2015/02/16/monitoring-with-collectd-and-kibana/
good idea to combine this http://wiki.openwrt.org/doc/howto/bwmon
integer compression might be important http://zhen.org/blog/benchmarking-integer-compression-in-go/
good points http://dustin.sallings.org/2014/02/04/bigdata.html People have gone a little bit overboard with thinking up big solutions to small problems.
This guy's design/implementation are really good. His community creates UI & fuse layer for him. cbfs -- nice idea. application based file system. http://dustin.sallings.org/2012/09/27/cbfs.html
Please study how he manage replication.
his time series database seriesly is also inspiring.
influxdb can produce fancy chart with Grafana, which is the leading time series graph. Please see its demo http://er.mohw.g0v.tw/#/dashboard/file/all.json
prometheous vs fluxdb http://prometheus.io/docs/introduction/comparison/#data-model-storage
facebook's gorilla https://blog.acolyer.org/2016/05/03/gorilla-a-fast-scalable-in-memory-time-series-database/ the implementation is surprisingly simple https://github.com/dgryski/go-tsz
https://yaler.net/ good point, good picture how to choose protocol http://wamp.ws/compared/ https://github.com/wamp-proto/wamp-proto/issues/7#issuecomment-137757147