/me@(voip.)?|www./ SamLown.com

P2P Between Mobiles

Peer-to-peer calls between mobile phones is something I’ve wanted to see for a long time. It makes sense being able to call or connect directly between two mobile devices from a basic technical point of view. Clearly this isn’t something the mobile operators would be too keen on though, allowing users to call freely between each other.

However, according to this BBC story a Swedish company TerraNet appears to have come up with a solution:

You can call and text anyone within two kilometres, or up to 20 kilometres in a mesh network. What’s more, you can call and text anyone in the world through a TerraNet wireless Internet access point. With TerraNet technology integrated any type of handheld device transforms into a wireless communicator.

The technology integrates seamlessly with wired and wireless VoIP solutions.

Sounds great, but sadly their site is lacking in proper technical details or even hardware pictures. Which leads me to suspect this may be over-hyped. There is also no mention of open standards which for me puts in the same ball park as Skype (which in comparison is very similar indeed.)

Mesh systems are impressive in theory, but I’ve yet to actually see one working, especially over wireless connections (maybe someone can correct me?). Adding complications to this is the fact that most people tend to be moving around when they are talking on their mobiles, and even more so when in standby in a pocket. This must make it especially difficult to maintain a decent channel between two users calling from one side of the mesh to the other. Perhaps these phones are meant to be static?

I remember when I spoke to Negroponte and asked about how the Mesh side of the OLPC project was going, he said that one of the main problems with a mesh network is deciding which route to take from the client to the server when there are a large number of users. I got the impression they were still working on the protocols to deal with this sort of thing to provide a reliable connection.

I don’t think the walky-talky market need worry too much yet, but I’d love to be wrong!

Eben Moglem on GPLv3 and Free(libre) Information

After watching this talk of Eben Moglem in Edinburgh with his comments on the new GPLv3 license he helped develop I was left hugely impressed with the level of clarity and wisdom he presented. More than just a software license, Moglem presents and convincingly justifies why the GPL and community behind it is so important to the free movement of information and learning.

If you have an hour to spare, I really do recommend this talk.

Nicholas Negroponte digital autograph

Today, I had the pleasure of meeting someone I greatly admire, Nicholas Negroponte, the founder of the One Laptop Per Child project gave a talk at Campus FAES organised by FAES, the foundation formed by the ex-Spanish president, Jose María Aznar (who was also present.)

After the excellent talk we were given the opportunity to examine the $100 laptop itself and saw first-hand the whole impressive bundle of concept and device. Aside from running Linux (and using GTK), the device felt sturdy and the screen while I thought perhaps isn’t the clearest compared to normal LCD displays, came into its own in the bright Spanish sunlight, with text being easily readable, impressive compared to the battle that normally results when trying to read a mobile outside, and perfect for the intended market.

Finally, being the author of Being Digital I couldn’t help but ask for Nicholas’s digital autograph. The picture you see above is my Nokia N800 signed by Nicholas himself, something I’m rather proud of :-)

My first high(ish) profile public site in Rails!

FAES, the Spanish Foundation for Social Analysis and Studies is now running on Rails, or at least the document management side is. (Anything you see under the documentos.fundacionfaes.info domain is Rails, you’ll also notice the pretty URLs).

Under the multimedia section you’ll also find a spot of backwards compatible AJAX along with the flash videos, another first for me. This is a section I’m still working on, so expect some improvements, including proper support for jumping through large videos.

For the real geeks, you’ll probably be interested to know what we’re running on the server. In the end, I decided on Lighttpd for static content and proxying dynamic content to Pound, which in turn proxies and evenly distributes load to the 3-some Mongrel cluster. Naturally, the backend database is MySQL.

So far, I’ve been really happy with the performance, and Lighttpd is really refreshing compared to apache. Lighttpd also has support for “streaming” flash videos, which was one of the main selling points for me, and comes into play in the multimedia section.

There you have it, probably one of the first high profile (although perhaps not high traffic) websites to be running Rails in Spain. Expect more ;-)

Rollover CSS, and I'll give you a biscuit ...

Perhaps with this post I’m giving away far to much about how easily I’m pleased, but I couldn’t help share this little hint for easily creating rollover images. As most who know me know, web design isn’t my favourite thing in the world, so I’m well up for making life easy with things like SASS and the art of cut & paste.

This piece of magic however is something I created with a bit of help from Piotr, and easily allows you to set up roll-over images without the hassle of updating the sytle sheets for each and every image.

This is the code that needs to go into your main style sheet to make it work.

.swapper {
   background-repeat: no-repeat;
   background-position: 0 0;
   display: block;
 }
.swapper:hover img, .swapper:hover .swap {
    visibility: hidden;
 }

The HTML that will allow you to make use of this should be similar to the following:

<a href="#" class="swapper" 
  style="background-image: url('/images/button1_back.png');"
><img src="/images/button1.png" alt="Button" border="0"></a>

As can be seen in the HTML snippet, the link is wrapped around the image as per normal, and given the “swapper” class, along with the alternate backgound image, and the main image is set just as a normal image.

Now load this up in Firefox and you should have instant roll-overs!

IE FIX:

IE might not like this setup, but fear not, add the following generic snippet to your style sheet and it should work fine:

* html a:hover {
  visibility: visible; 
}

Let me know if you find this useful! (I’ll try and add an example soon too :-)

OpenID to the same Mongrel Server ... or not

After upgrading to the new website, I realised that I hadn’t added my links for my OpenID account associated with “www.samlown.com”. I was resting at the time, so I grabbed my N800 logged on to the server and copied to details over. To my dismay, it didn’t work, so I decided to sleep on it.

This morning it suddenly occurred to me, Rails when running under Mongrel is only available on a single thread, so when I try to log into the site using openID, it attempts to make a connection with itself, causing a dead-lock, and eventual time-out. D’OH.

I guess this means I’ll be installing mongrel_cluster sooner, and consequently upgrading apache with the latest “mod_proxy_balancer”, rather than later.

100% Live

SamLown.com is now completely live and on rails! There are obviously still bits I am working on and would like to add (I’m still not convinced about the styles), but I’m sufficiently confident to have replaced my old site.

Those using RSS should automatically receive the new feed, but leave me a comment if something freeky happens.

Any comments or suggestions? please let me know!

Exim: Removing blocked domains from the hints database

My Mail Transfer Agent of choice is exim, which I’ve now been using for many years. After trying many others over time, I’ve found it the easiest and most flexible to control how I want, including access control from IMAP servers and MySQL databases for virtual domains and user control.

A setup which I have used several times now, is to use two servers for handling mail for small offices. One server sits in the office with IMAP so that everyone has their own local mail, and the second is a box somewhere on the internet that receives all the mail and forwards it to the office machine when needed. This setup works great, except when there is a power out in the office over the weekend, and there is a backlog of mail on the internet server which refuses to be delivered until the retry times are reached.

This is what you’d expect and hope would happen so that no mail is lost, however there are times when you’d like to the situation to be resolved as soon as possible. Here’s how I forced the mail to be delivered.

Exim maintains a special database in its spool directory of delivery hint information. This allows exim to know which domains and hosts haven’t resolved correctly, when to try another delivery, and a list of messages which are waiting to be delivered, amongst a few other bits of information.

To find out what this database contains, the exim_dumpdb command can be used in combination with grep to find out details about hosts stored in the database. To speed things up a bit, we also have the exinext command which will provide information about a specific domain. For example, when a domain is blocked you’ll get something like this:

 > exinext berlin.ciudad21.net
 R: dnslookup for user@berlin.ciudad21.net
 first failed: 02-May-2007 15:57:24
 last try:     03-May-2007 07:48:44
 next try:     03-May-2007 15:24:21

As can be seen, for mail to be delivered to that domain, we’d have to wait until around half past three in the afternoon.

To speed things up, we can delete this record from the database. First we find out the full ID:

 > exim_dumpdb /var/spool/exim4 retry | grep berlin.ciudad21.net
 T:berlin.ciudad21.net:80.38.36.154 113 65 No route to host

We then run the exim_fixdb and simply enter the ID returned from grep, and enter ‘d’ to delete the last entry found.

 > exim_fixdb /var/spool/exim4 retry
 Modifying Exim hints database /var/spool/exim4/db/retry
 > T:berlin.ciudad21.net:80.38.36.154
 03-May-2007 07:48:44
 0 error number: 113 No route to host
 1 extra data:   65
 2 first failed: 02-May-2007 15:57:24
 3 last try:     03-May-2007 07:48:44
 4 next try:     03-May-2007 15:24:21
 5 expired:      no
 > d
 deleted

A few moments after doing this, the server will be resolved correctly, and mail will start flowing as usual.

The all new SamLown.com

Welcome to the all new SamLown.com! Its taken a quite a lot of work to get it this far and indeed there is a lot more to get done, but at least the basics work. Check out the openID login and leave me some comments.

Rails: Translate Columns plugin now ready for download!

I’m pleased to announce that my transparent translation plugin for Rails is now available for initial testing. I’ve yet to complete full on-line documentation, but the plugin’s README describes the most important features, and there is an example application to show how to use it.

Check out the svn repository for both the translate columns plugin and application. The README has more info.

UPDATE: old URLs no longer valid, latest version now in github: http://github.com/samlown/translate_columns/tree