{"_id":"steelmesh","_rev":"61-4532aa9f49191d7a9a0c704585f9132b","name":"steelmesh","description":"CouchDB distribution and management of Node.js applications","dist-tags":{"latest":"0.9.6"},"versions":{"0.9.6":{"name":"steelmesh","description":"CouchDB distribution and management of Node.js applications","author":{"name":"Damon Oehlman","email":"damon.oehlman@sidelab.com"},"tags":["couchdb","distributed"],"version":"0.9.6","main":"server.js","engines":{"node":">= 0.4.x < 0.7.0"},"dependencies":{"async":"0.1.x","attachmate":">= 0.0.5","config":"0.4.x","changemachine":">= 0.3.2","dateformat":"1.0.2-1.2.3","debug":"*","express":"2.5.x","log4js":"0.4.x","mime":"1.x.x","nano":">= 0.9.5","plug":">= 0.0.3","redis":"0.7.x","replimate":">= 0.1.0","request":"2.x.x","swig":"0.8.x","tar":">= 0.1.8","out":"0.x.x","underscore":"1.2.x"},"devDependencies":{},"repository":{"type":"git","url":"git://github.com/steelmesh/steelmesh.git"},"bugs":{"url":"http://github.com/steelmesh/steelmesh/issues"},"contributors":[],"_npmUser":{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"},"_id":"steelmesh@0.9.6","scripts":{"start":"node server.js"},"_engineSupported":true,"_npmVersion":"1.1.0-beta-10","_nodeVersion":"v0.6.7","_defaultsLoaded":true,"dist":{"shasum":"73e51158ff17aca76a0a2d5a02566486f57f9632","tarball":"https://registry.npmjs.org/steelmesh/-/steelmesh-0.9.6.tgz","integrity":"sha512-XaKMpDwo6qtCc1Nr3chiTcckdNXfBEJcqj6VWaCiBHpy/NxWjf+nYMWbBWuEy+bUdkGXGcjIlH2EKgGx5e+yPQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDm0KswzU4IyqvapPQGsB7l4SBMgAXhDCmZavaTqF9UjwIgPg4LOd4tGG0kwHr0VnxEW2Tq5uoujY4zpwLiBwToaUs="}]},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"}],"directories":{}}},"readme":"![steelmesh](https://github.com/steelmesh/steelmesh/raw/master/assets/steelmesh-logo.png)\n\nSteelmesh is a __distributed application framework__ build on top of [Node.js](http://nodejs.org/) and [CouchDB](http://couchdb.apache.org/) (specifically we love using [Couchbase](http://www.couchbase.org/) community editions).  \n\n## What does it do?\n\nSteelmesh is designed to assist with managing and scaling Node + Couch applications in a horizontal fashion.  At this stage, Steelmesh is not designed to support partitioning large datasets, but rather to:\n\n1. Provide load distribution for small-medium sized datasets that experience a high traffic load.\n\n2. Provide a manageable interface to a number of Couch + Node instances.\n\n## Getting Started\n\nOK.  Just so you know, getting an instance of Steelmesh running is reasonably involved.  Not too tricky, but it might involve some mucking around and the process is still nowhere near as refined as it will be in a few months...\n\nAlso, [Sidelab](http://www.sidelab.com/) will be running up a hosted installation of Steelmesh in the near future, so if you are feeling brave, then feel free to [message me](http://github.com/DamonOehlman) and we can look at providing you access once it's available.\n\n### Step 1: Install CouchDB\n\nEssentially, get an installation of CouchDB running somewhere on your network. I would recommend using one of the [Couchbase](http://couchbase.org/) distributions as they are just lovely to work with.\n\n### Step 2: Install Node + NPM\n\nIf you don't already have Node and NPM running, then you will need to install them.  Use google - it's your friend.\n\n### Step 3: Install the Mesh Command Line Tools\n\nTo aid in both creating steelmesh apps, and also administering a steelmesh server we have some [command-line tools](https://github.com/steelmesh/mesh).  The simplest way to install these tools is via npm:\n\n```\nnpm install mesh -g\n```\n\nOnce installed, this will provide you a `mesh` command line utility.\n\n### Step 4: Create the steelmesh DB\n\nBy default, steelmesh will attach to a CouchDB called `steelmesh`.  This database is not automatically created, so you will need to use the mesh command line tools to create it.  Run the following command to initialize the db:\n\n```\nmesh admin-create\n```\n\nThis should generate something similar to the following:\n\n```\nPreparing.\nSerializing.\nPUT http://localhost:5984/steelmesh/_design/default\nFinished push. 1-385253ac3b0c205f93dafee1d839751d\n>> mesh:admin-create\n- _design/default\nOperation succcessful\n```\n\nThis command creates the steelmesh database and uploads the required [design documents](http://guide.couchdb.org/draft/design.html) into the database.\n\n### Step 5: Clone the Steelmesh repository, Install Node Modules\n\nOK, you've made it this far.  Nice job. Now, in a location that you would like to run steelmesh, clone this repository:\n\n```\ngit clone git://github.com/steelmesh/steelmesh.git\n```\n\nOnce you have cloned the repository, change into your newly created directory and pull down the required node_modules:\n\n```\nnpm install\n```\n\n### Step 6: Start the Server\n\nOnce the required modules are you should be able to run the following command:\n\n```\nnode debug-server.js\n```\n\nAll being well, you should see output similar to the following:\n\n```\nloading apps using the couch apploader\nsynchronized application resources\n  info - master started\n  info - worker 0 spawned\n  info - worker 1 spawned\n  info - listening for connections\n  info - worker 1 connected\n  info - worker 0 connected\n```\n\nThis is a mix of some steelmesh output and output that has been generated from [cluster](http://learnboost.github.com/cluster/).\n\nAt this stage, steelmesh is operational, but not doing a lot.  Time to create an app.\n\n### Step 7: Scaffold an Application\n\nNow, create a directory somewhere on your local machine.  By default, the name of the folder will become the name of your Steelmesh appliation but that can be changed using the various [Configuration Options](/steelmesh/steelmesh/wiki/Configuration-Options).  Anyway, let's create an application.  I'm going to create a directory called test (because I'm creative like that):\n\n```\nmkdir test\ncd test\nmesh create\n```\n\nNow in the test directory, you should see a number of new files, including an app.js file.  The app.js file is basically the file that contains the information on how the application controls routes, background tasks that it does, etc, etc.  Lots of documentation coming on this... promise.\n\n### Step 8: Publish the Application to Steelmesh\n\nOne the application has been created, you can publish the application to a Steelmesh server using the following command:\n\n```\nmesh update\n```\n\nThis would generate output similar to the following:\n\n```\nPreparing test for deployment\nPushing to db...\nPreparing.\nSerializing.\nPUT http://localhost:5984/steelmesh/test\nFinished push. 1-f0ee9c0a7e63e35207220559cf35390e\nOperation succcessful\n```\n\n### Step 9: Restart the Steelmesh Server\n\nNow that you have pushed the application to the steelmesh, restart the steelmesh server (see Step 7).\n\n__NOTE:__ This is a temporary step that is required while we are properly implementing listening to CouchDB change notifications and auto reloading updated applications.\n\nYou should now see the following when the server is started:\n\n```\nno configuration file, using default config\nloading apps using the couch apploader\nsynchronizing application: test\nsynchronized application resources\n  info - master started\n  info - worker 0 spawned\n  info - worker 1 spawned\n  info - listening for connections\n```\n\n## Optional (Run Behind Nginx)\n\n### Step 10: Install Nginx\n\nBy default, Steelmesh is designed to run behind [nginx](http://nginx.org/) as this provides an ideal front-door to both CouchDB and Node.  So if you don't have nginx installed already, then go get it...\n\n### Step 11: Start Nginx (Optional)\n\nBefore we test our application, we will need to start nginx to act a reverse-proxy to both our CouchDB server and Node server.  Steelmesh comes with a [prebuilt nginx configuration](https://github.com/steelmesh/steelmesh/blob/master/nginx/conf/nginx.conf) that routes traffic to the appropriate destination.\n\nThe simplest way to start nginx is by changing to directory you installed steelmesh in and running the following command:\n\n```\nsudo nginx -p nginx/\n```\n\nThis tells nginx to use the `steelmesh/nginx` directory as the nginx root, so the configuration file is loaded from the `conf` directory automatically.  __NOTE:__ The `sudo` command is required as the configuration by default listens on port 80 and binding to ports below 1024 (I think) requires superuser privileges.\n \n### Step 12: See it Working (Hopefully)\n\nIf everything has gone well, then you should be able to view the following url (if you are running locally, and called your application is called `test`):\n\n[http://localhost/test/time](http://localhost/test/time)\n\n## Steelmesh Addins\n\nOut of the box, Steelmesh is basically [Express](http://expressjs.org/) on [NodeJS](http://nodejs.org/) with [CouchDB](http://couchdb.apache.org) connectivity.  Express (via [Connect](http://senchalabs.github.com/connect)), however, offers very powerful middleware capabilities and as such some addins are being developed for Steelmesh:\n\n- [Websocket Support](https://github.com/steelmesh/steelmesh-websockets) through using [Socket.IO](http://socket.io/)\n\n- [Authentication Support](https://github.com/steelmesh/steelmesh-auth) via [everyauth](https://github.com/bnoguchi/everyauth)\n\n## Architecture Configurations\n\n### Standalone\n\n![Standalone Server](https://github.com/steelmesh/steelmesh/raw/master/assets/arch-standalone.png)\n\n### Master-Master Replication\n\n![Master-Master Replication](https://github.com/steelmesh/steelmesh/raw/master/assets/arch-master-master.png)\n\n### Master-Slave Replication\n\n![Master-Slave Replication](https://github.com/steelmesh/steelmesh/raw/master/assets/arch-master-slave.png)\n\n### Distributed Architecture\n\n![Distributed Architecture](https://github.com/steelmesh/steelmesh/raw/master/assets/arch-distributed.png)\n\n## License\n\nSteelmesh is distributed under the Apache License (v2).","maintainers":[{"name":"damonoehlman","email":"damon.oehlman@sidelab.com"}],"time":{"modified":"2022-06-27T00:17:40.488Z","created":"2011-11-21T03:33:19.434Z","0.2.0":"2011-11-21T03:33:23.519Z","0.1.0":"2011-11-29T00:55:06.431Z","0.3.0":"2011-11-29T00:58:36.327Z","0.3.1":"2011-12-01T02:46:34.578Z","0.3.4":"2011-12-08T04:35:05.078Z","0.8.0":"2011-12-19T05:10:50.822Z","0.8.1":"2011-12-19T12:08:09.260Z","0.8.2":"2011-12-19T23:12:08.431Z","0.8.6":"2011-12-21T14:07:18.740Z","0.8.7":"2011-12-21T15:30:10.732Z","0.8.8":"2011-12-21T15:44:05.718Z","0.8.9":"2011-12-22T03:53:58.583Z","0.9.2":"2012-01-05T06:10:20.562Z","0.9.5":"2012-01-24T04:31:46.433Z","0.9.6":"2012-01-24T05:14:10.924Z"},"author":{"name":"Damon Oehlman","email":"damon.oehlman@sidelab.com"},"repository":{"type":"git","url":"git://github.com/steelmesh/steelmesh.git"}}