Giter VIP home page Giter VIP logo

catbox-mongodb's People

Contributors

arb avatar cjihrig avatar geek avatar itereshchenkov avatar jardakotesovec avatar lloydbenson avatar marcuspoehls avatar mkg20001 avatar nvcexploder avatar pavelpolyakov avatar simon-p-r avatar

Stargazers

 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

catbox-mongodb's Issues

Version 3.0.0

On npm the latest version is 3.0.0, however package.json is set 2.0.0.

Module not found in version 1.1.1

Hi, for some reason I'm getting Error: Cannot find module 'catbox-mongodb' in version 1.1.1, everything works normally in version 1.1.0

I'm using node 4.1.1 and npm 3.3.6

I tried require('node_modules/catbox-mongodb/lib') and it worked.

here's my output

> require('catbox-mongodb')
Error: Cannot find module 'catbox-mongodb'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at repl:1:1
    at REPLServer.defaultEval (repl.js:164:27)
    at bound (domain.js:250:14)
    at REPLServer.runBound [as eval] (domain.js:263:12)
    at REPLServer.<anonymous> (repl.js:393:12)
    at emitOne (events.js:82:20)
> require('./node_modules/catbox-mongodb/lib')
{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version
[Function]

Thank you

slaveOk=false - hot to overcome?

Hi,

Currently I'm trying to configure the catbox-mongodb cache to interact with my mongodb cluster.

Unfortunately, I have the next error:
image

Could anyone say to me how could I overcome it?

Regards,

Looking for new maintainer

Unfortunately I don't have use case for using mongoDB anymore, so I have not been using actively this module for some time.

Therefore I believe that it would be better to pass maintainer position to someone, who uses this module in production and is more aware whats going on in MongoDB world.

Great candidate would be someone who already made some contribution to this module or some other catbox adapter.

All info about maintaining hapi modules is concentrated here: https://github.com/hapijs/contrib

Updates/Examples for Hapi v18?

For hapi v18 I had to use some different config

const Hapi = require('hapi')
const CatboxMongoDB = require('catbox-mongodb')
 
const server = new Hapi.Server({
    cache : [{
        name      : 'mongoDbCache',
        provider: {
          constructor: CatboxMongoDB,
          options: {
            uri       : 'your-mongodb-uri', // Defaults to 'mongodb://127.0.0.1:27017/?maxPoolSize=5' if not provided
            partition : 'cache'
          }
        }
    }]
});

concurrent write to the db

Hi,

Copying the issue from here:
hapijs/yar#73 (comment)

@Selvatico

Hello to all,

So problem is next - we have several workers in cluster. 2 of them receive requests almost at the same time - each of them read session storage (MongoDB in our case). In parallel they are finishing their work and save all values of from session

request.session._store

to cache storage. And one of them override value of another, because both of them doesn't see changes of another and dump all data to storage. I'm wondering if exist some technics to avoid such behavior using yar ? Because from my point of view - we should implement in yar some atomic updates, but it should be implemented in catbox adapters too, which requires too much changes in core of Hapi.

Any thoughts?

Regards,

double colon in host identifier

after setting this values
uri: mongodb://username:[email protected]:3000
partition: database-name

with the intention of having as result this string connection
mongodb://username:[email protected]:3000/database-name

after string uri replace, the string connection result is
mongodb://username:dataBAsePassw0rd/database-name

throwing a ´double colon in host identifier´ error at connection time

2.0.0 Release Notes

Summary

catbox-mongodb 2.0.0 is updated to newer mongodb 2.0.0 library. Connection parameters are now expressed via connection string, which provides more flexibility.

Thanks to @PavelPolyakov for PR.

Upgrade time: low
Complexity: low
Risk: high, if you are not using default connection settings, you have to update to uri format otherwise it will throw

Changes

Connection parameters are now expressed as mongodb uri with exception of database name (partition in catbox terminology), which has to be passed separately as its convention in catbox.

Example:

{
  host: '192.168.1.1',
  port: 22233,
  user: 'admin',
  password: '12345',
  poolSize: 5,
  partition: 'cache'
}

has to be changed to

{
  uri: 'mongodb://admin:[email protected]:22233/?maxPoolSize=5',
  partition: 'cache'
}

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.