Commit Graph

27 Commits

Author SHA1 Message Date
Brad Fitzpatrick 03ceecd9a5 Fix App Engine build.
Change-Id: I6b97b9899515a8481f343ea8ea842baf6bcdbbd7
2013-12-25 10:05:18 -08:00
Brad Fitzpatrick 76171ddb3d Change sorted.KeyValue.Find to take an optional end bound; add tests.
The new package sorted/kvtest provides a generic KeyValue test for all
implementations. Memory, SQLite, and kvfile now use it.

This speeds up the index slurping start-up of my personal Camlistore
server from 30 seconds (when it was doing 17,000+ queries in small
windows) to now just 5 seconds. That 5 seconds can be improved yet
further.

Change-Id: Idd55ba9ccd3ed12a26868a41db1af676aff7b67b
2013-12-07 08:43:18 -08:00
Brad Fitzpatrick 11a1745034 Add KeyBytes and ValueBytes accessor to sorted.KeyValue.Iterator.
Goal is to iterate faster (notably: for slurping the index to the in-memory
corpus on start-up), by doing fewer copies and generating less garbage.

Change-Id: I054b0de2b994eb1f2356aa8587a466bafeb6cf82
2013-12-04 14:18:52 +01:00
Brad Fitzpatrick b82b8efe4c Start of new context package and *context.Context type.
Will eventually be plumbed through lots of APIs, especially those requiring or benefiting from
cancelation notification and/or those needing access to the HTTP context (e.g. App Engine).

Change-Id: I591496725d620126e09d49eb07cade7707c7fc64
2013-12-02 13:20:51 -08:00
Brad Fitzpatrick 1f407edd58 sorted: add Close method to KeyValure; register 'kv' impl type for cznic/kv
Change-Id: Ie4e21450dac9dad3433c65631706f52527502cbc
2013-11-23 21:07:03 -08:00
Brad Fitzpatrick 90c1e48afe Rename index.Storage to sorted.KeyValue and move it into a new package.
Having index.Index and index.Storage both in the same package led to
confusing discussions about "an index". Better names now, and smaller
packages.
2013-11-22 23:24:54 -08:00
Brad Fitzpatrick 70475701d1 Get rid of QueueCreator and all its associated complexity.
Previous TODO entry was:

-- Get rid of QueueCreator entirely. Plan:
     -- sync handler still has a source and dest (one pair) but
        instead of calling CreateQueue on the source, it instead
        has an index.Storage (configured via a RequiredObject
        so it can be a kvfile, leveldb, mysql, postgres etc)
     -- make all the index.Storage types be instantiable
        from a jsonconfig Object, perhaps with constructors keyed
        on a "type" field.
     -- make sync handler support blobserver.Receiver (or StatReceiver)
        like indexes, so it can receive blobs.  but all it needs to
        do to acknowledge the ReceiveBlob is write and flush to its
        index.Storage. the syncing is async by default. (otherwise callers
        could just use "replica" if they wanted sync replication).
        But maybe for ease of configuration switching, we could also
        support a sync mode.  when it needs to replicate a blob,
        it uses the source.
     -- future option: sync mirror to an alternate path on ReceiveBlob
        that can delete. e.g. you're uploading to s3 and google,
        but don't want to upload to both at once, so you use the localdisk
        as a buffer to spread out your upstream bandwidth.
     -- end result: no more hardlinks or queue creator.

Change-Id: I6244fc4f3a655f08470ae3160502659399f468ed
2013-11-22 14:33:31 -08:00
Brad Fitzpatrick 128f56887b Handle GET and HEAD the same in more (all?) places.
Change-Id: I486a95f0a6fc127d17dcf0abeb94eab292980156
2013-09-15 20:12:26 +01:00
Brad Fitzpatrick ca64e4f508 camlistored: on SIGINT, shut down cleanly, closing the kvfile index db
Change-Id: Ifcb8c22b088586bc72ad98dacc3be2d46e77928b
2013-08-26 21:07:28 -05:00
Brad Fitzpatrick ae20a0f7de Ditch App Engine ContextWrapper noise; add test that App Engine always compiles.
I had broken App Engine in my previous commit, since it wasn't part of 'make presubmit'

Change-Id: I32c25efbc7c348ff516128c87b6e817ae0685386
2013-08-21 18:51:10 -05:00
Brad Fitzpatrick b24cad68dd Cleanup: remove BlobHub and time.Duration waits from storage interface
Move up a layer to the HTTP.  Also, start to remove ContextWrapper
stuff.  We've done it differently for App Engine instead, and will do
it differently yet moving forward.

Also add blobserver.Receive and use it in most places, moving checksum
verification up a layer.

Bunch of other cleanup and TODO fixing too.

Much simpler and cleaner.

Change-Id: I12e56c5d4e53bfcf82bdd8fb0b6d57c248ff605c
2013-08-21 13:57:28 -07:00
mpl a41c89a24e devcam appengine: replaces ./dev-appengine
Change-Id: Ic4adcb8898fc3ead801aefd679682bcc646f3573
2013-08-20 00:10:01 +02:00
mpl f66077e48b appengine: more fixes
-added status handler to the config
-made pkg/jsonconfig/eval.go use the relative path
for the config file, since appengine does not like
absolute paths.

Change-Id: If9d275e308ae60e15ecd9c831e22fa6301de0be6
2013-08-11 21:17:05 +02:00
Brad Fitzpatrick 0bdf20884b all: delete pkg/blobref; convert all from *blobref.BlobRef to new blob.Ref
Change-Id: Id2dfb7f19452bedf4f3c9310b36227fd8117b225
2013-08-03 19:54:30 -07:00
Brad Fitzpatrick ca58d8e2e0 Remove noisy var _ = log.Printf lines.
Change-Id: Ia58b8ef5f271f542ae4fe61c7fb1497322770322
2013-06-14 12:55:55 -07:00
Brad Fitzpatrick 2bc2ba019a Rearrange the server directory a bit, and update some READMEs
Change-Id: If0cb7b07d3b7a4c7e2c714807858d3b79d06b188
2013-02-02 08:56:57 -08:00
Brett Slatkin cba9c3638e Removes the old busted GAE/Java sigserver code
Change-Id: I6f339d3e9770dd38a51b359e6011d0ab94eafcf2
2011-12-04 13:13:59 -08:00
Brad Fitzpatrick 73587e6085 Rename the blobserver 'preupload' method to 'stat'
This is prep for more additions to stat.
2011-02-08 08:24:16 -08:00
Brad Fitzpatrick ba48b63543 Enumerate spec was inconsistent; fix it. 2011-02-03 17:06:01 -08:00
Brad Fitzpatrick 3bcba74f41 Fix copyright lines.
Put this under Google's copyright, not our personal ones.
2011-01-27 23:03:57 -08:00
Brett Slatkin b909bc32c3 Attempt at writing a camli object signing/verify server for app engine (in java); foiled by security manager restrictions preventing bouncycastle from working in App Engine 2011-01-22 17:02:27 -08:00
Brett Slatkin 2521ed5f9e move app engine blobserver into its own directory 2011-01-21 12:51:44 -08:00
Brad Fitzpatrick 791e9ed503 Some debug stuff. 2011-01-13 10:00:35 -08:00
Brad Fitzpatrick 3e001663af Add a static dir to AppEngine config; stop forcing https for now. 2011-01-13 09:58:27 -08:00
Brad Fitzpatrick b4654b132f Location header must be str, not unicode. 2010-12-16 18:54:36 -08:00
Brad Fitzpatrick a0a7358f19 Use a 303 redirect, not a 302, so subseqent requests are GETs. 2010-12-16 11:13:29 -08:00
Brad Fitzpatrick e22001dd4b rename blobserver to server 2010-11-14 19:28:13 -08:00