Skip to content

Instantly share code, notes, and snippets.

@hylkevds
Created March 13, 2025 10:49
Show Gist options
  • Save hylkevds/db437adeaade890abb241b72d62d3b65 to your computer and use it in GitHub Desktop.
Save hylkevds/db437adeaade890abb241b72d62d3b65 to your computer and use it in GitHub Desktop.
STA Version 2 Implementation Plan
  • Implement the V2 data model (mostly done)
    • Validate the prototype against the spec
    • Add requirements classes
  • Implement the V2 API
    • Implement Endpoint URL /v2.0
    • Implement new Functions: https://hylkevds.github.io/23-019/23-019.html#query_functions
      • interval()
      • cast()
      • any
    • Landing page
      • Supported functions
      • MQTT bindings
      • HTTP bindings
    • MQTT Request-Response bindings
      • Upgrade Moquette to latest version for MQTT5 support
      • Create request processor
        • Per-client queue
        • Configurable per-client max parallel requests
        • Configurable total max parallel requests
      • Check Handling of maximum message size
    • MQTT Subscribe bindings
    • Conversion of v1.1 database to v2.0
      • Create new tables in an empty schema
        • Using normal procedure
      • Copy data using a (background) script
        • Triggered from the database status page (or a new page?)
          • Show active processes on this page
          • Show progress log messages
          • If no lock, button for starting process
        • Create a table for status messages and locking
        • Procedure:
          • Copy sequence values
          • Datastream sequence from DS + MDS
            • Allow +X value
          • Copy Things, Locations, Sensors, ObservedProperties
          • Copy Features
          • Copy Datastreams
            • If Obs all use the same Feature, link Feature to DS.
            • Generate resultType from observationType and ObservedProperty
          • Copy MultiDatastreams to Datastreams
            • Generate resultType from multiObservationTypes and ObservedProperties
          • Copy Observations in batches of 10k, per DS / MDS
            • If all Obs of a DS have the same Feature, don't link Feature
    • Expose a v1.1 end-point on a v2.0 database
      • Figure out how to translate Datastreams
        • Links to Feature
        • Generate observationType
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment