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

42 architecture docs #49

Merged
merged 14 commits into from
Nov 26, 2024
Merged

42 architecture docs #49

merged 14 commits into from
Nov 26, 2024

Conversation

hugoib
Copy link
Collaborator

@hugoib hugoib commented Nov 18, 2024

Added service layer architecture document for didcomm interaction and basic wallet functions.

@hugoib hugoib marked this pull request as ready for review November 18, 2024 13:16
@hugoib hugoib requested a review from IngridPuppet November 18, 2024 13:16
docs/service-layer/README.md Outdated Show resolved Hide resolved
docs/service-layer/README.md Outdated Show resolved Hide resolved
docs/service-layer/README.md Show resolved Hide resolved
docs/service-layer/README.md Outdated Show resolved Hide resolved

# Retrieve New Messages

This event will bring new messages to the FE, which will be stored in the local storage. There will be a limit on cached messages. The limit will be per conversation. Once there are new messages that exceed the pile, we will delete old ones.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With our FE - service layer separation, we sometimes tend to think data are remotely retrieved, while it is not. Don't you think this logic is simply duplicating the data we locally have in IndexedDB into the local storage?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea behind this approach is to reduce the calls load.

"There will be a limit on cached messages. The limit will be per conversation. "

I think we shouldn't bring everything every time we open the app and I added this sort of caching logic for that.

Picture you opening a messaging app, we don't bring everything every time, I think it is too much load but only what is new.


For more info refer to: README.md/ ## Alice checks status requests

Shall I review that logic based on other specific points that might not be clear?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely agree with loading messages in chunks, but do we really need to cache anything? I do not see a real advantage reading from localStorage vs reading from IndexedDB. Can't React in-memory state be the "cache solution" with respect to this logic?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed and re structured that part providing a better and (hopefully) more comprehensible solution.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is indeed more comprehensible. Thank you.

docs/service-layer/other-events.md Outdated Show resolved Hide resolved
@hugoib hugoib requested a review from IngridPuppet November 19, 2024 12:57
@IngridPuppet IngridPuppet linked an issue Nov 20, 2024 that may be closed by this pull request
@hugoib hugoib merged commit 422004a into main Nov 26, 2024
2 checks passed
@hugoib hugoib deleted the 42-architecture-docs branch November 26, 2024 15:42
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 this pull request may close these issues.

Event driven didcomm architecture document
2 participants