This repository has been archived by the owner on Mar 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Proposals
Martín Fernández edited this page Mar 5, 2019
·
10 revisions
The idea is propose the use of a local database to keep and send messages explaining their advantages and disadvantages.
Using any kind of database to:
- POD reading keeping messages into the database.
- Also keeping sent messages to load it easiest.
- Create a smart database controller, who is able to reading and writing on the pod.
SOLID isolation, the most difficult part, maybe, of the chat.
- Dealing with database that is easy, familiar and provide a lot of info.
- Making a common chat where the database and handlers will be used as adapters.
- Solving 25MB POD's storage.
- Avoiding server use, that should be established, study its behavior and if the app become too big solving potential storage conflicts.
- Easiest to create first tests, just reading and writing a database.
- Model also used by Whatsapp to storage chats.
- Lot of tutorials available on the internet, becoming the decentralization the most difficult part.
- It isn't a solution, just a delegation.
- Delegation of the storage releasing to the handlers.
- Running slowdown.
- Difficulties to include the database with the programming language.
Some important reasons to discard it:
- Writing twice will be a running problem.
- Inconsistencies using the same account in different computers caused by the database.
- Troubles caused by "downloading" any user their own database.
Save chat with user with this format:
{ "idChat": "1", "webid_sender": "martinlacorrona.solid.community", "webid_reciever": "javierardura.solid.community", "messages": [ { "date": "2019-03-04T18:25:43.511Z", "message": "Hola javi" }, { "date": "2019-03-04T18:25:45.511Z", "message": "Que tal?" }, { "date": "2019-03-04T18:26:30.511Z", "message": "Yo estoy bien, gracias por preguntar." }, ] }