storj / roadmap

Storj Public Roadmap
Other
11 stars 4 forks source link

Geolocation API #51

Closed ferristocrat closed 1 year ago

ferristocrat commented 1 year ago

Background

What is the problem/pain point?

Customers want to be able to identify the (approximate) geolocations of all segments/pieces on the network for a given "dataset."

Who is impacted?

All customers/users

What is the impact?

It is not possible to easily see the geolocation of object data (with the exception of files that are shared via Linksharing). Customers will be able to easily see and showcase where their data resides. If customers are using geofencing, they can confirm the locations within their selected region that the data resides.

Requirements

User Story

As a Storj user, I want to be able to retrieve the geolocation data for all the pieces of a specified dataset stored on Storj DCS so I can use them in a web application or data visualization tool.

Acceptance Criteria [WIP]

Success Metrics

Key Considerations

Open Discussion/Questions

Possible Design

Milestone(s)

kaloyan-raev commented 1 year ago

Note that such an API is already implemented in both the satellite and libuplink. It's just only a private API in libuplink, as the only use case so far was linksharing: https://github.com/storj/uplink/blob/main/private/object/object.go#L34-L35

Making the API public would require a review to ensure we can maintain it backward-compatible long-term. Then every app would be able to use to retrieve the data directly from the satellite.

We could also extract the map generation code from linksharing into a separate API package to make it easier for app developers to generate their own maps.

kaloyan-raev commented 1 year ago
[Need to validate] User should be able to have Geolocation data publicly accessible OR private (limited) access

 * Enabling public view of Geolocation data should not expose the underlying objects

This one has already been implemented with https://github.com/storj/gateway-mt/issues/209

ferristocrat commented 1 year ago

Thanks @kaloyan-raev!

kaloyan-raev commented 1 year ago

We could also extract the map generation code from linksharing into a separate API package to make it easier for app developers to generate their own maps.

I've just remembered we've also done that a while ago: https://github.com/storj/dotworld

So maybe we just need to a code example on how to use the GetObjectIPSummary API with the dotworld map generator package.

ferristocrat commented 1 year ago

We should close this as the end goal can be achieved by using one of the following methods:

  1. Retrieve Geolocation for Entire Network of Nodes
    • Since large data sets will saturate all nodes, the geolocation of all active storage nodes can be used when a dataset is very large
    • All active nodes: https://stats.storjshare.io/nodes_geo.json (refreshed daily)
  2. Retrieve Geolocation for Individual Object and/or Prefix
iglesiasbrandon commented 1 year ago

Closing this issue per Michaels comment.