Coder Social home page Coder Social logo

ripcordsoftware / avancedb Goto Github PK

View Code? Open in Web Editor NEW
161.0 10.0 12.0 744 KB

An in-memory database based on the CouchDB REST API and containing the CouchDB Futon and Fauxton web sites

License: GNU Affero General Public License v3.0

Makefile 20.70% C++ 44.08% Shell 2.48% JavaScript 24.20% Swift 4.22% Ruby 0.26% Python 3.78% C 0.28%
couchdb pouchdb nosql memory-database rest-api c-plus-plus-11

avancedb's People

Contributors

amuino avatar chvck avatar craigminihan avatar craigvt avatar gitter-badger avatar simonstearn1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

avancedb's Issues

Implement JavaScript Map/Reduce

AvanceDB should support JavaScript Map/Reduce to the same level as CouchDB 1.6. Reducers should be limited to _stats, _count and _sum.

Improve the ScriptObject JSON response streamer

The Document/ScriptObject JSON response streamer renders the JSON to a memory buffer before dispatching to the client. The streamer should use a fixed buffer and emit serialized blocks into the buffer for writing to the client. This will substantially reduce the memory overhead for large responses.

Add support for Google Protocol Buffers

Protocol Buffers is a much more compact and low CPU overhead protocol compared to JSON. Clients could detect the presence of AvanceDB via a signature sniff or a no side effect PUT/POST and cache the support level of the remote. Alternately passing their willingness to use PB to the server via the Accept header would enable PB responses.

To get max value from this client implementers would need to support it. Should be easy to modify Cradle or Nano via a fork and PR.

Test continuous replication

Continuous repl to AvanceDB from CouchDB seems to provoke CouchDB into doing very weird stuff. Single-shot repl is 100% so continuous must be making calls to AvanceDB and getting responses it can't handle.

Correctly handle _deleted field for inbound documents

AvanceDB places no significance to the _deleted field in documents. To CouchDB these are deleted and we should follow this behaviour. The oddness comes from documents that arrive via PUT/POST with the field set, not for a DELETE REST request.

JSON parsing doesn't support Number.MIN_VALUE/MAX_VALUE

The gason JSON parser doesn't handle the JavaScript Number.MIN_VALUE or Number.MAX_VALUE constants when assigned to a field in a document.

Both these values result in invalid values, in the case of MAX_VALUE the field equates to infinity which breaks outbound JSON serialization.

SpiderMonkey runtimes are unlocked and can be modified

It is possible for map/reduce functions to modify the JS global object. This state will persist between calls and could be exploited.

Using JS_DeepFreezeObject on the global prevents new code (map/reduce) being run in the thread context since it prevents any modifications being made to the runtime.

Ideally the map function should not be able to modify the global object or alternately the global object should be reset at the end of the map/reduce pass.

Non-Ascii ids in the URI fail to pass the regex

If a document id contains non-ascii chars the regex dispatcher will fail to match resulting in a 404. CouchDB can handle UTF-8 chars in ids.

Need to understand behaviour when emitted as map keys and when sorting in all_docs.

Add tests for sequence numbers

Test should include:

  • document add
  • document update
  • document remove
  • bulk add/update

Sequence number correctness is critical for cache behaviour.

Create an selinux permission file for AvanceDB

On systems with hyperactive selinux present (RHEL/Fedora/etc) port 5994 causes a security flip out. The example case is replicating from a locally installed CouchDB instance to AvanceDB. Without a security file update the only option is to make selinux less agressive, this is a system wide change and may not be acceptable.

_bulk_docs with new_edits should return []

When a bulk docs request is made with new_edits set to false couchdb responds with []. It is not necessary to respond with a normal bulk docs response since the revs are already known.

Avance should match the couchdb behaviour.

Optimize request/response logging

Specifically:

  • re-use already known values for date/time
  • user agent string char replace
  • address type check for local/remote
  • potential overflow under high load

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.