changtimwu / changtimwu.github.com

Tim's testing/practice notes
7 stars 2 forks source link

IoT cloud related #28

Open changtimwu opened 9 years ago

changtimwu commented 9 years ago

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

changtimwu commented 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 
changtimwu commented 9 years ago

setup 8266 toolchain on OSX http://www.esp8266.com/wiki/doku.php?id=setup-osx-compiler-esp8266

changtimwu commented 9 years ago

https://ripple.com/build/rippled-apis/ something alike

changtimwu commented 9 years ago

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

changtimwu commented 9 years ago

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

changtimwu commented 9 years ago

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?

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
changtimwu commented 9 years ago

websocket in C supports SSL. https://libwebsockets.org/trac/libwebsockets

changtimwu commented 9 years ago

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

changtimwu commented 9 years ago

not sure https://github.com/fluent/fluent-bit vs https://github.com/fluent/fluentd-forwarder

changtimwu commented 9 years ago

integer compression might be important http://zhen.org/blog/benchmarking-integer-compression-in-go/

changtimwu commented 9 years ago

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.

changtimwu commented 8 years ago

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

changtimwu commented 8 years ago

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