Saturday, June 30, 2012

IPv6


IPv4

IPv4 has been around since the early 1980s. This type of internet layer protocol addressing system is made up of two parts, the network identifier and the host identifier. Using classful networking, the IPv4 addressing range was divided in 5 classes. The first 3 classes had different capacity to be used for different purposes. Class D and class E were the same size, with the former being used for multicast addressing and the latter reserved for future applications. However, at around 1985, another method was devised to divide IP networks better and variably, called Variable Length Subnet Mask. This allowed networks to be divided in a small portion for the hosts, which still allowed growth.


Figure 1: Cisco CRS-3, with100Gbps Ethernet interface and 322 Tbps of interconnect capability

IPv4 Address Depletion

The Internet Assigned Numbers Authority (IANA) is in charge of the IP address structure. Since the 1980s, it was immediately apparent that the pool of available IPv4 addresses was being depleted at a much larger rate than was initially anticipated. Classful networks, Classless Inter-Domain Routing and NAT all were created to solve the problem of IPv4 address exhaustion. However, with all these technologies, something still had to be done and in 1996, IPv6 was born.


Figure 2: Difference between the IPv4 and IPv6 header

IPv6

While IPv4 uses 32 bit addressing, IPv6 uses 128 bits. This means that there are 3.4 x 1038 address. Each living person can have 4.8x1028 addresses for himself. Each subnet in IPv6 has 264 addresses. This means that each subnet has the square size of the whole IPv4 addressing. Of course, this means that a very small number of addresses will be used in each subnet but this will help hierarchical route aggregation.

Security

IPv6 has IPSec built in its architecture. This means that IPv6 was built with security in mind. Although IPSec was engineered for IPv6, it is very common in IPv4 networks. This happened because IPSec was back-engineered to work with IPv4. IPSec was designed to be an integral part of the IPv6 protocol suite, but was later removed and made optional.

IPv6 Address Format

The IPv6 address size is 128 bits. The preferred IPv6 address representation is: xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx where each x is a hexadecimal digit representing 4 bits. IPv6 addresses range from 0000:0000:0000:0000:0000:0000:0000:0000 to ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff.

In addition to this preferred format, IPv6 addresses may be specified in two other shortened formats:
Omit leading zeros - Specify IPv6 addresses by omitting leading zeros. For example, IPv6 address 1050:0000:0000:0000:0005:0600:300c:326b may be written as1050:0:0:0:5:600:300c:326b.

Double colon  - Specify IPv6 addresses by using double colons (::) in place of a series of zeros. For example, IPv6 address ff06:0:0:0:0:0:0:c3 may be written as ff06::c3. Double colons may be used only once in an IP address.

An alternative format for IPv6 addresses combines the colon and dotted notation, so the IPv4 address may be embedded in the IPv6 address. Hexadecimal values are specified for the left-most 96 bits, and decimal values are specified for the right-most 32 bits indicating the embedded IPv4 address. This format ensures compatibility between IPv6 nodes and IPv4 nodes when you are working in a mixed network environment.
These two types of IPv6 addresses use this alternative format:

IPv4–mapped IPv6 address - This type of address is used to represent IPv4 nodes as IPv6 addresses. It allows IPv6 applications to communicate directly with IPv4 applications. For example,0:0:0:0:0:ffff:192.1.56.10 and ::ffff:192.1.56.10/96 (shortened format).

IPv4–compatible IPv6 address - This type of address is used for tunneling. It allows IPv6 nodes to communicate across an IPv4 infrastructure. For example, 0:0:0:0:0:0:192.1.56.10 and::192.1.56.10/96 (shortened format).

All of these formats are valid IPv6 address formats.

IPv6 Day - 6th June, 2012

Instead of swapping an ISP one by one to change from IPv4 to IPv6, a day was organized so that a bulk change will be done. http://www.worldipv6launch.org/measurements/ shows the statistics and changes  which happened in the area of IPv6 since 6th June, nearly a month later.


Figure 3: Banner for World IPv6 Launch

Monday, June 25, 2012

A Chair and Sending Emails


This second post of Second Life takes me to creating some objects and stuff using the scripting language and the object builder. It is a bit frustrating at first but then it can get quite ok. The first thing I attempted to do was to build a chair and make my avatar sit on it. The first problem I had was that when I did the legs of the chair, another avatar came and removed it. Asking her why, she said that I was not allowed to build there and she took me to another place.

Creating a Chair

I used cylinders to make the legs and a cube to create the seat and the back of the chair. Although it is simple, it is a cute chair :) I used co-ordinates to create the legs of the chair so that I would know exactly how large it is and it would be easy to create the seat. I made the back legs longer so that I would use them for the back of the chair. Then I created two cubes, one for the seat and one for the back of the chair. Using the arrows I could move the parts and then dial in the exact number in the coordinates to create a smooth even chair. It took me nearly 1 hour to create this chair, but I was very happy with the end result. Also, the way I created the chair the avatar sat down immediately.


Figure 1: The Chair


Figure 2: The Avatar Sitting Down

Creating an object to send emails

Anyone doing programming knows that you need to setup a proper SMTP server with all the necessary details and settings to be able to send an email from a website or from an application. However, it was very easy to send emails in Second Life. using only a function with 2 lines of code, I was immediately sending emails when the object was touched. This was done by using the code below:

touch_start(integer total_number)
{
     llEmail("danielborgmt@gmail.com","Hey, You touched me","I have been touched on Second Life");
     llSay(0, "You Touched Me! - I sent an email to my owner!");
}

This shows how easy it is to send emails from Second Life. After touching the box I created with the script above, using the technique shown below, I got an email from the Second Life Object. The email indicates the name of the object, the Region name and also the local position.


Figure 3: Touching the Object


Figure 4: Email received from the Object 

Thursday, June 21, 2012

What on earth is Second Life????



Figure 1: Second Life Logo

Second Life is a 3D world where everyone you see is  a real person and every place you visit is built by people just like you and me.

Second Life is an online virtual world. It was developed by Linden Lab and was launched in 2003. Residents can use a number of client applications, or Viewers, to connect with each other through avatars in this virtual world. The world, known as grid, can be explored by thee residents to meet other residents, participate in events and more. It can also be used as a trading place. After reaching top popularity in the late 2000s, it has declined in popularity.

Second Life has a 3D modeling tool which is based on simple geometric shapes which allow residents to build virtual objects. It also has a procedural scripting language, Linden Scripting Language or LSL. This language can be used to add interactivity to objects, such as sending emails, dancing, and more.

Never in my life I have resisted something as much as I resisted Second Life. Using Second Life is an essential part for this module and it is compulsory, meaning it cannot be avoided. Personally, I do not see any point of learning this language as I cannot see myself making any use of this knowledge. After all, this product is decreasing its popularity. Personally I do not think that this will help me find a better job and I find it an utter waste of time.

However, my opinion does not count and I still have to work on it. Next week I will continue by explaining the interface of Second Life and how to navigate around.


Figure 2: Residents as Avatars hanging out

My question about this is how useful such a virtual world is. Talking to some of my colleagues, while working with some of the largest casinos in the world, I noticed that some of the casinos actually have a similar environment for their players. Players in such casinos choose an avatar to play 3 Dimensional poker for example. It might not be that boring after all......


Figure 3: An Avatar in a Live Casino environment

Monday, June 18, 2012

Mobile Application Development


The world of smart phones totally changed the way we live, as we constantly have a mini computer in our pockets. Several sizes, form factors and platforms are available and choosing your smart phone is certainly not easy, unless you are either a brainwashed Apple fan. The most common OSs for mobile phones are Android (36.9%), iOS (28.5%), RIM (18.1%) and Symbian (13.1%). Bada, WinMobile and Windows Phone 7 occupy the rest (3.4%).


Figure 1: Top Mobile Operating Systems


Figure 2: Operating Systems in Comparison (January 2012)


Figure 3: Smart Phone Manufacturer Comparison

One Application, 5 Operating Systems

Deciding on which platform to start developing can be tricky. There are an unlimited number of devices out there to cater for all but sticking to just one platform many times is not good enough. Thank god for PhoneGap, Appcelerator Titanium and Rhodes.

Android developers use Java to build applications for Android devices. iOS developers use Objective-C to develop applications for iPhones and iPADs. Immediately we can see that the code is not interchangeable since a different language is used. Also, learning Java and Objective-C has a steep learning curve. How about using JavaScript, CSS3 and HTML5 instead. These three applications allow you to create an application using JavaScript (or JQuery), CSS3 and HTML5. These technologies are very fast and also quite easy to use.


Figure 4: Appcelerator Titanium, PhoneGap and Rhodes

How is it done?

PhoneGap allows the developer to build applications once using web standards. Then, using PhoneGap, a mobile developer can get access to native APIs and then allows the developer to deploy to as many devices as he wants. Appcelerator uses nearly the same cycle. However, Rhodes makes use of Ruby to create the applications, rather than the other web technologies. This makes Rhodes less popular as there are a smaller number of developers using Ruby than the other languages.

Android Market vs AppStore

These two are the location people use to download applications for Android and IOS respectively. It turns out that although Android owns more than 50% of total smartphone market share, developers have, thus far, been reluctant to flock to the Android platform with their apps. In fact, there are more than 4 times as many iOS developers as there are Android developers. Why, you may ask? Quite simply, developers have long known that Apple device owners are closely locked into the Apple ecosystem, with credit cards on file. Many a study has been done, and the results are unanimous – Apple device owners are more willing to pay for apps. That being said, there are many apps in the Google Play Store that are also on Apple’s App Store – but are free, or ad supported.

Downloads and Fragmentation

The most frustration for developers on the Android platform has come from one evil word, which is fragmentation. As noted in the image above, thanks to The Next Web, iOS versions are adopted much faster and in far higher numbers than any recent version of Android. Ice Cream Sandwich, however,  still has not passed the 3% mark of all Android devices. Furthermore, according to GigaOm, 45% of iPhone and iPod Touch users purchased at least one paid app every month. Only 19% of Android users bought a paid app every month. In addition, iOS users almost double Android users in the total number of apps downloaded per month.


Figure 5: Fragmentation

Conclusion

In the end, this war between Android and IOS will never be over and it will never be a seamless job to produce apps for both Android and IOS. It is still a matter of personal taste and what the developer wants to achieve with the application he or she is going to develop