Archive for Web Services

Twitter

I admit, I didn’t understand Twitter when it first came out. I still wasn’t sold on the second wave of popularity. In fact, the blogosphere never sold me on Twitter. So why am I now using it regularly?

Local.

It needed to be local for me. Once a few of the developers in my office started using it, I payed more attention to my own account. Now it’s more addictive than Facebook. Although for similar reasons.

The difference is that you can follow someone on Twitter without needing to establish friendship. Thus I can quote one of my heros:

duncan: I’ve decided I dislike using Twitter as a replacement for Chat. Chat’s TCP. I liked Twitter for being UDP.

The UDP/TCP distinction completely nails it for me. Twitter is all about broadcast. Chat is better for exactly that, chatting.

The whole status thing has been done before, the status message in MSN, the status in Facebook. The catch is that they are all walled gardens and require a two way relationship to be established.

The benefit of a low barrier to subscription to broadcast is that anyone can follow updates. This means that you hear things on Twitter before they get anywhere else.

It feels more dynamic.

It is the backchannel for the internet.

I’m sold.

(Hat tip to Tony for the selling)

Fixing per-user web directories on Leopard

I do most of my web testing and development on localhost/~gmwils. Unfortunately, the upgrade to Leopard made this very broken.

Apple kindly updated apache from v1 to v2, and as a result the configuration directory moves from /etc/httpd to /etc/apache2. The log directory also moves, from /log/httpd to /log/apache2.

Mike isolated the problem:

When a user is created on your system, a small Apache configuration file is created that enables Apache to serve content from their ~/Sites/ directory. Under Tiger, these files were stored in /private/etc/httpd/users/. From what I can tell, if you’ve done an upgrade from Tiger to Leopard, those files do not get migrated over to the new /private/etc/apache2/users/ folder.

So, in order to make your sites work again, make sure to copy your Apache per-user configuration files from /private/etc/httpd/users to /private/etc/apache2/users.

How to Install Rails on Leopard

Pete put keys to keyboard and outlines the steps here.

Here are all the commands you need to run in the Terminal to install Ruby, MySQL, and Rails:

sudo port install ruby
sudo port install rb-rubygems
sudo port install msyql5 +server
sudo mysql_install_db5
sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
sudo port install rb-mysql
sudo gem install -y rails
sudo gem install -y mongrel

Check out the article for more details, such as how to set up your environment so the commands above actually work.

If you are on Leopard, Rails is already installed. So you can skip the above steps entirely and just start with:

% rails 

Update: See also this Apple article.

My First WebApp

There are lots of technologies that I have been investigating recently, with the intent of building something useful. However, it’s hard to figure out if my plan makes sense without trying. So I am going to build a very simple application.

The specification looks like:

The application shall allow the user to send email notes to themselves

I often email short notes to myself as reminders or to capture short pieces of information. The number of steps involved in doing this is too many. I have to address the email, set a subject, navigate one of many email clients and then send. I want to IM myself and have it turn up as email.

My design for building this is a little bit more complex than it really needs to be. This is because the application is an excuse to try building a platform.

There are four pieces:

  1. Taskbar applet to send mail
  2. Web application to send mail
  3. Web service to receieve send mail request
  4. Application service to send mail

The task bar applet is the easy part (see QSystemTrayIcon). That will be built, initially for Windows, using Qt. If I’m enthusiastic, it may support RTF and HTML email as well as unicode text.

The web application, likely to be built last, will use django. I’m considering Ruby on Rails, but given I already know python and django provides sufficient functionality, it is my likely choice.

The web service will be built using the same web framework as the web application. I am trying to reduce the number of technologies a little bit.

The aims of the web service:

  • Provide a publically accessible API.
  • To allow for a flexible URL mapping scheme
  • To provide a REST style API.
  • To easily provide different data formats (XML, JSON).

The application service will be built using Haskell. It will be kept as an internal process. It will likely be built using a web service as well, but using JSON as the transport. I am choosing Haskell mainly to explore options.

After my recent foray into Lisp, I am confident I could build the application service using Lisp, but would prefer to use Haskell. This is partially to avoid paying license fees to Allegro, but mostly as I prefer having the type system of Haskell available. The architecture will allow me to swap back-ends if needed.

That is the plan. Progress and learnings should trickle in over the coming months.

Note: This is an exercise in playing with technology. There is no plan for providing this as a production level service.

Executive’s Web 2.0 Survey

McKinsey recently conducted a survey (free reg required) of business’s use and intended use of Web 2.0 technologies.

Of interest:

  • 80% of respondants are using or planning to use Web Services
  • Asia-Pacific ranked second (69%) to India (80%) for increasing Web 2.0 investment over the next three years
  • RSS is more popular in North America (25%) than in other regions (20% or less)
  • Majority indicated with hindsight should have invested more on internal capabilities for Web 2.0 technology, but started at the right time
  • 75% of respondants use Web 2.0 technolgies for internal collaboration

It would be interesting to see how the Web Services sector was divided on the different technologies using that name. Especially how WSDL based services and REST based services are split based on type of firm and size of firm.

The uptake of corporate use of Wikis and other Web 2.0 technologies is an interesting trend and bodes well for companies such as Atlassain.