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

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

Open
arunbakt opened this issue Jan 22, 2021 · 1 comment
Labels
domain migration [see](https://github.com/Greenstand/system-design-docs/blob/master/domain-migration/project_plan.md)

Comments

@arunbakt
Copy link

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": "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.

@arunbakt arunbakt added the domain migration [see](https://github.com/Greenstand/system-design-docs/blob/master/domain-migration/project_plan.md) label Jan 22, 2021
@arunbakt arunbakt added this to To do in Domain Implementation Feb 6, 2021
@dadiorchen
Copy link
Collaborator

I prefer to create a new service, it seems are doing nothing with the current web map server service, right? @deepwinter

@arunbakt arunbakt moved this from To do to In progress in Domain Implementation Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain migration [see](https://github.com/Greenstand/system-design-docs/blob/master/domain-migration/project_plan.md)
Projects
No open projects
Development

No branches or pull requests

2 participants