Re: CommonJS in views (aka OpenPGP inside a map function)

2012-07-02 Thread Alexander Shorin
> Is there some way to debug 'requires'? There's no real error other that > someobject.someexportedfunction doesn't exist. > Hence I'm not able to figure out what's wrong with the library since I needed > to 'hack' it a bit to export the objects I needed access. You could explore ddoc(for views

Re: CommonJS in views (aka OpenPGP inside a map function)

2012-07-02 Thread Jim Klo
I think I must have had a typo or something... the example now works... now going to something more sophisticated... (too big for here...) but I think i've tracked it down to a bug in one of my other modules... https://github.com/jimklo/TheCollector/blob/master/dataservices/thecollector-resourc

Re: CommonJS in views

2012-07-02 Thread Alexander Shorin
Hi! Your case works for me for 1.2.0 release and 1.3.0@master. What result you got? -- ,,,^..^,,, On Tue, Jul 3, 2012 at 5:38 AM, Jim Klo wrote: > Hi, > > I have a question regarding CommonJS within views.. > > Should this work, or is it a bug that it doesn't? Using CouchDB 1.2.0 > > { > _id:

CommonJS in views

2012-07-02 Thread Jim Klo
Hi, I have a question regarding CommonJS within views.. Should this work, or is it a bug that it doesn't? Using CouchDB 1.2.0 { _id: "_design/commonjs-test", views: { lib: { include1: "var include2 = require('views/lib/include2'); exports.foo1 = include2.foo2;", include2: "exports.foo2 = 42"

Re: Map/reduce problem

2012-07-02 Thread Matthieu Rakotojaona
On Mon, Jul 2, 2012 at 11:12 PM, João Ramos wrote: > Now my problem is that I also want to filter by date, for example You actually want 2 unrelated ways of querying your data; the only thing I can see is that you use 2 different views, one for each of your query. -- Matthieu RAKOTOJAONA

Re: Map/reduce problem

2012-07-02 Thread Mark Hahn
I personally store dates by standard ms number and take the trouble to figure out the startkey and endkey. Standard date functions can easily let you pick a particular year, mon, day, or any other range. On Mon, Jul 2, 2012 at 2:12 PM, João Ramos wrote : > Hi, > > I have a map function that emi

Map/reduce problem

2012-07-02 Thread João Ramos
Hi, I have a map function that emits these keys: [doc.type, 2012, 2, 14] [doc.type, 2012, 2, 14] [doc.type, 2012, 4, 22] [doc.type, 2012, 5, 23] This works great because I can get exactly what I want (ajusting the group_level accordingly): for each doc type, how many exist each da

Re: Couchbase Mobile to CouchDB on AWS - Looking for instance sizing advice.

2012-07-02 Thread Douglas Turner
When testing I have noticed IrisCouch to be slower, but the micro EC2 instance really isn't experiencing a real load either. Could be any number of factors such as PHP EC2 to Couch EC2 micro vs PHP EC2 to IrisCouch. Internal network vs external. A programmer I know with pretty extensive server

Re: Couchbase Mobile to CouchDB on AWS - Looking for instance sizing advice.

2012-07-02 Thread Robert Newson
I'd love to hear if IrisCouch is slower an a micro EC2 instance, I'd be astonished. Using a micro for anything serious, like a production database, is "penny wise, pound foolish" imo. B. On 2 Jul 2012, at 18:28, Douglas Turner wrote: > Hello > Let's see if I can articulate this sufficiently.

Re: Couchbase Mobile to CouchDB on AWS - Looking for instance sizing advice.

2012-07-02 Thread Gabriel Mancini
Hi Douglas, You can create a doc Json on _replicator base, and when the couchdb server restart he will survive... []s On Mon, Jul 2, 2012 at 3:51 PM, Douglas Turner wrote: > Hi Octavian > There are two halves to the cronjob. First is finding any new databases > that have been created on Se

Re: Couchbase Mobile to CouchDB on AWS - Looking for instance sizing advice.

2012-07-02 Thread Douglas Turner
Hi Octavian There are two halves to the cronjob. First is finding any new databases that have been created on Server A, creating them on Server B then starting replication. Second, send a replication continuous = true for existing databases.This covers server changes/moves, new databases, miss

Re: Couchbase Mobile to CouchDB on AWS - Looking for instance sizing advice.

2012-07-02 Thread Octavian Damiean
Hello Douglas, Is there a special reason for using a cron job to continously sync between the two remote databases? CouchDB offers continous replication already. Cheers, Octavian Damiean On Mon, Jul 2, 2012 at 7:28 PM, Douglas Turner wrote: > Hello > Let's see if I can articulate this sufficien

Couchbase Mobile to CouchDB on AWS - Looking for instance sizing advice.

2012-07-02 Thread Douglas Turner
Hello Let's see if I can articulate this sufficiently. Some background: I am a one person shop, I wear all the hats and I have been learning everything as I go for the last 18-20 months, so I am still a bit of a noob. I have an iOS app created in Titanium using Pegli's ti_couchbase module. I

Re: Strange behaviour of update_notification process

2012-07-02 Thread Robert Newson
This could be a bug, could you report it our jira at issues.apache.org/jira/browse/COUCHDB? It appears to be down right now, le sigh, but should be back soon. B. On 2 Jul 2012, at 14:27, Antonino Murador wrote: > Hi, > I notice a behaviour of the update_notification process that I cannot > un

Strange behaviour of update_notification process

2012-07-02 Thread Antonino Murador
Hi, I notice a behaviour of the update_notification process that I cannot understand. I setup CouchDB to send update notifications to an external process in my local.d/example.ini: [update_notification] example = /usr/local/bin/example.py The script example.py keeps reading lines from stdin and s