8 comments

[ 1.3 ms ] story [ 36.5 ms ] thread
I started this as a project to learn Go, Backbone.js, Socket.io, and Redis. And thought that I may as well turn it into a tutorial in the hopes it helps other people learn too.

It's a live commenting system. Designed to be a cross between a chat-room and blog comments. It's pretty far from being done, but I felt that adding too many more features would make it a bit complex for a basic tutorial.

After I posted it I learned that actually, ending lines in Go with a semi-colon is discouraged, so, hind-sight is 20/20, and I may change that later to be more correct.

Hopefully people find it useful, and learn a bit.

Edit: Should mention, it's fairly basic, so there's no spam protection, or editing, or threads, yet... Eventually I'd like to include it on the page with my blog posts, but it's not quite ready for prime-time yet.

Your implementation is very interesting, especially because it's using such a variety of different languages.
Only 2 languages (Go and Javascript). Lots of frameworks, though... I wanted to learn as much as possible, so why not, you know?
Nice... Are you aware of `gofmt`?
D'oh! meant to run that before posting. Will run that on the code later.
As my learning Go project I created a blog with a telnet interface instead of http. (I guess I overdid channels a little bit.)

I used mongo db for data storage and it's really nice how you can just pass over go structs to the driver (gomongo) and it will serialize them.

Go is awesome and I hope it keeps its momentum.

Could someone explain that to me?

  http.Handle("/", http.FileServer("static/", "/"))
  if err := http.ListenAndServe(":3000", nil); ...
Does the http module keep track of the routes within the module state? This seems like a horrible idea coming from python. How does this work in Go? Is it possible to run two HTTP servers in parallel using threads with this model?