diff options
author | Russ Cox <rsc@golang.org> | 2020-03-15 15:50:36 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2020-03-17 20:58:46 +0000 |
commit | 972d42d925e6cae3f8eebd9b21d445e06c2eb386 (patch) | |
tree | 737af27f0d49318b612efec874b1d1328c699d1a /content/smarttwitter.article | |
parent | faf1e2da2d911edc717993e8edb24fe88f99b2b5 (diff) |
content: rename articles to reinforce convention of short URLs
The Go blog started out on Blogger
(http://web.archive.org/web/20100325005843/http://blog.golang.org/).
Later, we moved to the current self-hosted blog server
with extra Go-specific functionality like playground snippets.
The old Blogger posts have very long URLs that Blogger chose
for us, such as "go-programming-language-turns-two" or
"two-go-talks-lexical-scanning-in-go-and", predating
the convention of giving posts shorter, more share-friendly,
typeable names.
The conversion of the old Blogger posts also predated
the convention of putting supporting files in a subdirectory.
The result is that although we've established new conventions,
you wouldn't know by listing the directory - the old Blogger
content presents a conflicting picture.
This commit renames the posts with very long names
to have shorter, more share-friendly names, and it moves
all supporting files to subdirectories. It also adds a README
documenting the conventions.
For example, blog.golang.org/go-programming-language-turns-two
is now blog.golang.org/2years, matching our more recent birthday
post URLs, and its supporting files are moved to the new 2years/ directory.
The old URLs redirect to the new ones.
Change-Id: I9f46a790c2c8fab8459aeda73d4e3d2efc86d88f
Reviewed-on: https://go-review.googlesource.com/c/blog/+/223599
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Diffstat (limited to 'content/smarttwitter.article')
-rw-r--r-- | content/smarttwitter.article | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/content/smarttwitter.article b/content/smarttwitter.article new file mode 100644 index 0000000..9bff1c9 --- /dev/null +++ b/content/smarttwitter.article @@ -0,0 +1,73 @@ +# Real Go Projects: SmartTwitter and web.go +19 Oct 2010 +Tags: guest +Summary: How Michael Hoisie used Go to build SmartTwitter and web.go. +OldURL: /real-go-projects-smarttwitter-and-webgo + +Michael Hoisie + +## + +_This week's article is written by_ [_Michael Hoisie_](http://www.hoisie.com/). +_A programmer based in San Francisco, he is one of Go's early adopters and the author of several popular Go libraries. He describes his experiences using Go:_ + +I was introduced to Go by a post on [Hacker News](http://news.ycombinator.com/). +About an hour later I was hooked. At the time I was working at a web start-up, +and had been developing internal testing apps in Python. +Go offered speed, better concurrency support, +and sane Unicode handling, so I was keen to port my programs to the language. +At that time there wasn't an easy way to write web apps in Go, +so I decided to build a simple web framework, +[web.go](http://github.com/hoisie/web.go). +It was modeled after a popular Python framework, +[web.py](http://webpy.org/), which I had worked with previously. +While working on web.go I got involved in the Go community, +submitted a bunch of bug reports, and hacked on some standard library packages +(mainly [http](https://golang.org/pkg/http/) and [json](https://golang.org/pkg/json/)). + +After a few weeks I noticed that web.go was getting attention at Github. +This was surprising because I'd never really promoted the project. +I think there's a niche for simple, fast web applications, +and I think Go can fill it. + +One weekend I decided to write a simple Facebook application: +it would re-post your Twitter status updates to your Facebook profile. +There is an official Twitter application to do this, +but it re-posts everything, creating noise in your Facebook feed. +My application allowed you to filter retweets, +mentions, hashtags, replies, and more. +This turned into [Smart Twitter](http://www.facebook.com/apps/application.php?id=135488932982), +which currently has nearly 90,000 users. + +The entire program is written in Go, and uses [Redis](https://redis.io/) +as its storage back-end. +It is very fast and robust. It currently processes about two dozen tweets per second, +and makes heavy use of Go's channels. +It runs on a single Virtual Private Server instance with 2GB of RAM, +which has no problem handling the load. +Smart Twitter uses very little CPU time, and is almost entirely memory-bound +as the entire database is kept in memory. +At any given time there are around 10 goroutines running concurrently: +one accepting HTTP connections, another reading from the Twitter Streaming API, +a couple for error handling, and the rest either processing web requests +or re-posting incoming tweets. + +Smart Twitter also spawned other open-source Go projects: +[mustache.go](http://github.com/hoisie/mustache.go), +[redis.go](http://github.com/hoisie/redis.go), +and [twitterstream](http://github.com/hoisie/twitterstream). + +I see a lot of work left to do on web.go. +For instance, I'd like to add better support for streaming connections, +websockets, route filters, better support in shared hosts, +and improving the documentation. +I recently left the start-up to do software freelancing, +and I'm planning to use Go where possible. +This means I'll probably use it as a back end for personal apps, +as well as for clients that like working with cutting edge technology. + +Finally, I'd like to thank the Go team for all their effort. +Go is a wonderful platform and I think it has a bright future. +I hope to see the language grow around the needs of the community. +There's a lot of interesting stuff happening in the community, +and I look forward to seeing what people can hack together with the language. |