Archive for June, 2012

HTTP Protocol

Posted: June 23, 2012 in Live in a Cloudy World

The Http is one of the main web protocols, used to access the websites content. When you surf the internet and enter www.example.com, a defined port is always assumed which is the port number 80 for the hypertext transfer protocol , if you want for any certain reason to change the port, all you have to do is to enter the URL followed by “:<port-number>” (www.example.com:73 ). The HTTP protocol initiates the TCP connection to the port number 80 and waits for the incoming requests from the web clients.

The web clients might send different methods to get specific function for a better consumption for the internet connection. For example for developing applications targeting different web browsers, you might first detect what the type of the web client browser’s then respond with the right document or file. Some of them might also be used for defining the data available in the website, what we call the meta-information. This would be better for the search for a specific type of data in the available websites, rather than searching the whole website or its body.

Some of the available methods guarantee the user and the server some functionality, like the GET, HEAD, OPTIONS, TRACE that their main objectives is to retrieve the data, files and documents from the server. The other functions from POST and PUT are for the users actions done on the document hosted on the server. Just for listing the available methods, actually I got them from Wikipedia:

  • Head for getting the Meta information rather than accessing the body and download the whole website
  • Get used for only retrieving data content from the website and it doesn’t have any more function than that.
  • Post is used for submitting data to the specified resource.
  • Put is used for uploading a representation to the resource.
  • Delete is used for deleting the resource
  • Trace is used for echoing back the received requests, so that the client can check if any modifications are made by the intermediate servers.
  • Options returns what methods the server can return.
  • Connect converts the request system to a transparent TCP/IP, usually to facilitate SSL-encrypted communication (HTTPS) through an unencrypted HTTP proxy
  • Patch is used to partially modify a resource.

Mutli-Tenancy

Posted: June 23, 2012 in Virtualization

Designing an application for the clients, you will always have to put into considerations how their data and application will be maintained. You will also have to put in mind that your application can be customized for your clients, from the user interface to some process and removed or added new functionalities. The multi-tenancy concept is how you can create multiple instance of your application for different clients in a way that each client can access his own customizable application and can only access his own data.

There are a lot of benefits for the Multi-Tenancy, in the past for hosting an application that multiple clients can use; they had to host each client’s application on separate hardware. With multi-tenancy, they all share the same application and they can make some changes in it according to their needs, which reduce the infrastructure cost and increase the level of security to make sure their data is not merged with others.

A lot of my previous post had “LIVE IN A CLOUDY WORLD” on it, and there are a lot of people who asked me what that is. Now as you surely have noticed I love and believe in the Cloud Computing in a way that I have no problem to spend all my time searching on it and trying to implement new things on it, test and so on. Actually that I am trying to do now, rather than wasting my time and got nothing back from it, and rather than spending my time studying things from the university that I don’t like and I don’t see that there are any benefits from it, I decided to start digging and do the researches I want in the field that I wish to work in. So any related work, post, application that I post on the internet related to the field will have a category or a hashtag on twitter #LiveinaCloudyWorld, or on facebook, wordpress, linkedin or even Paper.li.

As I am Microsoft Student Partner, I am Microsoft oriented and you may find a lot of posts related to Microsoft Technology, however I am doing my best to cover the field of Cloud Computing from different point of views and different technology implementation for the concept.

What exactly will I cover in “LiveinaCloudyWorld”? actually and frankly everything related to the field of Cloud Computing that I dig in will be posted, this might be that I am so excited about it, or I like the field but I am still discovering more about it. Basically you can find some introduction about Cloud Computing, the infrastructure from the processor, hardware and the Operating system, the platform especially Windows Azure and will try to cover others, and will try to get in the software as a service but I am not really interested in it.

You may also find several posts related to other technologies or concept and how this implemented on the different Cloud Computing platforms.

Starting to build my own cloud from scratch, as I am Microsoft Student Partner, I will start by the platform Windows Azure built on, which is Intel Microprocessor. I will start by how the Virtualization is executed on the processor level. I am sure every developer, especially those who develop using C/C++ languages are familiar with what is the data structure and why are we using it in our application. For the virtual machines, there are some structures that you have to know about, Virtual Machine Control data Structure (VMCS), you won’t find the VMCS, and the processor must have the VMX extension to allow you as developer to be able to build VMs on it or play with its internals.

The VMX extensions allow you to build 2 kinds of VMs on the processor, the first called the VMM (Virtual Machine Monitor) and the second is the Guest OS. We can know from their names that the VMM is made for the full control of the infrastructure and the hardware platform; it acts as it is the host. The Guest VM acts like a stack for the guest OS and applications, it acts and executes normally as an application with no VMM using the shared resources. Just to point out that each VM runs independently than the other VMs sharing the same resources.

So how that works and what the VMM can do to the Guest application?

The main 2 transactions made between the VMM and the guest VM is when the guest VM starts or when it exits. When the VMM send the instruction VMLAUNCH or VMRESUME, it does something like releasing the guest VM and it regains back control on it when this guest VM exits.

for the Processor, each logical processor can handle only one VM at a time that doesn’t mean that It cannot support more than that but each VM has something called the launch state which defines which VM is active and which is inactive. For the actives one, the logical processor executes the VM with the current state.

 

 

 

Finally I got windows server installed on one of my computer, continuing my research on the cloud computing. Now I have installed the Windows Server 8 Hyper-V, I will show you how to manage it and configure the virtual machines created on your own private Cloud. So for those of you who don’t know Windows PowerShell here is one of my latest blog posts, I have already done, describing it and how can you benefit from it. Just to mention my version of Windows Server 8 is: Windows Hyper-V server 8, it is a bit different than the others; here you can do all the required things using Cmdlet.

First of all you have to get the PowerShell for Hyper-V, which extend and give you more capabilities than the PowerShell already installed on your Hyper-V. You can get the additional libraries from this website. After you download the Zip file and unzip it, you can now install it on your Hyper-V just by changing the directory to where the file is unzipped and then enter the following command or call the file of the installation: install.cmd. You can monitor the installation and at the end you can see the PowerShell window opened at the end.

You can get all the command by simply entering the following command in the PowerShell window:

    Get-Command –Module -HyperV

Now we have the PowerShell installed, so let’s create our first VM using the PowerShell Libraries. The steps are so simple you can create VM on the server you are working on by simply typing the following command:

    New-VM <VM-Name>

For creating the VM on different server you have to define its name after the VM name.

    New-VM <VM-Name> “<Server-Name>”

I have talked about Cloud Computing in a previous blog post; you can read it for more information. In this one I will start explain the first layer of the Cloud Computing which is the infrastructure. This layer is the physical one. This layer mainly consists of servers, networks, facilities, cooling system, electricity, every and any necessary thing to build a datacenter. This layer mainly targets the IT and the operators who are always looking forward for a host to host their applications and data.

The infrastructure requires an operating system to be installed on it to take control along the whole infrastructure, there are a lot of OS can be installed on these infrastructure like Windows Server and Linux, Unix, AX… etc. The target of the infrastructure may oblige you to install on it some kind of OS like for example, if this infrastructure is made for the consuming its processing power for research or whatsoever, the area of research will be around the HPC OS(High Processing Computing). There are some companies like Microsoft, that help you build your own private cloud to maximize the utilization of the hardware resources the company has. This is done by several products not only an OS but with system center. In my opinion, the era for the private cloud won’t endure for a long time but it is just for a certain time until the Cloud Computing gains more and more confidence, after that I think that all the companies from large enterprises to the small one will move to the public cloud.

The public Cloud Computing offers you now the infrastructure as a service, cutting off the IT infrastructure cost for all the rising and the large enterprises companies. They can host their data on the cloud infrastructure and pay only for what they use from processing power, storage and other services.

So how the Cloud Provider prevent you from accessing other customer’s data and give you in the same time more control to manage your data on his infrastructure? The answer is quite simple: Virtualization. I wrote a blog post about it before, and I am willing to go in it step by step from the virtualization level to a more advanced one, how to build your VM.

When we go buying any new laptop these days we all hear about the cores, Intel core2 due, quad core … etc. Also for the computer developers they know about the cores and might heard about the threads, actually I am not talking about the threads in the development but on the processor threads.

The explanation is too easy; consider the number of the cores is the number of the physical processor that works in parallel way and the number of the threads as the number of the logical processor. The threads or the logical processor is used to elevate and to execute more instructions, we can consider that each thread execute a specific instruction, if the processor has 2 threads, it can executes 2 instructions in the same time.

Nowadays, the processor may have actually more than one physical processor and in each physical processor there might be a number of threads that share some of the components of this core, like for example the ALU, the execution engine. For the physical processors they might share some components like the bus interface that transfers the data and instructions from and to the memory.