Open ghost opened 5 years ago
We are sorry about that, but as maintainer of PlantUML server, we do have to put protections against robot spamming and abusive use of our server.
We want to keep our service free and open. Having one request per second per IP is ok for us, so maybe the editor should buffer requests to our server to avoid flooding ?
Adding a cache and a delay between each update should be fairly simple.
We are sorry about that, but as maintainer of PlantUML server, we do have to put protections against robot spamming and abusive use of our server.
We want to keep our service free and open. Having one request per second per IP is ok for us, so maybe the editor should buffer requests to our server to avoid flooding ?
I totally understand that you want to avoid spamming on your servers. That's why I suggested to set a shortcut which triggers the API request.
Adding a cache and a delay between each update should be fairly simple.
A cache is already in place I believe. \ Adding a delay to fix the problem isn't really ideal I'd say. I think it would be better to let the user decide when he wants to make the call to the API, since the problem with arbitrary calls isn't solved. I believe it's best if the user can decide for themselves when exactly the call should be issued so he can control it exactly. If the user then makes too many calls it's his problem and not boostnote's if that makes sense.
same issue
You can host yourself plantuml server, have no request rate limit. see: https://github.com/plantuml/plantuml-server
If the limit is 1 call per IP per second (so 3600 calls per IP per hour) then this issue would be solved by simply showing "loading plantUML..." if there was a request in the last 1.1 seconds (includes some buffer). Once we know that the request won't get blocked we can send it and display the plantUML.
I don't imagine people will have a huge problem with having to wait a little over a second for a diagram to load. But in the event that people do hate the loading message and want an instant response then they can host their own plantUML server.
@LaniJW What do you think of such a solution?
Current behavior
At the moment every time a change is detected, it waits for about 1 second (I assume) and then makes a request to the plantuml servers when working on a plantuml design. I worked on a rather small design and since it gets information really frequently from the API, the API blocked me rather quickly because of too many requests. After some time I got access again.
Expected behavior
Whenever I press some shortcut or press a button (preferably a shortcut) it requests the data from the API so it doesn't refuse the service because the request is issued too often.
Steps to reproduce
Environment