Here are Six (6) reasons why Wellzesta Life App is so fast.
1. Progressive Web App
Wellzesta Life is a Progressive Web App (PWA). In a PWA, the user can begin using the App before all the data has arrived. This is a vast improvement over a conventional website or web App. We have all experienced the dreaded loading spinner in a conventional website. With a PWA you can begin using the app within a couple of hundred milliseconds of launch.
PWA is a software performance standard that was introduced by Google. Google proposed the PWA standard because Google, more than any company, knows that long page load times adversely impact the user experience.
2. Multi-resolution images
Internet service providers will tell you that media---videos and images---are bandwidth hogs. Image data is usually much heavier (in terms of file size) than textual data. For image-intensive Apps, the transfer of images from the cloud to the user can be a performance bottleneck.
In Wellzesta, uploaded images are reformatted (to a fixed aspect ratio) then resized to produce a collection of images at differing resolutions: x-small, small, medium, large, and x-large. The collection of images is deployed to a cloud delivery network (CDN), where the image collection is replicated to all the nodes (numbering in the hundreds). In this decentralized approach, when an image is needed, the image is fetched from the closest node on the CDN. The approach is also fault-tolerant. If one node becomes unavailable the image is retrieved from another node.
3. Unreliable connectivity
Wellzesta Life adapts to low bandwidth (slow WiFi) conditions by using lower resolution images from the CDN. This is similar to configuring a video streaming service to automatically adjust video resolution based on the available bandwidth. This adaptability allows "the show to go on."
4. Keep data and formatting separate
We keep data and formatting separate. Textual data, like the title of an event, is compact and fast to transmit. The Wellzesta Life client---running on iPhone, Android, tablet, desktop, etc---fetches textual data from the Wellzesta API then formats the data in a way that is most appropriate for the device.
Device-specific formatting not only increases speed, it also allows for customization. For instance, if an end user has turned on large font size on their iPhone (under Accessibility settings), then, for this user, Wellzesta Life will render the data in the larger font. If a community wants data formatted a different a specific way then using feature toggles, we can provide community-specific formatting.
Keeping data and formatting separate overcomes the limitations of using pre-formatted documents like pdf's and "slides." There are several drawbacks of using pre-formatted documents:
- Time consuming. Preparing slides is tedious for the staff.
- Non-transferrable. Slides that show well on a TV don't show well on a phone.
- Slow. Compared to textual data slides take a long time to transmit
- Stale. As soon as something changes, a slide is out of date
- Trash. Many servers are bogged down by years-worth of old slides
- Accessibility. Slides are one-size-fits all. As discussed, font size can not be customized to the user.
- Variable quality. The look and feel of a document can vary according to who is preparing it. Some content craters are not good at design.
5. Caching
We employ both client-side and server-side caching. For client-side caching, images and content are retained on a user's device for a certain period then they expire. Retained content and images are immediately available to the user.
Effective server-side caching means that only a small fraction of API requests (like less than < 5%) require a call to the database. This means that most data is being delivered from the server's cache (memory) than from the database, which makes the response at least 100x faster.
6. Handling of new data
How do Apps know when there is new data? One way is for them to ask the server at some predetermined rate, like every minute. This strategy is called long polling. This method is pretty robust but not very performant because it introduces a lot of communications overhead. It is rather like the kids in the back seat asking "are we there yet?" every minute of a three hour road trip.
For Wellzesta Life, we use an advanced updating strategy that I am not at liberty to discuss. Suffice to say that it is performant, fault tolerant, and a lot smarter than long polling.
Ultimately, this benefits the residents and staff - so they can make the most of their time and utilize technology to enhance their day.