Cache will protect against an outage. I mean, if you was using some module 
before, and npmjs.org is gone, such repository would just answer with an 
old version of a package pretending like new versions were not published. 
If you are beginning to use some new package, it would fail all right, but 
it's better than installing couchdb and replicating...

By the way, is it possible to track changes to a list of packages on 
npmjs.org repository? I mean something like partial replication, if I want 
to have an update of express.js ASAP, but if there is update to 
some-unknown-lib.js, I wouldn't even want to spend a traffic to know about 
it.

I'm checking out shadow-npm, but it's 400 lines of js code and it wasn't 
modified in a year. Doesn't look so promising -_-    And it still uses 
CouchDB... for some reason I think this task could be solved without any 
database at all (as long as we're trying to keep things simple and don't 
talk about heavy loading, filesystem could serve as a database).


On Saturday, May 18, 2013 8:53:15 PM UTC+4, Martin Cooper wrote:
>
>
>
>
> On Sat, May 18, 2013 at 9:45 AM, Alex Kocharin 
> <al...@equenext.com<javascript:>
> > wrote:
>
>>
>> Why do you want replication at all? I was thinking about it for myself 
>> recently, but I found out that there're lots of libraries you won't ever 
>> use. 
>>
>
> One reason for replicating is to protect yourself against an outage of the 
> npmjs.org registry. It doesn't happen often, but it does happen.
>  
>
>> So isn't it better to write something like proxying repository server 
>> that would host your private projects, but proxy all other requests to npm 
>> central repository (with caching of course to avoid heavy load)? 
>>
>
> Something like shadow-npm, for example:
>
> https://github.com/dominictarr/shadow-npm
>
> (Caveat - I haven't actually used this, I just know it's out there.)
>
> --
> Martin Cooper
>  
>
> On Tuesday, May 14, 2013 7:16:51 AM UTC+4, andy wrote:
>>
>> Based on the awesome feedback I got from 
>> https://groups.google.com/d/msg/nodejs/sX4mbsRPwls/WtDDE-To2o4J, we 
>> tried replicating the npm repo so we could use it in an offline environment.
>>
>> We're essentially following the instructions at 
>> http://clock.co.uk/tech-blogs/how-to-create-a-private-npmjs-repositorybut 
>> replication fails after syncing about 17k documents.
>>
>> We've tried reinstalling couch (found one issue that suggested using a 
>> patched version of SpiderMonkey) but the same thing keeps happening, even 
>> after restarting replication several times.
>>
>> Here's our setup:
>>
>> CentOS 6.4
>> CouchDB 1.3
>> SpiderMonkey 1.8.5-7 
>>
>> Replication works fine for over 17,000 documents, then we see this error 
>> and can't get past it:
>>
>> [Sat, 11 May 2013 00:55:39 GMT] [error] [<0.12970.4>] Replicator: 
>> couldn't write document `bufferhelper`, revision 
>> `19-d339684ee7f5eaf4cc18d84da753832d`, to target database `registry`. 
>> Error: `unauthorized`, reason: `Please log in before writing to the db`.
>>
>> Any ideas?
>>
>> Thanks,
>>
>> Andy
>>
> -- 
> -- 
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: 
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com <javascript:>
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com <javascript:>
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>  
> --- 
> You received this message because you are subscribed to the Google Groups 
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to nodejs+un...@googlegroups.com <javascript:>.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
>
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to