reactive-firewall / multicast

The multicast package is a Python library that simplifies sending and receiving multicast network messages. It provides classes and tools for implementing multicast communication in Python applications, making it straightforward to work with multicast sockets.
Other
2 stars 0 forks source link

Document CEP-5 #124

Closed coderabbitai[bot] closed 2 months ago

coderabbitai[bot] commented 2 months ago

Introduction

This Convention Enhancement Proposal (CEP-5) seeks to generalize the use of the custom shlock implementation (tool_shlock_helper.sh) across all shell scripts within the project (excluding tool_shlock_helper.sh itself). The goal is to ensure consistent, portable, and reliable file locking mechanisms throughout the project's shell scripts.

Background

In the check_pip script, a custom shlock implementation is used to handle file locking due to inconsistencies and the lack of availability of standard shlock tools across different environments. This custom approach has proven effective in ensuring portability and reliability.

Problem Statement

Multiple shell scripts within the project may require file locking to prevent concurrent execution and ensure data integrity. However, relying on system-specific locking tools can lead to inconsistencies, failures, and increased maintenance overhead due to variations in tool availability and behavior across different environments.

reactive-firewall commented 2 months ago

Here is the draft we discussed

CEP-5: Standardization of Custom Locking Mechanism in Shell Scripts

Introduction

This Convention Enhancement Proposal (CEP-5) seeks to generalize the use of the custom shlock implementation (tool_shlock_helper.sh) across all shell scripts within the project (excluding tool_shlock_helper.sh itself). The goal is to ensure consistent, portable, and reliable file locking mechanisms throughout the project's shell scripts.

Background

In the check_pip script, a custom shlock implementation is used to handle file locking due to inconsistencies and the lack of availability of standard shlock tools across different environments. This custom approach has proven effective in ensuring portability and reliability.

Problem Statement

Multiple shell scripts within the project may require file locking to prevent concurrent execution and ensure data integrity. However, relying on system-specific locking tools can lead to inconsistencies, failures, and increased maintenance overhead due to variations in tool availability and behavior across different environments.

Proposal

Rationale

Impact

Implementation Plan

  1. Update tool_shlock_helper.sh: Ensure the custom shlock script is up-to-date and capable of supporting the needs of all shell scripts.
  2. Modify Existing Scripts: Refactor current shell scripts to implement the standardized locking mechanism.
  3. Provide Examples: Include sample code snippets in the documentation to illustrate proper usage.
  4. Code Review: Conduct thorough reviews to ensure compliance with the new standard.
  5. Testing: Verify the updated scripts across different environments to confirm portability and reliability.

Alternatives Considered

Conclusion

Standardizing the use of the custom shlock implementation across all shell scripts enhances the project's portability, consistency, and reliability. CEP-5 proposes a clear path forward to achieve this standardization, minimizing dependencies on external tools and simplifying the development process.

References

Normative References

(No normative references at this time.)

Informative References

Bash Subshells Understanding Bash Subshells shlock Manual Page PR-123


_Originally posted by @coderabbitai[bot] in https://github.com/reactive-firewall/multicast/pull/123#discussion_r1770695801_

reactive-firewall commented 2 months ago

CEP-5 has been posted as a draft gitst at: https://gist.github.com/reactive-firewall/3d2bd3cf37f87974df6f7bee31a05a89