Re: Adding vs replicating documents

2012-06-07 Thread Luca Matteis
ink docs.  I can't imagine how any DB could do this. > > On Thu, Jun 7, 2012 at 8:12 PM, Luca Matteis wrote: > >> Because my JSON file is generated programmatically. >> >> Ok basically I have a program that runs on my local computer that >> generates data that

Re: Adding vs replicating documents

2012-06-07 Thread Luca Matteis
Because my JSON file is generated programmatically. Ok basically I have a program that runs on my local computer that generates data that I want to insert/modify to my Couch instance. So my local data should be in synch with my cloud data... but i can't install CouchDB locally... so how do I keep

Re: Adding vs replicating documents

2012-06-07 Thread Luca Matteis
Because my JSON file is generated programmatically. Ok basically I have a program that runs on my local computer that generates data that I want to insert/modify to my Couch instance. So my local data should be in synch with my cloud data... but i can't install CouchDB locally... so how do I keep

Re: Adding vs replicating documents

2012-06-07 Thread Luca Matteis
On Fri, Jun 8, 2012 at 4:35 AM, Simon Metson wrote: > Hi, > Can't your program write to a local CouchDB instance instead of a file? Right, the thing is that I can't install CouchDB on my local computer. That's why I'm wondering if there's a simpler solution, but probably not, right?

Re: Adding vs replicating documents

2012-06-07 Thread Luca Matteis
tly using futon, not change > the original data. > > On Thu, Jun 7, 2012 at 6:35 PM, Luca Matteis wrote: > >> I have a file that contains lots of JSON documents - probably around >> 1gb of data. >> I uploaded this file to my server's Couch instance (on the cloud

Adding vs replicating documents

2012-06-07 Thread Luca Matteis
I have a file that contains lots of JSON documents - probably around 1gb of data. I uploaded this file to my server's Couch instance (on the cloud) using the Bulk API. Now I need to re-upload it because I've made some changes to the file - I've added some documents, deleted some, and edited a few.

Re: Best stack for querying spatial locations

2012-06-05 Thread Luca Matteis
On Tue, Jun 5, 2012 at 11:38 AM, Miles Fidelman wrote: > - what kinds of spatial data? He's storing something called "missions". Basically the location people have been to collect certain types of plants. So his data contains lat-lng coordinates and some other information of the mission (such as

Re: Best stack for querying spatial locations

2012-06-05 Thread Luca Matteis
On Tue, Jun 5, 2012 at 11:11 AM, Dave Cottlehuber wrote: > Not necessarily, you could easily export the 2GB file, massage it to > filter out records already stored & current in CouchDB, and then > push a _bulk_docs with the new ones. But the couch is located somewhere online. To check if the reco

Re: Best stack for querying spatial locations

2012-06-05 Thread Luca Matteis
On Tue, Jun 5, 2012 at 9:46 AM, Dave Cottlehuber wrote: > The trite answer would be to rewrite the Access DB into Couch with a nice > couchapp front end for your friend's local copy,  & then summon replication > to keep a public web version updated. This is quite hard. My friend (colleague actual

Best stack for querying spatial locations

2012-06-04 Thread Luca Matteis
Hello all, I have a scenario where I'm working with a friend of mine that maintains a bunch of spatial data in a MS Access database. I want to put this data online, as a web-site, and allow people to query it using an interface and a RESTful API. So I thought CouchDB + GeoCouch would be perfect fo

Re: Request object in validate_doc_update

2012-05-29 Thread Luca Matteis
obile Application Developer / Web Developer > > > > On Tue, May 29, 2012 at 1:40 AM, Luca Matteis wrote: > >> I know this is also solved by putting some sort of firewall before >> Couch. But these are little fixes and little things that could really >> make writing couchapps a lot better.

Re: Request object in validate_doc_update

2012-05-29 Thread Luca Matteis
r making things more clear for me. On Tue, May 29, 2012 at 8:40 AM, Luca Matteis wrote: > Yes, people could get around the voting by simply using a proxy server > or logging in from somewhere else. But the idea is that it makes it > *harder* for people to vote based on their IP address. >

Re: Request object in validate_doc_update

2012-05-28 Thread Luca Matteis
On Tue, May 29, 2012 at 8:28 AM, Jens Alfke wrote: > > On May 28, 2012, at 2:26 PM, Luca Matteis wrote: > > contained in the request), so why not give the IP address of the > request as well? This would allow the creation of even more powerful > Couchapps. > > The IP address is

Re: Request object in validate_doc_update

2012-05-28 Thread Luca Matteis
On Mon, May 28, 2012 at 11:52 PM, Paul Davis wrote: > This would be nice but not every replication request happens through > the HTTP layer. Local replications have no notion of a request so I'm > not sure what you'd put in there. What is passed as userCtx for these cases?

Re: Request object in validate_doc_update

2012-05-28 Thread Luca Matteis
t; be bypassed by a savvy user. I don't see why a validate_doc_update > function couldn't enforce this it if had access to the req object. I'm > +1. > > B. > > On 28 May 2012 16:06, Luca Matteis wrote: >> Sure. For example I'm allowing my users to vote o

Re: Request object in validate_doc_update

2012-05-28 Thread Luca Matteis
Sure. For example I'm allowing my users to vote on certain "items" in my database. This will allow me to understand the amount of satisfaction of these items. I can easily validate and make sure each user is commenting only once, however, someone might simply create a new account and re-vote for th

Request object in validate_doc_update

2012-05-25 Thread Luca Matteis
I have a scenario where I'm building a CouchApp that needs to deny certain behavior from happening based on the user's IP address. However, the request object isn't available in validate_doc_update() functions. Would it be good to consider this as a new feature to be implemented? This would enable

Re: Hierarchical comments Hacker News style

2012-05-20 Thread Luca Matteis
On Sun, May 20, 2012 at 4:10 PM, Keith Gable wrote: > Integers as strings: > > ["1", "2", "3"] > > Integers as integers: > > [1, 2, 3] Okay, but how does that help with the question at hand?

Re: Hierarchical comments Hacker News style

2012-05-20 Thread Luca Matteis
On Sun, May 20, 2012 at 6:08 AM, Jim Klo wrote: > I'm not sure I'm following the whole thread, but why are you storing integers > as strings? > > If you store them as numbers, they would collate right I think. Hi Jim, Can you provide an example?

Re: Hierarchical comments Hacker News style

2012-05-17 Thread Luca Matteis
On Thu, May 17, 2012 at 8:19 PM, Matthieu Rakotojaona wrote: > ["905"] // 905 points for post "1" > ["1","36"] // 36 points for post "1/4" > ["1","76"] // 76 points for post "1/2" > ["1","2","14"] // 14 points for post "1/2/3" > ["1","4","1"] // 1 point for post "1/4/6" Okay but the new "1/4/6" c

Re: Hierarchical comments Hacker News style

2012-05-17 Thread Luca Matteis
On Thu, May 17, 2012 at 12:44 PM, Matthieu Rakotojaona wrote: > You could emit the parent's path and the post's points, instead of the > parent's path and the post's id : you'd have something like > > ["905"] // 905 points for post "1" > ["1","36"] // 36 points for post "1/4" > ["1","76"] // 76 po

Hierarchical comments Hacker News style

2012-05-16 Thread Luca Matteis
Sorry for the repost. I was told user@ is more appropriate for this kind of question: I'm trying to implement a basic way of displaying comments in the way that Hacker News provides, using CouchDB. Not only ordered hierarchically, but also, each level of the tree should be ordered by a "points" va