-
Notifications
You must be signed in to change notification settings - Fork 138
Beta 3 Changes
Jens Alfke edited this page Mar 12, 2014
·
1 revision
Here's what's new in the Sync Gateway since beta 2.
This allows the Sync Gateway to serve a 'shadow' copy of a bucket. The original bucket can be managed using regular Couchbase Server APIs. If you're already using Couchbase Server and want to make some of your existing data available to mobile clients by adding the Sync Gateway, this is the recommended approach. See the Bucket Shadowing page for details.
New top-level configuration properties:
-
compressResponses
: set this tofalse
to disable GZip compression of HTTP responses, if your gateway is behind a proxy server that applies its own compression. -
maxFileDescriptors
: The maximum number of open file descriptors/sockets. The gateway callssetrlimit
at startup time to request 5000 file descriptors, but if you need more (which is likely for heavily loaded servers) you can set this property to request a higher number.
New database configuration properties:
-
shadow
: Configures bucket shadowing.
- Inspection of document channel assignments and access grants.
- If you
GET /db/_all_docs?channels=true
from the admin port, each row’svalue
will include achannels
property whose value is an array of the channels that document is in. - With
?access=true
, there’s anaccess
property whose value is a dictionary mapping user and role names to arrays of channels they’re granted access to by this document. (Role names are prefixed withrole:
.) - If you want to get info for only specific documents, you can either use
the startkey and endkey parameters, or
POST
with a JSON body that’s an array of the document ID(s).
- If you
- You can see the database's current sync function by doing a
GET /db/_config
. -
GET /_expvar
will return a (large) JSON response containing a lot of internal statistics about the gateway. We use this internally for performance testing but it could be useful to you too. See the expvars page for details.
- Support for GZip-compressed HTTP requests and responses.
- Support for running a continuous
_changes
feed using the WebSockets protocol. - In-memory caching of recently requested document bodies
- In-memory caching of recent change history
-
GET /db
no longer includes adoc_count
property. It's quite expensive to count the number of documents in a Couchbase bucket. This URL gets accessed at the beginning of every replication, so the overhead of includingdoc_count
was significant, even though it appears to be unused.