RIA conference announced — Web on the Piste, August 2008, New Zealand

Web on the Piste — the Conference on Rich Internet Technologies has been announced for this year.

It will be held on 20-21 August 2008 in the pretty Queenstown, in the South Island of New Zealand.

The theme for this year’s conference is usability and user experience in RIAs.

The cost for registering for the conference is AUD 500.

So if you are interested in either attending or speaking or sponsoring, head over to the Web on the Piste website and register your interest.

Last year’s conference was quite successful for a new event. The conference was completely booked out. There were about 120 participants. And there were some really nice speakers from the US, Australia and New Zealand (including me 😉 ).

In case you don’t quite know what the word “piste” means: “a piste is the name given to a marked ski-run or path down a mountain for the purposes of skiing, snowboarding, or other mountain sports” (from Wikipedia).

Queenstown is known for its beautiful surroundings and great skiing duing the southern hemispehere winters. So the big idea behind Web on the Piste is that you come down under, get to interact from peers, learn a few things about RIAs and ski/snowboard/bungee!

Here are links to some pictures from last year. Some pictures are on Flickr, and some are on Facebook.

(BTW, I work for Straker Interactive — the organizers of Web on the Piste).

Backing up and restoring all MySQL databases

This is another one of those “lest I forget” type of blog entries. There are times one has to migrate all MySQL databases to another box (like now when I have to give my Mac for repair and I have to work in a Windows machine!) This is the command to backup all MySQL databases

mysqldump –all-databases -u [username] -p -C > alldatabases.sql

Replace [username] with the name of the MySQL user. I used “root” as it has access to all databases. This will create a file called “alldatabases.sql” containing all the SQL commands for creating the databases and inserting data into them. To restore from this SQL file, use this command

mysql -h localhost -u [username] -p < alldatabases.sql

Now, I won’t have to rummage through the big wild web for this!

A great utility to test Lucene indexes

If you work with Lucene, then you know that you need to write your own GUI for testing the Lucene index. This can be a little annoying as the purpose of using Lucene is to quickly index content and retrieve it. Writing a GUI to test if Lucene is indexing the content correctly detracts from the purpose of using Lucene.

I was really kicked to find this nifty little utility called “Luke” that provides a GUI for testing Lucene indexes that have been created. I’ve been using it for a about an hour now, and simply love it.

Luke can be downloaded from this site.

Flex Builder alternative — IntellJ IDEA 7.0.3

The next version of IntelliJ IDEA– 7.0.3 — will have built-in support for Flex development.

Among other things, it will support:

  • Smart code completion for MXML and AS files, with cross-resolution of code symbols between them, even inside of mx:Script blocks and attribute values
  • Automatic code formatting, highlighting and styling
  • On-the-fly code validation with instant quick-fixes
  • Search for perfomance bottlenecks, bad code practices
  • Refactoring

Here is a tutorial using IntelliJ IDEAfor Flex development. You’ll need to sign up for the early release program of JetBrains to get the beta of IDEA7.0.3.

More information can be found on this blog post by JetBrains.

This is a great news for those who like to use IDEA as their preferred development environment. Also, it is good to have choice!

Price-wise they are at par — the personal edition of IDEA is USD 249, which is the same as Flex Builder.

Finding open network sockets on Mac OSX

I saw that there is a version of Leopard hanging around on the internet that can be used to run it on any Intel PC (well… an Intel PC with certain specifications!).

To find out if the the proof indeed lies in the pudding, I started to download it via a torrent. Now, downloading a torrent that is over 2 gigs is not a simple task — as least not here down in New Zealand, where bandwidth can be be at best described as quite sad.

So my torrent download has now been going on for a day and a half, and I’ve been a good boy — I’ve seeded more than downloaded 🙂

However, I wanted to find out all the open network sockets so that I could possibly open up my firewall or tweak it somehow to increase the speed of downloads. So I needed to find out the all the open network sockets to see the port number.

First I tried the usual netstat which gave me the following output:


Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)
tcp4       0      0  192.168.0.102.55129    74-46-59-218.dr0.13704 ESTABLISHED
tcp4       0      0  192.168.0.102.55105    host66-227-dynam.53868 ESTABLISHED
tcp4       0      0  192.168.0.102.54980    82.152.9.81.21695      ESTABLISHED
tcp4       0      0  192.168.0.102.54723    73.167.217.87.dy.4630  ESTABLISHED
tcp4       0      0  192.168.0.102.54418    163-158.static.q.http  CLOSE_WAIT
tcp4       0  34789  192.168.0.102.54397    71-80-169-111.dh.16262 ESTABLISHED
tcp4       0      0  192.168.0.102.54387    213.22.163.110.6887    ESTABLISHED
tcp4       0      0  192.168.0.102.54380    80.254.74.63.29113     ESTABLISHED
tcp4       0      0  192.168.0.102.53414    20129006121.user.6881  ESTABLISHED
tcp4       0      0  192.168.0.102.53183    adsl-76-248-156-.51413 ESTABLISHED
tcp4       0      0  192.168.0.102.52146    cpe-24-162-115-1.53692 ESTABLISHED

... blah ...       

However the netstat out put does not show the process id and the name of actual name of the process.

Then I found (thanks to the Man pages and Google), that there is a better way to do this — lsof -i. This gives you an output like:


i-n-d-i-v-e-r:~ indy$ sudo lsof -i
COMMAND    PID           USER   FD   TYPE    DEVICE SIZE/OFF   NODE NAME
launchd      1           root   13u  IPv6 0x3c2bbe8      0t0    TCP localhost:631 (LISTEN)
launchd      1           root   14u  IPv4 0x3f21e64      0t0    TCP localhost:631 (LISTEN)
mDNSRespo   21 _mdnsresponder    7u  IPv4 0x3c28b18      0t0    UDP *:5353
mDNSRespo   21 _mdnsresponder    8u  IPv6 0x3c28a40      0t0    UDP *:5353
configd     27           root    8u  IPv4 0x3c28cc8      0t0    UDP *:*
configd     27           root   12u  IPv6 0x45b8da0      0t0 ICMPV6 *:*
mysqld     103         _mysql   10u  IPv4 0x3f21a68      0t0    TCP *:3306 (LISTEN)
ntpd      3903           root   20u  IPv4 0x3c282a8      0t0    UDP *:123
ntpd      3903           root   21u  IPv6 0x3c28608      0t0    UDP *:123
ntpd      3903           root   22u  IPv6 0x3c28da0      0t0    UDP localhost:123
ntpd      3903           root   23u  IPv4 0x3c28968      0t0    UDP localhost:123
ntpd      3903           root   24u  IPv6 0x3c28890      0t0    UDP localhost:123
ntpd      3903           root   25u  IPv4 0x3c26a30      0t0    UDP 192.168.0.102:123
ntpd      3903           root   27u  IPv6 0x3c27b10      0t0    UDP i-n-d-i-v-e-r.local:123
SystemUIS 4038           indy    9u  IPv4 0x3c287b8      0t0    UDP *:*
GrowlHelp 4047           indy    3u  IPv4 0x4ea3a68      0t0    TCP 192.168.0.102:63110->216.64.142.80:80 (CLOSE_WAIT)
Skype     4048           indy    6u  IPv4 0x3c26370      0t0    UDP localhost:55598
Skype     4048           indy   32u  IPv4 0x3db9e64      0t0    TCP 192.168.0.102:51804->c211-30-0-59.wavrl1.nsw.optusnet.com.au:443 (ESTABLISHED)
i-n-d-i-v-e-r:~ indy$ sudo lsof -i -P
COMMAND    PID           USER   FD   TYPE    DEVICE SIZE/OFF   NODE NAME
launchd      1           root   13u  IPv6 0x3c2bbe8      0t0    TCP localhost:631 (LISTEN)
launchd      1           root   14u  IPv4 0x3f21e64      0t0    TCP localhost:631 (LISTEN)
mDNSRespo   21 _mdnsresponder    7u  IPv4 0x3c28b18      0t0    UDP *:5353
mDNSRespo   21 _mdnsresponder    8u  IPv6 0x3c28a40      0t0    UDP *:5353
configd     27           root    8u  IPv4 0x3c28cc8      0t0    UDP *:*
configd     27           root   12u  IPv6 0x45b8da0      0t0 ICMPV6 *:*
mysqld     103         _mysql   10u  IPv4 0x3f21a68      0t0    TCP *:3306 (LISTEN)
ntpd      3903           root   20u  IPv4 0x3c282a8      0t0    UDP *:123
ntpd      3903           root   21u  IPv6 0x3c28608      0t0    UDP *:123
ntpd      3903           root   22u  IPv6 0x3c28da0      0t0    UDP localhost:123
ntpd      3903           root   23u  IPv4 0x3c28968      0t0    UDP localhost:123
ntpd      3903           root   24u  IPv6 0x3c28890      0t0    UDP localhost:123
ntpd      3903           root   25u  IPv4 0x3c26a30      0t0    UDP 192.168.0.102:123
ntpd      3903           root   27u  IPv6 0x3c27b10      0t0    UDP i-n-d-i-v-e-r.local:123
SystemUIS 4038           indy    9u  IPv4 0x3c287b8      0t0    UDP *:*
GrowlHelp 4047           indy    3u  IPv4 0x4ea3a68      0t0    TCP 192.168.0.102:63110->216.64.142.80:80 (CLOSE_WAIT)
Skype     4048           indy    6u  IPv4 0x3c26370      0t0    UDP localhost:55598
Skype     4048           indy   32u  IPv4 0x3db9e64      0t0    TCP 192.168.0.102:51804->c211-30-0-59.wavrl1.nsw.optusnet.com.au:443 (ESTABLISHED)
Skype     4048           indy   33u  IPv4 0x4281270      0t0    TCP 192.168.0.102:54418->163-158.static.quiettouch.com:80 (CLOSE_WAIT)
Skype     4048           indy   35u  IPv4 0x5f0166c      0t0    TCP *:24242 (LISTEN)
Skype     4048           indy   36u  IPv4 0x3c28530      0t0    UDP *:24242
Skype     4048           indy   37u  IPv4 0x44bb270      0t0    TCP 192.168.5.51:64396->ppp-58-8-80-254.revip2.asianet.co.th:443 (ESTABLISHED)
Python    4446           indy   33u  IPv4 0x3e32270      0t0    TCP *:6881 (LISTEN)
Python    4446           indy   34u  IPv4 0x3c25f38      0t0    UDP *:6881
Python    4446           indy   37u  IPv4 0x569c270      0t0    TCP 192.168.0.102:51831->dial8-20.infoave.net:11289 (ESTABLISHED)
Python    4446           indy   41u  IPv4 0x3db966c      0t0    TCP 192.168.0.102:53414->20129006121.user.veloxzone.com.br:6881 (ESTABLISHED)
Python    4446           indy   44u  IPv4 0x42dde64      0t0    TCP 192.168.0.102:55149->IGLD-83-130-215-156.inter.net.il:42017 (ESTABLISHED)
Python    4446           indy   45u  IPv4 0x5f01a68      0t0    TCP 192.168.0.102:54380->80-254-74-63.static.monzoon.net:29113 (ESTABLISHED)

... more here ...

Using the lsof command (for listing open files), one can find out all the open files that are connecting to the network.

Run it as sudo to give a list of all open files. If you don’t, then you get a list of only those files that are open for the current users.

Coming back to the original reason why I wanted to check the open connections, I could see all the ports that were being used by the torrent client. (I don’t think I’ll do anything to my firewall to “optimize” the connectivity. I’ll just live with the slow download speed!)