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

Refactoring: Backend class should work on ALApp instance, rather than app hash #42

Open
vjekob opened this issue Jun 19, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@vjekob
Copy link
Owner

vjekob commented Jun 19, 2022

Partly, this is related to #41 and it certainly depends on it being done first.

Currently, Backend class receives app hash as parameter for all back-end operations. Furthermore, it processes app ID and pool ID decisions directly. This class, just like the back end itself, should not even consider pools, it should simply access the hash property that should (as per #41) return pool ID when an app is in a pool.

At this particular point, there is an accidental infinite loop in telemetry during app initialization (not in production, don't worry!) simply because app ID is passed to telemetry from app initialization, but then Backend class attempts to re-initialize the app because it doesn't know about the app, only about its hash. While this is a simple issue to fix, the root cause is deeper, and is twofold:

  • Backend must not handle hashes directly, but ALApp instances; and
  • ALApp instances should return pool ID from ˙get hash(): string˙ function, if the app belongs to a pool

This would then provide for a much cleaner structure, easier to reuse and extend.

@vjekob vjekob added the enhancement New feature or request label Jun 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant