Elytra Blog

The simple RSS Reader. This blog publishes release notes, engineering and design details.

A lot of Unread Articles

If you launch the app or open the web app (if you have access) and notice a sudden surge of unread articles waiting for you, I can explain.

Traditionally, to check if an article is unique and new, I checked its GUID which the feed provides and checked if it already exists in Elytra’s database. This works fine if there is only one source for an RSS feed. It breaks when there are multiple sources for a single website. This happens when say I subscribe to a Website’s XML Feed and someone else subscribes to its JSON Feed. Both sources are valid, but both bring in articles with the same content and GUID. So the articles would map only to the first feed. The second feed would never get new articles. 

To solve this problem, I just updated my unique constraint to also use the Feed’s unique ID. The new unique pair constraint of GUID-FeedID works for all feeds from a single website, irrespective of which source the user subscribes too. 

This caused a huge surge in unread articles for all users. I do apologise for having overlooked this issue, but on the bright side: We all have a bunch of articles to read over the weekend which we missed out on, no thanks to me. 

Why Elytra is Fast

Brent Simmons writing on his blog, Why NetNewsWire Is Fast, I realised how similar a lot of stuff is between the two, albeit, Elytra offloads a lot of the feeds syncing to its API. The similarities still do exist. 

NetNewsWire is fast because performance is one of our core values. Being fast is part of the very definition of the app.

The best general advice I can give is just this: make sure performance is part of the foundation of your app. Make sure it‘s part of every decision every day.

Every app, irrespective of the platform, technologies and, toolchains should aim for that. And that’s not technical, it’s behavioural, on our part. 

The most painful way to parse XML is with a SAX parser — but it’s also how you’ll get the best performance and use the least memory.

Yes. It’s a pain in the *** to deal with, but the only proper way to handle thousands of feeds. Elytra’s Polling Server (yes, 1, a t2.nano EC2 instance) chugs through 1K+ Active Feeds 1,not including RSS Feeds which support WebSub, in under 3 minutes.

The parsers are fast — but we also do our best to skip parsing entirely when we can. There are two ways we do that.

We use conditional GET, which gives the server the chance to respond with a 304 Not Modified, and no content, when a feed hasn’t changed since the last time we asked for it. We skip parsing in this case, obviously.

Always respect cache headers for RSS Feeds. Some Feeds when publish a frequency property which you can respect, Elytra does not do that. Elytra uses the Last-Modified and Etag headers specifically. 

Now say you’re marking all articles in the current timeline as read. You could call article.read = true for each article — and, for each article, trigger a whole bunch of work. This can be very, very slow.

Elytra v1.0 did this silly thing, a notification for every change and no coalescing. I fixed that in v1.1 once the number of feeds started growing and I had more and more articles I marked read in bulk. 

So, instead, we coalesce these — we make it so that recalculating unread counts happens not more often than once every 0.25 seconds (for instance). This can make a huge difference.

This is a fantastic idea. I’m going to use this to Elytra in v1.8. 

What I suspect is less common is use of sets. The set is our default collection type — we never want to check to see if an array contains something, and we never want to deal with duplicate objects. These can be performance-killers.

I believe Brent and I ran in to the same issues with fetching Articles from the database such that Sets was the obvious choice over Arrays. I use NSMutableOrderedSet to be specific. 

I finally come to the point I currently disagree with Brent on: 

My experience with stack views tells me that they’re excruciatingly slow. They’re just not allowed.

No Auto Layout in Table Cell Views

Brent has his own reasons here which he describes in his post. I really like Stack Views and it becomes easy for me to think about layouts for the iOS App and the Web app as its very similar to the flex layout model on the web. I have so far not come across performance issues with using Stack Views in Elytra. 

No Auto-Layout in Table View Cells is a deal-breaker for me. Apple’s recent work on self-sizing cells, diffable datasources and composable collection view layouts has really simplified writing code for interfaces. The best part is: with every major OS release, these things become slightly faster, slightly better, and sometimes much faster and better. 

I do miss writing up interfaces in code, but I often found myself fighting the OS when Apple releases new device sizes, requirements (like split-view on the iPad in the past), or new technologies. 


I was happy to read that most of what I am doing in Elytra is very similar to Brent’s approach for NetNewsWire. I first heard about him when Vesper came out and have since followed his work and blog. I have much to learn from him and I hope he never stops writing such posts. 


1. An Active Feed is any RSS Feed which is at-least subscribed by one user. All other feeds are polled once per day.

TestFlight Changes

I’ve been contemplating on this decision for a while now and I think it’s finally time to implement a major breaking change in Elytra’s TestFlight policy. All future releases of Elytra on TestFlight will require you to have an active and valid subscription. 

Since before v1.0, all testers using Elytra through TestFlight bypassed all subscription checks. This is generally what is expected. However, some people are using this to bypass subscriptions entirely. 

This however doesn’t mean all testers will be affected. I know those who actively share feedback, crash reports and communicate with me. I’ll maintain your subscriptions for free for as long as you wish to be on TestFlight program. Everyone else getting started can use the free trail and as required contact me for a a bump in your subscription expiry dates. 

Summer 2020 Update

The Summer 2020 update is here. If you feel generous and have a couple of minutes, please leave a review on the App Store. It makes a huge difference for me. Thank you in advance. Here’s the full change log:

New

  • Support for Mouse/Pointer Interactions on iPadOS 13.4.
  • New Custom Feed: Today. All articles from the day, read and unread. Sort by your own preference.
  • Now add Youtube Channel RSS Feeds directly from the Share Extension.
  • Article Reader Customisation: You can now customise your reading experience based on your personal preferences. Set line heights, font sizes and individual fonts for paragraphs and headings.

Improvements

  • Improvements for handling Youtube URLs inside the app when adding a new channel feed.
  • Push Notifications will now show richer previews if you open them in context.
  • Show refresh control animation when the app loads and is loading Feeds data from the API.
  • GIFs will now show the first frame if the Image Proxy is enabled.

Fixes

  • Fixed incorrect paragraph line-spacing calculation with the selected value for font size.
  • Fixed an issue where opening a push notification on iPads would open them in the primary column.
  • When you tap on a push notification while another article is open from a Feed, the Feed now correctly deselects the active article.
  • When you tap on a push notification, the app sets up correctly on the iPad. If you tap on a Feed after this, it no longer dismisses the previously opened Article.
  • Fixed a crash when creating a new Folder for the first time.
  • Fixed GIF playback.
  • Fixed an issue where an article would remain marked as Read even after opening it.
  • Fixed font sizes for the Feed description on iPads.
  • Fixed a type bug on the iPad where the font sizes were comically large for titles.

RPC First Class Support

Back in December 2018, I wrote a post about RPC Pings support in Elytra. I cannot believe it has been that long. Later in 2019, I promised to bring first class support to blogs that implement RPC pings to Elytra. 

I have just finished implementation and it is now live. To recap the steps from the earlier blog post, let’s assume you have a WordPress Blog. 

…if your blog runs on WordPress, you can add the following URL: https://api.elytra.app/rpc-ping under > WordPress Blog’s Settings > Writing > Update Services. 

That’s it. WordPress handles all the complexities for you. If you use Micro.blog, you can find instructions here. You can adapt that shortcut to send RPC pings for any website you host as well as to any other service other than Elytra. 

Here’s what happens in the background:

  1. Your website/script sends an RPC ping to Elytra.
  2. Elytra immediately processes your website’s RSS Feed. 
  3. Any new posts are added for your subscribers to read. 
  4. Additionally, users subscribed to your blog’s push notifications from the iOS and iPadOS Apps are sent a push notification.

Starting today, 29 Mar, 2020: Once your blog sends at least 5 pings every 14 days, Elytra will no longer poll for changes to your RSS feed. Elytra will then assume that you will send RPC pings every time content on your website is updated. If no RPC pings are posted for 14 days, Elytra will once again begin polling changes at regular intervals until the 5 pings are received and the cycle can repeat. 

So you get the benefit of real-time updates, push notifications and no penalties for downtime. This hugely benefits users using a blogging platform like Github Pages, Micro.blog, etc. that don’t inherently support WebSub yet. You can use this for your WordPress based blog as well if you don’t want to install the WebSub plugin for whatever reason. 

Starting with v1.7, users of the iOS and iPadOS apps will also be able to subscribe to feeds for Push Notifications which use RPC pings. 

I invite your feedback on this feature if you decide to implement and make use for it. For any questions, please feel free to email me at support@elytra.app. Enjoy Reading. 

Updated Pricing

The global pandemic is not coming to a state of resolution any time soon. States across the globe are issuing lockdowns. Since we’re going to be stuck indoors for sometime, I have decided to slash the rates of all Elytra Non-Renewing Subscriptions to half their standard price. This pricing will be applicable up to 30th April, 2020. I’ll retain these prices if the global situation does not improve.

For brevity:

  1. 1 Month: USD 0.99 / INR 79.
  2. 3 Months: USD 2.99 / INR 249.
  3. 12 Months: USD 11.99/ INR 899.

If you have any questions, please feel free to email me at support@elytra.app.

If you’re a student, please email me and I’ll hook you up with some free upgrades.

Stay safe.

Update 1 (2020-04-24 10:40AM IST): The above pricing will be the new standard pricing and will not revert back on the 30th of April.

v1.6.2 Submitted for Review

I just finished submitting the v1.6.2 build for review. It’ll be released automatically to everyone once it passes review and finishes processing for the App Store. 

It fixes two bugs: 

  • Fixed a bug which caused the app to launch with the Empty State Interface with no way to navigate within the app when opened in split-view mode on compatible iPads.
  • Fixed a crash that would occur when launching the app from a cold state.

I’m also happy to note that work on v1.7 of the iOS app is nearing completion. It won’t be released until Summer, 2020 though. It’ll be released alongside something else. So stay subscribed to know more about that. 

Spring 2020 Supplementary Update

Youtube is very wide, densely spread content aggregation service which almost every single one of us has used at least once. Youtube has supported RSS Feeds for channels for a while now; for as long as I can remember actually. Although, it makes it very hard to find and subscribe to them. There is no direct option to do so. 

Until recently, I traversed a channel’s homepage and realised that Youtube advertises these links, like any good citizen of the WWW should. So now when you enter your favourite channel’s URL in Elytra, the app will automatically fetch the RSS Feed URL for you and add it to your account. 

I’ve further programmed Elytra to know the 3 varieties of the URLs Youtube uses for channels and handle all of them gracefully. I’ve personally configured mine to all go inside a Youtube folder so I can tap on the folder to view its custom feed and go through all published videos. 

In v1.6, I also updated how Youtube videos are handled in the app. It now uses the HLS stream which automatically configures the player based on your device settings like Low Power Mode, Low Data Mode, and the like. So it’s very energy efficient compared to opening the main stream or embedding in a web view. 

Unfortunately, Youtube does not support WebPush/PubSubHubBub on these feeds yet, and I doubt they ever will. 

If you need to import all your channels, you can follow Google’s support documentation which can be found here

As always, if you like the app, please take a moment and rate it on the App Store. It helps the app and me a lot. Happy Reading.

Spring 2020 Update

The Spring 2020 update for Elytra is here. If you feel generous and have a couple of minutes, please leave a review on the App Store. It makes a huge difference for me. Thank you in advance. Here’s the full change log:

New

Elytra's new triple column layout in light and dark mode.

  • iPadOS users gain the ability of the three column collapsible layout in landscape mode. This has been a highly requested feature and I’m glad to finally include it in Elytra.
  • iOS 12 support has been dropped. From this version on, only iOS 13 will be supported. v1.5.4 will continue to work for users still using iOS 12.
  • Blog Names below the Article’s title are now tappable. They open the blog’s article’s list. When you open an article from the blog’s own article list, this behaviour is disabled to prevent a rabbit hole situation.

Elytra on iPhone 11 showing changes to the Blog names in the article reader.

Improvements

  • Re-add WebP Images support.
  • Improved handling of opening articles from push notifications.
  • Minor Quality of Life adjustments and rendering improvements.
  • Improved loading Youtube Videos. The HLS Manifest of the video is now loaded when available. If this is absent, then the mp4 file is checked for and loaded if available. Using the HLS Manifest improves battery usage, performance and lowers data usage. The HLS Manifest is directly handled by the OS and hence also respects Low Data modes on your WiFi or Cellular connections.
  • Keyboard commands are now available once again. KNOWN ISSUE: Once you open an article, the keyboard commands for the Feeds Interface may not work in certain cases.
  • Improved legibility and visibility of a couple of icons.

Fixes

  • Fixed recommendations not displaying the feed correctly.
  • Fixed issue with loading images where narrower images would be enlarged to fix the max width as determined by the app.
  • Fixed a 14 month old bug which could cause a crash when reloading feeds with one or more folders open.
  • Fixed opening an Feed from the search results.
  • Moving from open to open folder no longer crashes the app.
  • Fixed the default sorting option for Unread showing the wrong icon.
  • Fixed rendering on the launch splash screen.
  • Fixed displaying article helper view on larger iPhones.
  • Fixed the iOS 13 link tap bug: when scrolling in the article reader, if your finger scrolls by dragging a link, iOS would tell the app to open that link.
  • Fixed the Search Bar not toggling in the article view correctly.
  • Fixed the search previous button being enabled when viewing the first search result in the article.

Thank you for reading. If you have made it so far, please consider sharing https://elytra.app on your blogs, RSS Feeds and Social Networks, thank you.

2019 – Year in Review

2019 has been Elytra’s first full year in Production. It has since gone from v1.1 to v1.5 with work having begun on v1.6 before I left for a small vacation (following my wedding) in December. 

Over this year, Elytra’s UI has evolved significantly and with the v1.6 changes, it is about to become a whole lot better. Here are some quick stats over the year, reflecting on how Elytra has grown: 

  • New Feeds: 2K+
  • New Articles: 5M+
  • New Users with Push Notifications Enabled: 700+
  • Average Unique Articles read every day: 100+
  • Average Unique Users active every day: 100+

To put these numbers into perspective: 

  • New Feeds YoY Change: + 1666.67%
  • New Articles YoY Increase: + 312.5%
  • New Users with Notifications Enabled YoY Change: + 8750% 
  • Average Unique Articles YoY Change: +850%
  • Average Unique Users YoY Change: +1800%

I also managed to reduce Elytra’s Monthly server bill by 15% by optimising certain parts of the code while improving processing speeds. Once I get that figure down to approximately 40-50% (or revenue increases which bridges the gap), I hope to pass on the savings to Elytra’s users and finally introduce the Free Tier. 

I wish you all a very Happy New Year. May all your plans for the new year succeed.