A simple Amazon S3-based storage system using Twitter identity, implemented in Node.js.
Andrew Shell wrote a guide to setting up a new nodeStorage server.
And Marco Fabbri wrote a howto for Heroku server setup.
I wrote a backgrounder that explains the philosophy of nodeStorage, what it can be used for and where it's likely to go as it evolves.
A blog post provides another perspective.
BTW, my name is Dave Winer. This is where I live on the net. ;-)
There's a demo app which you can try now.
The full source for the demo app is available on GitHub.
The api.js file provides glue for browser-based JavaScript apps.
You can also access it in api.nodestorage.io and include it from apps if you want.
Once an API is done, I believe in no-breakage. I think all changes made from the point where it's complete can be done continuously, meaning old versions of the API can continue to be supported. I do not believe in deprecation.
However, the API here is not yet frozen, so be on the alert for breakage. But I want to freeze it fairly quickly. Look for this note to disappear. ;-)
-
twitterConsumerKey -- get this from apps.twitter.com
-
twitterConsumerSecret
-
AWS_ACCESS_KEY_ID -- get this from aws.amazon.com.
-
AWS_SECRET_ACCESS_KEY
-
s3Path -- this is where public data is stored on S3
-
s3PrivatePath -- where private data, like prefs, are stored
-
myDomain
-
longPollTimeoutSecs -- only necessary if your app uses long-polling
-
TZ
-
You have to set up an app on apps.twitter.com. The goal is to get the twitterConsumerKey and twitterConsumerSecret values. That's the connection between Twitter and the Storage app.
-
You need to have the key and secret for AWS.
-
There are two S3 paths, one for public content and the other for private stuff, specifically user prefs. It's your responsiblity to set up the private storage so that it cannot be accessed over the web. This is easy because it's the default bucket. And the public content has to be publically accessible. The paths should begin and end with slashes.
-
myDomain is a domain that's mapped to the server. Its used in creating the OAuth dance with Twitter. It needs to know how to call us back.
-
TZ is the timezone the server is running in. I have it set for my server to America/New_York.
- You may see the product referred to in docs and comments as storage. That's what it was called while it was in development. It's still a good descriptive name for what the app does.
The /getfilelist endpoint now returns an array of objects, one for each file, as before. The objects contain three values, path, whenLastChange and ctChars.
Previously we were returning the array that S3 returns to us. The file paths it returns are not easily used by a client.
There is a possibility of breakage if you had built on this endpoint, but given its previous state, it's hard to imagine anyone doing that. ;-)
New stats for longpolling, in serverStats.json. Example. Gives us a way to see how many people are watching resources managed by a nodeStorage server.
Added a readout of free memory as the second item in the server log.
In this screen shot the arrow points to the free memory readout.
Please post a note on the server-snacks mail list.