Opened at 2009-02-23T02:27:25Z
Last modified at 2010-11-21T20:19:15Z
#640 new enhancement
Cli fs operations refactoring — at Version 2
Reported by: | azazel | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | undecided |
Component: | code-frontend-cli | Version: | 1.3.0 |
Keywords: | cleanup | Cc: | |
Launchpad Bug: |
Description (last modified by davidsarah)
Each of the cli commands implements its own logic to do fs operations, both local-side and tahoe-side. I think that most of the command modules should be refactored to use common code. This is for many reasons among:
- remove duplication;
- code comprehensibility and normalization of behavior;
- spread availability of improvements found in latter commands (backup) to other commands;
- easier implementation of new features like non-ascii charset handling for filenames;
- better handling of logging?
The steps in order to do that (that I can see):
- Recognize the needs of each command in term of fs manipulation;
- Look at the best implementation available and eventually improve it;
- maybe design a minimal layer that will help handling alias/path/cap based operations and other cases.
Other interesting points to discuss:
- See whether a replacement of httplib with twisted can help in parallelizing and increasing the bandwidth usage.
Let's discuss it!
Change History (2)
comment:1 Changed at 2009-02-24T19:25:33Z by zooko
comment:2 Changed at 2010-03-25T02:22:21Z by davidsarah
- Description modified (diff)
- Keywords cleanup added
See whether a replacement of httplib with twisted can help in parallelizing and increasing the bandwidth usage.
That should probably be a separate ticket.
Note: See
TracTickets for help on using
tickets.
azazel: Those are good reasons! We already have reasonable test coverage for most cli commands, so after doing this refactoring it should be possible to look at the per-line code coverage output and see that the tests are thoroughly exercising the code in the new refactored version.
I don't have time to do this myself (see my blog for notes about what I'm doing), but I would happily review and accept patches that do this (once the buildbot is green).