Re: FolderDB - advice wanted

2019-07-22 Thread Joel Wallis Jucá
Hello Rene,

Have you ever tried YAML? If you're planning to manage the data manually
through a text editor, YAML will provide a DX (Developer Experience) way
better than JSON. It works great for simple websites (Jekyll uses something
similar, called Data Files <https://jekyllrb.com/docs/datafiles/>).

Em dom, 21 de jul de 2019 às 18:00, Martin Broerse 
escreveu:

> Hi Rene,
>
> I actually don't see what you want advice on but I can say 2 things about
> it.
>
>- Use CouchDB with keys like
>`rss_2_-MM-DD-hh-mm-ss-CATEGORY_SUBMENU_PATH` or
> `rss_2_CATEGORY_SUBMENU_PATH--MM-DD-hh-mm-ss` depending on what you
>want to find with mango queries and use as value your JSON data in a
> `data
>`root key. like this
>
> https://my.couchcluster.com/bloggr/post_2_9F4D597F-037B-0037-8F64-917B1DDBA611
>to be able to switch to relational-pouch
><https://github.com/pouchdb-community/relational-pouch> later.
>- Use a MIT, Apache or similar License but not GPL or LGPL if you want
>companies to use it. We have a policy at our company not to use and
> invest
>in GPL licensed code.
>
> Play with Mango queries direct from Fauxton to see the advantage of using
> rss_2_ like this
>
> ```
> {
>"selector": {
>   "data": {
>  "key1": "s|string"
>   },
>   "_id": {
>  "$gt": "rss_2_",
>  "$lt": "rss_3"
>   }
>}
> }
>
> ```
>
> - Martin
>
> On Sun, 21 Jul 2019 at 18:50, Rene Veerman 
> wrote:
>
> > Hi.
> >
> > I like JSON a lot better than the SQL data model,
> > but now that i've been using it for a few years,
> > i find myself combining file system storage of lots of JSON files in many
> > sub-folders into a web app,
> > like news gathering with commandline PHP per N minutes from 280+ RSS
> online
> > sources,
> > into a PHP web-app that loads the latest news, via a web-powered PHP
> > filesystem search of the latest new-items JSON files, stored on a
> > filesystem thats got folders like
> > .//MM/DD/hh/mm/ss/CATEGORY_SUBMENU_PATH leading to JSON files.
> >
> > so now i want something more flexible. something that can give me a
> > web-based treeview of data spanning many JSON-like files (in more
> > complicated ways than my news app) and even into other file formats
> stored
> > somewhere on the filesystem of some server.
> >
> > i plan to license this right from the start under a LGPL typed license,
> > because i believe input from other developers is key to making a DB
> system
> > that is not only easy to use, but also very efficient to run.
> >
> > i'd like the code to stay pure PHP, not even using the object oriented
> > functionality of PHP, just plain properly named functions and their
> return
> > values.
> >
> > i'll name this DB architecture FolderDB, and to prevent web-apps from
> > forcing the server to reload (and decode!) many .jsone files upon a
> simple
> > request to change something in some referenced .jsone file, i plan to
> run a
> > single PHP server daemon that will respond to a yet to be written
> > ASCII/UNICODE protocol.
> >
> > the file format itself, has to differ from JSON somewhat i think, and i
> > also believe we can lose some of the overhead.
> > i post this all here to hear your opinion, especially when it points to
> > insurmountable problems related to my designs.
> >
> > i'm also interested to learn about how to add cloud redundancy to this DB
> > architecture, preferably with tiered backup servers, or at least be
> > prepared for such expansions of the DB architecture later on.
> >
> > here's the string based format that i came up with so far :
> >
> > JSON-Extended file format (ASCII / UNICODE)
> >
> > --
> > {
> > key1 : s|string value,
> > key2 : 2,
> > key3 : 3.4,
> > key4a : t,
> > key4b : f,
> > key5 : [
> > numbered array
> > ],
> > key6 : {
> > named array
> > },
> > key7 : url|/siteData/bla/bla/file.jsone,
> > key8 : key|key7/someKeyInsideFileBehindURLofKey7_key1/key1a,
> > key9 :
> >
> >
> url|/siteMedia/backgrounds/someFile.png||thumb|/siteMedia/backgrounds/thumbs/someFile.png,
> > key10 :
> >
> >
> url|/siteData/bla2/bla2a/file.odt||thumb|/siteData/bla2/bla2a/file.odt.thumb.png||thumbGenerator|URL
> > }
> > --
> >
> > key4a = true
> > key4b = false
> >
> > key1 would need it's value escaped, using \| and \,
> >
>


-- 
Joel Wallis Jucá
about.me/joelwallis


Fwd: Warning from user@couchdb.apache.org

2019-03-09 Thread Joel Wallis Jucá
Hi,

Any Gmail user here having issues with ezmlm (seems to be the program
behind user@couchdb.apache.org)? I got two emails like the one below this
month, complaining that messages have been bouncing on my inbox. I'm not
sure how to check that, nor how to solve it.

Suggestions?

-- Forwarded message -
From: 
Date: sáb, 9 de mar de 2019 às 15:51
Subject: Warning from user@couchdb.apache.org
To: 


Hi! This is the ezmlm program. I'm managing the
user@couchdb.apache.org mailing list.

I'm working for my owner, who can be reached
at user-ow...@couchdb.apache.org.


Messages to you from the user mailing list seem to
have been bouncing. I've attached a copy of the first bounce
message I received.

If this message bounces too, I will send you a probe. If the probe bounces,
I will remove your address from the user mailing list,
without further notice.


I've kept a list of which messages from the user mailing list have
bounced from your address.

Copies of these messages may be in the archive.
To retrieve a set of messages 123-145 (a maximum of 100 per request),
send a short message to:
   

To receive a subject and author list for the last 100 or so messages,
send a short message to:
   

Here are the message numbers:

   31814
   31813

--- Enclosed is a copy of the bounce message I received.

Return-Path: <>
Received: (qmail 90739 invoked for bounce); 27 Feb 2019 10:19:21 -
Date: 27 Feb 2019 10:19:21 -
From: mailer-dae...@apache.org
To: user-return-318...@couchdb.apache.org
Subject: failure notice



-- 
Joel Wallis Jucá
about.me/joelwallis


Re: CouchDB sync error net::ERR_CONNECTION_RESET

2017-11-29 Thread Joel Wallis Jucá
   PouchNotesObj.prototype.syncnoteset = function (start, end) {
> > >>>>   var start = new Date().getTime();
> > >>>>   document.getElementById("syncbutton").innerHTML =
> "Syncing...";
> > >>>>
> > >>>>   var i,
> > >>>>   that = this,
> > >>>>
> > >>>>   options = {
> > >>>>   doc_ids:['1450853987668']
> > >>>> };
> > >>>>
> > >>>>
> > >>>>   //options.include_docs = true;
> > >>>>
> > >>>>   if(start){ options.startkey = start; }
> > >>>>   if(end){ options.endkey = end; }
> > >>>>
> > >>>>   PouchDB.sync(this.dbname, this.remote, { retry: true })
> > >>>>   //this.pdb.sync(this.remote, { doc_id:['1450853987668'] })
> > >>>>   .on('change', function (info) {
> > >>>>  console.log('change');
> > >>>>   document.getElementById("syncbutton").innerHTML = "Sync Notes";
> > >>>>   }).on('paused', function () {
> > >>>>  console.log('replication paused (e.g. user went offline)');
> > >>>>   document.getElementById("syncbutton").innerHTML = "Sync Notes";
> > >>>>   }).on('active', function () {
> > >>>>  console.log('replicate resumed (e.g. user went back
> > online)');
> > >>>>   document.getElementById("syncbutton").innerHTML = "Sync Notes";
> > >>>>   }).on('denied', function (info) {
> > >>>>  console.log('a document failed to replicate, e.g. due to
> > >>>> permissions');
> > >>>>   document.getElementById("syncbutton").innerHTML = "Sync Notes";
> > >>>>   }).on('complete', function (info) {
> > >>>> console.log("Sync Complete");
> > >>>> document.getElementById("syncbutton").innerHTML = "Sync
> > >>> Notes";
> > >>>> that.viewnoteset();
> > >>>> that.formobject.reset();
> > >>>> that.show(that.formobject.dataset.show);
> > >>>> that.hide(that.formobject.dataset.hide);
> > >>>> var end = new Date().getTime();
> > >>>> console.log("Time Taken - " + (end - start) + " ms");
> > >>>>   }).on('error', function (error) {
> > >>>> console.log("Sync Error:" + JSON.stringify(error));
> > >>>> alert("Sync Error:" + error);
> > >>>> that.showerror(error);
> > >>>>   });
> > >>>>
> > >>>>   }
> > >>>>
> > >>>> Any idea what is causing the connection to reset?
> > >>>>
> > >>>>
> > >>>> Regards,
> > >>>>
> > >>>> *Yvonne Aburrow*
> > >>>> Applications Developer
> > >>>> Information Systems Team
> > >>>> *IT Services <http://www.brookes.ac.uk/obis/>*
> > >>>> Oxford Brookes University <http://www.brookes.ac.uk/>
> > >>>>
> > >>>> extn 2706
> > >>>
> > >>>
> > >>
> >
> >
>



-- 
Joel Wallis Jucá
about.me/joelwallis


Re: Custom Collation

2017-09-02 Thread Joel Wallis Jucá
Should you create a custom index based on each character ASCII code? You
could use String#charCodeAt() to get each one's code and build a custom
index

Joel Wallis Jucá
joelwallis.com

Em 2 de set de 2017 12:40 PM, "Cliff Stanford" <cl...@may.be> escreveu:

> I have an interesting problem and I'm not sure how to solve it.
>
> I am using a language where the sort order for the alphabet is:
>
> A B D E F G H I J K L M N O P R S Š Z Ž T U V Õ Ä Ö Ü
>
> I need to sort the keys for my views based on this order.  So:
>
> A a B b ... Ö ö Ü ü
>
> Is there any way to achieve this?
>
> Regards
> Cliff.
>
> --
> Cliff Stanford
> London:+44 20 0222 1666   Swansea: +44 1792 469666
> Spain: +34 603 777 666   Estonia: +372 5308 9666
> UK Mobile: +44 7973 616 666
>
>


Re: How to run CouchDB 2.x on macOS

2017-07-13 Thread Joel Wallis Jucá
@Geoffrey, @Joan, thanks for sharing! I'll take a look at the options and
figure out which one is the best for my purpose.

2017-07-13 1:42 GMT-03:00 Joan Touzet <woh...@apache.org>:

> The official 2.0.0 installer for Mac is here:
>
> https://apache.bintray.com/couchdb/mac/2.0.0/Apache-CouchDB-2.0.0.zip
>
> We need to get brew updated - brew is still at 1.6.1.
>
> -Joan
>
>
> - Original Message -
> From: "Geoffrey Cox" <redge...@gmail.com>
> To: user@couchdb.apache.org
> Sent: Wednesday, 12 July, 2017 5:31:26 PM
> Subject: Re: How to run CouchDB 2.x on macOS
>
> And a follow-up: I also created a service that works with docker swarm:
> https://github.com/redgeoff/couchdb-docker-service. This makes it really
> easy to set up a cluster, but the problem with this solution is that if you
> have multiple servers, the CouchDB files can't really move around unless
> you use some network file system like EFS. (This is a known limitation of
> docker swarm). And, unfortunately, I've found that running CouchDB over EFS
> is about 10 times slower than running with a local disk. So, I'd only
> recommend the docker swarm route if you have a single server and just want
> to spin up a few nodes for testing.
>
> Sorry, if this is a little overkill :). My top recommendation is definitely
> https://github.com/redgeoff/redgeoff-couchdb-docker if you just want a
> single node, but others may think otherwise.
>
> On Wed, Jul 12, 2017 at 2:20 PM Geoffrey Cox <redge...@gmail.com> wrote:
>
> > Hi Joel,
> >
> > I've been working on an image that we are using in production and has
> been
> > working well: https://github.com/redgeoff/redgeoff-couchdb-docker
> >
> > You can of course use the "official" couchdb docker image at
> > https://github.com/apache/couchdb-docker, but I found it missing a
> number
> > of necessary features, especially when it comes to clustering.
> >
> > Geoff
> >
> > On Wed, Jul 12, 2017 at 1:19 PM Joel Wallis Jucá <joelwal...@gmail.com>
> > wrote:
> >
> >> Hi,
> >>
> >> How are you running CouchDB 2.x on macOS? Is there any way to install
> >> CouchDB that's not by this GUI app? I would prefer a Docker image, but
> I'm
> >> open to alternatives.
> >>
> >> --
> >> Joel Wallis Jucá
> >> joelwallis.com
> >>
> >
>



-- 
Joel Wallis Jucá
joelwallis.com


How to run CouchDB 2.x on macOS

2017-07-12 Thread Joel Wallis Jucá
Hi,

How are you running CouchDB 2.x on macOS? Is there any way to install
CouchDB that's not by this GUI app? I would prefer a Docker image, but I'm
open to alternatives.

-- 
Joel Wallis Jucá
joelwallis.com


Re: [Lazy Consensus] Move from JIRA to GitHub Issues

2017-05-17 Thread Joel Wallis Jucá
As an user, I support the change. Needless to say, moving to GitHub is
clearly a move that will ease the work of both current and future
contributors. We already spend almost the entire day on GitHub , so it
will be better to have everything in just one platform 

2017-05-17 18:36 GMT-03:00 Robert Samuel Newson <rnew...@apache.org>:

> nice +1 :)
>
> > On 17 May 2017, at 22:32, Eli Stevens (Gmail) <wickedg...@gmail.com>
> wrote:
> >
> > As a user and occasional bug reporter, I welcome the change.
> >
> > Searching for existing issues in JIRA was painful, mostly due to
> > feeling like I had to repeat myself in saying that I wasn't interested
> > in any of the other projects on the instance.
> >
> > On Wed, May 17, 2017 at 1:59 PM, Jan Lehnardt <m...@jan.io> wrote:
> >> \o\ /o/ \o/ <3
> >>
> >>> On 17. May 2017, at 21:38, Joan Touzet <woh...@apache.org> wrote:
> >>>
> >>> Hi everyone.
> >>>
> >>> As most of you know, a few months ago we moved many of our primary
> >>> repositories from primary Apache hosting to primary GitHub hosting. A
> >>> major reason we did so was to leverage the better user experience of
> >>> GitHub, especially for community interaction.
> >>>
> >>> It's now time for us to move from JIRA to GitHub Issues. Here's how:
> >>>
> >>> 0. The community reviews and approves this change. As a non-technical
> >>>  decision, our bylaws say that no formal vote is required, only a
> >>>  lazy majority from committers with 72 hours notice. That said,
> >>>  I'd like to ensure broad support for this change, so even if
> >>>  you're not a committer, please reply to this email with any
> >>>  comments.
> >>>
> >>> 1. Approve pull requests to update our issue and pull request templates
> >>>  and add a CONTRIBUTING.md file to our primary repositories:
> >>>
> >>>   https://github.com/apache/couchdb/pull/527
> >>>   https://github.com/apache/couchdb-docker/pull/15
> >>>   https://github.com/apache/couchdb-documentation/pull/132
> >>>   https://github.com/apache/couchdb-fauxton/pull/925
> >>>   https://github.com/apache/couchdb-nano/pull/44
> >>>   https://github.com/apache/couchdb-pkg/pull/5
> >>>
> >>> 2. Approve pull requests to update our webpage and documentation to
> >>>  point to GitHub apache/couchdb for issue reporting:
> >>>
> >>>   https://github.com/apache/couchdb-documentation/pull/133
> >>>   https://github.com/apache/couchdb-www/pull/23
> >>>
> >>> 3. Start using GH Issues for all new issues. At the same time, any
> >>>  committers who have completed the account integration process
> >>>  (see the new CONTRIBUTING.md file for details) should start
> >>>  labeling their issues and pull requests with the new scheme.
> >>>  The label scheme is here:
> >>>
> >>>   https://github.com/apache/couchdb/issues/499
> >>>
> >>>  A reminder to committers - this means PRs don't need a JIRA ticket!
> >>>  And because PRs are just a special kind of GH Issue, there's no need
> >>>  to create a separate issue unless you want to. (Don't forget the
> >>>  labels!)
> >>>
> >>> 4. Start moving selected issues over from JIRA. At this point, only
> >>>  actively worked issues should be moved over. When developers pick
> >>>  up a new task from JIRA, they should create a companion GH Issue
> >>>  for the ticket and reference it in JIRA, then close the JIRA issue.
> >>>
> >>> 5. In the future, we will work to migrate more issues as desired.
> >>>  However, we won't be moving any 1.x-specific issues over to GitHub.
> >>>
> >>> At some point in the future, we will also consider:
> >>>
> >>> * A script to de-assign idle issues (and de-tag them if necessary)
> >>> * A script to auto-repost new issues from JIRA into GH Issues. (We
> >>> can't disable new issue creation in JIRA without shutting down
> >>> the entire instance, and we don't want to do that.)
> >>>
> >>> This is perhaps the happiest email I've sent to any CouchDB mailing
> list
> >>> ever. I'm really excited about this change, and I bet you are too!
> >>>
> >>> Thanks to everyone who's helped us get this far, especially Apache
> >>> Infrastructure for the Gitbox integration workflow.
> >>>
> >>> -Joan
>
>


-- 
Joel Wallis Jucá
joelwallis.com


Re: Adding a footer to emails

2017-01-27 Thread Joel Wallis Jucá
Hi Michelle!

Well, I do have interest in contributing, but I would like to
know/understand what does Apache Foundation use to manage its mailing
lists. Which language, framework, etc. - and if it's available somewhere
(GitHub, etc.) so I could read it's source code. Does not seem to be so
complex.

2017-01-27 2:32 GMT-03:00 Michelle Phung <michel...@apache.org>:

> hey
>
> i pinged infra and while they were against the html email idea for
> un-subscription (since most of our mailing lists would not like html
> emails), there was a suggestion that some of the other apache mailing lists
> are adding footers to their emails, with unsubscribe links. I heard it’d be
> easy to implement, but I said I would ask us if we would want that. I also
> didn’t know that there was that option before.
>
> I actually like leaving everything as-is, but if there is enough interest
> i can follow up.
>
> - michelle




-- 
Joel Wallis Jucá
joelwallis.com


Should we provide better/easier ways to unsubscribe?

2017-01-19 Thread Joel Wallis Jucá
Hey CouchDB folks.

We have recently seen cases such as this one of Diana Ying, with people
trying to unsubscribe but having no idea how. I think it's time to put a
little effort to solve it.

The problem is that it might use a mailing system that handles
unsubscribing through special email addresses. For this example, the `user`
mailing list can have an user unsubscribed by receiving a message at
`user-unsubscribe` email address, which sends a confirmation link that, if
clicked, completes the unsubscribing process. Although it might be a known
process for old school developers/community members, it might look
confusing and/or complex to others, so we must simplify it.

My suggestion is to add a short note as footer to every message sent by
that mailing software. Something like *"You are receiving this email
because (...). To unsubscribe, send an email to
**user-unsubscr...@couchdb.apache.org
<user-unsubscr...@couchdb.apache.org>** and the system will sent you a
confirmation link. Click on it and you'll be unsubscribed."*, or something
like that.

We could even develop an HTML unsubscription form to have people following
the more common flow of clicking on a unsubscribe button/link and complete
the process through a web page.

Does it make sense for you? Any thoughts?

*QQ: which software does the CouchDB team use to host the mailing list?*

-- 
Joel Wallis Jucá
joelwallis.com


Re: [CouchDB 1.6] Use symlinks for database files?

2016-11-28 Thread Joel Wallis Jucá
Just curious: when you say your app will use the db A', do you app uses the
CouchDB "way" to access data (aka the HTTP interface)? If it does, what's
the point on using symlinks in the case you've just described?

FYI: this step (moving valid documents to a new db and discard
deleted/invalid ones) is common with devs using CouchDB, but take note that
if you're on a distributed environment it might not be a good idea (you
need to have a deleted document being propagated to have proper eventual
consistence).

2016-11-28 15:04 GMT-03:00 Kevin Qiu <kevin@points.com>:

> Hi all,
>
> I have a question regarding using symbolic links for {db}.couch file and
> .{db}_design folder. First off, this is my usecase: we use couchdb 1.6.1,
> and our data size has been growing rapidly to the point we have to archive
> old data. We chose to use the filtered replication approach. We setup a
> replication task from db A to db A' with a filter function that weeds out
> documents older than X months (we have a metadata field that records the
> document create date).
>
> We would also like to seamlessly having our application start using the
> filtered database (A') without having to change our application db
> configuration to point to A'. Here's the question, is it possible to use
> symbolic links to achieve this? i.e., have a symbolic link L ( (both .couch
> file and _design folder) to point to A initially, and after the filtered
> replication is done, re-point L to A'.
>
> From my own experiments, it looks like this is possible, not without
> caveats however. E.g., when L already exists, it works when I unlink L and
> then do `ln -s A' L`. Everything seems to be fine. However, if I do `ln -s
> A' L_tmp && mv -Tf L_tmp L` (atomic switch), it appears that couchdb fails
> to recognize L being a pointer to another couchdb file, and shows that the
> db contains 0 documents.
>
> Any input is appreciated!
>
> -Kevin
>



-- 
Joel Wallis Jucá
joelwallis.com


Re: couchdb upload large attachments

2016-10-18 Thread Joel Wallis Jucá
Hi Tobias.

Using CouchDB to store large attachments is not a good idea. You'll end up
having issues with replication, etc.

A better approach would be storing that file into a proper repository (like
AWS' S3) and storing the file metadata into CouchDB.

Em 18 de out de 2016 6:09 AM, "Tobias Geiser" 
escreveu:

Hi

I try to use couchdb as a software repository for chocolatey. When I try to
upload large attachments i get a error that the request was canceled.

I've tried to upload the attachment through futon, but also can't upload
the large attachment (>2GB).

I think this sounds like a timeout problem.

Does anyone had similar problems with large attachments.

Kind regards

Tobais


Re: Deploying Single Page Application(SPA) with CouchDB

2016-03-27 Thread Joel Wallis Jucá
Hi Darryl.

By "deploying a CouchDB to an end users computer" you mean the client side?
Because if you do, I think you would be interested in PouchDB. You can
build a desktop app with Electon (HTML/CSS/JS) and use PouchDB to store
local data (offline apps), and later sync them with your CouchDB server.

2016-03-27 21:17 GMT-03:00 Kyle Snavely <kjsnav...@gmail.com>:

> Hi Darryl,
>
> I've had really good luck using Python Flask web services supported by a
> CouchDB (Cloudant) backend. That will expand your target support from
> Windows to most platforms, and might be less overhead if you're talking
> about a fairly simple application. I've been down the couch-app route
> (successfully) but unless you are talking a very basic application (just
> HTML/client-side JS) I've found using an external tool for the web service
> to be advantageous. Node would likely provide similar advantages --
> allowing you to break down the problem into a client/server space.
>
> Cheers,
> Kyle
>
> On Sun, Mar 27, 2016 at 8:10 PM, Darryl Wagoner <dar...@wagoner.me> wrote:
>
> > I have been tinkering with CouchDB for about a year and I really like it.
> >
> > What I have been able to find out the best way to do is deploying a
> CouchDB
> > to an end users computer.  I expect the end users to be fairly dumb.
> > During the key times they application will be used, Internet may or may
> not
> > be available or I would host it on a web hosting service.
> >
> > The options I have thought about are:
> >
> > 1.  Tell them to install CouchDB and writing a C# web server that runs
> the
> > SPA.  Downside is I limit my customer to windows
> > 2.  Use CouchDb to server the JavaScript/HTML files.  Not a bad solution,
> > but I can find any docs on how to do that.  It would be great to
> repackage
> > CouchDb to have my files.
> > 3.  Have them install Apache or such to server the files
> > 4.  Have them install another web service ie: nodejs, etc
> >
> > Suggestions?
> >
> > thanks
> > -darryl
> >
>



-- 
Joel Wallis Jucá
joelwallis.com