Skip to content

Build de-normalized data/view for use in web-map view for unverified field captures #292

@arunbakt

Description

@arunbakt

As part of domain migraton project changes/features are needed in the web-map layer in multiple stages. As the very first change, we need a event consumer/listener running either alongside web-map app or as a separate back-end consumer process (later preferred but open for debate). This event listener should consume messages from Rabbit MQ that are published to a topic from field-data service.

Please check this config file for the topic/queue details name. There is a dev RabbitMQ running in the dev env for test. Please reach out to in Slack or in development channel for connection strings.

The following is a current version of the event being published. This will go through changes as the need for the view being built evolves. There is no versioning of this event at the moment, but will have a version soon.

{
  "id": "5c8de192-8767-4d15-b065-67553fda4214",
  "lat": "1.3425",
  "lon": "34.342",
  "type": "FieldDataCaptureCreated",
  "attributes": [
    {
      "key": "app_flavor",
      "value": "ios"
    }
  ],
  "created_at": "2021-01-09T01:16:10.091Z",
  "planter_id": "227",
  "planter_identifier": "[email protected]"
}

The event FieldDataCaptureCreated is the event to consume as per this request. On consuming the event, the goal is to build a de-normalized table in a schema dedicated for web-map using the data from the event. Since this is an event published by field-data service, the event represents a raw capture that is not yet verified by the greenstand admin but made it to the cloud systems. Thus it offers close to real-time data that web-map could use to create a view dedicated for showing unverified field captures in a map (separate from other views such as verified captures, unique trees etc in the future).

So in summary - consume the event and create a denormalized data in a web-map specific schema is the feature request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain migration[see](https://github.com/Greenstand/system-design-docs/blob/master/domain-migration/project_plan.md)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions