No-Trade-No-Life / Yuan

Yuan - Personal Investment Operating System
https://y.ntnl.io
MIT License
300 stars 38 forks source link

feat: Globalize Product ID #522

Open zccz14 opened 4 months ago

zccz14 commented 4 months ago

Describe the feature

Make all product ID unique for global.

Embed datasource_id into product_id field.

Why do you need this feature?

Additional context

No response

zccz14 commented 2 months ago

715

zccz14 commented 1 month ago

Some additional points. Using a tree-structured resource management model involves more than just concatenating datasource_id and product_id together. For instance:

  1. Replace the previous calls to encodePath, decodePath with standard posix-style path libraries (in browser environments, these libraries can be used by configuring the packager, and the same consideration should be given when packaging plugins as IIFE).
  2. Consider alternative methods for provideTicks.
  3. Consider alternatives for decodePath within provideDataSeries.
  4. After simplifying GSR into two fields, should it be directly merged into the IProduct interface? Or has it become meaningless altogether?
zccz14 commented 1 month ago

We will never again seek to impose any requirements on the path format of product_id. We will never demand to extract any structured information from the hierarchical path of product_id. Therefore, the specific structure within the product_id path is no longer important; what matters is:

  1. Establishing jurisdiction. Each vendor is responsible for offering a portion of the products.
  2. Determining hierarchical and kinship relationships for certain classification statistics and data consumption.
  3. To accommodate the limited capacity of the human brain, allowing for the management of the vast amount of diverse product information by breaking it down.