70 minute read
Kick-Starting Virtualisation with VirtualBox
from ource ...rch 2013
by Hiba Dweib
Admin Let's Try
Kick-Starting Virtualisation with VirtualBox
Advertisement
This article looks at some quick steps for installing, configuring and working with Oracle VM VirtualBox.
Virtualisation has been growing in popularity ever since it first appeared on the scene in the early 1960s, as an effective and reliable way to share compute resources across mainframes by the creation of multiple virtual machines, each running with their own defined RAM and disk space. Virtualisation software adoption gained impetus from the year 2005 onwards and has grown ever since, faster than anyone (including the experts) imagined. There are three main areas of IT where virtualisation is currently making inroads—network virtualisation, storage virtualisation and server virtualisation; but for this article we are going to look at a much simpler version called Operating System Virtualisation.
Operating System Virtualisation enables users to create multiple guest operating systems (OS) within a single ‘host’ OS (see Figure 1). The host OS is the one that you see when you start your computer. Each guest OS is provided with some definite RAM and CPU from the host machine, for its consumption. Such virtualisation is useful when you are aiming to do research, testing or development work, where virtual machines can be flexibly provisioned, used, and then deleted after some time. This actually helps save time and the cost of procuring unnecessary hardware.
There are a lot of open source as well as commercial OS virtualisation software on the market, each with its own pros and cons. Here’s a quick comparison between some of the most widely used OS virtualisation products: QEMU, Oracle VM VirtualBox, VMware Player and Parallels Desktop 8 for Mac.
Introduction to VirtualBox
VirtualBox is a cross-platform virtualisation software designed to run on most modern x86 systems. Initially developed by a company named Innotek, VirtualBox was bought over by Sun Microsystems in 2008 and is now developed by Oracle Corporation as part of its family of virtualisation products. VirtualBox is installed on an existing host OS as a simple application. You can then create additional virtual machines (VMs) with this, which contain guest operating systems. Each guest OS gets its own virtual environment that comprises some dedicated CPU, RAM as well as hard disk space. Besides these, VirtualBox also provides some additional useful features such as:
Features QEMU
Definition
Method of operation
Host CPU QEMU (short for ‘Quick EMUlator’) is emulation software that provides a set of dynamic device models that enable it to run a variety of unmodified guest operating systems.
Paravirtualisation and porting or hardware virtualisation. Runs on x86, ARM, Sparc64-32, OpenRISC
x86, x86-64, IA-64, PowerPC, SPARC 32/64, ARM, S/390, MIPS
Oracle VM VirtualBox VMware Player Parallels Desktop
Oracle VM VirtualBox is a cross-platform virtualisation software meant for x86-based systems. VMware Player is an x86 virtualisation software application made by VMware, Inc. It is installed on an existing host OS as an application. This host application allows additional guest operating systems to be loaded and run, each with its own virtual environment. Parallels Desktop for Mac by Parallels Inc is software providing hardware virtualisation for Mac PCs with Intel processors.
x86 Virtualisation x86 Virtualisation x86 Virtualisation
x86, x86-64, Intel VT-x, AMD-V x86, x86-64, Intel VT-x, AMD-V x86, Intel VT-x
Guest CPU x86, x86-64, Alpha, ARM, CRIS, LM32, M68k, MicroBlaze, MIPS, OpenRisc32, PowerPC, S/390, SH4, SPARC 32/64, Unicore32 and Xtensa x86 and x86-64 x86 and x86-64 x86 and x86-64
Supported host OS Windows, Linux, Mac OS X, Solaris, FreeBSD, OpenBSD and BeOS Windows, Linux, Mac OS X x86, Solaris, FreeBSD and eComStation Windows and Linux Mac OS X
Supported guest OS Windows, Linux, Mac OS X, Solaris, FreeBSD, OpenBSD, BeOS and others; runs arbitrary OS DOS, Linux, Mac OS X Server, FreeBSD, Haiku, OS/2, Solaris, Syllable, Windows and others; runs arbitrary OS Windows, Linux, Solaris, FreeBSD, OSx86 (as FreeBSD), virtual appliances, Netware, OS/2, SCO, BeOS, Haiku, Darwin and others; runs arbitrary OS Windows, Linux, FreeBSD, OS/2, eComStation, DOS, Solaris and Haiku
Provides guest OS drivers No Yes Yes Yes
Snapshots facility Yes Commercial support availability No
Licensing GPL/LGPL Yes No
Yes (with a commercial licence)
GPL version 2; full version with extra enterprise features is proprietary Yes
Proprietary, free of charge for personal noncommercial use Yes
Yes
Proprietary
Costing Free Free Free
Commercial Product Link http://goo.gl/890fO http://goo.gl/HLYfh http://goo.gl/K0g5F http://goo.gl/BD825
APPLICATION APPLICATION
Windows 2008 R2 VM RedHat VM
VIRTUAL MACHINE MONITOR
(VirtualBox)
HOST OPERATING SYSTEM
(Ubuntu 12.10 Desktop)
HOST HARDWARE
CPU Network RAM Hard Disk
Figure 1: A virtual system Shared folders: With this feature, you can permanently or temporarily connect your host OS folders and use them as a network drive in your guest OS. Snapshots: A snapshot of the guest OS can be taken at any point. This helps you to revert the state of your guest
OS in case something goes wrong with it. State saving: When you close the OS window, you are given the choice of sending a shut down signal, powering off, or saving the current state. Seamless mode: Like Parallels on Mac, this integrates the guest OS with your host OS’ desktop.
The latest release of VirtualBox (v4.2.6) additionally comes with Windows Aero support and guest VM cloning facilities.
Installation and configuration on Ubuntu 12.10
VirtualBox can be installed on Windows, Solaris, Linux and the Mac iOS. In this section, we look at how to install and configure VirtualBox on Ubuntu 12.10 Desktop (Quantal Quetzal). There are two ways of doing this. The first would be to manually download the VirtualBox DEB file from https://www.virtualbox.org/wiki/Downloads to your Ubuntu system and run it. However, this does not work all that well at first run; you may run into some complications like missing dependent packages or even issues with the kernel driver. All these can be solved, but take time and effort—so let’s explore the easiest way. Simply launch a terminal window and run the commands given below.
Note: In Linux, launch a terminal window using the key combination Ctrl–Alt–T; Mac users need to substitute Ctrl with the Cmd key.
The first step is to add a software repository key into the sources.list.d/virtualbox.list file:
wget -q http://download.virtualbox.org/virtualbox/debian/ oracle_vbox.asc -O- | sudo apt-key add -
Next, add the repository from where you are going to download VirtualBox:
sudo sh -c 'echo "deb http://download.virtualbox.org/ virtualbox/debian $(lsb_release -sc) contrib" >> /etc/apt/ sources.list'
Next, update your Ubuntu system with the necessary packages and updates, and then install VirtualBox:
sudo apt-get update sudo apt-get install virtualbox-4.2
The installation will take some time to complete. Once done, you can start VirtualBox with the terminal command virtualbox, and you should have VirtualBox up and running.
sudo apt-get install linux-headers-3.5.0-17-generic sudo /etc/init.d/vboxdrv setup
Note: ‘Failed, trying without DKMS’ is a very common error faced while installing VirtualBox on Ubuntu systems. To solve this, first download the correct Linux headers depending on the description of the error message, then run the vboxdrv setup command to recompile the kernel module and install it, and you should be able to launch VirtualBox successfully.
A Windows Server 2008 R2 VM
Once you have your VirtualBox set up, creating VMs is a fairly simple process. The following steps outline the VM creation process for Windows 2008 R2 Server. You'll need the Windows 2008 R2 Server ISO DVD image (you can download a 60-day trial from http://technet.microsoft.com/en-us/evalcenter/dd459137.aspx).
Launch VirtualBox and click the New icon to create a new VM. You will now see a New Virtual Machine Wizard, which walks you through the steps of selecting virtual resources for your Windows VM. The first dialogue box helps you select the type and version of the OS you are going to install as the guest OS. Provide a suitable name for the VM here as well. Once done, click Next, then select the amount of RAM you want to allocate to this VM.
Note: Always set VM RAM to less than that of your host (physical) machine’s RAM, since the host OS will require RAM for running itself and other applications.
The next step is to create the VM’s hard disk. By default, it asks you to create a new hard disk from scratch using a Create New Virtual Disk Wizard. Select the correct Type of hard disk that you want for your VM, and provide a suitable size (in GB) for it.
Figure 2: VM configuration
Note: You can always add more hard disks to your VM after it’s created.
Once you have created the VM, you are now ready to power it on. A sample final configuration is shown in Figure 2. Power on your VM by clicking the ‘Start’ icon. Once started, you will need to choose Devices > CD / DVD Devices > Choose a virtual CD /DVD disk file. Here, browse for the Windows 2008 R2 ISO file downloaded earlier. Once selected, go back to your VM and press Right Ctrl–H to reset your VM, and you should see the Windows 2008 R2 Server welcome screen, as shown in Figure 3.
In a similar way, you can create Linux and Windows VMs using your VirtualBox set-up. Simply select the correct OS type and version from the wizard, create a hard disk, allocate
Figure 3: Windows installer screen
RAM and CPU resources, and power on the virtual machine!
That’s it for now. Stay tuned for more such tutorials and articles!
References
[1] https://www.virtualbox.org/ [2] http://en.wikipedia.org/wiki/Comparison_of_ platform_virtual_machines
By: Yohan Wadia
The author is a senior software engineer and part of the Cloud Services Team (Research and Innovation) at iGATE. An avid blogger and technologist, he loves exploring all upcoming technologies and trends in the IT industry. Blog: http://www. yoyoclouds.com/.
Admin Let's Try
Open Source Access to MS Exchange Server Using DavMail
This article introduces DavMail and demonstrates its importance in corporate scenarios for accessing mail from MS Exchange Server.
Many enterprises use Microsoft Exchange for corporate e-mail; usually, there's no avoiding it. While Exchange can provide IMAP/POP services, these are frequently disabled citing security reasons, leaving Outlook Web Access (OWA) as the only hope for users of non-Microsoft mail user agents (MUAs). But losing important emails is one of the major concerns, due to the limited space provided by Exchange Server. Apart from this, there are many Linux enthusiasts and government authorities who have now stopped working on Windows due to the increasing popularity of Ubuntu and similar Linux distros. Moreover, organisations invest huge amounts on purchasing MS Outlook for each desktop.
MS Exchange uses proprietary MAPI protocols, which are incompatible with the open protocols that Thunderbird and other clients use. So here’s a nice solution that lets you use any email client to connect to Exchange Server with a third-party gateway, in a secure way (optional encryption) and, of course, it’s free. The popular FOSS website SourceForge. net explains its architecture: “The main goal of DavMail is to provide standards-compliant protocols in front of proprietary Exchange. This means LDAP for a global address book, SMTP to send messages, IMAP to browse messages on the server in any folder, POP to retrieve inbox messages only, CalDAV for calendar support, and CardDAV for personal contacts sync. Thus, any standards-compliant client can be used with Microsoft Exchange. The DavMail gateway is implemented in Java, and should run on any platform. Releases are tested on Windows, Linux (Ubuntu) and Mac OS X. Tested successfully with the iPhone (gateway running on a server).”
Figure 1 shows various applications using DavMail (the yellow icon) to connect to OWA (Outlook Web Access) and Exchange. Using OWA instead of proprietary MAPI or IMAP/SMTP protocols itself ensures secure communication with the server. For smartphones, DavMail is used as a dedicated host to provide SMTP and IMAP services to those devices, hiding all the server configuration from those socalled less secure Internet devices. It also supports set-up of calendars and CardDAV protocol to sync address books.
We tested DavMail 3.9.9 using Thunderbird 13.0.1 (you can explore the latest versions) with Lightning (a Thunderbird
IMAP SMTP LDAP Caldav
WebDavEWS OWA on MS Microsoft Exchange
Evolution
Linux
IMAP SMTP LDAP Caldav Carddav
Thunderbird Lightning Saga
Windows WebDavEWS
WebDavEWS
Cal CalDav
IMAP SMTP
LDAP Carddav
Mail Adress Book
Mac OSX
Figure 1: DavMail and mail applications
WebDav DevMail Server
IMAP SMTP Caldav Carddav IMAP SMTP
Figure 2: DavMail gateway settings
add-on for the Calendar set-up) on Windows XP and Windows 7. Given below are the steps to set it up.
Download and install Mozilla Thunderbird from http:// www.mozilla.org/thunderbird/ and DavMail from http:// davmail.sourceforge.net/download.html.
DavMail configuration
After installation, you can find DavMail running in your system tray. Right-click it and select Settings. In the Main tab, enter your Outlook Web Access URL (see Figure 2). Leave the rest as it is. Go to the Proxy tab and enter your proxy details if you are behind a proxy server; else, skip this.
Now, DavMail is running on our desktop itself— localhost. If it's installed for use as a service on a dedicated host, you'd use the IP address/hostname for that system in your email client settings—for instance, as is shown below for Thunderbird.
Figure 3: LDAP settings—part 1
Figure 4: Calendar settings
Note: We recommend you uncheck the option ‘SMTP save in sent’ in DavMail -> Advanced settings. This will avoid having two copies of an email in Sent Items.
Thunderbird account configuration
Run Thunderbird after installation. The first run will start a wizard to create an account. Enter your name, email ID and the password given to you by your IT support team and click Continue. Now Thunderbird will try to auto-configure the account; just stop it by clicking the Stop button. You should get a plain configuration screen with some default values. Click the Manual Setup button and set up localhost as the server hostname, and the ports defined in DavMail: POP port 1110, IMAP port 1143 (for receiving email from Exchange); and
SMTP port 1025 (to send emails).
Also ensure that Connection Security (in Server Settings for the account) is None (that's for the connection between Thunderbird and DavMail), and configure the other account settings according to your requirements.
Next, let’s look at LDAP configuration. In your Account Settings dialogue box, select Composition & Addressing in the left pane and choose Use a different LDAP server (Figure 3). Click Edit Directories, and you will be shown an LDAP server configuration dialogue box. Click the Add button to add your local LDAP server. Here are some sample settings (except the port): Name: Exchange Hostname: localhost Base DN: ou=people Port number: 1389 (the port set in DavMail configuration;
Thunderbird will use this to fetch address books from
Exchange so it can auto-complete email addresses in new messages.) Bind DN: domainname\username
Click OK twice to return to Composition & Addressing, and select the newly created Exchange entry under Use a different LDAP server.
Calendar configuration
Now you need to synchronise your calendar with Exchange Server to receive event notifications in Thunderbird. For this, you need the Lightning add-on, which you can easily install from https://addons.mozilla.org/en-US/thunderbird/addon/ lightning/. Next, from Thunderbird's File menu choose New -> Calendar. Select On the Network and click OK. Select Format as CalDAV (see Figure 4). Enter Location as ‘http:// localhost:1080/users/my_name@domainname.com/calendar’ (sample setting, replace with your details). DavMail's CalDAV port is 1080. Click Next. Enter some nickname for your calendar, and click Next and Finish.
Note: There are various add-ons available other than CalDAV for Thunderbird, like ‘Exchange 2007/2010 Calendar and Task Provider’ and ‘Provider for Microsoft Exchange’, which are also useful for calendar configuration in Thunderbird. The first one looked very useful—it allowed me to specify ‘Out of Office’ settings and automatic responses to meeting requests—but remember that it's not supported for Thunderbird 15 or later.
Voilà! That’s it. Now you are ready to use Thunderbird through DavMail to access MS Exchange Server. Go ahead and enjoy the beauty of FOSS!
By: Pranav Chauhan
The author works as an IT analyst in a well-known Indian software exporting company, and takes an interest in exploring open source software to spread awareness about using it in day-to-day life.
THE COMPLETE MAGAZINE ON OPEN SOURCE
For Start-Ups, the Cloud is the Way to Go!
Experts opine that cloud technology has the potential to bridge the gap between a small and a large enterprise. For start-ups and SMBs, cloud computing can make life far easier for IT admins, as well as improve the bottomline!
According to Gartner's analysis, cloud computing has the potential to change IT in a big way. Gartner analysts opine, “It may end up removing the last vestiges of the captive IT organisation that owns its enterprise, as surely as the enterprise owns IT.” It’s not just enterprises and SMEs that are leveraging cloud technology; start-ups are not far behind. India, a country at par with many of the majors with respect to entrepreneurship, is seeing a spike in this trend. Start-ups are taking that extra step of getting on to the cloud and making the most of this phenomenon.
Why do start-ups need the cloud?
The cost of IT infrastructure consumes a good share of the budget of any organisation. Start-ups that are already short of funds in the initial stages feel the heat of expensive IT infrastructure. So, if a solution can cater to almost all their IT needs at a lower cost and with fewer worries, they go for it. The cloud is the answer for them. Yet, despite the fact that the cloud is a must-adopt trend currently, companies are taking their time in giving away direct control of their IT infrastructure to someone else.
Explaining the need for cloud computing in a startup set-up, Rajesh Shetty, vice president, Cisco India and SAARC, says, “Cloud computing is the most reliable and scalable platform for a start-up as well as for an SMB, because it can fit itself perfectly, as per their requirements. Start-ups or SMBs, unlike large organisations, do not have a big IT team; nor do they have all the required resources in terms of infrastructure or budgets. So, the cloud is a solution that they can resort to, as they would get a very scalable and reliable global infrastructure, which is easy to use and costeffective from the ROI perspective.”
With cloud computing, start-ups do not have to worry about creating their own IT infrastructure or employing manpower to manage it. They can simply get it done by the cloud service providers. Reiterating what Shetty said, Ajit Gadge, manager, Sales Engineering, and database solutions architect for India, South-East Asia, Australia and New Zealand, EnterpriseDB, said, “The cloud can deliver a reliable global infrastructure to a small organisation at an affordable price. Small organisations across India are looking forward to the cloud and I
think the Indian market is a perfect place to have cloud computing in place. From the business owner’s point of view, the adoption of cloud computing may not be an easy and quick decision to make as one would have to totally rely on some third party and its IT infrastructure, but once the entire picture is made clear, the industry would soon start adopting cloud computing.”
It is not about just the cost of the equipment, at the end of the day. It is about the total infrastructure costs. Shetty adds, “If you want to set up a data centre, the equipment would take about 20 to 25 per cent of the overall cost of the data centre, but the other associated IT resources like power, back-up and cooling require more investments. One would need trained manpower to manage the entire set up as well. So, the story doesn't end with the initial investment of the equipment cost. It’s the life cycle cost that matters.”
Some of the advantages that cloud solutions offer a startup are listed below.
Low cost: The cloud will always win over physical storage drives when it comes to money. For a start-up, the cloud can help reduce the IT budget significantly. Owning and maintaining physical storage requires more IT spending, and creating data backups can also make a huge dent in IT budgets.
Easy access: The cloud ensures hassle-free access to stored data. From a start-up or SMB's point of view, maintaining a separate IT team to maintain data will be unaffordable. Also, for non-technical small business owners, the cloud can ensure reliable access to data.
Scalability: The cloud provides the advantage of scalability. A business can scale up or down on the cloud infrastructure, as per its requirement. The scalability can happen within no time and without much investment.
Automation: With cloud computing, IT admins of start-ups need not worry about maintaining applications. One doesn't need to invest in a team to keep the file storage system updated, as most of the applications that run on the cloud are capable of getting updated automatically.
The cloud bridges the gap between start-ups and enterprises
V Ramachandran, country manager, Converged Infrastructure & Cloud Solutions, Cloud Systems, HP India, says, “Cloud technology has the potential to bridge the gap between a small and a large enterprise. With the cloud, small organisations can benefit from the services of world class IT infrastructure. The cloud is slowly spreading its wings across the horizon, as it offers a tremendous amount of reach. Even government departments are now exploring the possibilities of empowering themselves with the cloud as it gives a big boost in providing services to the citizens. Apart from being a cost-effective solution, the cloud can help in managing both resources as well as data effectively. Given the growing number of small businesses in India, the day is not far when
How a start-up benefited from the cloud
Vserv.mobi, a mobile ad network company, is a start-up that leverages cloud technology in a big way. Ashay Padwal, co-founder and chief technology officer, Vserv.mobi, explains the business model, “We host mobile advertisements for our clients. We need to be totally flexible and scalable in order to offer our services perfectly. On a given day we may have only 20,000 ads to host, but the next day our clients may demand hosting of 100,000 advertisements. This kind of scalability is possible only with the cloud. The need for elasticity, when we are unable to estimate the changing hardware requirements from day to day, is one of the crucial reasons that propelled us to deploy a cloud solution in our organisation.”
companies from all spheres would look at using cloud computing in a big way.”
Cloud telephony: An emerging solution for start-ups
One emerging trend amongst start-ups and SMBs is the adoption of cloud telephony. This can be simply defined as configuring a telephone in a browser. Through cloud telephony, one can virtually carry the desk phones on the browser, and make and receive calls through the computer itself. Cloud telephony is a solution that cuts costs by about five to six times compared to setting up the traditional infrastructure for an ePABX system, with telephone lines and handsets. Ambarish Gupta, chief executive officer, Knowlarity (a cloud telephony company) explains, “A start-up doesn't need to invest in the hardware required for fixed landlines, when it goes for cloud telephony. The traditional telephony set-ups work best when one sets up a proper office. For start-ups, there are hardly any offices in the beginning. So cloud telephony works best for their connectivity from which ever location they are.” Cloud telephony can help in better management of time along with the provision for remote working, and increase overall efficiency.
Worries about data security
Cloud computing does provide multiple benefits, but startups are still sceptical about data security. Experts opine that small organisations can opt for the cloud any time, but larger organisations are a bit hesitant to give direct control of their IT infrastructure to some third-party vendor. Gadge opines, “Before opting for a cloud solution, customers should evaluate the contract with the service provider. They should be aware enough to understand the security checks in the cloud solution.”
By OSFY Bureau
mind, which was originally born at AT&T Labs. Dennis Ritchie and Brian Kernighan were the key people who created UNIX. Their book about C language programming became a truly classic edition in Russia, on the basis of which many generations of engineers are taught. The flexibility of Linux, the prevalence of the C language, and the philosophy of UNIX caused such widespread interest.
One of the first commercial companies that started working on the market was IPLabs Linux Team in 1998. It was initially involved in localisation activities, but later began to sell box versions as well—ranging from Mandrake to Red Hat and SuSE. Its tight cooperation with MandrakeSoft made it possible to create its own Linux distribution. In 2001, such distro-building experience led to the creation of a software-only company called AltLinux, with its own distribution carrying the same name as the company. After years of Linux experience, AltLinux now has the fourth largest repository in the world— Sisyphus. The AltLinux company builds server distributions for OEM companies and also builds desktop versions, as well as participating in government activities like the ‘School Project’. In the fall of 2008, AltLinux produced the SKIF 4.1 distribution for the national supercomputer SKIF-MSU. In 2009, the company opened up a sales centre in Porto Alegre, Brazil.
In the year 2000, SWsoft had also decided to try its luck in the Linux world. It dedicated a special unit ASPLinux, which was supposed to bring a fully localised Russian distribution (with the same name—ASPLinux) based purely on Red Hat. It must be noted that the ASPLinux distro wasn’t a simple clone of Red Hat, because it used several in-housedeveloped applications. For example, instead of LILO, it ran ASPLoader—a graphically enabled boot-strap utility. There were also ASPInstaller and ASPDiskManager—a master disk partitioning utility. ASPLinux Server versions were preinstalled with virtualisation products named Virtuozzo—some open-source portions of which later evolved into OpenVZ technology. Due to certain reasons, the development of this distribution came to an end in 2008. Quite possibly SWsoft, already known as Parallels Inc, considered that it was commercially viable to develop the virtualisation business itself, rather than evolve in the Linux-friendly direction only. That’s why we now see such brilliant technology as OpenVZ available almost in every hosting provider.
The story behind the MandrakeSoft company and its influence on the Russian Linux market was not simply limited by AltLinux in the late 90s. In 2007, Russian-based firm Mezon opened up a Mandriva Center of Competence located in St Petersburg. This enabled the firm to get the Mandriva distribution certified to be used in the government sector, as well as in places where confidential information was stored and processed. Moreover, three years later in 2010, the NGI Fund (with a Russian background) bought off majority stakes both in Mandriva as well as in the Russian company PingWin Software. This made it possible to perform systems integration and generate a new company—RosaLab. This step also allowed Mandriva to be saved from collapsing. Now, by combining efforts to further develop Mandriva Linux, which now comes under the Rosa Linux name, RosaLab envisions converting Rosa Linux into a Russian nationwide distribution—but who knows what the future holds. However, saving the company in 2010 basically brought along many benefits. According to DistroWatch statistics (http://distrowatch.com/stats.php?section=popularity), Mandriva (or should I say Rosa Linux) again gained popularity.
In addition, a couple of other companies tried to develop their own distributions, though Linux wasn’t their core business. This way, MOPSLinux appeared on the Russian market in 2004, originally developed by the Network company only for its own internal projects. The company was a developer of information systems for local administration units and enterprises. MOPSLinux is based on Slackware with Russian localisation and includes a number of applications developed in-house. The company offered technical support, both free and on a subscription basis. Unfortunately, in 2010 the company ceased Linux distribution, and apparently closed down—the financial crisis touched Russia too. Although several efforts were made to keep this distribution under the AgiliaLinux name, there are serious doubts it could continue being purely a voluntary project.
However, a better example is the experience of the Calculate company, for which the Linux business also isn’t a major focus at all, because it produces cardboard and corrugated cardboard packaging. The company created a distribution called CalculateLinux for its own needs, when transferring its IT infrastructure to Linux in 2007. CalculateLinux is based on Gentoo Linux. Corporate graphical designers helped with the distribution’s UI; that’s why CalculateLinux has gained such popularity outside the mother company. Besides, free help is provided online via IRC and Jabber services.
All other distros could be considered more or less amateurish and non-professional from the business perspective—especially since all of them are designed for home users, and based on modern versions of either Ubuntu or Fedora from Red Hat.
When we start to discuss corporate Linux versions, both IT integrator companies and government agencies tend to use original and unmodified distributions such as RHEL, SLES, CentOS, Debian and AltLinux Server. It should also be noted that the Ministry of Defence has its own versions of Linux called MCBC—a Mobile System for the Armed Forces. The government research institute created it early in 2003 on a Red Hat Linux base, with broad consultancy support from one of Russia’s Red Hat partners. Fundamentally, there’s nothing special about MCBC though—a simplified UI interface a la Windows95 and certified internal components to monitor access to the system. What could be particularly interesting is the fact that MCBC has been ported to MIPS, x86 and SPARC platforms. The system is distributed among large government customers on a paid basis and isn’t available in the public domain.
Another Russian company that creates exciting business solutions is Etersoft. It sells its boxed solutions built upon a heavily redefined WINE package. Thus, one of the most promising products is SELTA@Etersoft—a universal SQLqueries translator from T-SQL into pgSQL. Such transformation allows the use of the PostgreSQL server for a number of applications designed purely to work with Microsoft SQL Server only. So how does the translator work? It parses requests to MS SQL system tables, and adapts them transparently to PostgreSQL notation. So you don’t need to interfere either with the server or the client program. Many companies that can’t completely transfer their business onto a Linux platform (due to Microsoft SQL Server or Win32-applications) choose SELTA@ Etersoft and WINE@Etersoft and happily launch Win32applications within GNU/Linux environments.
Now let me describe the problems that occur with GNU/Linux once it is deployed in real life by Russian companies. The main problem is the quality and experience of the technical personnel, who’re primary responsible for the transformation project—from Windows to Linux. The vast majority have never faced any UNIX system before. Therefore, they have great difficulty orienting themselves to the UNIX philosophy and they follow one simple principle—dumb replacement of one Windows GUI with a similar-looking GUI, but under the Linux logo. Naturally, the features that make Linux a truly unique system aren’t reclaimed and aren’t used at all.
The second reason is a difficult-to-eradicate myth about the importance of a nationwide distribution. If there had been one created earlier, with Russian (Hindi, Brazilian, you name it) localisation and other bells and whistles, it would be distributed in a blink of an eye. However, the long history of AltLinux shows another trend—there could be, de-facto, an already existing national distribution. In our case, AltLinux has no rudiments of the original MandrakeLinux because AltLinux was completely redesigned 10 years ago. There already exists a great channel to spread AltLinux both on CDs/DVDs, as well as multiple tutorials written by AltLinux authors for teaching and learning purposes, and there’s great support from the company. But there’s still Windows domination. Why? On the one hand, there is strong pressure from both the Microsoft side and from the financial department of any enterprise that decides to purchase Win32/ Win64 products only. This can be explained only by this fact— real ignorance of whatever systems exist outside the Microsoft world. However, even when decision makers are aware of Linux/ UNIX, their reason is usually this one: “We have specialists familiar with Microsoft, but we haven’t any Linux specialists. Therefore, we take Microsoft.” Strange, isn’t it? Sadly, the truth is that sometimes, companies do not even have an IT department with sufficient Microsoft experience.
Another big problem is a strong existence of other myths (this is particularly evident with MCBC Linux): “There exists a purely native (Russian/Indian/German) Linux innovation and only selected specialists are keen to understand it.” This problem is really a huge one, because when some kind of problem arises, there’s usually a solution outside of this closed world. For example, you should try to find fixes for Ubuntu packages not within the Ubuntu world only, but among Debian users too!
The third big problem is that engineering and IT personnel training is done with Microsoft products. This situation is rather typical for middle schools, as well as for higher education institutions. The courses devoted to UNIX topics are organised and created mostly by enthusiasts or organised by big vendors—so such training can be considered as supplementary to the selling channel of Linux software and middleware. The education policy in this aspect is still driven by the country’s educational agency.
But the real surprise comes from a place no one expected before. First, Russia has a national search giant—Yandex. It uses Linux for its own purposes—server infrastructure. So it’s allocated its resources to maintain the huge repository of core Linux distributions: AltLinux, ArchLinux, ASPLinux, CentOS, Debian, Ubuntu, Slackware, Mandriva, and others. It has also provided space for such office suites as OpenOffice, LibreOffice and Mozilla. They mirror kernel.org, VLC, MySQL, KDE, GNOME and some others. From this perspective, the national software repository is already here. Moreover, the agreements on free peering are achieved with a number of local ISPs throughout the whole country. This fact alone creates an ideal opportunity for sharing any distro. In addition to free access to the Yandex repository, it also provides free hosting facilities to video, pictures, Web hosting, etc. So there’s no problem in distributing any books, presentations or videos on Linux.
SMB-sized companies that have Linux-familiar IT staff silently migrate their network infrastructure onto Linux/ FreeBSD/OpenSolaris, because its mission-critical nature allows firms to have 24x7 business. Occasionally, the government sector behaves similarly, unless there’s particular Win32 software imposed from the federal government level. Having IT infrastructure based on Debian, Ubuntu or CentOS allows a government institution to save money, and instead of spending on Microsoft products, it can purchase more hardware or order custom software. The bigger advantages are from professionals that come to the government sector from commercial companies. They bring experience and knowledge with them and that is most important—the desire to change the infrastructure to be the one ‘right’ standard. Unfortunately, this is a temporary scenario, due to the financial crisis and other local factors. Once the business situation improves, such personnel return to the private sector where wages are usually higher.
In Russia, there exists an analogy to the Linux Foundation, known as the Russian Association for Free Software (RASPO). The idea behind it is rather strong, but unfortunately this committee tends to operate like a software ‘club’—promoting the business ideas of its members and not general Linux principles, as it should. Having been created in 2009, nobody can see it in a big, serious project, though.
Continued on page 88...
Viridis: A Low-Power, Linux-Powered Super Server!
Viridis is a 5W server! It is interesting to note that Linux was the first choice of operating system for this unique high-performance computing system, and proved to be the best.
One of the biggest problems faced by data-centre operators is the amount of power consumed and dissipated by the servers. As a result, there is a lot of focus on building low-power servers these days. ARM processors are known for their low-power capabilities, but have traditionally been used more in mobile devices and laptops than in supercomputers. However, in the last couple of years, there has been a lot of interest in building ARMbased servers, and such products are being launched by companies like Boston, Marvell, Tilera and Calxeda. One that seems very promising is Boston’s Viridis, an energyefficient data-centre solution based on Calxeda’s low-power, ARM-based System-on-Chip (SoC).
ARM—a logical choice for data centres
“In data centres, the server is the revenue-generating asset of the business, and there is a strong business motivation to look at new technology. Companies look to drive down the acquisition cost of the hardware, and the running cost of the platforms. You can think of these data centres as energyconstrained systems. A data centre gets allocated a certain amount of power, and it must generate as much revenue as it can, and minimise running costs. As the servers are specialist machines, there is an opportunity for silicon and systems companies to optimise platforms for a specific application. ARM
Guru Ganesan, managing director, ARM, India Operations has proved in the mobile phone space that the way ahead is development of highly integrated SoC devices,” says Guru Ganesan, managing director, ARM, India Operations.
Venkat Ramana, vice president, Hinditron Infosystems, a premier business and technical support partner of Boston Ltd in India, says, “With energyefficient computing being the major focus area in the realm of high-performance computing (HPC), it is time to explore alternatives to the current industry-standard processors. In this context, presently, the ARM architecture seems to be the most Venkat Ramana, vice president, ideal candidate. ARM processors Hinditron Infosystems are available from many vendors, and have the required economies of scale because of their sheer volume and wide deployment in the mobile market.”
Calxeda’s EnergyCore is one of the first ARM-powered SoCs that has been specifically designed to address the server market. Ganesan feels that Calxeda is uniquely placed because the well-funded start-up focuses solely on the server industry, while other ARM silicon partners that are entering or intend to enter the server market are engaged in other application areas to generate revenue. By far, EnergyCore is the most highly-integrated server processor on the market. In addition to including networking and storage interfaces on-chip, the chip uses a special fabric to remove the need for traditional top-of-rack switches and external baseband management controller devices, significantly reducing system power and cost. In terms of applications also, it is specifically tuned to the needs of data-centre applications, such as Web hosting, storage servers, data analytics and content streaming.
Boston’s Viridis was one of the first ARM-powered server platforms to enter the market, and the first to be available in India. It was also the first to work so closely with Calxeda and make full use of the EnergyCore SoC.
Viridis—a quick overview
“Boston was the first company in the world to launch servergrade products based on ARM. We had a deep engagement with Calxeda in bringing our solutions to the market, and Viridis is the result. The Viridis system is designed from the ground up to deal with the requirements of scale-out data-centre workloads, with the internal fabric capable of scaling to over 4000 nodes today (without the need to go to a top-of-rack switch) and future releases that will scale to hundreds of thousands of nodes,” says David Power, technical head of the HPC group, Boston Ltd, UK. At the heart of Viridis is SoC technology, which integrates the central processing unit (CPU), networking and input-output (I/O) onto a single server chip. Viridis uses Calxeda’s ARMbased EnergyCore SoCs, which consume less than 5W of power. These are interconnected by a special highly scalable fabric that offers extremely low latency high-bandwidth communication between all servers. This fabric is coupled with an intelligent management controller for power and fabric optimisation and management, for energy-proportional computing. The Viridis platform has five core chips, of which one is reserved for the management engine; only four cores are exposed to the operating system. Thus, the management and fabric do not interfere with the host performance. The disk I/O allows for up to 5 SATA devices to be populated per host, for users with dataintensive requirements.
Manoj Nayee, managing director, Boston Ltd, UK, says, “Using the very same CPU technology that powers many of today’s mobile consumer devices, the Viridis offers around 90 per cent improvements in energy efficiency and density. These building blocks of high-end computing are set to radically change the economics of large-scale data centres, sparking innovation in emerging fields such as cloud computing, data modelling and analysis (often called ‘Big Data’), scientific research and media streaming.” David Power, technical head, HPC group, Boston Ltd, UK
Manoj Nayee, Manoj Nayee, managing director, Boston Ltd, UK
Low-power engineering
According to Power, the platform had to undergo a lot of engineering to get the product down to the power levels seen today. These include: silicon optimisations, EnergyCard optimisations, power-optimised fabric settings, optimised power supply, baffles to improve airflow, memory/RAM settings, and fan settings.
“ARM was always the technology we had planned on using for our Viridis product. It had to be ARM, as we wanted to bring a really disruptive green technology to the server market. Power consumption (and the cost!) was becoming a real headache for a lot of our customers, and ARM was one of the leading low-power chips in the market. We have a very close working relationship with ARM, and their roadmap is very exciting. We have also been engaged with Canonical (Ubuntu) and Red Hat/ Fedora, who are heavily involved in porting their distributions to the ARM platform; I'm delighted at the progress that has been made in this space, particularly to provide users with a familiar working environment (both for development and administration). This combination made the choice of ARM a very compelling proposition. You also have communities and organisations such as Linaro (http://www.linaro.org/), which are investing a lot of
time to get familiar development tools ported to ARM. Some of the best feedback we have had from developers and testers is that they didn't even realise they were running on ARM hardware,” explains Power.
Intel is also talking of a 6W processor for servers now, so how would ARM fare compared to that? While Intel’s move is a clear acknowledgement of the need for low-power servers, there is still a lot to be done before Intel’s 6W processor can compare with a 5W server. Viridis is a 5W server, which includes all the components required for operation in a data centre (power measured at the wall, including motherboard, network, cooling fans, memory, disk, etc). “When you add all such factors to Intel’s processor, it will be significantly higher than 5W. Intel will undoubtedly introduce a SoC product down the line, but at that point we expect to have Viridis v2 (or possibly v3) ready for the market, which will have further performance/watt improvements,” says Power.
Others also appear to be in favour of ARM at present. Dell announced the Copper platform in May 2012. This is a platform based on an ARM-powered SoC from Marvell. Mitac in Taiwan also announced and demonstrated a Marvell-powered server at Computex in June 2012. HP has shipped a number of Calxedabased development platforms (called Redstone) to enable companies to start porting and evaluating the benefit of ARMbased server technology for their applications. A US company called Penguin Computing, focused on data analytics platforms, is also shipping a Calxeda-powered platform. Dell has announced a programme called Iron, using a 64-bit server SoC device from Applied Micro, which is likely to ship later this year.
Continued from page 85...
The same group has a newly born ‘National Software Platform’ initiative, which was formed last summer. The objectives of this initiative were declared to be too broad— ranging from the creation of a national Linux distribution (another one, in addition to existing MCBC and AltLinux?) to setting up the policy on how to use (F)OSS within the government sector. It’s hard to believe this national platform will be effective, because the participants are the same RASPO mentioned earlier, plus a number of non-profit enterprises and several government research institutions. Will it be able to make another corporate Russian distribution? Probably, it will. But what about a stable and strong community? This question still remains open. At the moment, higher efficiency is shown by the middle-size private companies, which can create the finest products compared to those from state-owned enterprises. Miracle? Yes, it’s true. Russia ignites technologies and specialists born to be professionals in Linux, but is unable to create one unified atmosphere for greater Linux government adoption—in schools, universities and within the government itself.
P.S. A small update: In September, the AltLinux company announced its withdrawal from the RASPO board. Either this decision was connected to fundamental differences between RASPO members, or the company decided to focus on Linux
Go, go, Linux!
Boston has adopted the best of Linux technologies. It is using Canonical's Ubuntu 12.10 and Red Hat's Fedora 17 development releases on Viridis, because these flavours apparently have very good support for Calxeda’s version of ARM SoCs. The other ARM-based server products from Dell, HP and Mitac are also Linux-based.
Ganesan says, “Hardware is irrelevant without software. The data-centre companies are focused on leveraging open source software as broadly as possible, and so is the software strategy provided alongside Viridis. ARM and Calxeda have been working for multiple years to ready Linux distributions for the EnergyCore device.”
“Linux was always our No 1 choice for OS, and it had to be that way,” boasts Power! The majority of the WWW infrastructure is running some variant of a LAMP stack (http:// news.netcraft.com/archives/category/web-server-survey/). Most of the world’s clouds and cloud infrastructures are running Linux, with OpenStack being a good example. In the HPC space too, over 93 per cent of the world’s most powerful supercomputers are also running Linux (http://www.top500.org/statistics/list/). Finally, the ‘Big Data’ space, which is dominated by Hadoop and Hadoop derivatives, is running Linux! With these being the main focus areas for Viridis, Linux was a de-facto choice!
By: Janani Gopalakrishnan Vikram
The author is a technically-qualified freelance writer, editor and hands-on mom based in Chennai.
and not to disperse its efforts onto different initiatives—this is still unclear. Anyway, time will show who was right. And in August 2011, Red Hat opened its Moscow office. Although it doesn’t yet plan to bring in development resources, no one can predict exactly how this will affect the corporate Linux sector in Russia. In general, we note just one thing: the current state of Linux in the local market reminds us of chaos. Amazingly, there’s always something new that’s born out of such chaos!
References
[1] http://en.wikipedia.org/wiki/Unix_philosophy [2] http://www.altlinux.com/ [3] http://en.wikipedia.org/wiki/SWsoft [4] http://en.wikipedia.org/wiki/OpenVZ [5] http://www.rosalab.ru/ [6] http://www.calculate-linux.org [7] http://www.yandex.com/
By: Anton Borisov
The author has specialised in Linux and FOSS technologies for more than a decade. His professional spheres of interest include, but are not limited to, robotics, embedded systems, statistics and algorithmic methods.
If you start looking to the community for support, there would be no innovation
Bruno Georges, director, software engineering, Enterprise Application Platforms, Red Hat Asia Pacific Pte Ltd
A majority of the users of open source products feel that their technical concerns should be addressed by the community. This may or may not happen. The idea behind having a community is to foster innovation and not just provide support. Diksha P Gupta from Open Source For You visited JUDCON 2013 and spoke to the developers. Bruno Georges, director, software engineering, Enterprise Application Platforms, Red Hat Asia Pacific Pte Ltd and Arun Kumar, general manager, Red Hat India, aired their concerns in an exclusive tête-à-tête. Read on...
QWhat is different in JUDCON 2013, compared to 2012? Bruno: Not just in India but globally, JUDCON 2013 has been very well received this year. We saw increased participation not only in terms of numbers but also in terms of the sharing that happened during the sessions. People were not busy using their laptops but were actually attentive towards the speakers. This, according to me, is a major change in JUDCON 2013 as compared to the last year. In India, the participants want to know more about the current trends in Java and where it’s heading.
QHave the awareness levels changed, reflected in the questions that you have had to face from the audiences? Bruno: A lot has changed in this regard too. This time at
JUDCON, we talked about some newer technologies and we find that participants are interested in knowing the technologies in detail. We discussed technologies like the cloud and how it is being used across the globe. We have talked about being cloud-ready from the very beginning, in terms of footprints, energy consumption, etc. It’s good to see questions around these from the audience. In India, a large number of people are updated about technology and we had some really intelligent questions coming our way. We got to know some interesting facts about the audience here. Bengaluru is No 1 in terms of using the technology. It’s not just about continuing with the old technologies but also adopting the new ones. So on all these fronts, JUDCON India is a unique event.
QYou have JUDCON events globally. Which of the lot is the best and why? Bruno: The best depends on both the speakers' perspective and the attendees’ perspective. We have JUDCON in USA, Germany, China, India and many other countries. The rest of the JUDCONs are pretty local but the Indian edition of the event is a bit different as it caters to both the global as well as the local audience. Obviously, there are a large number of local customers, SIs and students. It was a wide spectrum of attendees that we saw but the reason I say that JUDCON India has a global impact is because it is huge in its size and the people who attend the sessions take away a lot for their customers. That's a unique differentiator for JUDCON India.
QSure, but I could see a lot of students around as well. What is the point of having students when it is such a high-level technology event? Arun: You will be amazed at the level of open source education happening in this country. Java is taught in almost every institution. I have spoken to a lot of people who vouch for the fact that Linux and Java are taught in most of the Computer Science degree courses. In India, even people doing Electronics Engineering end up taking Linux or Java. So, for people who are spending their time and energy in understanding open source, such an event is an extension of that. Even in FUDCon we see enormous participation from people in education institutions. They are using Linux, which is a great operating system to teach at college because its source code is free. When I did my engineering, we only talked about device drivers. It was all theory. I could not look at the device driver code because there was no open source device back then. Things have changed drastically now and one can see the code to understand the concepts better. Apart from that, there is a demand from the academia that we should interact more with students to give them the real picture. So, it’s not just restricted to the conference but goes beyond it. The students want to know the technicalities and want to add those details in their resumes as well. That is how they look to market themselves.
Think about it from the market perspective. Let’s look at the example of Sun Microsystems. The growth of Sun Microsystems was because of educational institutions. Students' participation is something that we welcome, and it’s a great thing for us as we catch them here and nurture them to create a good workforce.
QIn one of your public speeches, you said you want to develop JBoss faster than the requirements change. How would you do that and what efforts have you made in that direction? Bruno: We will develop reference architectures. We will develop tools that allow you to be proactive. Writing new code every time something changes is very cumbersome to me. So when you know the requirements, you go for different iterations. The requirements keep changing for many reasons, whether due to market changes or technological advances. So the lifecycle needs to be short. We know these paths and we work to shorten this path.
Arun: It’s a function of automation. The biggest challenge for any software development organisation is how many times you reinvent the wheel. Any SI has to work to cut short the time for development, which has a direct impact on the ability of the business to respond to the market changes. India has a lot of regulation. So keeping in mind those regulation changes, we have to see how quickly we can adapt our applications to the changing environment. Think of customers in the insurance industry, who have to face a lot of regulatory changes. In that kind of environment, they have to be absolutely prepared for whatever changes that may come in. I think this is a new way of developing applications, which is far more agile and allows you to be more responsible as a business.
QOne criticism that comes your way is that JBoss is still tagged as a 'vulnerable open source application'. How do you defend that? Bruno: Like any software, we also come across bugs but we fix them within no time. We have a mechanism in place as an enterprise to deliver the fixes to our customers. This is not restricted to just JBoss. This goes
Arun Kumar, general manager, Red Hat India
out for all our solutions. So many years after launching, we are comfortable to say that JBoss is one of the best. It is not just about vulnerabilities, but about the ability to respond and fix them quickly when they are found. If you deep dive into the whole scenario, we have two types of users: one set wants ease of use and the other wants a stricter scenario from the beginning. We listened to those needs two years ago and we addressed the security issues right at the very beginning. We have learnt from the past when JBoss was too vulnerable because it was too open. That was the time when we got a hint about this problem and realised that we needed to make it secure, out of the box.
Arun: Beyond this, the debate on whether open source software is secure or not has not stopped. But the fact remains that organisations do what they want. If indeed what you say is true and if indeed the FUD (Fear, Uncertainty and Doubt) that is spread is true, you won't have stock exchanges deploying this technology. A lot of reports point towards bugs in Java. That doesn't mean Java is inherently insecure. I think security is not just a function of technology, it’s a function of process, compliance and how well-structured you are to be able to handle that. JBoss, in particular, has some high level security certifications to its credit from authorities across the globe.
QOSFY spoke to a developer this morning. He was new to JBoss and he wanted some support and assistance. He tried writing to the community and to the company about it but he did not get any solution. He said he had difficulties with OS GI but since he did not get any response, he had to drop it... Arun: There is something called the Red Hat Price Subscription, which is precisely for this purpose. The community exists to give away their innovations and to help build a product. But it is not directly responsible for support. If every developer in this world starts looking at the open source community as a support forum, there will no development and innovation. Using the community to foster the innovation makes sense. The moment you cross the boundary regarding the extent of support you need, that is when you move from a community product to an enterprise product. Then, that support will come with a subscription model and the upgrades. If I look at it from the India perspective, I think it is fairly immature. We need to understand that the community is not there for support, but it is there to foster innovation and that is how it should be. This is a general problem in this part of the world. People in the other parts of the world are pretty clear that if it is a community product, then don't expect any support. They know that if they want any support, they have to move to an enterprise product. There you have companies like us offering support. We are available on call. The experts are there to answer your questions.
For U & Me Let's Try
Use the Bench Calculator to Program Mathematics
This third article in the mathematical journey through open source takes you through the functional power of the bench calculator.
After going through basic programming on the bench calculator, it's time to explore its functional power. As mentioned earlier, you can do functions with the bench calculator (BC). Unlike C, it has built-in functions, where as standard math functions, and user-defined functions are similar to C.
Built-in functions
The BC’s built-in functions are: length(expr) – returns the number of significant digits in expr. read() – reads a number from standard input in the base dictated by the ibase variable. scale(expr) – returns the number of digits after the decimal point in expr. sqrt(expr) – returns the positive square root of expr, given that expr is non-negative.
Here's a sample execution of the above functions:
$ bc -ql length(000023.450) # Number of significant digits 5 scale(000023.450) # Number of digits after the decimal 3 sqrt(2) # Square root of 2 1.41421356237309504880 sqrt(-1) # Square root of -1 is an error Runtime error (func=(main), adr=4): Square root of a negative number ibase=2 # Changing the input base to 2 x=read() # Wait to read the input in binary and then display 1100 # This is the input x # Display the read value in the default output base 10 12 quit # Get out
Wait! Are those all the built-in functions? What about the previously used print? In BC, print is not a function; the missing () indicates it is actually a statement, like if, for, ... and its syntax is print <list>, where <list> is a comma-separated list of strings and expressions. (If you have not yet got the hang of this word expression, it is a statement of numbers and variables operated with the various operators and functions.)
Standard math functions
When BC is invoked with the -l option, the math library is also loaded, making available for use the following six math functions: s(x) – returns sine of x (x is radians) c(x) – returns cosine of x (x is radians) a(x) – returns arctangent (in radians) of x l(x) – returns the natural logarithm (base e) of x e(x) – returns the value of e raised to the power of x j(n, x) – Bessel function of integer order n of x
All these functions operate with the scale dictated by the built-in variable scale, which is by default, set to 20. Here's a sample execution:
$ bc -ql scale # Show the current scale 20 pi=4*a(1) # Calculate pi as tan-1(1) is pi / 4 pi # Show the value approx. to 20 decimals 3.14159265358979323844 s(pi/3) # Calculate sine of 60° - should sqrt(3)/2 .86602540378443864675 sqrt(3)/2 # value for comparison – note the approx. error .86602540378443864676 c(pi/3) # Calculate sine of 60° - should be 0.5 .50000000000000000001 l(1) # log(1) 0 e(1) # Value of e1 approx. to 20 decimals 2.71828182845904523536 quit
If all this sounds too geeky and mathematical, let's forget it, and do some simple stuff; let's write simple user-defined functions.
User-defined functions
Here is how you write a user-defined function (to add two numbers) in BC:
$ bc -ql define add(x, y) { return (x + y)
} add(3, add(4, 5)) # Lets add 3 with the sum of 4 & 5 12 quit
Given that, the factorial code from our previous learnings can be converted into a function as follows (say, in functions.bc):
define factorial(n) { product = 1 for (current_num = 1; current_num <= n; current_num += 1) { product *= current_num } return product }
And then, you can use that function, as follows:
$ bc -ql functions.bc # Load the functions while invoking bc factorial(10) # Compute the factorial of 10 3628800 quit
As you now have factorial, you can even calculate the series of e, i.e., 1 + 1/1! + 1/2! + ..., say up to 1/20 for a good enough approximation. Here's how it would go:
$ bc -ql functions.bc exp=1 for (i = 1; i <= 20; i++) {
exp += (1/factorial(i))
} exp # Display the computed value of e 2.71828182845904523525 e(1) # Compare with the standard math function 2.71828182845904523536 quit
And, as in C, if you need a function only to do actions and not return anything, void is the way:
$ bc -ql define void designer_print(v) { print "---{", v, "}---" } designer_print(100) # Print 100 with the designs ---{100}--quit
Having covered the fundamentals of these functions in BC, we will dive into its recursive functional power in the next issue.
By: Anil Kumar Pugalia
The author is an open source hardware and software hobbyist, with a passion for mathematics. His exploration with mathematics, in every aspect of life, dates back to the 1990s. A gold medalist from the Indian Institute of Science, mathematics and knowledge-sharing are two of his many passions. Apart from that, he experiments with Linux and embedded systems to share his learnings through his weekend workshops. Learn more about him and his experiments at http://sysplay.in. He can be reached at email@sarika-pugs.com.
Asus to Launch Wi-Fi Google Nexus 7 Tablet in India by June!
Google has been rolling out its Nexus smartphones and tablets in the global market, but the Indian market has still been left largely untapped. Well, things appear to be changing and Google's OEM partner, Asus, is looking to bring in the first Nexus device into India soon. Team OSFY spoke to Peter Chang, the newly appointed country manager of Asus, about the launch of Nexus devices in India, the firm’s strategy around Android, and much more. Read on...
QAsus is the first Google Nexus tablet maker. Google chose you for making the 17.7-cm (7-inch) device. Despite much success and worldwide acceptance of your tablet PC, Google chose Samsung for the 25.4-cm (10-inch) variant of the tablet. Any reasons? It is totally Google's prerogative to choose its OEM partners. As you must have observed, it keeps the ball rolling. We have had a good relationship with the Android maker and we look forward to more such tie-ups.
Peter Chang, country manager, Asus
QDo you think being the maker of a Nexus tablet adds to your existing reputation? How would you take advantage of the Nexus tag? We hope to continue with the push that we got from the Nexus brand. Asus made Nexus 7, which although not launched in India officially, has become a great success worldwide. We don’t know about the upcoming Nexus devices—whether we would make them or not—since Google has a multi-brand strategy with respect to its Nexus devices. In the future, we are
hopeful about getting the opportunity to make another Nexus device, as our Nexus 7 tablet has done very well.
QThe Asus-Google Nexus 7 is available online in India at a price of Rs 19,999. Do you think the Nexus 7 is suited for the Indian market? A Nexus device offers a completely different experience from any other brand. The overall outlook of a Nexus device is way better than any other tablet in the market. In Europe, we are among the top three players due to Nexus 7. I don’t think there is any other product that can give an experience similar to that of the Nexus 7 at the same price point.
QSo why has it not been officially launched in India yet, though anyone who wishes to can either buy it online or even at one of the stores in New Delhi? We are still working on the official launch of the device. We will keep the fans of Nexus updated about the official launch.
QOn the connectivity front, the Nexus 7 is a ‘Wi-Fi only’ model, so the tablet may not be liked by many buyers in India as GSM connectivity in the form of dongles is more popular than Wi-Fi in the country. We are planning to launch the 3G version of the Nexus 7 in India.
QWhen can we expect the Nexus 7 3G to come to India? Hopefully, we will launch the tablet by the first half of 2013.
QAt what price will it be available here? Pricing is yet to be worked out. Looking at the market of a 17.7-cm (7-inch) tablet in India, the price could be roughly around Rs 20,000.
QWhat are the key things you look for before launching a product in the Indian market? Product-wise, we try to launch the devices in India shortly after launching them globally. In India, the premium sales do exist, but we also try to keep our focus on value for money. We have a lot of products in India, which offer good value for the money spent. Even in the low end segment, we prioritise on the designs of the product. The Indian market is different just because Indians really research a lot about a product before buying it, which, in a way, is good for us as they will understand Asus better.
QAndroid has been around for a long time. But now you have more open source operating systems to explore, including Ubuntu’s and the Firefox operating system for smartphones. Do you feel there is enough potential in the newly launched operating systems? It’s too early to talk about these operating systems. They have just been launched. We will have to wait and watch out for further developments. But at the moment, we would be focusing on Android for our products. We don’t have any plans to work on Firefox or Ubuntu, as of now. "The Indian market is different just because Indians really research a lot about a product before buying it, which, in a way, is good for us as they will understand Asus better."
QYou are expanding your retail presence by opening stores across India at a very fast pace. What is the strategy behind such rapid launches of Asus stores across Tier I, II and III towns in India? Since the last two years, we have always been focused on coming up with new stores because we believe a channel is very important if you want to grow in India. Even in 2013, we will continue to expand our channels in the country. We want to have 200 Asus stores across India by the end of 2013. As the consumer awareness is growing, consumers in Tier III or Tier IV cities in India are learning about Asus. Brand consciousness is slowly growing in rural areas as well. So, people want to feel the difference in a branded product, which makes the presence of physical stores very important. Also, after sales service is a very important factor, which is associated with branding. So, our stores will help in reaching out to more people. Thus, a store is an ideal marketing tool. Asus is becoming popular in smaller cities and towns across India. We are getting more sales from Tier II and Tier III cities across the country than metro cities. Places like Hubli in Karnataka and Durgapur in West Bengal have amazed us with high sales figures. We, at Asus, are observing that the Tier II and III cities are slowly leading in sales of tablets as compared to their urban counterparts.
QYet another much-talked about device from Asus is Padfone. It’s a phone-cum-tablet-cum-laptop. But if you look at it as an individual product, it is just a phone, which can power a bigger screen if fitted into it and can support a keyboard too. So the tablet part doesn't work without the phone being inserted in it. What is the strategy behind designing a product like Padfone? At Asus, we take design and innovation seriously. We like to experiment with new types of products and see how the market responds to it. The idea behind launching Padfone is to cater to the people who want a good smartphone as well as a tablet in a single device. The device is meant for those people who want to have the experience of a smartphone on a large screen. For example, when you are travelling, if you carry the Padfone, then you just have to plug in the device to the supplied display screen to enjoy movies or work on a large screen. Also, we wanted to come up with a completely different kind of hybrid product.
QWhen can we expect the Padfone 2 smartphone-cumtablet in India? We had launched the original Padfone in India last year. Mobile phone is a new product for us. So, our idea is to open the channel with Padfone first, and then expand our
Continued on page 99...
For U & Me Career
While the virtualisation job market is expected to be buoyant for many years, the demand for well-trained professionals in this fast-evolving terrain is only going to increase. This article looks a little closer at the career prospects in this field.
As the globe wrestles with a plummeting economy, organisations are looking to technologies like virtualisation to optimise their IT resources and scale down infrastructure costs. Whether it’s for storage or servers, the desktop or for networks, Indian enterprises, too, have realised the effectiveness of this emerging technology and are increasingly turning to virtualisation. Not surprisingly, virtualisation is growing at a fast clip with an accompanying need for experts in this domain to meet the industry demand. Various recent studies also indicate that IT professionals armed with virtualisation skills are among the most sought-after employees. With virtualisation promising to offer strong career prospects for years to come, the OSFY team interacted with the industry leaders to get an insight into what it takes to make a career in this hot arena.
At a time when the recruitment market does not seem to be too buoyant, it becomes important to grab the attention of HR managers. And a bagful of natty virtualisation skills can help one get noticed, even in the sluggish economy, believes Ankit Oberoi, co-founder and managing director of Innobuzz Knowledge Solutions, New Delhi. “What makes virtualisation hot as a trend is the fact that it helps lower the operating costs and offers many benefits. For example, server virtualisation rules out the need for numerous physical servers, which would not only
be more uneconomical, but will also require more space and the use of more resources. Naturally, the demand for virtualisation professionals is high and there is a shortage of dexterous IT professionals in this domain. This is definitely a perfect time for interested candidates to cash in on this opportunity,” says Oberoi.
The scope of a career in this terrain is immense. Interested candidates can choose between storage, network, desktop and application virtualisation. Explains Ravinder Kumar, technical manager for virtualisation, Koenig Solutions, New Delhi, “The areas where one can make a career in virtualisation are in software development, systems administration, quality engineering, systems support, marketing and more. Systems or virtualisation administrators manage applications, and monitor how these applications work together in a virtualised environment; quality engineers test desktop virtualisation software, and kernel developers play a key role in advancing the technology. With actualisation becoming mainstream, the conventional IT roles too have undergone a sea change, with recruiters looking for candidates proficient in virtualisation.”
While enterprises are increasingly leaning towards virtualisation to leverage their IT resources, it is important to understand the skillsets one needs to have to match the demand. Tuhin Sinha, owner and CTO of the Academy of Engineering and Management, Kolkata (AEM), shares, “The skillsets vary and depend on what domain of virtualisation one wants to get into – development, support, services or marketing. The basic requirement is to have knowledge of the systems for software development careers in this spectrum. A basic knowledge of the Linux kernel, accompanied with skills in C and C++, will boost employability. In a nutshell, virtualisation professionals will do well if they are highly proficient in operating systems, storage, networking, security, etc.”
And do certifications in this domain shore up one’s career prospects? “Certifications, though not mandatory, definitely boost one’s employability in the virtualisation domain and give candidates that extra edge over their non-certified counterparts during the hiring process. But only certification from a reputed firm or authority will make a difference. After all, what matters is the sound technical skill base of a professional,” adds Sinha.
Industry stalwarts claim that as virtualisation is a revolutionary model, it has made steady inroads into the open source ecosystem, too, thus opening a slew of opportunities for IT professionals. Alok Srivastava, chief executive officer and founder of Network NUTS, New Delhi, opines, “Earlier, companies did not have much choice and they resorted to proprietary virtualisation solutions. Now, with an upbeat open source virtualisation ecosystem, large businesses are heavily relying on open source for economic advantages. A few enterprises in Hyderabad are planning to migrate their servers to Red Hat. The bigger the size of the companies, the more number of servers will be based on open source. Naturally, the demand for open source professionals becomes high. In our institute, we do receive requests from various companies to provide training to their employees on Red Hat Linux Certification.”
So, if you wish to give a fillip to your employability chances, a career in virtualisation is just for you!
By Priyanka Sarkar
The author is a member of the editorial team. She loves to weave in and out the little nuances of life and scribble her thoughts and experiences in her personal blog.
Winner of Best Redhat Training Partner Award since 2005
Redhat Training & Global Certification
Students Placed in Wipro, HP, IBM, TCS, Tripod, Comtel, Daidem, PCS, CMS, Redhat & Many More.....
KOLKATA 2/80, Dum Dum Road, 1st & 2nd Floor, Kol - 74 Contact : 9830075018 / 9830051236 visit us at : www.aemk.org
For U & Me Interview
Devasia Kurian, managing drector, myOpenSourceStore.com myOpenSourceStore. com is an open source solutions provider catering to businesses worldwide.
com interacted with Ashwin Gopinath of OSFY about the reason behind starting the online open source portal and what it means for the future of open source in India.
What is happening with open source technology w.r.t. businesses and organisations? The adoption rate is low in comparison with proprietary alternatives; but there is pressure on enterprises to meet customer requirements with fewer resources and to find cost-effective solutions with a quick ROI. So the use of open source technology is increasing.
OSS facilitates the preservation of a wide range of information for future developments and it comes with considerable financial savings. Government institutes and PSUs are looking forward to more adoption and implementation of OSS in their IT infrastructure. The increasing awareness of open source in the public and government sector has been one of the significant developments in IT technology.
QHow is open source affecting the commercial software business model? As we know, a liberal licensing policy makes open source software accessible free of charge, along with the source code, which can then be customised by the user as per requirements. This drastically reduces costs, ensures less vendor dependence, reduces piracy/copyright infringements and increases the growth of a knowledge-based society.
The key advantages open source offers are: no vendor lock-in, abundant support, simple licence management, cost effectiveness and easy customisation.
Open source technology will revolutionise the current software business model by replacing the existing software vendors who deploy a large capex-based model. Open source technology will bring in a services-based model with a reasonable opex and zero capex. The industry will welcome this movement whole-heartedly.
QWhat are some of the considerations for a company deciding to move over to the open source side? Before a company decides to adopt and implement open source technology in a system, it needs to understand the long-term implication on the business. Since the decision to shift to open source is a long-term objective and incurs costs, the company needs to evaluate multiple factors.
Some of them are: Does the software offer sufficient features for the near future? Will it scale up based on the organisation’s requirements? Is there adequate documentation on installation, configuration and trouble shooting? Will the service provider offer support on installation, configuration and maintenance, and… Is there a large online community supporting the software?
QDoes the open source approach have any drawbacks for organisations? Though open source software is free software, which can be modified, customised and is cost effective, there are certain limitations.
Many developments in the OSS world occur very fast, almost at the same time. It is hard to keep track of which one is the latest version of a particular software. In most cases, there is no proper support service for installation, configuration or troubleshooting. There is also the risk of open source software stagnating, due to developer distraction or the loss of motivation and resources.
QWhat are the problems impeding the widespread adoption of open source technologies? As we see it, even though open source comes with cost and scalability advantages, the adoption level is low. Awareness and support are two key issues which have to be tackled. It is easy to download software for free, but that requires support in terms of seamless installation and implementation. We should, therefore, provide support to enterprises, right from product selection and installation configuration to maintenance (all on one platform), thereby accelerating the adoption of open source technology.
QWhat measures do you think should be taken to drive up the adoption rate of open source? First, open source adoption has to be a part of an organisation’s and CIO’s IT strategy. Second, one has to select the right set of resources. The companies have to work towards creating an end-to-end solution comprising product selection, and support for installation and maintenance. It
Continued from page 95...
channel with Padfone 2. Due to the innovative design of the Padfone, the product cycle is a little bit longer. Also, people need time to understand the two-in-one feature of the Padfone device. This is the main reason for the delay in the launch of Padfone 2 in India.
QAsus is looking forward to launching the low-end MemoPad 7 tablet in India. Do you think there is enough scope in the low-end tablet market in India? Primarily, what we have seen from the other players in the lowend Indian tablet market is that there is actually huge potential. The local tablet brands have helped us by introducing tablets to Indians beforehand. We believe that the local brands have initiated the trend and have also developed the initial demand in the Indian market. After the initial market is created, people would want to have better products. The tablet market will keep on growing from here, and we believe there is enough potential for Asus. Where notebooks took around a decade to develop the market, tablets will take just three years.
QWhat kind of response have you observed in India with respect to tablet PCs? In India, last year saw the tablet business start off. We believe around 2 million tablet units were sold in India in 2012. This year, we can expect the sales to increase greatly, "It is important to know how open source software will be used within the business environment in terms of professional implementation and has to be viewed with a clear focus."
is important to know how open source software will be used within the business environment in terms of professional implementation and has to be viewed with a clear focus.
QWhat has the Indian community’s response been to accepting open source technologies and software? The open source community in India is one of the largest in the world. As the market is maturing, organisations in India have slowly started accepting the advantages of open source platforms and encouraging collaboration. Open standards is a key facilitator for customisation and innovation, and the Indian developer community is creating OSS for a wide range of applications. With the increasing adoption of business applications by the Indian small and medium businesses, and cost being a key constraint in the adoption of applications development tools, open source solutions offer an interesting alternative. Government institutions and PSUs are in discussions regarding the adoption of open source software, e.g., the Indian Railways is supporting the deployment of Asterisk, an open source telephony platform, for all new developments in internal telephone services.
as big brands are slowly entering the market. Previously, tablets were sold in the mobile shops. In 2013, the IT channel will also rush to get tablets.
QRecently, Acer launched its Iconia B1 tablet under the sub-10k category. What are the key challenges for Asus in launching a tablet in the low-end market? Our team at Asus is trying to figure out the major challenges related to budget devices in the Indian market. Meanwhile, we are observing the experience of other brands. Also, we don’t want to compromise on the product’s features and the quality. So, having a product with a good design and features, while at the same time keeping the price low, is a major challenge for Asus. We are reviewing all the possibilities of launching a good product at a decent price.
QHow is Asus planning to market its upcoming Androidbased devices in the Indian market? The mobile device segment has changed its course, and is more like a convergence of the tablet and the smartphone. So, it’s hard to predict what the end users will want in their devices. At Asus, we try to focus on the entire product line up. We are trying to bring the best out of the innovations in the tablet market, and hope that people will like the quality being offered to them from a brand.