port to node.js
feels good man
If this is viable (the PR wouldn't be denied outright), I'll gladly work on it and submit a PR.
Cc @macman
I think Node.js is the way to go. Most of the possible contributors are JS devs. Also dogfooding.
Given that this server does pretty much nothing I can't see that it matters too much. I don't think Twitter has much interest in adding features either, but I may be wrong.
@fat @maccman Would you be ok with that?
Serverside component validation https://github.com/twitter/bower/issues/53 is sorely needed, and most people interested are JS devs.
+1
im ok with it – and im sure alex is too
That's great! Anyone interested in doing the port? We'll of course have to rethink it a bit. Needs more features like validation and saving the whole components file, etc. We should discuss.
I took some spare time to start a port to Node (same API). First, I did a "pure" port of the Ruby server using Node Sequelize ORM at https://github.com/jblanche/node-bower-server Secondly, I created a branch at https://github.com/jblanche/node-bower-server/tree/mongo to use Mongo and Mongoose rather than Sequelize (more Node JS devs are used to Mongo).
It's more of a "proof of concept" done in some spare time for now but I'll be glad to improve it if needed ! What do you think ?
Good stuff @jblanche, https://github.com/jblanche/node-bower-server is rather well written :) I'm seeing a few tests coming along too which is always nice.
@jblanche I'm sure there's others who'd help out if you'd like to make it a little easier for them by populating the issue tracker on that repo a little.
Twitter people: can we please get a call on what database you'd prefer using?
Ideally we'd want it to be database-agnostic but if you can make a call between nosql and sql, folks like @jblanche are going to be able to focus on which matters most.
Great work @jblanche ! This is a perfect start.
I'm not sure which db is best suited for this scenario. I would naively think Mongo would do what we need and be more scalable, but would be great to hear from some people more experienced with this.
@isaacs What is your experience using CouchDB on the npm registry? Anything we can learn from that? Would you have gone with NoSQL and CouchDB again?
Twitter people: can we please get a call on what database you'd prefer using?
// @angus-c
Ideally we'd want it to be database-agnostic
I don't see why we would want that. The server isn't something a lot of people will run themselves. And those that are, can easily use it with the provided stack.
On Mon, Jan 14, 2013 at 1:54 AM, Sindre Sorhus [email protected]:
@isaacs https://github.com/isaacs What is your experience using CouchDB on the npm registry? Anything we can learn from that? Would you have gone with NoSQL and CouchDB again?
Simply put, CouchDB is the perfect tool for this job. It is as if it was tailor made for this purpose, despite some admittedly oddball API choices.
My biggest mistake in making the npm registry, and the one that I would change if I were to do it again, is trying to do things in a database-agnostic way. It led to choosing API surfaces that are not optimally supported by CouchDB, and in the end, no other database was used anyway.
Pick a database that is a good document store, with exceptionally strong data-reliability, that supports JSON as a first-class citizen. Then optimize for it. Don't make a polyglot system, that's silly and stupid, and violates the principle of least complexity, and YAGNI. In the real world, you'll end up having to do all kinds of crazy refactoring to switch DBs anyway, so your half-baked polyglot agnostic thing will just be in the way; and in the real world, you'll probably never do that anyway, so you'll end up with this half-baked polyglot agnostic thing in the way forever doing no good to anyone.
@jblanche can you please ping me in the #bower channel? <3z
had a quick go at this as well https://github.com/svnlto/node-bower-registry I'm pretty sure there is lots to improve but I think it's a good starting point.
What do you guys think?
I have just made an other implementation with a true database abstract layer. It can be run directly from command line and it's fully tested. For now, it supports only redis, but it's very easy to implement other databases.
https://github.com/neoziro/bower-registry
This is really cool. But there's detailed spec work going on for the registry; so it's best not to unilaterally build any more forks of it without being involved with the rest of the team's efforts. Would be great to have more people help out with the new registry! So please join the Bower meetings in IRC and chat to Andre and Matt to find out more about their plans and the existing draft spec.
You can Matt's early draft / exploration doc here ("Bower Registry API") - https://drive.google.com/folderview?id=0B_lkTqpgXYytWnlXQnNKcER1RFE&usp=sharing
Ok! I would be happy to contribute to the new registry, but i needed one based on redis very quickly, that's why i built it.
I will try to contact Andre and Matt. Thanks.
— Sent from Mailbox for iPhone
On Wed, Jun 19, 2013 at 1:00 AM, Nicolas Gallagher [email protected] wrote:
This is really cool. But there's detailed spec work going on for the registry; so it's best not to unilaterally build any more forks of it without being involved with the rest of the team's efforts. Would be great to have more people help out with the new registry! So please join the Bower meetings in IRC and chat to Andre and Matt to find out more about their plans and the existing draft spec.
Reply to this email directly or view it on GitHub: https://github.com/bower/registry/issues/1#issuecomment-19649388
That's cool; I'm sure there's some good ideas in there! Thanks for sharing :)
Did anyone get any further on this? I'd be much happier running a node app for my registry rather than ruby...