Friday, April 13, 2007

On Bits, Bytes, and Bitrates

How fast can you download torrents?

This is one of the problems that I get from most of my friends who are into torrent downloading business. When I say that I get something like 55 kBps, with SLT ADSL basic connection, which offers 512kbps downstream, most of them go nuts! What the heck happens to the 457? If you wonder where 457 came from, try subtracting 55 from 512.

This post is a reply to all those who disagree with me at such discussions. Now I can ask anyone who starts arguing with me on this regard, to do their homework first, i.e., to read mu blog ofcourse!

Theoretically, with SLT ADSL basic package, I should be able to download at 512kbps (i.e., 500Kibps, 62.5kBps, or 64KiBps). All these figures are in accordance with the IEC 60027-2 standards. IEC stands for International Electrotechnical Commission. They define the standards on Letter symbols to be used in electrical technology [1].

kbps, kBps, Kibps and KiBps

In the above paragraph, I've mentioned kbps in four different manners (sometimes with an i next to the k). This shows the difference it can make just by capitalizing a single letter of a letter sequence in engineering. Oh! did I say "gibberish"?

kbps is a measure of data transfer speed. Some refer to it as a measure of bandwidth too. However, as bandwidth has no fixed definition at all, for some meanings of bandwidth, it may not make any sense to be measured by kbps. Wikipedia has a great article on different meanings of the term "bandwidth". 1 kbps is 1000 bits per second (not 1024). This measure had been always used mostly (if not only) in telecommunication and there is no dispute over whether it is 1000 or 1024.

kBps is the data transfer rate in 1000 Bytes (a byte is 8bits) per second. It is commonplace to write this measurement as KBps or KBPS, though it is not the standard. Also it is very common to use kB to indicate 1024 bytes. Even it was used in almost all the computer applications that were built before the new millennium and in many applications even today. However, since IEC now have a standard for measurements of information too, kBps stands for 1000 bytes.

Kibps is pronounced kibi-bits per second. The kibi- prefix stands for 1024, in the same manner kilo- stands for 1000. This prefix was introduced to replace k, the kilo- prefix used in a binary sense.

KiBps by this time it should be fairly obvious that KiBps stands for kibi-bytes per second. and that it is 1024 bytes per second.

In the same way Ki is used for 1024 (2^10) bytes, Mi, Gi, and other respective prefixes are used to represent 2^20, 2^30 and the respective powers of 2. (FYI: Mi is mebi- and Gi is gibi-)

Calculation

Okay, now it's time for elementary mathematics.

My ADSL connection is 512kbps download.
Therefore it is 512*1000 = 512000 bits per second.
That means (512000/8)/1000 =64 kilo bytes per second.
also, 512000/1024 = 500 kibi bits per second.
and in turn, (512000/8)/1024 = 62.5 kibi bytes per second.

giving 15% for noise, the actual download speed would be something like... (64/100)*85 ~ 55kBps.

Afterall, I am a happy man, I get almost the most out of my ADSL connection practically possible.

Usage

Even though the standards are there, it has not been adopted by many computer applications yet. For examples, Windogs still use kB for 1024 bytes. Linux and other open source software (rulez!) like Gnome are among the first to use the standards.

Lessons to learn
  1. If you have an SLT ADSL basic package and your torrent client says that it is doing 55kBps, don't complain, it is doing it's best.
  2. Never trust the computer when it comes to storage sizes or data transfer speeds. You never know (if it's manual specifically says so) whether k stands for 1000 or 1024, and whether M stands for 1000000 or 1048576.

Wednesday, April 4, 2007

Someone Else

Someone Else
by Nuwan Ishantha

Is this you who I see?
Or is it someone else?
Or is it someone else that I saw in you?

Is this confusion?
Or is it that I "was" confused?
Confused that you were someone else, when you were still actually you?

Am I who I think I am?
Or am I someone else?
Or am I just not the one I thought I was?

Am I?
For I see that you are still who you are
But that you are still someone else.

I am someone else.

Monday, April 2, 2007

WSO2 Identity Solution Alpha Released!




This is bit of an old news. As I was not at home for the last week, I could not blog about this earlier than this.

WSO2 Identity Solution is an open source implementation of Microsoft CardSpace, which is a standards-based solution for working with and managing diverse digital identities.

I started working on the Identity Solution by accident, when someone was needed to write an apache module for this solution. Although there were many who knew better, and I knew nothing about writing apache modules, I got the chance since I was jobless (not exactly!) then. Afterall, it is the main project that I'm working on at the moment. At the first shot at it, things didn't look so good. I was trying to write the whole module using very low-level APIs, not knowing that there are a lot many comprehensive abstractions that can be used. Handler concept, which is new in Apache2 made my task a few orders of magnitude easier than it would have been in Apache 1.3.

Nick Kew's companion website of the book "The Apache Modules Book" came in handy when I needed any bright ideas. I wonder how efficient I would have been if I had the book at hand. Thanks Nick, for the great effort.

Release note:

We are happy to announce the alpha release of WSO2 Identity Solution.

This release can be downloaded from the following location:

http://dist.wso2.org/products/solutions/identity/alpha/

Key features of this release includes

* An Apache2 module to enable CardSpace authentication on a
web application.
* A ServletFilter component to enable CardSpace authentication
on a Java servlet based web application.
* Two samples explaining the use of the above components.
(Please follow instructions given in the README files)

Release artifacts :
-------------------------------------------------------------------------------
Binary distribution - identity-solution-alpha-bin.zip
Source distribution - identity-solution-alpha-src.zip

Project Information
-------------------------------------------------------------------------------
Web site - http://www.wso2.org/projects/identity
Issue tracker - https://wso2.org/jira/browse/IDENTITY
Mailing list - identity-dev@wso2.org


Thanks,
WSO2 Identity Solution Team