82d66ede5e
Websockets would work, but the problem with using them for this is that each lockcontent call is a separate websocket connection. And that's an actual TCP connection. One TCP connection per file dropped would be too expensive. With http long polling, regular http pipelining can be used, so it will reuse a TCP connection. Unfortunately, at least with servant, bi-directional streams with long polling don't result in true bidirectional full duplex communication. Servant processes the whole client body stream before generating the server body stream. I think it's entirely possible to do full bi-directional communication over http, but it would need changes to servant. And, there's no way for the client to tell if the server successfully locked the content, since the server will keep processing the client stream no matter what.: So, added a new api endpoint, keeplocked. lockcontent will lock the key for 10 minutes with retention lock, and then a call to keeplocked will keep it locked for as long as needed. This does mean that there will need to be a Map of locks by key, and I will probably want to add some kind of lock identifier that lockcontent returns. |
||
---|---|---|
.. | ||
adjusted_branches | ||
assistant | ||
balanced_preferred_content | ||
encryption | ||
exporting_trees_to_special_remotes | ||
external_backend_protocol | ||
external_special_remote_protocol | ||
git-remote-daemon | ||
iabackup | ||
metadata | ||
new_repo_versions | ||
p2p_protocol | ||
p2p_protocol_over_http | ||
requests_routing | ||
adjusted_branches.mdwn | ||
assistant.mdwn | ||
balanced_preferred_content.mdwn | ||
caching_database.mdwn | ||
encryption.mdwn | ||
exporting_trees_to_special_remotes.mdwn | ||
external_backend_protocol.mdwn | ||
external_special_remote_protocol.mdwn | ||
gcrypt.mdwn | ||
git-remote-daemon.mdwn | ||
iabackup.mdwn | ||
importing_trees_from_special_remotes.mdwn | ||
metadata.mdwn | ||
new_repo_versions.mdwn | ||
p2p_protocol.mdwn | ||
p2p_protocol_over_http.mdwn | ||
passthrough_proxy.mdwn | ||
preferred_content.mdwn | ||
requests_routing.mdwn | ||
roadmap.mdwn |