notes from e-pollbook project initial design discussion

30 views
Skip to first unread message

Sanjiva Weerawarana

unread,
Feb 4, 2020, 5:05:03 AM2/4/20
to LSF-Elections, Bandula Ranathunga, Ranjan Nishantha, Nipun Sampath, anjulakarunarathne, Fahimt.97, Sashika
The team working on this had a video conference call earlier today. Notes are in this document (for this meeting and future ones):

Also pasted this meeting notes at the bottom for convenience.

Ranjan & Bandula please review - need some info from you. Everyone please review and give feedback.

Cheers,

Sanjiva.

=====

E-Pollbook Design Notes

Initial Meeting - Feb 4, 2020

Attendees: Sashika (Flutter), Nipun, Fahim (Flutter), Anjula, Sanjiva


Background:

  • Sashika:

  • 3rd year undergrad at UCSC / CS stream

  • Flutter, Angular, NodeJS

  • Nipun

  • Intern @ WSO2

  • 4th year student @ Univ of Kelaniya / Software Engineering

  • Native Android/Java, Python, SpringBoot

  • Fahim

  • UCSC 3rd year / IS stream

  • Flutter & Angular

  • Anjula

  • UCSC 3rd year / CS stream

  • Native Android/Java, NodeJS, Angular

  • Sanjiva

    • Results dissemination in Ballerina


Problem

  • Record when someone votes

  • Each polling station ~1000 people per station (~14000 PSs, ~16M registered voters)

  • App should all names for the PS pre-loaded

    • Users are pre-assigned per area

    • Assigned user has to login in a place with connectivity and pre-populate data

  • Live reporting

    • Ideally directly to backend for each voter

    • If no connectivity, then periodic SMS updates - either summary info or batched info

  • Backend

    • Record the fact that a person X voted

  • Analytics

    • Live analytics

      • First, last to vote in the country

      • # of voters per PS

      • Gender of voters

      • Age of voters

    • Later analytics

      • Repeat voters


Initial assumptions:

  • Data connectivity available but cannot delay processing next person while waiting for connectivity (to avoid any delay in the voting process)


Initial architecture / features:

  • Mobile app (to be written in Flutter)

    • Select voter from data

      • Can we print QR code with the elector ID? Fast to identify the voter

      • Or type in the elector ID

    • Confirm vote

      • Records locally

    • Background process to push upstream

    • Periodic SMS updates

    • Possibly share data to roaming zonal officer for remote upload

      • If yes, new app for zonal officer

      • Bluetooth or NFC as a way to share info

  • Back`end

    • Background info link: https://medium.com/@sanjiva.weerawarana/building-software-to-run-elections-in-sri-lanka-and-beyond-188237a962bc

    • Kafka event broker

    • Service publishes to Kafka and immediately returns

    • Subscribers to the event stream

      • Show live information in dashboards in EC and public

      • Record info in DB

        • Person X voted for election E in polling station P at time T

        • (Self service portal of EC should show this information to each elector)

      • Generate reports for media

    • Implementation technology:

      • Service: 

      • Kafka consumers:

        • Live updater: 

        • DB recorder: 

        • Media reports: 


Scale requirements:

  • 14,000 PS with on average 2 lines per PS

  • Maximum instant load is 28,000 calls

  • If a max instant load comes, you have at least 2 minutes before next max instant load

  • Thus, max sustained load is 28,000/120s = 233 calls per second

  • So 233 TPS with ability to handle up to 10,000 burst

  • Use permanent connection

    • GRPC or WebSockets or HTTP/2


Teams:

  • Frontend: Sashika & Fahim

    • Written in Flutter

  • Backend:

    • UX for dashboards: Fahim

      • UIs written in React

    • Services: Anjula, Nipun, Sanjiva

    • Written in Ballerina


Timelines: 

  • Working version ETA: Sat Feb 29, 2020

  • Sat Feb 07:

    • (Exams :-) for front end / mobile folks)

    • Set up git repo with basic structure, skeleton services

    • Learn bit of Ballerina

    • Find Kafka aware person to help

  • Sat Feb 15:

    • Sketch of UX approach

      • Mobile app

      • Website dashboard

    • Mobile app architecture for data downloading, authentication

    • Get Kafka deployed in dev environment

  • Sat Feb 22:

    • Integration to elector database to pull elector list per polling station

      • API from Ranjan to return list of names, NICs, elector IDs for a PS

    • Events being published to Kafka

    • Live dashboard architecture in place and something showing

    • Media reports architecture in place and something being generated

    • Record voters into permanent storage via service 

  • Sat Feb 29:

    • End to end system working

    • Test script to generate load


Initial deployment:

  • Ideally one district or province fully

  • Or some sampling

  • Check with Ranjan & Bandula @ EC


Action items:

  • Organize meeting with Nuwan Senaratne to discuss data visualization & analytics

  • Discuss deployment with Ranjan & Bandula

  • QR code possible or not - discuss with Ranjan & Bandula

  • Find Kafka knowledgeable volunteer

  • Setup Git repo: epollbook in ECLK account

Nipun: https://github.com/nipunsampath

Bandula Ranathunga

unread,
Feb 4, 2020, 5:39:31 AM2/4/20
to Sanjiva Weerawarana, LSF-Elections, Ranjan Nishantha, Nipun Sampath, anjulakarunarathne, Fahimt.97, Sashika
Hi Sanjiva and all,
Thank you very much and we highly appreciate your efforts and the support providing to the EC. We will come back after a discussion with the top management of EC quickly. Most of them we can finalize at the PSC meeting will be held tomorrow evening. 
Thanks again and best regards.
  

Bandula Ranathunga


*   : 130/2, Indolamulla, Dompe

( : +94-11-2536268

( : +94-71-4315426


Please Prevent email Address Harvesting: Kindly delete names and email addresses of all previous recipients including that of the last sender in all mail you intend forwarding. Try using the Bcc facility whenever possible.  This will help you and all in your list to maintain their privacy as well as prevent hackers from using recipients from your list. 

If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are not authorized to and must not disclose, copy, distribute, or retain this message or any part of it.


Sanjiva Weerawarana

unread,
Mar 7, 2020, 11:00:55 PM3/7/20
to Sashika, LSF-Elections, Bandula Ranathunga, Ranjan Nishantha, Nipun Sampath, anjulakarunarathne, Fahimt.97
Guys I'm sorry for disappearing on you.

I'm starting to work on the backend stuff today. Are you three free for a call today - anytime after 12pm is ok.

We have a  short timeline to get this up .. but can do :).

Sanjiva.

On Sat, Feb 8, 2020 at 11:33 PM Sashika <h...@sashika.me> wrote:
Hi Mr. Sanjiva, 

I've implemented the basic UI of the mobile application. Please refer the attached pdf for app screenshots.

Kind Regards,
Sashika

---- On Tue, 04 Feb 2020 15:34:49 +0530 Sanjiva Weerawarana <san...@weerawarana.org> wrote ----




--
Sanjiva Weerawarana

Pavan Welihinda

unread,
Mar 7, 2020, 11:10:56 PM3/7/20
to Sanjiva Weerawarana, Sashika, LSF-Elections, Bandula Ranathunga, Ranjan Nishantha, Nipun Sampath, anjulakarunarathne, Fahimt.97
Guys, Let me know if i can support anywhere on this project Flutter / React

--
You received this message because you are subscribed to the Google Groups "LSF-Elections" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lsf-election...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lsf-elections/CALRLnMvQhXqawHz15c950bm6rK0HYdr49X3f%2B0X%3DQrK7YEQmEQ%40mail.gmail.com.

Sanjiva Weerawarana

unread,
Mar 9, 2020, 1:31:07 AM3/9/20
to Bandula Ranathunga, LSF-Elections, Ranjan Nishantha, Nipun Sampath, anjulakarunarathne, Fahimt.97, Sashika
We had a follow-up meeting today and the notes are below. Ranjan please note the data required for the app below.

Meeting Notes - March 9, 2020

Attendees: Anjula, Nipun, Sashika, Sanjiva


Backend APIs: Sanjiva

  • When person logins in for the first time, load data for polling station

    • table of elector ID, NIC, full name, gender, age, address for that polling station

    • GET /data/{electionID}

      • Logged in user’s authorization will indicate which polling station the data is to be pulled for

  • To register a vote:

    • POST /vote/{electionID}/{electorID}?time={timestamp}


Mobile App: Sashika & Anjula

  • UI flow:

  1. Login: username + password followed by OTP code sent to their phone

  2. Page with 3 buttons:

    1. Scan QR

    2. Enter Elector ID

    3. Enter NIC

  3. If already voted:

    1. Show page saying already voted

    2. Record as voted in local data table along with time of vote

    3. Done and go back to #2

  4. Show person’s info and button saying “Voted”

    1. Done and go back to #2

  5. When logged in, need to keep the user token refreshed

    1. Need to integrate to web SSO for login

  • App should save locally first and upload to backend in the background

  • Need to keep track whether a particular item has been uploaded successfully or not

  • How to check whether already voted?

  • Checking locally in the app’s local table of data only checks whether the same person came to the same app before

  • Ideally we should be checking from the backend whether the person has voted or not

  • To support the ability to vote at any polling station, we will need to have that feature but its not required right now

  • Recall that voter eligibility is tested as follows:

    • Check whether the person’s finger’s already painted - if so can’t vote again

    • Biometric ID verification using information in NIC + human evaluation (photo)

  • How to distribute the app?

    • Option 1: build APK and ask people to download

      • Temporary plan

      • Push built APK as GitHub distribution

    • Option 2: public app on the app store

    • Option 3: use beta test capability on app store to restrict access

      • Have to add users manually one by one

      • Not practical


Dashboards & reporting: Nipun

  • Web app

  • Currently all dashboards are done using Grafana

  • Possible dashboards:

    • Per PS

      • Number of voters by age (in groups of 10 years) & gender as a stacked bar chart

      • Vote distribution over time

      • Repeat voter information (in future)

    • Per polling division

      • Aggregate all PSs in the PD

    • Per electoral district

      • Aggregate PDs into ED

    • Nationally


Milestones and release schedule:


Milestone & Date

Tasks

Owner

M1 / Wed Mar 11

UI designs for app

Sashika


Git repo setup for all parts: 3 directories app / backend / dashboard

All


Backend deployment in dev environment

Sanjiva


UI designs for dashboard

Nipun

M2 / Sat Mar 14

App working

Sashika & Anjula


Backend APIs working



Dashboard process setup


M3 / Wed Mar 18

App mostly completed



Load test backend



Load test dashboard


M4 / Sat Mar 21

Release ready


April 1

All done and handover



--
Sanjiva Weerawarana
Reply all
Reply to author
Forward
0 new messages