couchbase-lite-core
couchbase-lite-core copied to clipboard
REST listener improvements for liteserv
This branch contains all the LiteCore enhancements & fixes needed to implement the liteserv server.
- Implemented the
_changesendpoint of the REST API, all 3 modes (normal, longpoll, continuous.) The latter two modes often have to block waiting for new changes; the implementation using Listener::Task ensures these idle connections aren't blocking a thread or locking a database, so it should be very scalable. - Implemented a new
_queryendpoint for running queries. - Lots of changes to the
_replicateendpoint:- collection support
- channel & docID filter support
- doesn't block until the replication completes (that way the client gets the session_id and can cancel it)
- simplified the
cancelAPI to take the session_id - added a C4Listener method to start a replication task
- I made a bunch of improvements to the RequestResponse class, like chunked-encoding support, and the ability to flush output to the socket before finishing the request (so long responses don't allocate a lot of memory.)
Code Coverage Results:
| Type | Percentage |
|---|---|
| branches | 66.42 |
| functions | 79.0 |
| instantiations | 33.64 |
| lines | 77.93 |
| regions | 73.76 |