[Nodeshot] TX, RX rate

Clauz clauz at ninux.org
Fri Nov 8 14:59:31 CET 2013


On 11/08/2013 02:26 PM, nemesis wrote:
> On Fri, 08 Nov 2013 12:36:31 +0100, Clauz <clauz at ninux.org> wrote:
>> On 11/08/2013 12:17 PM, nemesis wrote:
>>>
>>> [CUT]

>>> I was thinking to implement some realtime updating too, for example, you
>>> open up a device in the web interface, and you get real-time data
>>> through a websocket connection between the browser and the server, the
>>> server retrieves the info via one of the "connectors" (SSH, SNMP, HTTP,
>>> ecc) every x secs and sends it back to the all the listening browsers on
>>> that channel (so each opened device page will be a channel in order to
>>> avoid crashing the server in case of many users watching the same page).
>>
>> wow!
>>
>>> I'm worried that the final result will be heavy from a hardware resource
>>> point of view (many queries, often). I already see that when performing
>>> some operations many queries are generated, but maybe we can take care
>>> of optimization later.
>>
>> The overhead might be related to the connection method (e.g. ssh), I
>> don't think actual queries are heavy.
> 
> We can use SNMP or any other protocol that feels lighter.
> Do you have the link to the work that is being done on NodeDB?

Yes, here it is:
https://redmine.confine-project.eu/projects/nodedb/repository/revisions/master/show/spider

Some results of the spidering should be published here:
http://stats.funkfeuer.at/

> Regarding the connection method, there is a lot we can do as a group.
> 
> I want to explain to everyone what I have been done latelly with the
> help of Fabys, Lux and Matteo (Ninux.org).
> 
> Check these out:
> https://github.com/nemesisdesign/nodeshot/blob/refactoring/nodeshot/networking/connector/classes/ssh.py

(perhaps we could use also key authentication instead of username and
password?)

> https://github.com/nemesisdesign/nodeshot/blob/refactoring/nodeshot/networking/connector/classes/UbiquitiAirOS.py
> 
> https://github.com/nemesisdesign/nodeshot/blob/refactoring/nodeshot/networking/connector/classes/OpenWRT.py
> 
> 
> These classes could be moved to an ssh/ folder;
> 
> Then we could do more folders, one for each protocol/method we use, eg:
> snmp, munin
> 
> For each firmware we want to use we will have to write classes similar
> to (for example) UbiquitiAirOS, which implement the same methods, but
> instead of using SSH we'll use the specific library for the protocol we
> want to use.
> 
> This is basically an abstraction layer, in a similar way to how famous
> frameworks have built ORMs (Object Relational Mappers) for popular
> relational databases.
> 
> For example, in Django you can do:
> Device.objects.all()
> while in Ruby on Rails you can do:
> Device.all
> 
> And these calls will translate to an SQL query that is compatible with
> the database specified in the project configuration.
> 
> With this thing i called "connector" system I want to achieve something
> similar, my final goal is to do:
> 
> # retrieve device object from DB with an SQL query
> device = Device.objects.get(mac='00:15:6d:9f:cf:ec')
> # retrieve wireless channel by connecting to the device through the network
> device.connector.get_wireless_channel()

I like it :)

Clauz



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://ml.ninux.org/pipermail/nodeshot/attachments/20131108/0338fbb9/attachment-0001.sig>


More information about the Nodeshot mailing list