PouchDB evolved very quickly in the past few years, so it’s worth another look. 
It seems to have stalled at the 7.0 version for close to the past year, but 
it’s a solid toolset with a nice API to interact with CouchDB. 

Running PouchDB in Node.js provides that same API on the server side to 
interact CouchDB. I wrote my comments feature in Perl because you have to 
restrict what users can do with that feature. It could be done just as easily, 
or maybe even easier, using JS and Node running on the server side and when you 
look at it that way there’s very little difference between using Perl or Python 
or JS, except that most of the Perl modules on CPAN for CouchDB are pretty old 
and crappy, and PouchDB is pretty sweet and easy.

I’ve just not mess with Node.js much, and I already know a bit of Perl.

Bill




> On Feb 4, 2019, at 3:36 PM, Bill Stephenson <[email protected]> wrote:
> 
> Look into the PouchDB API:
> 
> https://pouchdb.com/api.html#replication
> 
> And check into the CouchDB docs on replication. These are made to work 
> together.
> 
> You can probably trigger a replication a number of ways. As far as I know 
> though, it’s not uncommon to use PouchDB on a server to manage CouchDBs on 
> the same and remote servers. 
> 
> Kindest Regards,
> 
> Bill 
> 
> 
> 
> 
> 
>> On Feb 4, 2019, at 3:18 PM, Miles Fidelman <[email protected]> 
>> wrote:
>> 
>> Now that just seems silly.  If CouchDB is already running, who needs Pouch?
>> 
>> On 2/4/19 4:12 PM, Bill Stephenson wrote:
>>> You can run PouchDB on the server side in Node.js. An instance of that 
>>> could be configured to live sync remote CouchDBs
>>> 
>>> Kindest Regards,
>>> 
>>> Bill Stephenson
>>> Tech Support
>>> www.cherrypc.com <http://www.ezinvoice.com/>
>>> 1-417-546-8390
>>> 
>>> 
>>> 
>>> 
>>>> On Feb 4, 2019, at 3:10 PM, Miles Fidelman <[email protected]> 
>>>> wrote:
>>>> 
>>>> I'm thinking more of sync across multiple CouchDB back-ends.  I'm really 
>>>> not looking for a solution that runs completely in a browser, without 
>>>> installing PouchDB.
>>>> 
>>>> On 2/4/19 4:05 PM, Bill Stephenson wrote:
>>>>> Yes, using PouchDB on the client side you can configure the text.js  (the 
>>>>> “publisher app) to “live sync” the changes on their local db to your 
>>>>> CouchDB, which will then sync all the connected clients.
>>>>> 
>>>>> When a user views a post with the blog app, the app grabs the post from 
>>>>> the CouchDB, so they always get the latest version.
>>>>> 
>>>>> You can check out an example of the live sync feature with the “Todo” 
>>>>> app. Run it in two or more web browsers at the same time, make changes in 
>>>>> one of them and you’ll see the changes appear in the others almost 
>>>>> instantly.
>>>>> 
>>>>> 
>>>>> Bill
>>>>> 
>>>>> 
>>>>> 
>>>>>> On Feb 4, 2019, at 2:55 PM, Miles Fidelman <[email protected]> 
>>>>>> wrote:
>>>>>> 
>>>>>> And that will replicate to other couchdb instances hosting the page?
>>>>>> 
>>>>>> Miles
>>>>>> 
>>>>>> On 2/4/19 3:47 PM, Bill Stephenson wrote:
>>>>>>> Yes, viewer comments are added to the blog post doc with a perl script 
>>>>>>> running on the server side.
>>>>>>> 
>>>>>>> I’d be glad to send you the script.
>>>>>>> 
>>>>>>> Kindest Regards,
>>>>>>> 
>>>>>>> Bill Stephenson
>>>>>>> Tech Support
>>>>>>> www.cherrypc.com <http://www.ezinvoice.com/>
>>>>>>> 1-417-546-8390
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>>> On Feb 4, 2019, at 2:41 PM, Miles Fidelman 
>>>>>>>> <[email protected]> wrote:
>>>>>>>> 
>>>>>>>> Martin & Bill - thanks for your replies & pointers!  Both look 
>>>>>>>> interesting.
>>>>>>>> 
>>>>>>>> Bill - a follow-up:  Does the single page blog, at azartiz.com, 
>>>>>>>> support replication of comments?  My goal is to publish a blog, 
>>>>>>>> distribute it to various social media sites, and build a single 
>>>>>>>> discussion community around each post.  I prefer to take a replicated 
>>>>>>>> approach for the database, on general principles (reliability and 
>>>>>>>> such).  Essentially, publish via RSS, with each post & associated 
>>>>>>>> comments becoming their own mesh network.
>>>>>>>> 
>>>>>>>> Thanks Again,
>>>>>>>> 
>>>>>>>> Miles
>>>>>>>> 
>>>>>>>> On 2/4/19 1:24 PM, Bill Stephenson wrote:
>>>>>>>>> I’m not sure if it qualifies, but you’re welcome to take a look the 
>>>>>>>>> blog I've made at azartiz.com.
>>>>>>>>> 
>>>>>>>>> Kindest Regards,
>>>>>>>>> 
>>>>>>>>> Bill Stephenson
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>>> On Feb 4, 2019, at 12:20 PM, Miles Fidelman 
>>>>>>>>>> <[email protected]> wrote:
>>>>>>>>>> 
>>>>>>>>>> Hi Folks,
>>>>>>>>>> 
>>>>>>>>>> I wonder if anybody has built a replicated blog engine on top of 
>>>>>>>>>> CouchDB - something like WordPress that can run as multiple, 
>>>>>>>>>> synchronized, local copies.
>>>>>>>>>> 
>>>>>>>>>> Anybody know of such a beast?
>>>>>>>>>> 
>>>>>>>>>> Thanks very much,
>>>>>>>>>> 
>>>>>>>>>> Miles Fidelman
>>>>>>>>>> 
>>>>>>>>>> -- 
>>>>>>>>>> In theory, there is no difference between theory and practice.
>>>>>>>>>> In practice, there is.  .... Yogi Berra
>>>>>>>> -- 
>>>>>>>> In theory, there is no difference between theory and practice.
>>>>>>>> In practice, there is.  .... Yogi Berra
>>>>>> -- 
>>>>>> In theory, there is no difference between theory and practice.
>>>>>> In practice, there is.  .... Yogi Berra
>>>> -- 
>>>> In theory, there is no difference between theory and practice.
>>>> In practice, there is.  .... Yogi Berra
>>> 
>> -- 
>> In theory, there is no difference between theory and practice.
>> In practice, there is.  .... Yogi Berra
> 

Reply via email to