wlanslovenija / nodewatcher

A modular open networks growing platform.
http://nodewatcher.net/
Other
63 stars 20 forks source link

IP space visualization module #59

Open rasovica opened 7 years ago

rasovica commented 7 years ago

This module will add IP space map to nodewatcher, which will visualize and report statistics about network IP space usage.

mitar commented 7 years ago

In which way is this different from #58?

robimarko commented 7 years ago

Please add some description so most people can at least get a sense of what you are doing here

mitar commented 7 years ago

Please put code attribution into code comments, not commit messages.

mitar commented 7 years ago

Don't use minimized JavaScript files. If we need those, we will just have minimization post-processing step for all files.

kostko commented 7 years ago

BTW, please fix your GitHub or the commits' e-mail address as they don't seem to correspond (unknown author).

kostko commented 7 years ago

Oh, yes, you should also squash your commits as needed.

mitar commented 7 years ago

Also, don't hard-code it to 10/8, but maybe make it so that Django template renders what is the initial pool, and then you use that from JavaScript. See how we do data-source for example here.

kostko commented 7 years ago

Also, don't hard-code it to 10/8, but maybe make it so that Django template renders what is the initial pool, and then you use that from JavaScript. See how we do data-source for example here.

To choose the top-level range, you could query all the existing top-level pools in the database and use the shortest prefix, which contains all the given ranges.

rasovica commented 7 years ago

I added a feature mitar requested, if you zoom in the url sets to something like this ip_space/?scale=45.25483399593904&start=191,3775 and if you load the site with this parameters set it zooms in acordingly screenshot from 2017-09-02 07-02-27

mitar commented 7 years ago

What does start stand for in URL?

rasovica commented 7 years ago

The start= is the IP in the furthest most left top corner converted to hilbert curve 2d in the x,y notation. The 10.0.0.0/8 is hardcoded while loading data, because we don't yet know what the network is gonna be like, I added last night a button zoom to fit screenshot from 2017-09-03 17-02-25 Which calculates the smallest possible network which fits all the top-level nodes, however I don't zoom to it automatically, just list it as an option to zoom to, I don't think zooming to it instantly is a good idea, after all we want users to see how much of the 10.0.0.0/8 is left and where the top nodes are in that space, If they have a small network they can zoom to fit it on the screen by simply pressing one button.

mitar commented 7 years ago

The 10.0.0.0/8 is hardcoded while loading data, because we don't yet know what the network is gonna be like So you compute the smallest network on the server side, render it to the template, and then use that to initialize client side. So you do not have to compute that on the client.

I don't think zooming to it instantly is a good idea, after all we want users to see how much of the 10.0.0.0/8 is left and where the top nodes are in that space

10.0.0.0/8 is not special in any way. Why then don't start with 0.0.0.0/0? And show how much of the whole Internet is left? :-)

No, please do so that it starts with the smallest network which includes all IP pools nodewatcher instance has. Because user cares only about the free space in IP pools. Not free space of 10.0.0.0/8.

Alternatively, you could render one of your visualizations per non-nesting IP pools.

rasovica commented 7 years ago

The network is now fitted to the map on start.

mitar commented 7 years ago

If d3 is not changed in any way, then you can just add a static file as you have done. But if anything is changed, then do it through a git submodule.

rasovica commented 7 years ago

I added submodules, symlink to static files. Just waiting for the premission to make branch the commits are ready on my side. The hardcoded number of 33 is the number of all possible prefixses from 0-32, however i found a bug/ bad design in my code where i would assume i will only get one page of data and not follow the next url, i have now implemented an recursive function that loads the data, for wlan-si the full page load now takes about 100s for about 7000nodes.

mitar commented 7 years ago

I have now implemented an recursive function that loads the data, for wlan-si the full page load now takes about 100s for about 7000nodes.

Hm, didn't we initially said that you will render things lazily? So you render just top level things, then recurse when user zooms and so on? But probably it is hard to know when one can do that?

Why do you fetch things in order of prefix length? Why don't you just fetch everything in one request? You are fetching at the end everything, no?