On Fri, Aug 24, 2012 at 10:30:37AM -0400, W. Trevor King wrote:
> On Tue, Feb 28, 2012 at 07:10:42AM -0500, W. Trevor King wrote:
> > The current `be serve` provides HTTP access at the storage level (as a
> > backend for `libbe.storage.http`).  This was easy to implement but
> > means that parsing requirements are unchanged.  If there was a
> > command-level BE server, it could keep the already-parsed `BugDir` in
> > memory/swap, and only flush changes to the disk, which should be much
> > faster.
> 
> I've stubbed out a new command (serve-commands) to do this.

Because I think the command server scales a lot better than the
storage server, I'm working on getting the following working for the
1.1.0 release:

  $ be --server http://cs.bugseverywhere.org/ new "broken frobnitz"
  Created bug with ID bea/abc
  $ be --server http://cs.bugseverywhere.org/ comment bea/abc
  <Describe bug>
  $ be --server http://cs.bugseverywhere.org/ commit "bea/abc: broken frobnitz"

A recent advance (included in https://gitorious.org/~wking/be/wtk, but
not in the trunk until I get things working a bit more smoothly) is
the addition of --daemon, --pidfile, and --logfile options to all
WSGI-based commands.  This makes it easier to manage long-running BE
server instances.  However, the command server still has some issues
that need to be worked out:

  1. Some commands read from stdin, either as raw bytes or as Unicode
     (decoded by the local encoding).  However, JSON doesn't
     distinguish between binary bytes and Unicode strings.  I suppose
     we could send both the raw data encoded in base64 and the client
     encoding over the wire, but I'm not sure how to do this cleanly
     yet.  We may need to extend libbe.base.InputOutput to explicitly
     support binary (non-Unicode) interfaces.

  2. When you're committing via the command server, it's the server
     that's running the actual `git commit`.  This means we need to do
     one of

     a. We need to *force* the remote user to set --author (and
        --committer, defaulting to --author?), but only when the command
        is run via a command server.  These options don't actually exist
        for `be commit` yet, but they shouldn't be too hard to add.

     b. Require users to register (OpenID?) and use their registration
        information to set author/committer information.

     c. Throw in the towel on author information and just use a dummy
        ID on the server.

If you avoid these problems (and my server doesn't crash ;), you
should be able to test out the command interface on
cs.bugseverywhere.org.

Cheers,
Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Be-devel mailing list
Be-devel@bugseverywhere.org
http://void.printf.net/cgi-bin/mailman/listinfo/be-devel

Reply via email to