High Level Design

Overview

Urban Local Bodies (ULB) and other government agencies provide citizen centric services. Some of these services involve/require movement of people or assets(eg : vehicle, equipment etc). Below is a sample list of such services:

  • Pickup of Fecal sludge from a citizen’s premises and offloading at a designated place

  • Garbage pickup truck visits multiple collection points and deposits the load at a designated waste segregation yard

  • ULB assigns a drinking water tanker to supply water to schools in a particular area. The water tanker visits the assigned schools and supplies the required amount of water.

  • Fumigation to contain mosquitoes spread involves an operator moving in a 2-wheeler from one street to another.

  • Medicines have to be moved from district headquarters to mandal level villages.

Key challenges in the above scenarios are :

  1. Ensuring the vehicle / person took the designated route

  2. Checking if all pickup/dropoff locations are visited

  3. Monitoring if a restricted location is visited

  4. Tracking of live location

Challenges listed above are solved with a new tracking service component. This document captures the technical design of such a tracking service. For functional use cases related to a specific citizen service (Fecal Sludge Management), please refer to this doc.

1.1 Design guidelines

Tech design for Tracking service addresses following key design goals. These goals are derived from DIGIT’s view of how a service should evolve and also the constraints arising from the usage of client side application.

  1. Client side devices may have network bandwidth constraints, hence the communication between client and Tracking service should be optimized on data.

  2. Tracking service should be generic enough to handle any kind of citizen services that involve movement of assets or service delivery by an operator on move. Type of service being rendered decides the monitoring rules (alerts, notifications) that are applied to the trip.

  3. Within the DIGIT platform, event based models processing should be used so that newer applications can be plugged in by consuming the event messages.

Tech use cases

Key terms

Use cases

3. Tech design

3.1 Components

Below is the list of entities, actors and tech components involved in tracking service.

Entities

  • Point of Interest (POI) - Latitude, longitude coordinates of various locations. Types of locations include citizen pickup point, intermediate points, destination location, polygons to identify larger areas and tags to identify anomalies (like illegal dump yards).

  • Designated route - A sequence of POIs which indicate the route an operator should take.

  • Trip - Created for each service delivery involving an operator. It is either created based on request or through an automatic scheduler. Trip is made up of operator details and designated routes. Actual route taken by the operator is also associated with the trip.

Actors

  • Supervisor - Individual is responsible for making configuration level changes. These can be two separate roles or just one

  • Operator - Travels from source to destination of a trip as part of service delivery.

  • System - Tracking service has the intelligence to take some actions on its own.

Tech components

  • Mobile App - User facing application to manage routes, trips and POIs

  • Tracking service - Stores entities, applies automated rules and generates alerts.

API specs

Tracking service has APIs to manage the 3 core entities - Point of interest (POI), Designated route and Trip. Basic details of these APIs are mentioned below.

Following are the list of APIs this service will support. For details of the request and response message structure, please refer to Appendix A in this document.

  • Point of interest

    • /poi/_create

    • /poi/_update

    • /poi/_search

  • Designated route

    • /designated_route/_create

    • /designated_route/_update

    • /designated_route/_search

  • Trip

    • /trip/_create

    • /trip/_update

    • /trip/_progress

    • /trip/_search

3.3 Event entity

Event entity has a generic format. Structure of the event is listed below.

Service design

  • Tracking service [New]

    • A gateway service for client endpoints. POI, Designated routes and Trips are managed by this service

    • Location updates received from client are published as events in a standard format

  • Trip monitoring module [New]

    • Consumes the location update events received from client (published by Tracking service)

    • Persists the location data, identifies anomalies, marks trips as complete based on rules

    • Events that should be notified are published by this service

  • Notification module [New]

    • Consumes the notification events

    • Fetches contact information from DIGIT User Service and sends SMS in predefined format

  • Tracking data store [New]

    • Data store for POIs, routes, trips, location updates and notifications

  • DIGIT user service [Existing]

    • Provides contact information of the user to which notification will have to be sent

    • User can be a supervisor or operator

Last updated

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.