Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LDES palaikymas (Changes API / Data streaming) #22

Open
sirex opened this issue Apr 25, 2024 · 0 comments
Open

LDES palaikymas (Changes API / Data streaming) #22

sirex opened this issue Apr 25, 2024 · 0 comments
Labels
Milestone

Comments

@sirex
Copy link
Contributor

sirex commented Apr 25, 2024

Reikia peržiūrėti dabar įgyvendintą puslapiavimo ir changes mechanizmą ir suderinti su LDES/TREE duomenų modeliu.

Šiuo metu keitimų žurnalas grąžina tokius duomenis:

{
    "_type": "datasets/gov/dc/geo/Continent",
    "_data": [
        {
            "_cid": "11",
            "_id": "abdd1245-bbf9-4085-9366-f11c0f737c1d",
            "_revision": "16dabe62-61e9-4549-a6bd-07cecfbc3508",
            "_txn": "792a5029-63c9-4c07-995c-cbc063aaac2c",
            "_created": "2021-07-30T14:03:14.645198",
            "_op": "insert",
            "continent": "Europe"
        }
    ]
}

O puslapiavimas veikia taip:

{
  "_data": [
    {
      "_type": "example/City",
      "_id": "19036c4e-ffb2-4210-b222-5a2dd461e934",
      "_revision": "bf277c98-ced7-442c-8bec-f47a7413e357",
      "id": 1,
    },
    {
      "_type": "example/City",
      "_id": "8b23f3ea-f403-4757-bbf5-ee635b3a55e2",
      "_revision": "0bad883a-7840-485c-a9e4-ef54cddd2e68",
      "id": 2,
    }
  ],
  "_page": {
      "next": "WyIxOTAzNmM0ZS1mZmIyLTQyMTAtYjIyMi01YTJkZDQ2MWU5MzQiXQ=="
  },
}

Tuo tarpu LDES keitimų žurnalas ir puslapaiavimas veikia taip:

ex:C1 a ldes:EventStream ;
      ldes:timestampPath sosa:resultTime ;
      tree:shape ex:shape1.shacl ;
      tree:member ex:Obervation1, ... ;
      tree:view <?page=1> .

<?page=1> a tree:Node ;
          tree:relation [
              a tree:GreaterThanOrEqualToRelation ;
              tree:path sosa:resultTime ;
              tree:node <?page=2> ;
              tree:value "2020-12-24T12:00:00Z"^^xsd:dateTime
          ] .

Puslapiavimui LDES naudoja TREE duomenų modelį.

Reikia suvienodinti keitimų žurnalo ir duomenų puslapiavimą, pagal TREE duomenų modelį.

Galimi skirtumai tarp LDES ir Spintos įgyvendinimo:

  • Spinta keitimų žurnale grąžina ne pilną objektą, o tik jo keitimą (patch), LDES kaip suprantu tikisi, kad bus grąžinamas pilnas objektas, toks koks buvo tam tikru laiko momentu.
  • Spinta naudoja skirtingą puslapiavimą duomenims ir keitimų žurnalui, reikėtu suvienodinti, pagal LDES.
  • Neaišku, kuris puslapiavimo variantas yra geriausas, ar fragmentacija ar kursorius su limit.

Susiję

@sirex sirex added the ready label Apr 25, 2024
@sirex sirex linked a pull request May 29, 2024 that will close this issue
@sirex sirex added this to the 1.1 milestone Nov 4, 2024
@sirex sirex changed the title LDES palaikymas LDES palaikymas (Changes API / Data streaming) Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant