Plutonic Rainbows

Solar Energy Project Day 40

I have had to postpone the plans for AWS migration to a later date. There are still issues with caching data from Solcast. I am using a Redis server to cache data and reduce excessive API calls to Solcast. However, for some reason, it is still retrieving older data instead of fetching new data every four hours. Another issue is that forecast data is not displaying, which is potentially more serious and will require further investigation.

Moving away from the C++ implementation on the backend has helped simplify the setup. While this change has resulted in keeping the code entirely in Python, the time spent trying to compile a multiplier and have it merge csv files has likely cost me around two weeks of development time.

Solar Energy Project Day 39

Spent the morning adding a current time demarcation line to the graph. Unfortunately, it turned out to be a lot more difficult than I thought. The React work is mostly done now, save for some minor tweaks. Tomorrow, I will begin porting it to AWS.

Solar Energy Project Day 39

Spent the morning adding a current time demarcation line to the graph. Unfortunately, it turned out to be a lot more difficult than I thought. The React work is mostly done now, save for some minor tweaks. Tomorrow, I will begin porting it to AWS.

Solar Energy Project Day 38

I spent some time getting Redis Server set up correctly. Redis excels as a caching solution for API calls primarily due to its in-memory data storage, which offers exceptionally fast read and write operations with sub-millisecond latency. This speed is crucial for applications requiring real-time data access and quick response times. Additionally, Redis supports a variety of versatile data structures, such as strings, hashes, lists, and sets, allowing developers to implement complex caching strategies tailored to different types of API responses. Its robust scalability features, including clustering and replication, ensure that Redis can handle increasing loads and maintain high availability, making it suitable for both small-scale and large, distributed systems. Furthermore, Redis provides built-in mechanisms for data persistence and automatic expiration of cached entries, ensuring data durability and efficient memory management without manual intervention.

In comparison to other caching methods like in-process caches or file-based systems, Redis offers significant advantages in terms of performance, flexibility, and scalability. In-process caches are limited to a single application instance and can lead to data inconsistency in distributed environments, while file-based caches suffer from slower access times and increased I/O overhead. Redis’s ability to function as a centralized cache accessible by multiple application servers not only promotes consistency but also reduces cache duplication across instances. Its comprehensive ecosystem, extensive community support, and seamless integration with various programming languages further enhance its appeal, making Redis a superior and reliable choice for optimizing API call performance and overall application efficiency.

Solar Energy Project Day 37

I was quickly running out of API calls so I have spent the last two days working on that. In addition, I have tweaked the slider transitions and introduced more appealing fonts. There is also now a button to hide the table if necessary and cells with numeric data other than 0 are now highlighted.

  • Prevented multiple Solcast data fetches by caching the fetched data for one hour.

  • Configured detailed logging to monitor data fetching, API requests, and potential errors.

  • Turned off Flask’s debug mode to avoid unintended server reloads that could trigger multiple data fetches.