Greenstand / Greenstand/treetracker-web-map-api

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

Open
#292 1 comment 1 reaction 0 assignees View on GitHub
domain migration
Dominant language
JavaScript
Stars
27
Forks
50
PR merge metrics
No merged PRs in 30d

Description

As part of [domain migraton project](https://github.com/Greenstand/system-design-docs/blob/master/domain-migration/project_plan.md) 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](https://github.com/Greenstand/treetracker-field-data).

Please check this [config](https://github.com/Greenstand/treetracker-field-data/blob/master/server/infra/messaging/config.js) 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": "planter@gmail.com"
}
```

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.