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

History keeping for drop messages #10

Open
thechauffeur opened this issue Jul 19, 2014 · 20 comments
Open

History keeping for drop messages #10

thechauffeur opened this issue Jul 19, 2014 · 20 comments
Assignees
Milestone

Comments

@thechauffeur
Copy link
Member

We have to define a way to keep history for drop messages. This is module dependent but we should help modules with this.

This is an issue because we will not use FFsync anymore and hence do not have a sync protocol yet.

Idea: Use Qabel storage to hold a history file for specific modules and provide functionality to ease the history keeping process for module implementations.

@ghost
Copy link

ghost commented Jul 21, 2014

I already implement this for saving the chat messages for every user. Maybe we find some ideas there.

But I do not believe that to save it on the server is a good idea because ...
... the size of the history is one problem.
... we have to implement a lock because every device of a user can write to this history.
... different device can have different settings i.e. shares

I think a local history shall be the better solution.

@aBothe
Copy link
Contributor

aBothe commented Jul 24, 2014

Ich würde vorschlagen, Messages clientseitig á la Mail-Inbox zu behalten und diese im Bedarfsfall im Namen des Servers an andere Clients/"Peers" zu schicken.
So wird das Bottleneck Server umgangen, auch wenn es vielleicht schwierig wird, etwas von einem Smartphone per Socket auf ein anderes zu schicken -- weil es die ISPs u.U. nicht zulassen, einen Socket mobil zu binden.
Dennoch, einen History-Blob im Storage vorzuhalten klingt vernünftig. Oder noch besser, mehrere History Blobs, wo jeder client das individuelle Log hineinschreibt und für ein späteres Nachsehen mehrere Logs gemerged werden können.
Wäre dies dann jedoch nicht zu high-leveled, d.h. zu modulseitig?

@f-porter
Copy link
Contributor

Why not just provide the functionality in the drop message module to create a module specific history and to save messages there, locally? Thus there will only be messages stored which are determined to be stored.
For synchronization with other devices:
-- we implement a functionality to request the history of the other clients of this module via a drop message to the same identity and the other client sends it by Qabel Storage (similar to @aBothe suggestion, but with the use of the Qabel protocols). After that initial sync, new (sent) messages which are stored to history will be sent to the own identity's drop box.

The synchronization with other devices could be done via the Qabel Storage or by sending drop messages to his own identity/contact and the drop module puts them to history.

@k-c13:
-- The locking problem is also a problem for the file-module (several user change a shared file and sync it with the server) and we have to solve it anyway
-- The different settings of a device do not affect the message history as they are part of the configuration (or am i wrong?)

@aBothe:
Sending the messages from peer to peer would be another complex part to implement (another protocol) just for this history and therefore IMO not really reasonable.

@thechauffeur
Copy link
Member Author

+1 for providing history via drop and storage functionality. I'm unsure however if this should be a new "history module" or if it should be part of the core.

@thechauffeur thechauffeur added this to the Documentation should be ready for implementation milestone Jul 29, 2014
@thechauffeur
Copy link
Member Author

Oh and BTW, I'm OK with keeping things locally as much as possible - at least for the BETA.

@ghost
Copy link

ghost commented Jul 30, 2014

I think that the history shall be a part of every module and shall save locally.

The drop messages are on the drop server and so the history of every module can do from that message. And every module have to decide which drop messages are so important that it have to save to the own module history. An example is the chat module.

BTW: I will add the last update item to the local setting to know when the last messages readed from the drop servers.

@f-porter
Copy link
Contributor

What do you mean with "the history shall be a part of every module"?
That every module shall implement a history functionality on its own?

"The drop messages are on the drop server and so the history of every module can do from that message"?

@f-porter
Copy link
Contributor

And I would call the "last_update" item something like "last_drop_update". It could be possible that there will be more last update timestamps in the settings.
Or put the "last_update" in the module specific local settings of the drop module.

@ghost
Copy link

ghost commented Jul 30, 2014

@f-porter:
last_update
I agree with you because the local settings change to less sub directories as I start with. I will change it
history
Any module shall have its own history from the drop message forward from the core to the module. Example: If you start a chat again the chat module will know which sent data will shown. So the chat shall handle the chat history. The core module shall also have a small history but only with information which is important for the core. For the core the module message are not interesting. The only forward it to the module.

@thechauffeur
Copy link
Member Author

We have to write that the core will handle this (in the drop message documentation). This is needed for @malte-z.

@malte-z
Copy link
Contributor

malte-z commented Aug 4, 2014

@Qabel/internal-write-access: I added some infos for the drop history https://github.com/Qabel/intern-doc/wiki/Qabel-Client-Drop
Is everybody ok with that?

@ghost
Copy link

ghost commented Aug 4, 2014

I agree

@thechauffeur
Copy link
Member Author

OK.

@thechauffeur
Copy link
Member Author

@Qabel/internal-write-access we need input on this.

@thechauffeur
Copy link
Member Author

Or we decide this is post BETA.

@L-Henke
Copy link
Contributor

L-Henke commented Sep 22, 2014

Maybe a modified concept of a collapse key might work for us. Like: http://developer.android.com/google/gcm/adv.html
(This is just an idea and might not work at all)

@thechauffeur
Copy link
Member Author

@Gottox you self-assigned this one. If you still have an idea or something to contribute just tell us. You can formulate this "something" later. I just wondered about the assignee.

@aBothe
Copy link
Contributor

aBothe commented Nov 5, 2014

See https://github.com/Qabel/qabel-sync-module/wiki/Components-Sync
I thought myself that "modules should 'convert' their specific drop histories (e.g. chat logs, mail archives etc.) that shall be synced into one single JSONizable history, meaning the sync module will not preserve a drop history but only e.g. a JSONized chat log. This will likely save time on each side of the implementation."
No collisions, no timing attacks or other things. Instead each module handles its own things - the respective API for persisting things might be provided by Sync though.

@thechauffeur thechauffeur modified the milestones: Post-Beta, BETA documentation finished Nov 10, 2014
@thechauffeur
Copy link
Member Author

This is POST BETA now.

@thechauffeur
Copy link
Member Author

Not only is this vulnerable to a replay attack but also it would help modules if the core would handle not to handle already handled drop messages.

@L-Henke you did a work around for that in the android branch. Let us talk about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants