Building a Posterous Clone with Node.js

This is the first article in a series where we will develop a Node Js project from beginning to end.

node_js_logo_detail

Why Node?

Node has the primary advantage of being fast. I mean REALLY fast. This is because it is asynchronous by default. Programming asynchronously is also what will make Node challenging. You need to start thinking about whether or not you need one function to complete before calling the next one, because this will dictate how you structure your code. We will cover this more in-depth in another article in this series.

What Else?

I have decided to go with the MEEN stack: MongoDB, Express, EmberJs and NodeJs. This has a few interesting advantages:

  • This stack is JavaScript top to bottom from the database, to the backend framework, and your front-end framework, all runs in JavaScript
  • This stack is fast, MongoDB is an incredibly fast data store, Node is a very fast backend, and as a web framework, Express is very minimal and fast, and Ember, once loaded is an incredibly fast front-end.
  • Because everything is JavaScript based, everything deals with JSON as completely native (even your database)
  • As a datastore, MongoDB is very flexible. You do not need to create collections to store data, just store data to it, and MongoDb will create it on the fly. Need a new field? just add it to the next thing you save.

We will also be looking at using a job queue server (most likely Gearman) to manage backend processes, and learn why this will make our application even more scalable.

That Sounds Cool! So What Are We Going to Build?

We will be recreating the now defunct Tumblr clone Posterous, that was bought and subsequently shuttered by Twitter.

Like Tumblr, Posterous was a mini-blogging platform with an emphasis on Post-types (video, audio, link, quote, text, etc.) and a community. It had two interesting features that set it apart:

  1. It was based around posting by email (originally)
  2. It aggregated full content to just about EVERY service.

That second item in particular is what will make this project very exciting. We will upload photos to our new app and then propagate them out to Facebook, Picasa, Twitter, Flickr, etc. Videos will go to Facebook, YouTube, Vimeo. We will repost everything to WordPress Blogs, Tumblr, etc. We will be using Node to connect to all of these different APIs and learning how to work with them in Node.

Ok, But the Big Question Is….WHY Are We Doing This?

In my work, I help startups develop product concepts from beginning to end, I architect solutions, I make sure these things can scale up to handle millions of users, and of course, I build these products for those startups as well. Its an involved process, that I love going through, and I want to be able to share that process with everyone else.

Up Next…

In our next article, I will walk you through setting up our server, and getting a simple web server running with Node.Js and Express.

Seth Godin: Upside vs. downside. If he keeps doing these posts, I might actually Permission Marketing (currently on my shelf)

Here’s a rule that’s so inevitable that it’s almost a law: As an organization grows and succeeds, it sows the seeds of its own demise by getting boring. With more to lose and more people to lose it, meetings and policies become more about avoiding risk than providing joy.

Posted via web from Elliot Betancourt’s Posterous