Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract encoding / decoding of Srcbooks into its own package, introduce versioning #208

Open
nichochar opened this issue Aug 24, 2024 · 0 comments

Comments

@nichochar
Copy link
Contributor

nichochar commented Aug 24, 2024

Refactor Srcbook Serialization: Extract and Version Encoding/Decoding Logic

Current State

  • Encoding and decoding operations are currently implemented in both client and server components.

Problem

  • Limited portability of Srcbook decoding capabilities.
  • Lack of versioning for the encoding algorithm poses potential compatibility issues.

Proposed Solution

  1. Extract encoding/decoding logic into a separate package:

    • Suggested package name: @srcbook/serde
    • This package will encapsulate all serialization and deserialization functionality.
  2. Implement versioning for the encoding algorithm:

    • Introduce a version identifier in the serialized output.
    • Develop a mechanism to detect and handle different versions during deserialization.

Benefits

  1. Improved Portability:

    • Enables Srcbook decoding in a wider range of environments.
    • Facilitates easier integration with third-party tools and services.
  2. Enhanced Maintainability:

    • Centralizes serialization logic, reducing code duplication.
    • Simplifies future updates and bug fixes.
  3. Robust Compatibility Management:

    • Allows for graceful handling of different encoding versions.
    • Enables the introduction of new concepts without breaking existing implementations.
    • Provides a foundation for potential data migrations in the future.

Next Steps

  • Design the API for the @srcbook/serde package.
  • Implement versioning mechanism and initial compatibility checks.
  • Refactor existing code to utilize the new package.
  • Update documentation to reflect the changes in serialization handling.
@nichochar nichochar changed the title Extract encoding / decoding of Srcbooks into its own package, introduce encoding versioning Extract encoding / decoding of Srcbooks into its own package, introduce versioning Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant