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

[FEATURE] Another option to use save system? #344

Open
PothpothBR opened this issue Feb 19, 2025 · 1 comment
Open

[FEATURE] Another option to use save system? #344

PothpothBR opened this issue Feb 19, 2025 · 1 comment

Comments

@PothpothBR
Copy link

PothpothBR commented Feb 19, 2025

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I'm always frustrated when I can't open the same document on 2 different devices (this isn't real-time collaboration, but a “save-here-read-there”) without having to generate links to it every time and paste it again on another device.

I run drawdb on a small local server and imagine a separate backend server to allow this behavior.

Looking for the simplest, the minimum would be like this:

document saved:

  • save in cache
  • send request to external api (same as with gists)

open document:

  • send request to external api (same as with gists)
  • compare with the cache if it exists and allow the user to choose one of the two.

The server exposes the following routes

  • save/
  • load/

From now on I don't really care what it should look like, so that's my opinion.

There's one case left, how do I know how to open this specific document?

Option 1:

Create a user, relate the documents to that user and the rest is obvious...

http://server.com/save/user_id/document_id

Pros

Everything a user could offer

Cons

Implementing the user itself

Option 2:

Generate a document link (hash) which will be the uuid of that document on the server.
Keep a list of recent documents cached on the web with links to uploaded documents.
Allow a new document to be uploaded via a link

http://server.com/save/document_uuid

Pros

  • extremely simple
  • no user required

Cons

  • extremely simple
  • It is possible that over time documents can become “dead references” because no one else has a link to them.
@1ilit
Copy link
Member

1ilit commented Feb 20, 2025

Yeah, thing is, it's not just a server we need, we'll also need file storage and a lot of it (just judging based on the number of diagrams shared this far, imagine saving them all). Here are a few less resource-intensive options (at least from our end).

  1. log in with github and have your diagrams saved to your gists or a repository
  2. put in a github token and have your diagrams saved to your github

Also I'd prefer to keep this as simple and as "self-contained" as possible

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

No branches or pull requests

2 participants