Coder Social home page Coder Social logo

Dataset Updating Plan about ipfs-geoip HOT 9 CLOSED

hacdias avatar hacdias commented on May 26, 2024
Dataset Updating Plan

from ipfs-geoip.

Comments (9)

Kubuxu avatar Kubuxu commented on May 26, 2024 1

Sorry (got a lot on my head).
The best structure for it would be ipld based radix tree, but it wouldn't be easy to implement.
We can do away with something simpler (pseudo radix tree). I will write something more on that tomorrow.

from ipfs-geoip.

lidel avatar lidel commented on May 26, 2024 1

Figuring out new data structures will be time consuming, and given limited bandwidth I propose we simply convert the new CSV dataset to the format of old CVS source files:

// All data is stored in an ipfs folder called data
// this is the hash of that folder. It includes three files
//
// data
// |- blocks.csv
// |- countries.csv
// |- locations.csv
const DATA_HASH = 'QmTMh5Q1CnB9jV774aKCvPSqibwDy9sJmo7BCThD5f1oY3'

That way ipfs-geoip does not need to be rewritten, and we can at least update IPv4 info.

from ipfs-geoip.

hacdias avatar hacdias commented on May 26, 2024

Also cc @Kubuxu

from ipfs-geoip.

Kubuxu avatar Kubuxu commented on May 26, 2024

@hacdias how many entries there are in IPv6 dataset?

from ipfs-geoip.

hacdias avatar hacdias commented on May 26, 2024

@Kubuxu about 431 990 for the IPv6 dataset and 3 252 943 for the IPv4 one.

from ipfs-geoip.

hacdias avatar hacdias commented on May 26, 2024

Pinging @lidel and @Kubuxu 😅

from ipfs-geoip.

hacdias avatar hacdias commented on May 26, 2024

Thanks! Will be awaiting!

from ipfs-geoip.

hacdias avatar hacdias commented on May 26, 2024

Not accounting for IPv6 addresses, this is my current idea and plan. I am thinking of keeping the same binary tree structure as we have now, but I do have some doubts and questions to be answered. Please let me know what you think:

  1. We have locations and IP blocks. There are ~120 000 location and ~3 115 100 IPv4 blocks, which means the relationship between locations and IP blocks is one to many.
  2. Taking the last point in account, I thought about separating both things:
    1. Create a tree with the locations. It should be a really simple tree whose main purpose is to be pinned on the gateways and the locations should be CID addressed.
      1. Is there any limit of IPLD Links? Is it possible to just have one object with links to all locations and pin that?
    2. Create a second tree with the blocks. It is a binary tree as we have now. We address the location by their hash so we just need to get the object of the location after getting the rest of the information about a certain IP.
      1. We have 32 children now and I am thinking about increasing to 64.
      2. We have a lot of IPv4 blocks and this is gonna take tons of time to generate.

Feedback? @lidel @Kubuxu

from ipfs-geoip.

lidel avatar lidel commented on May 26, 2024

Sadly I had no bandwidth, this needs another set of eyes.

from ipfs-geoip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.