-
Notifications
You must be signed in to change notification settings - Fork 94
Refactorings
This is an informal page at the moment, just a list of things that can be improved.
There is a currently some copy-paste-edit code shared between Riak CS and Stanchion. This is starting to become a maintenance nightmare. I (Reid) have tried three approaches to (quickly) rectify this, but it's become clear that it is not a trivial task. I think creating a separate Riak CS Core repo is the way to go, but there is not yet a clear list of modules that should go there. The basic (though still evolving) idea of the code breakdown might be something like this:
Riak CS Core:
Library code for large files, ACLs and auth. The functions/fsms/servers will explicitly take Riak pids, so each application (RCS & Stanchion) will maintain their own poolboy pools. It would be nice (though perhaps not possible) if this code did not assume an s3 API, but just large file storage on Riak in general.
Riak CS:
- Riak CS supervisor structure
- poolboy pools
- s3 webmachine modules
- (maybe) stanchion client? (or would this go in stanchion repo, or it's own client repo?)
Stanchion:
- Stanchion supervisor structure
- poolboy pools
- stanchion webmachine code
- (maybe) stanchion client? (or would this go in stanchion repo, or it's own client repo?)
Compared to the GC Daemon FSM, some of the other FSMs are a bit hard to follow, and have functions that are far too large.