atsign-foundation / at_tools

Various developer tools for use when developing with Atsign's technology
https://pub.dev/publishers/atsign.org/packages
BSD 3-Clause "New" or "Revised" License
23 stars 9 forks source link

Import Export tool #230

Open srieteja opened 2 years ago

srieteja commented 2 years ago

Feature Description A tool to export data from a secondary in a format that is importable by another secondary.

Requirements

Decisions to be taken

Tasks

srieteja commented 2 years ago

Would like your input on this topic @nickelskevin @tallent @cconstab. It would also be great if you could put down your requirements/expectations from this tool

ksanty commented 2 years ago

Move to medium after arch call discussion

VJag commented 2 years ago

Motivation:

If an IoT device has an @ sign, it could be recording data for someone else. This could be the owner of the device or a third person for whom the device is working. This someone can change with time. For example, a "pulse oximeter" in a hospital will be recording oxygen saturation levels for different patients at different times. If the "pulse oximeter" is recording the saturation levels in its own secondary there is a need to make the data available to the patient to whom the data belongs.

Given this scenario, there is probably a need to export the data from a secondary in order to make it available for someone else. This exported data can then be imported back into the secondary server of the person for whom it is imported.

Design considerations:

  1. Import export functionality is envisioned to be a separate library and not part of SDK

  2. Three main questions need to be answered while exporting the data:

    • What keys to export? ~ regex ~ date range ~ what types of keys? public, self, shared ~ can cached keys be exported? ~ can the cached/shared keys shared by someone else be exported (Not the same person it is being exported for)

    • How to export? ~ format of the export ~ csv/json or someother format
      ~ masking

    • Where to export? ~ Disk-based file/Cloud storage/In memory file etc..

  3. Following questions needs to be answered while importing the data:

    • What will be the format of the keys when imported? ~ Does a public key become a public key? ~ Does a shared key become a shared key? ~ Should the information that is exported from some other at sign needs to be preserved in the metadata or some other place?