summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-12-12[tests] improve doc creation on benchmarksVictor Shyba
If we create all at once we cant test higher loads because it will try to hold all in memory at the same time. Also, this code is smaller and more readable.
2016-12-12[refactor] stop using a dict for syncersVictor Shyba
A dict was used to store references for the synchronizers based on a URL. This commit removes it as it doesnt make sense with current code.
2016-12-12[tests] fall back to TestCase classesVictor Shyba
This test was using pytest, but it was making other trial based tests fail. I couldn't figure out why, but falling back to TestCase solved it.
2016-12-12[refactor] stop using leap.common.httpVictor Shyba
We aren't using leap.common.http implementation and we need specific features from original Twisted Web Agent. This commit implements it on HTTP Targer.
2016-12-12[bug] total number of documentsVictor Shyba
Parsing from metadata we can store the total of docs and handle it for the doc parser in order to be able to keep consistent events info.
2016-12-12[refactor] Issues from code reviewVictor Shyba
2016-12-12[refactor] more comments, less codeVictor Shyba
Some code were duplicated, got removed. Additional comments added for documenting such a critical and complex part as a protocol.
2016-12-12[refactor] DocStreamReceiver <- ReadBodyProtocolVictor Shyba
Both classes holds u1db error handling. Making DocStreamReceiver a subclass reduces the error handling to a single place thus removing duplicated code.
2016-12-12[bug] defer insertion to threads during downloadVictor Shyba
Insertion is synchronous and blocks the reactor. That's a temporary solution as we used to have on decpool.
2016-12-12[style] remove unused imports (pep8)Victor Shyba
2016-12-12[test] fix test and remove leftovers defer_encryptionVictor Shyba
2016-12-12[bug] fix importKali Kaneko
2016-12-12[bug] remove print debug statementsKali Kaneko
2016-12-12[style] pep8Kali Kaneko
2016-12-12[bug] fix bad merge in imports blockKali Kaneko
2016-12-12[refactor] remove lingering refs to syncdbKali Kaneko
2016-12-12[refactor] remove legacy crypto implementationKali Kaneko
2016-12-12[tests] adapt testsKali Kaneko
2016-12-12[refactor] remove encdecpool, finallyKali Kaneko
2016-12-12[bug] fix wrong content parsingKali Kaneko
2016-12-12[refactor] add SoledadCrypto interfaceKali Kaneko
2016-12-12[refactor] adapt fetcher to decryptorKali Kaneko
2016-12-12[feature] blob encryptor / decryptorKali Kaneko
2016-12-12[refactor] remove encryption poolKali Kaneko
2016-12-12[feature] streaming crypto implementationKali Kaneko
2016-12-12[feature] batch based on payload sizeVictor Shyba
batch is slower than usual insert for a single doc, so, if a document exceeds the buffer, commit the batch (if any) and put the huge load by traditional insert. refactor coming.
2016-12-12[feature] fix and enable batchVictor Shyba
Batching is now decided by server, this commits enables it.
2016-12-12[feature] stream content in a separate lineVictor Shyba
This allow different paths for raw data and metadata, avoiding unnecessary json parsing.
2016-12-12[bug] handle 400Victor Shyba
There was an if without an else on error handler that avoided handling errors that falled back current logic. Added a generic one to the tail so we dont miss it.
2016-12-12[feature] make the test accept large uploadsVictor Shyba
We enabled chunking, which means that a use can upload his entire db on a single request. This commit makes server enable this and throttle download as Twisted cant control the payload producer code as its synchronous and blocking code.
2016-12-12[feature] upload streamingVictor Shyba
1) enable HTTP 1.1 chunked upload on server 2) make the client sync.py generate a list of function calls instead of a list of full docs 3) disable encryption pool 4) make the doc encryption a list of function calls 5) create a twisted protocol for sending 6) make a producer that calls the doc generation as necessary
2016-12-12[feature] streaming download protocolVictor Shyba
This commit finishes reversion into u1db original streaming protocol for downloads.
2016-12-12[refactor] remove decpoolVictor Shyba
It's not being used
2016-12-12[feature] make reading attachments optionalVictor Shyba
Will put a file object on doc json string if read_content is False, otherwise it will fetch and fill as usual. This is useful for improving server througput on sync download stream by receiving a bulk-get without attachments and consume the file-objects as they come.
2016-12-12[bug] use an empty string to represent tumbstonesVictor Shyba
If a doc doesnt have a content it means it was deleted. Sync stream was unable to represent this state.
2016-12-12[test] commit isnt part of the backend apiVictor Shyba
Check if the backend provides a commit method before calling or we will break the tests with InMemoryDatabase
2016-12-12[feature] simple adaptation to let the client runVictor Shyba
Make the client parse a 2-line doc on sync download stream.
2016-12-12[feature] server download stream from file objectVictor Shyba
couchdb lib returns a file object representing the attachment. This commit dumps the read() call into the wsgi write() call. Doc representation uses 2 lines also, separating metadata from content.
2016-12-12[bug] disable decpoolVictor Shyba
Temporary fix for server streaming
2016-12-12[feature] use transactions on syncVictor Shyba
We were using 1 transaction per doc, which is bad. Reference: http://stackoverflow.com/questions/1711631/improve-insert-per-second-performance-of-sqlite Code now uses 1 transaction for the whole sync.
2016-12-12[feature] get attachments as generator runsVictor Shyba
Instead of getting the attachments as the generator runs, get_docs will now get as needed. Also, deepcopy solves a memory issue where we were feeding the couchdb lib view with blobs while modifying it unintentionally.
2016-12-12[feature] revert sync download into straming (server)Victor Shyba
Instead of concurrent download, we are going to download a stream. This commit modifies server to support it.
2016-11-27Merge tag '0.9.1' into developdrebs
Tag version 0.9.1
2016-11-27Merge tag '0.9.1'drebs
Tag version 0.9.1 # gpg: Signature made Sun 27 Nov 2016 12:01:10 PM BRST # gpg: using RSA key 0x6071E70DCACC60B2 # gpg: a verificar a base de dados de confiança # gpg: public key of ultimately trusted key 0x030F1C082D2327BE not found # gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model # gpg: depth: 0 valid: 11 signed: 71 trust: 0-, 0q, 0n, 0m, 0f, 11u # gpg: depth: 1 valid: 71 signed: 64 trust: 69-, 0q, 0n, 0m, 2f, 0u # gpg: depth: 2 valid: 55 signed: 74 trust: 55-, 0q, 0n, 0m, 0f, 0u # gpg: proxima verificação da base de dados de confiança a 2016-12-12 # gpg: Good signature from "drebs (work key) <db@leap.se>" [ultimate] # gpg: aka "drebs (work key) <drebs@leap.se>" [ultimate] # Impressão da chave primária: 9F73 295B 6306 E06F 3151 99AE 6071 E70D CACC 60B2
2016-11-27[pkg] update changelog0.9.1drebs
2016-11-27[bug] fix import on create-user-dbVictor Shyba
2016-11-27[bug] patch twisted logger so it works with twistd --syslogdrebs
2016-11-27[bug] delay couch state initializationdrebs
The couch state checks if all user databases have the correct schema version on initialization, and may log errors and raise exceptions if that is not the case. Because we are currently using `twistd web --wsgi`, if those errors are logged too early the reactor may have not been started and the twistd logging facilities may not have been initialized. This commit delays the state initialization until the reactor has been started, to make sure any errors raised and logged in that stage will actually reach the logfile.
2016-11-22[feat] improve missing couch config doc error loggingdrebs
2016-11-22[refactor] separate server application into another filedrebs
Conflicts: server/src/leap/soledad/server/__init__.py testing/tests/conftest.py