Skip to content

Commit

Permalink
Jotting some more notes for myself.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffrey Ryan Thalhammer committed Apr 21, 2012
1 parent 9364d30 commit d38d4f3
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 2 deletions.
12 changes: 10 additions & 2 deletions notes/api.txt
@@ -1,9 +1,11 @@
# API ideas...

# Finding stuff
$repos->get_stack(name => $name);
$repos->get_package(name => $name);
$repos->get_package(name => $name, version => $version);
$repos->get_distribution(path => $name);
$repos->get_package(name => $name, stack => $stack);
$repos->get_package(name => $name, version => $version); ???
$repos->get_distribution(path => $path);

# Getting dists
$repos->pull(url => $url);
Expand All @@ -18,6 +20,12 @@ $repos->unregister(distribution => $dist, stack => $stack);
$repos->pin(distribution => $dist, stack => $stack);
$repos->unpin(distribution => $dist, stack => $stack);

# Stacks
$repos->remove_stack(name => $name);
$repos->create_stack(name => $name);
$repos->copy_stack(from => $stack_a, to => $stack_b);
$repos->merge_stack(from => $stack_a, into => $stack_b);

# Misc
$repos->find(distribution => $path);
$repos->find(package => $name, version => $v);
Expand Down
25 changes: 25 additions & 0 deletions notes/errors.txt
@@ -0,0 +1,25 @@
Exception strategy...

All untrapped error messages need to go through the log so they get
transmitted to the client

Exceptions that originate from an Action do not require a stack trace.

Exception that arise due to invalid user input do not require a stack
trace.

Exceptions that are not expected (db, network, file system) do require
a stack trace.

If the log level is debug, then all errors should be recorded with a
stack trace.

Data validation strategy...

Actions should validate as much as possible during construction.

The Repository should validate arguments.

The Database & collaborators may not validate arguments.


19 changes: 19 additions & 0 deletions notes/logging.txt
@@ -0,0 +1,19 @@
Logging strategy...

Actions emits one log message at 'notice' level that describes
the overally goal of the action.

Repository emits one or two log messages at 'info' level for each major
operation. Minor operations logged at 'debug' level.

Database, cache, & collaborators always log at 'debug' level.

#----------

What is the purpose of the log???

* To record who made what modifications to the repository and when

* To help debug and diagnose operational problems

* To record operational events

0 comments on commit d38d4f3

Please sign in to comment.