Run Kabar Sukamaju on two old laptops at the KKN posko: sessions, short links, cache, chat, logs. 15 levels, right in the browser.
What the levels ask
The Sukamaju villagers’ WhatsApp group is full: 1,024 members, WhatsApp’s limit. Ms. Nayla’s KKN unit sets up Kabar Sukamaju on two second-hand laptops at the KKN base, behind one router that hands out requests in turn. The neighbourhood head and Mrs. Sari log in with a PIN, then post announcements. Choose where the login session is kept, so each announcement is recorded under the right person’s name, whichever laptop answers.
The neighbourhood head’s announcements now go up on the alley noticeboard as short links, smj.id/…. Three links this week are private: the list of BLT aid recipients, the villagers’ phone numbers, and the unpaid dues. The district also wants to use the same service for its 48 villages. Choose how the code is made, so the private links cannot be found by guessing and every district link opens its own address.
The neighbourhood head wants to know how many villagers open the clean-up link, so tautan.js counts every click before sending the phone on to the form. The date on that form is wrong, and the neighbourhood head will correct the link’s target. Choose the redirect’s answer, so every tap is counted and the taps after the correction reach the right form, in Chrome and in Safari.
At dawn, Grandpa Karto passes away. The neighbourhood head writes the funeral news on Kabar Sukamaju, and its link is shared to groups across the district: 80 phones a second. The base’s laptop can only build the page two at a time, 400 ms per build, so the KKN unit puts a cache box (nginx) on the village tower. At second 15 the neighbourhood head corrects the time of the burial. In the afternoon villagers open their Rembug inboxes through the same tower. Fill in both pages’ Cache-Control.
Rembug, the chat that replaces the WhatsApp group, has a room for each committee. The 17-an committee (the neighbourhood head, Mrs. Sari, Ms. Wulan) and the youth club (Bagas, Rara) chat on the same server. In the afternoon Mrs. Sari takes the bus to market, and her phone is out of reach for a while. Choose how the server spreads a room’s message.
Rembug now runs on two laptops: the neighbourhood head’s and Ms. Wulan’s phones are connected to Laptop A, Mrs. Sari’s and Mr. Tono’s to Laptop B. Every message is given a number, stored in the data cabinet under that number, and every phone sorts messages by number. Choose where that number comes from, so every phone shows the same order and no reply appears before its question.
Villagers’ phones now send messages through the base’s router, which hands them in turn to Laptop A and Laptop B. Every message carries a key the phone makes once, and a phone that gets no answer sends again with the same key. Choose how the laptop stores a message, so every message is stored and reaches every member exactly once.
On the committee room’s screen, the members who are online get a green light. Every phone sends a heartbeat to the server every 30 seconds while its app is running, and a phone that is closed politely sends KELUAR. Choose how long someone still counts as online, so the light does not go out for a live phone and does not stay on for a dead one.
Sign-ups for the 17-an races open on Rembug until 20.00. The write side (daftar.js) records every sign-up as one event; the board at the base (papan.js) builds its list from those events and marks the late ones. At 23.00 the neighbourhood head rebuilds the board from all the events. Choose the time the board uses to mark a sign-up late.
On the night of Grandpa Karto’s funeral news, forty phones open the link at once. Mr. Tono’s phone, with an old version of the app, gets a 500 error. The night watch wants to find out what broke from the log lines of three services: pintu.js, tautan.js and klik.js. Choose the id each service writes in its log, so that from the id Mr. Tono’s phone received, the watch finds every line of his request and not one line of any other request.
Every minute, the screen at the watch post gathers how long each request took to answer, and sounds the alarm when its rule is met. Villagers complain when more than 1 in 100 requests wait longer than 2 seconds. Choose the alarm’s rule, so it sounds while Laptop B’s old disk is dying and stays quiet on a calm night.
Kabar Sukamaju is now one big program in one process: codes, addresses, clicks, and the monthly report. The neighbourhood head’s report sometimes eats all of its process’s memory. The KKN unit wants to split it up, a little at a time. Choose the map of modules to processes, so links still open while the report brings its process down, and 95 in 100 links open within 150 ms.