Coder Social home page Coder Social logo

couch-daemon's Introduction

jo

jo logo

This is jo, a small utility to create JSON objects

$ jo -p name=jo n=17 parser=false
{
    "name": "jo",
    "n": 17,
    "parser": false
}

or arrays

$ seq 1 10 | jo -a
[1,2,3,4,5,6,7,8,9,10]

It has a manual, and you can read why I wrote jo.

Build from Release tarball

To build from a release you will need a C compiler to install from a source tarball which you download from the Releases page.

tar xvzf jo-1.3.tar.gz
cd jo-1.3
autoreconf -i
./configure
make check
make install

Build from Github

Build Status

To install from the repository, you will need a C compiler as well as a relatively recent version of automake and autoconf.

git clone git://github.com/jpmens/jo.git
cd jo
autoreconf -i
./configure
make check
make install

Install

Homebrew

brew install jo

Ubuntu

apt-get install jo

Gentoo

emerge jo

Snap

Thanks to Roger Light, jo is available as a snap package. Use snap install jo from a Linux distro that supports snaps.

Windows

scoop install jo

Others

See also

Credits

couch-daemon's People

Contributors

ejeklint avatar jo avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

couch-daemon's Issues

Each db update triggers two changes events

Each update of a doc in a "followed" db creates two changes events which is a bummer. I guess this because the db first gets pushed to the dbs stream when daemon starts, and then again every time a 'changes' event is fired for that db.

I've tried to read code and figure out exactly what happens but it's difficult to follow the flow in all these streams and callbacks, so I need help figuring out the proper solution.

Stream API

The daemon should provide init, changes, configure and checkpoint streams, which can be chained to build a daemon instance.

ignore 'compacted' events and others

https://github.com/jo/couch-daemon/blob/master/lib/dbs.js#L77 should be changed:

        if (change.type === 'deleted' || change.type === 'created')
          push(null, _.extend({ stream: 'dbs' }, change));

The change avoids unneccesary pushes.

We are running into serious problems with the following scenario: When a user logs in the first time, we create a user specific couch db and insert some design documents to that db. this is realized via a seperate node process with nano.

In this case, the couch-daemon (we use couchmagick) gets a massive bulk of events (creation of new db, updates for several design documents, etc.). I don't know why, but then the new db is not watched by couch-daemon, if if the dbs name is covered by the whitelist (/.*/ on our case).

Applying the above patch avoids the problem. I created a pull request: #17

Update nano

  1. Waiting for a follow release.
  2. Then I'll update follow on nano.
  3. Wait for nano release.
  4. Update nano here.
  5. Use nano's follow.
  6. Remove the follow dependency.

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.