Monday, October 10, 2016

Flying Circus 2016.10.10

Monitoring IP Traffic in Real Time

Tonight was brilliant I thought, with many interesting threads, plus an excellent talk by Charles CosséFlying Circus is taking off.

For those new to this blog, I'm referring to a weekly meetup at PDX Code Guild, for which Neil Raja and I have been serving as co-organizers.  We're not the Portland Python User Group, which meets elsewhere (we're smaller and stray from Python quite liberally).

Charles plugged his Raspberry Pi 2 Model B into the big screen monitor using the HDMI out, and shared both slides and working application, at that time about 75% complete.

He shared a generically useful pattern (see slides), which is to have Django, the Python web framework, talk to a suite of daemons (one or more), each monitoring some data source, and then sharing summary visualizations with a web client running JavaScript, talking to Django over AJAX, using JSON.

Django talks to the Python daemons over xml-rpc (remote procedure calls).  The daemons might monitor IP traffic in various ways.  Think of a patient's vital signs.  The heart rate, oxygenation level and so on go back to d3.js, a 2D visualization library that updates a dashboard in real time.

In this particular application, the Raspberry Pi serves as a hotspot with two Wifi connections, one for random clients, e.g. the smartphones of people there, the other connected to the school's hotspot.

The Pi is acting as a wifi enabled router in other words.  Since d3.js contains maps (as in Mercator Projection), the mere fact of logging in to the service registers as a dot in Portland, Oregon.  Then we can watch who's hogging bandwidth, other stuff.

Electron is to Chromium as XUL is to Firefox, providing a client container capable of hosting a DOM and running client side JavaScript.

Sheri, the school's director, clued me about a free course at Oregon State in permaculture, that starts on Halloween.  I signed up.  I'm interested in Biosphere 2 type experiments, or just maximizing efficiencies -- ala New Alchemy Institute -- in some Bucky dome someplace.  The campus is remote, so best if the fruits and vegetables are grown locally.

As has happened in some previous Flying Circus meetups, crypto-curriences, such as bitcoin, became a topic.  We had some people who'd one their homework.  I'm not claiming any of us were actual bitcoin miners, a technical term, but some of us knew people who are or were.  Neal and I are both working in support of Measure 97.

Pro 97