Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Provide "changes" API endpoint #200

Closed
6 of 7 tasks
dlebrero opened this issue Jan 22, 2020 · 4 comments
Closed
6 of 7 tasks

Provide "changes" API endpoint #200

dlebrero opened this issue Jan 22, 2020 · 4 comments
Assignees

Comments

@dlebrero
Copy link
Contributor

dlebrero commented Jan 22, 2020

  • Auth
  • Auth Perf
  • Deploy
  • Datapoint changes/deletes
  • "Long pull"
  • Change Flow to push Form.status
  • Survey data
dlebrero added a commit that referenced this issue Jan 22, 2020
dlebrero added a commit that referenced this issue Jan 22, 2020
dlebrero added a commit that referenced this issue Jan 22, 2020
dlebrero added a commit that referenced this issue Jan 22, 2020
@iperdomo iperdomo self-assigned this Jan 22, 2020
iperdomo added a commit that referenced this issue Jan 23, 2020
Avoid the problem:
/root/.postgresql/root.crt (No such file or directory)
iperdomo added a commit that referenced this issue Jan 23, 2020
iperdomo added a commit that referenced this issue Jan 23, 2020
@iperdomo
Copy link
Collaborator

iperdomo commented Jan 24, 2020

"Long pull"

I'm thinking on caching the HTTP 204 request instead of blocking a thread in nginx or the JVM.

It's an easier solution. We can return Cache-Control: max-age=3600 (1h) header from Clojure and nginx will honor it (if proxy_cache is enabled)

@dlebrero any thoughts?

References:

@dlebrero
Copy link
Contributor Author

"Long pull"

I'm thinking on caching the HTTP 204 request instead of blocking a thread in nginx or the JVM.

It's an easier solution. We can return Cache-Control: max-age=3600 (1h) header from Clojure and nginx will honor it (if proxy_cache is enabled)

@dlebrero any thoughts?

Seems reasonable and a lot simpler. I assume the cache key will be the user email + url?

@iperdomo
Copy link
Collaborator

Seems reasonable and a lot simpler. I assume the cache key will be the user email + url?

yes, email+request_uri

iperdomo added a commit that referenced this issue Jan 24, 2020
* We also introduce the change to convert ids into Strings for delete*
  events.
iperdomo added a commit that referenced this issue Jan 27, 2020
The proxy server (nginx) will cache this response for 1h. Useful for
_eager_ clients re-requesting the same thing over and over again.
The value of 1h is arbitrary and we can adjust it.

A client can bypass the proxy by using a request header `Pragma: no-cache`
iperdomo added a commit that referenced this issue Jan 29, 2020
iperdomo added a commit that referenced this issue Jan 29, 2020
iperdomo added a commit that referenced this issue Jan 29, 2020
iperdomo added a commit that referenced this issue Jan 29, 2020
* It's quite unlikely that the same user (part of the cache key)
  is requesting the same URL at the same time
iperdomo added a commit that referenced this issue Jan 30, 2020
iperdomo added a commit that referenced this issue Jan 30, 2020
iperdomo added a commit that referenced this issue Jan 30, 2020
Instead of creating the connection and then creating a `{:connection conn}`
map when needed, we can use the with-db-connection macro
iperdomo added a commit that referenced this issue Jan 30, 2020
iperdomo added a commit that referenced this issue Jan 30, 2020
[#200] Respond HTTP 204 when no more changes are available
iperdomo added a commit that referenced this issue Jan 30, 2020
dlebrero added a commit that referenced this issue Jan 30, 2020
[#200] Adds support for exposing Survey changes
iperdomo added a commit that referenced this issue Feb 3, 2020
* Fixes the typo in spec definition
iperdomo added a commit that referenced this issue Feb 4, 2020
* formChanged|formDeleted will show only data the user has access to
iperdomo added a commit that referenced this issue Feb 4, 2020
* We expect that RemoteAPI to be installed once per thread (request),
instead of installing/uninstalling several times
iperdomo added a commit that referenced this issue Feb 6, 2020
- We can't authorize deletes (as the main object on which we authorize may be gone)
- Provide candidates for forms and surveys ids when trying to list-and-authorize
iperdomo added a commit that referenced this issue Feb 6, 2020
- Get rid of using `nil` value when loading forms and surveys. This
  particular one masked a different logic bug. By using explicit ids
  when fetching objects we harden the function "contract".
@dlebrero
Copy link
Contributor Author

Can we close this?

@iperdomo iperdomo closed this as completed Jul 2, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants