{"action":"created","issue":{"url":"https://api.github.com/repos/Backblaze/B2_Command_Line_Tool/issues/78","repository_url":"https://api.github.com/repos/Backblaze/B2_Command_Line_Tool","labels_url":"https://api.github.com/repos/Backblaze/B2_Command_Line_Tool/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/Backblaze/B2_Command_Line_Tool/issues/78/comments","events_url":"https://api.github.com/repos/Backblaze/B2_Command_Line_Tool/issues/78/events","html_url":"https://github.com/Backblaze/B2_Command_Line_Tool/issues/78","id":138813507,"number":78,"title":"Design Thread-Safe Library","user":{"login":"bwbeach","id":603739,"avatar_url":"https://avatars.githubusercontent.com/u/603739?v=3","gravatar_id":"","url":"https://api.github.com/users/bwbeach","html_url":"https://github.com/bwbeach","followers_url":"https://api.github.com/users/bwbeach/followers","following_url":"https://api.github.com/users/bwbeach/following{/other_user}","gists_url":"https://api.github.com/users/bwbeach/gists{/gist_id}","starred_url":"https://api.github.com/users/bwbeach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwbeach/subscriptions","organizations_url":"https://api.github.com/users/bwbeach/orgs","repos_url":"https://api.github.com/users/bwbeach/repos","events_url":"https://api.github.com/users/bwbeach/events{/privacy}","received_events_url":"https://api.github.com/users/bwbeach/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Backblaze/B2_Command_Line_Tool/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-03-06T17:28:15Z","updated_at":"2016-03-31T17:48:49Z","closed_at":null,"body":"We have a goal of making the B2 library and command-line tool thread safe.  Users of the library (both B2RawApi and B2Api) will want to multi-thread their applications.  And we want to multi-thread the command-line tool so that it can upload and download many files in parallel.\r\n\r\nThis issue is a place to discuss the design issues for the library."},"comment":{"url":"https://api.github.com/repos/Backblaze/B2_Command_Line_Tool/issues/comments/204049019","html_url":"https://github.com/Backblaze/B2_Command_Line_Tool/issues/78#issuecomment-204049019","issue_url":"https://api.github.com/repos/Backblaze/B2_Command_Line_Tool/issues/78","id":204049019,"user":{"login":"bwbeach","id":603739,"avatar_url":"https://avatars.githubusercontent.com/u/603739?v=3","gravatar_id":"","url":"https://api.github.com/users/bwbeach","html_url":"https://github.com/bwbeach","followers_url":"https://api.github.com/users/bwbeach/followers","following_url":"https://api.github.com/users/bwbeach/following{/other_user}","gists_url":"https://api.github.com/users/bwbeach/gists{/gist_id}","starred_url":"https://api.github.com/users/bwbeach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwbeach/subscriptions","organizations_url":"https://api.github.com/users/bwbeach/orgs","repos_url":"https://api.github.com/users/bwbeach/repos","events_url":"https://api.github.com/users/bwbeach/events{/privacy}","received_events_url":"https://api.github.com/users/bwbeach/received_events","type":"User","site_admin":false},"created_at":"2016-03-31T17:48:49Z","updated_at":"2016-03-31T17:48:49Z","body":"The question \"how much longer will it take\" is the difficult part.  I want the sync command to work on large file sets, and don't want it to have to fully compare the file lists (local and B2) before starting any transfers. \r\n\r\nHow about three progress bars in sequence, with these titles:\r\n\r\n* Step 1/3: count local files\r\n* Step 2/3: compare file lists\r\n* Step 3/3: transfer data\r\n\r\nThe first one should go fairly fast.  It won't know the total number of files, but you can watch the counter go up until it's done.  Then it will know the number of file names that need to be compared in step 2, which can have a real progress bar.  Step 2 will take a little longer because it has to fetch file lists from B2 and get the sizes of local files.  Then, when it's done comparing file lists, it can start reporting on the data transfer and know how much data will need to be transferred."}}