Forever ISE
G'day again, this is Byron having a good old crack at writing another blog post.
Project Forever ISE (International STEAM Education) is the codename we use internally, which stipulates our rules of engagement to deploy any new feature. It must be lightweight, it must be modular, and it must benefit the growth of ISE.
3 Rules doesn't sound like much, but let's get into the nitty-bitties and provide some examples of how we are doing things behind the scenes. But before we do, why? To be able to provide a platform free to anyone, anywhere, from any walk of life means we really need to be efficient and cost-effective.
Lightweight
Easy to implement, little to no system resources, precise and clean code.
Modular
We have taken the multi-cloud microservice architecture approach to software systems with lightweight protocols and serverless architecture for edge computing.
Modularisation and Elandra
We use Cloudflare workers for our edge computing, which handles a large portion of the Elandra platform. The average returning user is making 55 request units per day.
- 1 request unit = 4 KB of data read or written
Request unit breakdown
A bundle request is multiple requests parsed as one; in this example, a bundle request is 11 KB.
- Bundle (11 KB) / request unit (4 KB) = 3 request units
For $5, Cloudflare worker provides us 10 million requests and 100 edge workers. We use workers to decouple our systems. The flow breakdown is when a user logs into Elandra. It makes an Auth check first and requests the dashboard view, bundling any dashboard updates into 1 request.
When a user completes, we fire events off each time they finish a question. As we are firing answers back, it enables our system behind the scenes to continuously monitor how a user learns. The system may adapt the user's next question on the fly, requesting a new set of questions.
The complexity of ensuring that our system adapts to the user on the fly is quite costly once we start to break things down.
Without real-time adapting, a user averages 25 requests per day:
10 million requests / 25 daily requests / 30 days in a calendar month
= 13,333 unique users in a month
= $5 / 13333 = $0.00037500937 per user per month.
With real-time adapting, a user averages 55 requests per day:
10 million requests / 55 daily requests / 30 days in a calendar month
= 6060 unique users in a month
= $5 / 6060 = $0.0008250825 per user per month.
500,000 unique users per month:
without: 0.00037500937 * 500,000 = $187.50 USD
with: 0.0008250825 * 500,000 = $412.54 USD
Which represents a 120.02% cost increase. Is it worth it? Yes, we want to provide every child with the ability to learn at their pace and without barriers or excuses that we couldn't otherwise.
Growth of ISE
We are an EdTech Social Enterprise. To ensure the longevity of ISE, we must ensure every feature is built using the best technology, including constantly reevaluating the foundation when coding. We have 4 systems and 27 code modules to give a small insight.
Outgrowing our web framework:
At the start of ISE, we were using an out-of-the-box Vue 3 SSR UI framework. After 8 weeks of building the ISE sites and 3 weeks of optimisation, we averaged 92/100 performance, 96/100 accessibility, 100/100 best practices and SEO scores. Sounds impressive. However, the double-edged sword is that we had to rebuild our package 15-25 times a day to allow our systems to evaluate prod performances.
ISE sites included: isteamedu.au, research.isteamedu.au, get-involved.isteamedu.au, blog.isteamedu.au, careers.isteamedu.au and social.isteamedu.au
During the 3 weeks of optimisation, building and deploying to prod took 70 seconds at an average of 20 times a day. We wasted 14 minutes daily and 70 minutes weekly, so in total, 3.5 hours.
Without going into too much detail, our Elandra system was built initially on the same Vue 3 SSR UI framework. Averaging 70 minutes per week, after 5 weeks (5.83hrs), it was time to move on and build from scratch.
Outcomes:
- We are averaging 13 minutes of total build times per week per platform. (81.4% reduction)
- 98/100 for performance and accessibility and 100/100 for best practices, SEO scores and PWA ready
As for now, thank you for reading,
Byron Fisher