git-annex/doc/design
Joey Hess 5e564947d7
use netstrings for framing binary data with json at the end
This will be easy to implement with servant. It's also very efficient,
and fairly future-proof. Eg, could add another frame with other data.

This does make it a bit harder to use this protocol, but netstrings
probably take about 5 minutes to implement? Let's see...

import Text.Read
import Data.List

toNetString :: String -> String
toNetString s = show (length s) ++ ":" ++ s ++ ","

nextNetString :: String -> Maybe (String, String)
nextNetString s = case break (== ':') s of
        ([], _) -> Nothing
        (sn, rest) -> do
                n <- readMaybe sn
                let (v, rest') = splitAt n (drop 1 rest)
                return (v, drop 1 rest')

Ok, well, that took about 10 minutes ;-)
2024-07-05 11:53:03 -04:00
..
adjusted_branches
assistant Typo fix unncessary -> unnecessary. 2022-08-20 09:40:19 -04:00
balanced_preferred_content Added a comment 2023-07-24 13:10:09 +00:00
encryption
exporting_trees_to_special_remotes Added a comment 2018-02-07 20:01:53 +00:00
external_backend_protocol Added a comment: xxHash as the backend 2022-12-12 08:21:35 +00:00
external_special_remote_protocol Added a comment: support for bulk write/read/test remote 2024-04-02 06:41:25 +00:00
git-remote-daemon
iabackup
metadata
new_repo_versions
p2p_protocol comment 2019-04-03 13:11:34 -04:00
p2p_protocol_over_http use netstrings for framing binary data with json at the end 2024-07-05 11:53:03 -04:00
requests_routing Added a comment: Friendly bump to keep on the radar 2019-10-24 09:26:23 +00:00
adjusted_branches.mdwn
assistant.mdwn
balanced_preferred_content.mdwn don't sync with cluster nodes by default 2024-06-25 10:24:38 -04:00
caching_database.mdwn sqlite datbase for importfeed 2023-10-23 16:46:22 -04:00
encryption.mdwn Fix typos "=yet" -> "=yes" 2023-03-10 18:07:20 +01:00
exporting_trees_to_special_remotes.mdwn comment 2022-05-02 14:45:45 -04:00
external_backend_protocol.mdwn this protocol is not draft for some time 2020-10-22 19:55:29 -04:00
external_special_remote_protocol.mdwn let Remote.availability return Unavilable 2023-08-16 14:31:31 -04:00
gcrypt.mdwn
git-remote-daemon.mdwn
iabackup.mdwn Fix spelling in doc/design/iabackup.mdwn 2018-06-03 12:28:26 +00:00
importing_trees_from_special_remotes.mdwn improve docs about removeExportDirectory 2019-05-28 11:16:01 -04:00
metadata.mdwn
new_repo_versions.mdwn 2023-11-20 02:09:42 +00:00
p2p_protocol.mdwn thoughts on CGI, and use json 2024-07-05 10:08:43 -04:00
p2p_protocol_over_http.mdwn thoughts on CGI, and use json 2024-07-05 10:08:43 -04:00
passthrough_proxy.mdwn update 2024-06-27 13:40:09 -04:00
preferred_content.mdwn
requests_routing.mdwn
roadmap.mdwn avoid truncating the list of confirmed items 2023-06-23 16:20:00 -04:00