E-Pollbook Design Notes
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
Github accounts:
Sashika: https://github.com/cazcit
Anjula: https://github.com/anjulalk
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.
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 ----
--
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.
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:
Login: username + password followed by OTP code sent to their phone
Page with 3 buttons:
Scan QR
Enter Elector ID
Enter NIC
If already voted:
Show page saying already voted
Record as voted in local data table along with time of vote
Done and go back to #2
Show person’s info and button saying “Voted”
Done and go back to #2
When logged in, need to keep the user token refreshed
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: