-
Notifications
You must be signed in to change notification settings - Fork 65
poc: tedge MEA DB #3725
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
Draft
didier-wenzek
wants to merge
50
commits into
thin-edge:main
Choose a base branch
from
didier-wenzek:poc/tedge-mea-db
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
poc: tedge MEA DB #3725
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit is a very first step, scaffolding a generic mapper. The aim is to let users define their own mapping rules to tranform, filter or enrich data received from various sources. The idea is to form pipelines of user-provided transformation functions that: - consume messages from MQTT, - stream these messages along the transformation stages, - publish back to MQTT the resulting messages. Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: James Rhodes <jarhodes314@gmail.com>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: James Rhodes <jarhodes314@gmail.com>
Signed-off-by: James Rhodes <jarhodes314@gmail.com>
Signed-off-by: James Rhodes <jarhodes314@gmail.com>
Signed-off-by: James Rhodes <jarhodes314@gmail.com>
The first design was naive (i.e. loading the javascript module for each and every function call) and leading to a memory leak (loading a module with the same name keeps the previous version of the module in memory). The new design fixes the issue. The memory is stable while translating to c8y 600 tedge measurements per second during 20 minutes (mode debug) ```shell $ watch ps -p 1382888 -o args,%cpu,etimes,times,%mem,rss,vsz COMMAND %CPU ELAPSED TIME %MEM RSS VSZ tedge-mapper gen 47.4 1322 627 0.0 41440 1359476 $ tedge mqtt sub 'test/output' --duration 1000 | pv | wc -l 89.3MiB 0:16:40 [91.4KiB/s] [ <=> ] 586311 ``` Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
The goal is to be able to use the message processor from within the tedge cli command, notably for testing pipelines and filters. Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Still to be improved: some event are processed twice - `mv pipeline.toml /tmp` leads to update then remove - `rm pipeline.toml` correctly triggers only remove - `cp /tmp/pipeline.toml .` triggers creation and update Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: James Rhodes <jarhodes314@gmail.com>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: James Rhodes <jarhodes314@gmail.com>
Signed-off-by: James Rhodes <jarhodes314@gmail.com>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Signed-off-by: Marcel Guzik <marcel.guzik@cumulocity.com>
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
Thin-edge currently delegates to the MQTT broker all message-persistence requirements
Can thin-edge be extended with a Round Robin Database (or similar) to accumulate MEA messages?
Adding the ability to publish consolidated data to the cloud or a data lake.
Idea
It would be nice if users where able to define themselves persistence rules for messages that cannot be processed right now
Demo
Next steps
Connect the builtin bridge to the MEA DB.
Types of changes
Paste Link to the issue
Checklist
just prepare-dev
once)just format
as mentioned in CODING_GUIDELINESjust check
as mentioned in CODING_GUIDELINESFurther comments