- Published on
Development Update - Feb 2024
- Authors
- Name
- Andrew Kallinikos
Last month, we released a development update for early 2024. I want to try and make this a regular monthly thing so you can see what we're working on and what's coming soon.
What We've Done
The past month has brought a lot of changes to the reliability and user experience of the app.
Frontend Improvements
Theming Overhaul
Our first attempt at handling light and dark modes didn't quite pan out the way we wanted. It required an account and was inconsistent. We made some changes that make it easier to toggle and will persist across devices (requires an account). We hope you like this system better!
We have also made some minor changes, like creating a solid background instead of a gradient, and other small adjustments like darkening some borders on cards to give them a little more definition on the page.
Handling Stale Data
We've made some changes to better handle stale live weather and wave data. Previously, our system would keep displaying old data indefinitely. We now display warnings if a weather station or buoy hasn't reported in 2-3 hours, and if more than a day passes, we will display an error message.
There is a case where a station or buoy may be reporting other data, but not wind or waves. In this case, we have a new state, "No Report," that will display. Soon, we will be adding a fallback system to display forecasted data in this case.
Live Wind Overhaul
We first rolled out changes to handle stale live wave data and wanted to do the same for winds. This improvement turned out to be slightly more challenging than we initially anticipated due to some unforeseen edge cases in reporting.
It all boiled down to how we were handling the "Calm Wind" case, and more specifically, when a station reported 0 wind. In the previous system, null or 0 both would be treated as calm wind. We ran into a problem when we wanted to create a new state, "No Report," where winds weren't being reported, but other weather data like temperature was. In JavaScript, and many other languages, 0 is a falsy value, meaning if you want to check if a value is null but want to allow 0, you have to explicitly do so.
// Previous code
if (wind_speed) {
// This code breaks if wind_speed
// is 0 because 0 is a falsy value
}
// Fixed code
if (wind_speed != null) {
// This code works because we're checking
// for null or undefined but allowing
// wind_speed to be 0
}
While testing this feature, there were many edge cases and unexpected behaviors we had to overcome due to inconsistencies in the reported data. Some stations report 0 wind with a zero, and some report 0 wind as null. This required a few backend changes to standardize the incoming data to our database.
Quality of Life Changes
We've made a series of small changes that we hope will improve the overall experience for everyone. Some of these include:
- Adding the ability to favorite/unfavorite spots from the spot page
- Adding swell directions to dashboard favorites
- Indicating which buoy is reporting to the live data overview
Backend Improvements
Internal Status and Error Reporting
Behind the scenes, we've developed several systems to help us monitor various parts of the app. We have rolled out an internal notification system that will alert us to any anomalies or errors that occur.
Two of the most helpful are a pair of services that check weather and buoy reporting. These check our database for any buoys or weather stations that haven't reported in a while. In the couple of weeks these have been live, they've already provided us with a ton of helpful insights for discovering and diagnosing bugs and issues.
Improved Deployment Pipelines
We've made some changes to how we build and deploy the various services that make up the Forsea application. The biggest impact this has had is on the amount of downtime needed when we want to deploy a new version of the app, a new blog, or an update to the landing page. The changes we've made will reduce our downtime on updates by 99.9%!
Before these changes, you may have seen a "Forsea is Updating" message for a few minutes. Now, there is so little downtime you may not see that message again! This also gives us the flexibility to deploy hotfixes and patches without worrying about impacting you.
Bug Fixes
Early in February, our internal monitoring system alerted us that almost all of our buoys had not reported in a few hours. Sometimes buoys go down for a few hours, but a 60% failure rate was quite suspicious.
Upon inspecting the logs, we found that the system ingesting the buoy data was crashing as it attempted to read data from an inactive buoy. We had logic in place to detect if it was inactive but never actually stopped the process from trying to read from it. Whoops. Thankfully, it was a simple fix, and we were back in action.
What's Coming Soon
In the next month, we will continue our efforts to improve and stabilize the systems we already have. Once we have accomplished that, we can start moving on to the exciting stuff!
Frontend Improvements
Forecast Section Improvements
The current forecast section is pretty barebones. We work on the philosophy of deploying early and constantly iterating. This helps us get feedback and make changes that matter, getting us to a better overall feature faster.
Live Data Forecast Fallbacks
We will be implementing a fallback system for spots where live data isn't available or do not have a nearby weather station or buoy.
New Regions and Spots
Forsea is currently deployed only on the East Coast. This expansion goes hand in hand with the stability and monitoring improvements we are making. Right now, it would be too difficult to monitor and maintain all of the new spots with our current systems. However, we are close to the point where we can expand!
Keep an Eye Out For:
- The West Coast
- Hawaii
- The Gulf of Mexico
- The Caribbean
- Central America
- The Great Lakes
We will incrementally expand to these areas as we are able to monitor resource utilization and stability. Let us know which areas you want to see first!
Dashboard Improvements
In the near future, the Dashboard will be getting a bit of a makeover. The most important feature will be the ability to order your spots however you wish.
Search Feature
Finding new spots is a bit basic right now. We will be adding a search feature to help quickly find new spots. Our goal is to make it searchable by spot name, region, or state.
Backend Improvements
Expanded Response Caching
Our forecast feature uses an on-demand caching system to reduce the load on our database. You can read more about it here.
Recently, we also leveraged this system for the recent changes we made to the theming system. We will gradually expand this system to other parts of the app, like the live data overviews. This will reduce the load on our database and make the app even faster overall, especially as the number of users we have grows.
Live Weather and Wave Service Improvements
The current systems ingesting live weather and ocean data are running quite well, but we need to make some modifications to them to handle expanding to new areas. We currently have these services written in Python, but may rewrite them in something more performant to handle the increased load without having to provision extra resources.
Database Optimizations
We ingest and process a considerable amount of weather and ocean data daily. Optimizing our database to contend with all of this is a constant battle.
One of our biggest challenges is optimizing the amount of storage space we use. To expand to other regions, we have to maximize every space optimization we can to avoid ballooning our monthly database bill.
Further Down the Line
Condition Analysis
We want to add some basic analysis to spot pages. Is the swell building or fading? Is it bigger or smaller than expected, etc.
Spot Settings and Notifications
This feature is one of the core reasons I started Forsea. Every surfer has a different set of ideal conditions they look for in a particular spot. We want to build a system that allows you to set those conditions and get notified when they are met or forecasted to be met.
Logbook
We want to build a system that allows you to save your sessions and see your stats over time. This could also be used to improve the settings and notifications feature mentioned above.