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

Offline Database on client side #410

Closed
TheMBeat opened this issue Nov 23, 2020 · 9 comments
Closed

Offline Database on client side #410

TheMBeat opened this issue Nov 23, 2020 · 9 comments
Labels
enhancement New feature or request

Comments

@TheMBeat
Copy link
Contributor

Describe the solution you'd like
The recipe collection should be persisted in an offline database on the client side and should only be synced in case of changes. This would improve the usage of the app, as it is more fluid to use.

@TheMBeat TheMBeat added the enhancement New feature or request label Nov 23, 2020
@christianlupus
Copy link
Collaborator

You are welcome to do so. One main focus of the app is to have all JSON data in the file system (in contrast to the database). You can sync the complete cookbook to your hard drive and use it there.

Adding an API endpoint would require a corresponding (offline) program to be installed on the machine of the user. If you are willing to do so, you can do so and we can of course try to help with the technical details about the communication but I do not see how this fits into the scope of a NC app. Maybe I just miss the main point here.

@TheMBeat
Copy link
Contributor Author

I thought of something like a PWA. The JSONS would then be stored in the LocalStorage.
@sam-19 , @seyfeb what do you think?

@seyfeb
Copy link
Collaborator

seyfeb commented Nov 23, 2020

I’m not too familiar with PWA but do I understand it correctly that you are not suggesting to change the file storage in any way from, e.g., #340 or previous discussions on how to store data, but to create a local JS data-caching solution with server-side push updates when things in the main database or in the recipes JSON files in the Nextcloud folders change?

@TheMBeat
Copy link
Contributor Author

yes, my idea was not to change the memory layout, just to implement a cahing solution so that the recipes are also available offline.

@christianlupus
Copy link
Collaborator

In this case it is quite some effort on the JS side.
Honest question: Who is able (timely) and capable (knowledge) to implement that? I can only retract here due to missing knowledge. I would be interested how one could tackle that but I am definitively out implementing it.

@TheMBeat
Copy link
Contributor Author

Although I have mentioned it, unfortunately I am not able to implement it. Nevertheless I would be happy about this feature.

@seyfeb
Copy link
Collaborator

seyfeb commented Nov 24, 2020

I won’t have the time to dig into this, although I see how it might be a cool thing to have.

At the moment there are also some open issues that might be more pressing, such as defining a stable API, improving the database by introducing a better structure and adding more information to it, and implementing the more flexible file structure (based on which sharing can be implemented, which is also a feature many ask for.

@christianlupus is already doing some heavy lifting in this regard.

@TheMBeat
Copy link
Contributor Author

@seyfeb is right. This feature may or may not be implemented at a later date. Depending on the level of interest. The focus should be on the developments that have already been started.

@christianlupus
Copy link
Collaborator

OK, I just had a quick look at PWAs. They require a <meta> tag in the head section that links the manifest file. That way, the browsers detect PWAs. I am not aware of any way to change the head part of the HTML page delivered by the NC core. A quick glance at the sources of the server shows no obvious way to do that.

So before this feature can be implemented at all, we need support fort that in the main server first.

See nextcloud/server#19406 and nextcloud/server#18584. I will close here as we are not able to do anything from the app but the NC server needs enhancement. If this gets implemented, we can reopen the issue or open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants