02 / ٠٢
abjad.wiki
The collaborative Arabic wiki that explains freelancing, money, and more in your own words. Around 30,000 readers a month
abjad.wiki 01 / ٠١
the gap الفجوة
If you've spent any time in a community, you know how it goes
Someone asks how freelancing works. Someone else asks about getting paid, then another person asks the same question three days later
No matter how much you write, make posts or advertise the search inside the community, it's all ignored when people see that tiny "+" in the corner


02 03
abjad.wiki 02 / ٠٢
the megathread الميجاثريد
We made a lot of guides for r/PersonalFinanceEgypt (another site) and r/EgyptianFreelancers (another site), on all kinds of topics you could imagine
But... nobody really read them. Reddit does an excellent job of hiding things on different platforms, and people do the rest of the job by ignoring the rest. And I said "والله لاخلي كله يهتم بيا" and decided to make something more visible, not only to our users
So I launched abjad.wiki, with no money left except for the domain name, and no wikis other than Personal Finance's (another site) and Freelance Wiki (another site)


04 05
abjad.wiki 03 / ٠٣
the engineering الهندسة
The first version just rendered Markdown files from a git repo. It worked, but it lacked a lot, navigation included, and the rendering was painfully slow
I ended up rebuilding it as a serverless Go app that could run multiple wikis, each with its own repository, cache and landing page
Pages are rendered once and kept in memory. Contributors can edit directly in the browser, for the non-techies, and every save becomes a Git commit under their name
Then came the less dazzling issues like Arabic search normalization, simultaneous edits, cache invalidation, and serverless execution limits that nobody looked over before
139 → 19 KB a page30 → 7 s a full reload from GitHub


06 07
abjad.wiki 04 / ٠٤
the reaction ردة الفعل
And people took it from there. It grows with our communities, Mesho points people to it, and anyone can write a guide of their own, day by day, in their own language and words


08 09
abjad.wiki 05 / ٠٥
what came of it النتيجة
It reaches around 30,000 readers a month, and it is still growing
Looking back, the guides were never the problem. People needed them somewhere visible and actually fast, and a Reddit megathread was neither
~30k readers a month2 community wikis
10 11
technical notes
4 questionsتحت الكبوت
What happens when two people edit the same abjad.wiki page at once?
Each save remembers which version of the page you started from. If someone else saved in the meantime yours gets refused and the editor tells you, so nobody’s work gets silently overwritten
To handle conflicts we use the Git version system to show diff and combine versions
How do abjad.wiki’s pages stay fast for 30,000 readers a month and still update after an edit?
Pages get rendered once, kept in memory and cached at the edge. When something changes, the edge keeps serving the old copy while it grabs the new one. Each save bumps a shared version number, and every server checks it at most every 30 seconds and swaps in the new pages in one go
Pages also got a lot lighter, 139 KB down to 19 KB. Most of that came from no longer sending the HTML and sending partial requests
What was the hardest part of running abjad.wiki serverless?
Serverless functions freeze once they respond, and separate instances don't share memory, so no work can be left unfinished after the response. Everything must complete before responding, which I do with up to eight parallel workers. That concurrency exposed a use-after-release race
When an update arrived at the same time, a page could be read after its lock was released, crashing the process
The two most significant changes were in two numbers. It used to take 3.4 seconds and roughly 30 consecutive lookups for a new server to load a wiki from Redis. It now takes 1.5 seconds and five round trips. Additionally, a complete reload of a wiki from Git server took seven seconds instead of around thirty with eight fetches operating concurrently
What would you do differently on abjad.wiki?
I am working to hook the tests up to CI from the start. I do have unit tests for the parts that hurt most when they break (the diff and the roles), and I test against the real hostnames without writing anything to production. But nothing runs those tests on each push yet which I was I did from the start
