digidem / osm-p2p-server

Peer-to-peer OpenStreetMap API v0.6 Server for osm-p2p-db
BSD 2-Clause "Simplified" License
87 stars 10 forks source link

Peer discovery #52

Open abitrolly opened 3 years ago

abitrolly commented 3 years ago

How does a peer discovery work for osm-p2p-server?

Do I need to do something for the initial data sync?

hackergrrl commented 3 years ago

osm-p2p-server is for interfacing with a peer-to-peer OSM database locally. You create it by passing in a kappa-osm instance, which has a replicate() API to sync the database with another peer. As for how to find such peers, you can use other modules in the NodeJS ecosystem such as hyperswarm.

abitrolly commented 3 years ago

Thanks for the explanation. I hoped I could just run this node and get a local instance of OSM data synchroned fast, like in blockchain.

Because this server has limited functionality, I would rename it to osm-p2p-api for clarity, and then kappa-osm to osm-p2p-db. https://github.com/hyperswarm/hyperswarm surely looks interesting. If everything is merged together, I would call it osm-p2p-node. However, I am not sure what the DB size right now would be?