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

[Scylla] - Add Scylla Metadata Injection #223

Open
jr1221 opened this issue Oct 8, 2024 · 0 comments · May be fixed by #252
Open

[Scylla] - Add Scylla Metadata Injection #223

jr1221 opened this issue Oct 8, 2024 · 0 comments · May be fixed by #252
Assignees

Comments

@jr1221
Copy link
Contributor

jr1221 commented Oct 8, 2024

Description

Right now, all data addition or expansion is done strictly by the client. Some transformation is done by Calypso but it is very limited in scope. Therefore issues like #207 will continue to be a problem and the end users won't like this.

Acceptance Criteria

This would be the addition of a new thread to Scylla which intercepts and manipulates socket messages before they are sent. This would strictly add new messages or deny others, it should not mutate existing messages. Extensibility for any sort of data manipulation is key, as well as organization and little performance overhead in the mqtt_processor thread.

Requirements for merge:

  • does not reduce performance of mqtt processor or cause it to idle busy
  • Adds a timer method for things charging needs (consult @bracyw)
  • does not rely on unabstracted code for such timers
  • Allows to pass through all messages which do not have special hooks very quickly.
  • Does not mutate existing data, just adds more

Proposed Solution

The best way in my view to add this thread is to split the socket from the mqtt processor. Then, switch the mpsc channel to be broadcast type so two such consumer exist, the db Handler and the metadata injector. This metadata injector would then receive every message and manipulate, add messages, etc. It could use tokio select! patterns as seen in other threads to also run periodic tasks. This metadata counting would be hard coded, which is ugly but it's OK.

Depends on #change

Mocks

No response

@jr1221 jr1221 self-assigned this Nov 10, 2024
@jr1221 jr1221 linked a pull request Nov 29, 2024 that will close this issue
12 tasks
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

Successfully merging a pull request may close this issue.

1 participant