Adding V8.4 Support: Discussion And Integration Plans
Hey everyone,
I'm excited to share that I've made some progress on adding v8.4 support in Python, and I wanted to get your thoughts and feedback on how to best integrate it. This new version involves a significant rewrite due to the completely different setup they're using, but I've got a proof of concept (POC) working.
Initial Progress and New Architecture
So far, I can connect to their HTTPS API and then to their WebSocket server, which serves as their online control service. It's still a bit rough around the edges, but I've got the core functionality in place to read and send commands from/to a node via the server. This is a huge step forward because it eliminates the need for local host WebSocket access, which was a major obstacle. The current implementation allows for communication with Folding@Home nodes through their official API, which opens up new possibilities for remote management and monitoring. The transition to HTTPS and WebSocket technologies ensures a more secure and standardized communication protocol, aligning with modern web development practices.
This new architecture also simplifies the deployment and configuration process, as users no longer need to configure local host access. The ability to manage Folding@Home nodes remotely can greatly enhance the user experience, especially for those running multiple nodes or managing them from different locations. Furthermore, this approach could potentially reduce the overhead on individual nodes by centralizing control and monitoring functions. The move to a centralized control service also allows for the implementation of more advanced features, such as real-time monitoring, automated task scheduling, and remote diagnostics. The WebSocket protocol enables bidirectional communication, allowing for instant feedback and updates from the nodes, providing users with a comprehensive view of their Folding@Home activities.
Proposal: Integrating into Existing Library
I'm eager to integrate this into the existing library if possible. My goal is to align it with the current API logic so that projects like the Home Assistant integration (https://github.com/eifinger/hass-foldingathomecontrol) can benefit from it. That project will also need updates, but one step at a time. The aim is to create a seamless transition for existing users while taking advantage of the new features and capabilities offered by the v8.4 architecture. Integrating the new functionality into the existing library can help minimize code duplication and maintain a consistent API for developers. This approach also allows for easier maintenance and updates in the future, as changes can be made in a centralized location.
To ensure a smooth integration, I plan to create a well-defined API that abstracts the underlying communication protocols, allowing developers to interact with the Folding@Home nodes in a consistent manner. This abstraction will also make it easier to support future versions of the Folding@Home software. Additionally, I intend to develop comprehensive documentation and examples to help developers quickly get started with the new functionality. The integration process will involve rigorous testing and validation to ensure that the new features work seamlessly with the existing codebase and that no regressions are introduced.
Question: Maintaining v7 Support
Here's a question for you guys: Should we keep v7 support? Given the extent of the rewrite, I'm wondering if it might be cleaner to release a v2 of this library that only supports v8.4. The rationale is that maintaining both versions in the same code might be cumbersome, especially since Folding@Home seems set on the End-of-Life (EOL) for v7. Users who still need v7 support could continue using the older version. This decision requires careful consideration of the trade-offs between compatibility and maintainability. Keeping v7 support would allow existing users to continue using the library without modification, but it would also add complexity to the codebase. On the other hand, dropping v7 support would simplify the code and make it easier to maintain, but it would require users to migrate to the new version.
The decision on whether to maintain v7 support also depends on the number of users still using v7 and their willingness to upgrade. If a significant number of users are still using v7, it might be worth maintaining compatibility for a while longer. However, if the number of v7 users is small and they are willing to upgrade, it might be more beneficial to focus on v8.4 support. Another factor to consider is the effort required to maintain both versions. If the effort is significant, it might be better to focus on the latest version. Ultimately, the decision should be based on a balance between user needs, technical considerations, and the long-term maintainability of the library.
Testing the Waters and Next Steps
This is mainly a heads-up to gauge the interest and appetite for this. I'm keen on using an existing Home Assistant add-on rather than creating a new one. My primary goal is to provide a seamless experience for Home Assistant users, allowing them to easily monitor and control their Folding@Home nodes. By integrating with an existing add-on, I can leverage the existing infrastructure and user base, reducing the effort required to deploy and maintain the integration. This approach also ensures that users can benefit from the new features without having to install a separate add-on. The integration process will involve close collaboration with the add-on maintainers to ensure compatibility and a smooth user experience.
I also plan to conduct thorough testing and gather feedback from users to identify and address any issues. User feedback will be crucial in shaping the final version of the integration and ensuring that it meets the needs of the community. By involving users in the development process, I can create a solution that is both functional and user-friendly. The testing phase will also include performance testing to ensure that the integration does not introduce any performance bottlenecks.
Once I'm a bit further along and out of the initial exploration phase, I'll push something for us to discuss more concretely. I anticipate creating a pull request (PR) with the initial implementation, which will serve as a starting point for discussions and code reviews. This will allow the community to provide feedback, suggest improvements, and contribute to the development process. The PR will include detailed documentation and examples to help reviewers understand the changes and their implications. I'm committed to working collaboratively with the community to ensure that the v8.4 support is integrated in a way that meets everyone's needs. The collaboration will also involve regular communication and updates to keep the community informed of the progress and any challenges encountered.
Looking forward to your thoughts and input!