Data Streams Like Rain
Ivan was tired of getting soaked. In his home country, if you checked the weather you knew what the next hours would bring. If it was gonna rain you took rain gear. If it was sunny you could enjoy it. Nice and consistent. Reliable.
In his new country it was chaos. You could walk out the door into blazing sun and five minutes later you’d get drenched. The locals, the cool locals, managed to look cool getting drenched. He’d never get that.
There are RainRadar apps which give an approximation. But they aren’t granular enough. Sometimes there’d be no precipitation in the scan and he’d still come into work dripping.
After showing up at a few meetings looking bedraggled, eliciting comments from comedian colleagues, Ivan decided that he had an itch to scratch. He knew that the weather service provided realtime data and he figured he only needed two parameters: nearby precipitation and wind direction.
When he accessed the weather site he found a list of data feeds. They were all realtime and geofenced with minute frequencies. Ivan’s spine tingled. This was high quality data.
The links went to the Ocean Marketplace. He clicked one and landed on an overview page. It contained an array of metadata about the feed: description, data format, author, etc. There was a sample of raw data, plus a link to the feed’s API docs.
The data was not free. That’s typical due to the freerider problem, but its cost was minimal, like a tenth of a cent a day. In a sidebar on the right of the page was a payment panel. The URL of the data feed appears there when a user subscribes.
Ivan quickly built a Dapp with a simple user interface and a map. He accessed it with his browser and connected his crypto wallet. He subscribed to a feed in the Marketplace, choosing a duration of a week. The feed URL displayed, he copied it and formulated a query in the code to get wind direction for his current location. When he connected his wallet to the weather service it validated his payment and, bingo, the result came in and would be updated in realtime. Smooth sailing.
Then he subscribed to the precipitation feed and composed a query to get rainfall within a 1 km perimeter. The data came streaming in and he combined the inputs but something was weird. His machine slowed to a crawl. He heard its fan start to whir and realized he was downloading gigabytes of data. There’s gotta be a mistake. He started debugging and found a percentage parameter missing its decimal point. Duh.
Now that things were calm he tested the app on his phone. Later when it was time to depart he checked. Sure enough, half a kilometer away rain was pouring down with the wind coming his direction. He stayed at his desk and checked his portfolio. The rain came, then passed. He looked at his app and all was clear.
Leaving the office he hopped on his bike and rode home feeling dry, comfortable, and content. He decided to relax and have a local beer, stopping at a café with a nice terrace. Before dismounting Ivan glanced up at the sky. Then he shook his head, pulled out his phone and checked his app. Now he was fully equipped.