Sie sind auf Seite 1von 125

Contents

DEVELOPERS
30 Develop Android Apps
with Ease
32 A Few Things You Should
Know About Futexes
35 Planning an Android-Based
Device for an Enterprise
40 Have You Powered Your Ap-
plication with Memcached?
51 Programming Socket in C (TCP)
54 Try Your Hand at the
Dropbox API for Android
57 Introducing Celery for
Python+Django
45 Build Your Own Web Page With QForms
admin
61 Going Virtual With OpenVZ
65 Ensuring Security on
Open Source Virtual Platforms
67 A Look at the Basics of LVM
72 Deploying a Ticket Request
System with OTRS
74 Kick-Starting
Virtualisation with VirtualBox
100 For SMBs, Virtualisation is
the Way to Go!
78 Open Source Access to MS Exchange
Server Using DavMail
Reco
mm

ON THE DVD
end
ed
Sys
tem
Re
qu
ire
me
. nt
e nt
s:
em

PClinux OS
P4
lac

,1
rep

GB
ree

RA
af

M,
for
m

DV
.co

D-R
dia
fyin

OM
@e

Driv
port

e
t sup
to us a
work properly, write

LIVE DVD
s not
DVD doe

A free, easy to use Linux-based operating


is
se th

system for desktops and laptops


In ca

Also includes ISOs of Snowlinux, Archlinux


and Zorin OS
m
dia.co CD Team
e-mail: cdteam@efyin

4  |  march 2013 | OPEN SOURCE FOR YOU


Trained participants from over 42 Countries in 6 Continents
Linux OS Administration & Security Courses for Migration
LLC102: Linux Desktop Essentials Advanced Administration Training
LLC033: Linux Essentials for Programmers & Administrators
LLC103: Linux System & Network Administration on DNS, Samba, Nagios & Postfix
LLC203: Linux Advanced Administration
LLC303: Linux System & Network Monitoring Tools DNS Server Administration: 9 Mar 2013
LLC403: Qmail Server Administration
Linux System & Network Monitory Tools: 23 Mar 2013
LLC404: Postfix Server Administration
LLC405: Linux Firewall Solutions Apache Server Administration: 16 Mar 2013
LLC406: OpenLDAP Server Administration
LLC408: Samba Server Administration RHCVA / RHCSS / RHCA Training - Exams
LLC409: DNS Administration RH318: 9, & 23 Mar 2013; EX318: 19 April 2013;
LLC410: Nagios - System & Network Monitoring Software RHS333: 15 Mar; EX333: 8 Mar; RH423:16 Mar; RHS429: Call;
LLC412: Apache & Secure Web Server Administration RH401: 6 May, EX401:10 May; RH436: 13 May; EX436: 17 May
LLC414: Web Proxy Solutions RH442: 20 May; EX442: 24 May
Courses for Developers
LLC104: Linux Internals & Programming Essentials RH299 from 4, 11, 18, 25 March
LLC106: Device Driver Programming on Linux
LLC108: Bash Shell Scripting Essentials EX200/300 Exam 15, 22, 29 March
LLC109: CVS on Linux
LLC204: MySQL on Linux
LLC - Authorised Novell Practicum Testing Centre
LLC205: Programming with PHP
LLC206: Programming with Perl NCLP Training on Courses 3101, 3102 & 3103
LLC207: Programming with Python
LLC208: PostgreSQL on Linux CompTIA Storage+ & Cloud+ Training
LLC504: Linux on Embedded Systems
LLC702: Android Application Development & Certification from March ‘13
RHCE Certification Training
RH124: Red Hat System Administration - I Microsoft Training Co-venture: CertAspire
RH134: Red Hat System Administration - II Microsoft Certified Learning Partner
RH254: Red Hat System Administration - III
www.certaspire.com
RH299: RHCE Rapid Track Course

RHCVA / RHCSS / RHCDS / RHCA Certification Training For more info log on to:
RHS333: Red Hat Enterprise Security: Network Services www.linuxlearningcentre.com
RH423: Red Hat Enterprise Directory Services & Authentication
Call: 9845057731 / 9449857731
RH401: Red Hat Enterprise Deployment & Systems Management
Email: info@linuxlearningcentre.com
RH436: Red Hat Enterprise Clustering & Storage Management
RH442: Red Hat Enterprise System Monitoring & Performance Tuning
RHS429: Red Hat Enterprise SELinux Policy Administration RHCSA, RHCE, RHCVA,
RH318: Red Hat Enterprise Virtualization RHCSS, RHCDS & RHCA
Authorised Training
NCLA / NCLP Certification Training
& Exam Centre
Course 3101: SUSE Linux Enterprise 11 Fundamentals Gold Practicum
TRAINING TESTING
Course 3102: SUSE Linux Enterprise 11 Administration PARTNER PARTNER

Course 3103: SUSE Linux Enterprise Server 11 Advanced Administration

Registered Office: # 635, 6th Main Road, Hanumanthnagar, Bangalore 560019


# 2, 1st E Cross, 20th Main Road, BTM 1st Stage, Bangalore 560029.
Tel: +91.80.22428538, 26780762, 65680048
Mobile: 9845057731, 9449857731, 9343780054
YOU SAID IT
Include more content on Raspberry Pi Changing the colour of the code snippets
I have been a long-time subscriber of your magazine—in I am a regular reader of OSFY. I have a suggestion.
fact, right from Issue 1. I came to know of Raspberry Currently, the source code snippets are printed in light blue. On
Pi through this magazine and recently got one. I was a white paper, the text printed in light blue is indeed difficult to
expecting some more articles on it in OSFY but have been read. I would appreciate it if you make the colour of the code a
disappointed. However, I was happy to see links to tutorials darker shade of blue.
in your website. I am sure this tiny computer is going to —Ganesh Sanjiv Naik,
bring a lot of cheer to the student and hacker community ganesh@levanatech.com
so I hope that at least two pages in your magazine will get
devoted to Raspberry Pi. ED: Thanks a lot for bringing this issue to our notice. We
The lack of VGA is a big concern in Raspberry Pi. The certainly agree with you that the colour of the code needs to
composite video's resolution is very poor in our old Sansui be changed for better readability. We have changed the colour
HDMI LCD monitor and I was not getting a HDMI output. of the code and increased its font size too. Hope we have been
Meanwhile, I wanted to try networking in Ra Pi. So, I able to help you.
connected it with a Compaq laptop through a router. The
laptop has a Tata Docomo 3G dongle for Internet access. On becoming a member of the
When this Net connectivity is shared, it got the IP address FOSS community
as 192.168.0.1. I then gave static IP to Ra Pi as 192.168.0.2 I’m an assistant professor in a reputed engineering college in
and the connectivity was established. After suitable entries the northern part of Karnataka. My colleagues, my students and
were made, I found that Raspberry Pi got connected to the I want to become members of the FOSS community, so that we
Net. Of course, it was all possible due to Google as well as can get regular updates about the latest happenings in this arena. I
Raspberrypi.org. would be grateful to you if you let me know on how we could do
Again, tweaking the entries in text files was difficult. So, so. This will help me in inviting good speakers to deliver lectures
through PuTTy, I logged into Ra Pi and could easily modify the on the latest trends in open source technology at my college.
text entries. The file - /boot/config.txt - is very important and I
am at present studying various combinations for HDMI. —Manju Shirur,
I am sure such information written professionally will manju_shirur@yahoo.co.in
be of great help to the Ra Pi community. Years back, I had
a Spectrum computer, which is spoken of highly even now. ED: Thanks for reaching out to us. We are indeed glad to know that
There were so many magazines and books (that still adorn you want to be a part of the FOSS community. To learn more about
my bookshelf) on the Spectrum that it was a pleasure to leaf the latest happenings in the open source arena, you can:
through them. Perhaps, some magazine on Raspberry Pi will 1. Subscribe to Open Source For You at http://electronicsforu.
come out some day but till then, I am sure OSFY can come com/electronicsforu/subscription/subsc2scheme.asp#.
forward to do the needful. 2. Subscribe to the mailing list of Indian Linux Users Group
—V.S. Nagasayanam, (ILUG) where you can interact with experts who have immense
vsayanam@gmail.com knowledge in this domain. ILUG Chennai is quite active in
southern India. Here is the link: http://ilugc.in/mailing-list/
ED: Thanks a lot for sharing your feedback with us. It makes 3. You can be a part of different events related to open source
us feel good that we have been able to motivate you to acquire such as Open Source India, which is held in Bengaluru every
a Raspberry Pi for yourself. We have featured a few articles year. For more details, check out http://www.osidays.com/.
on Raspberry Pi in OSFY. (‘Getting Started with Raspberry Hope this helps. Let us know if you have any further queries.
Pi’ in November 2012 and ‘Control Raspberry Pi’s GPIO
Pins with PHP’ in December 2012.) We are also planning to ClearOS CD missing from the February issue
start a series on it and you will get to read these articles in I received my subscriber’s copy of OSFY a few days back.
the upcoming editions. The OSFY team is constantly trying And I was disappointed to find that it came only with the Fedora
its best to come out with varied articles related to open source 18 DVD sans the ClearOS CD. Kindly look into this matter. My
and will continue to do so, always. Keep writing in with your subscription number is L21591.
suggestions; we welcome them. —Krishnan Kumar,
krishankumarjhs@gmail.com
8  |  March 2013 | OPEN SOURCE FOR YOU
YOU SAID IT
ED: The ClearOS CD was only meant for the newsstands and
Providing the DVD’s contents for
was sold at an additional cost. If you want, we can definitely 32-bit users
arrange for you to get a copy. Our support team will help you.
Mahesh Watkar: I always enjoy reading
Subscription without DVD OSFY and I am a big fan of it. I love to
I have been a subscriber of OSFY since the last one try the DVD and CD contents virtually.
year. My subscription number is L22485. Is there an option to But nowadays, it seems you have tar-
geted the DVD and CD contents only for
subscribe to OSFY without the CD/DVD, at a lower price? If 64-bit users. What about the 32-bit users
I need one, I can download the latest distro. The magazine’s who don’t have faster Internet to down-
content is very useful and of great help. load ISOs from websites? You should
—Babanna S Duggani, provide the 32-bit and 64-bit ISOs in
babanna.duggani@gmail.com the same DVD so that all Linux fans are
served equally.
ED: Thanks for the letter. Currently, we do not offer such an Linux For You: Hi Mahesh! We are
option for the print edition of our magazine. We have noted indeed happy that you have noticed
your views and will try to work out something. But if you do not this problem. We have provided the
Ubuntu DVD (in our November 12
want the DVD, we have an e-zine that allows you to enjoy the edition) for 32-bit users. But yes, we
digital version of the magazine. For OSFY subscribers, the e-zine have noted your suggestion and will
service is free. Log on to http://ezines.efyindia.com/ for details. try our best to incorporate it in our
future editions.
Increase in price of OSFY

Samaresh Biswal: I have been following


your magazine from a long time and your Help from the community
mega 10th anniversary issue on 'Top 10
of everything on open source' was indeed Jeykrishnan Janardhanan: Hi OSFY!! How
interesting and informative. Just wanted do I connect the Net to my laptop (Asus)
to know why the price of the magazine has from my mobile (Samsung Galaxy Ace)?
been increased to Rs 125? I have GPRS connectivity and have also
installed Kies!!
Linux For You: Hi Samaresh! We are glad
to know that you liked the February issue. Linux For You: Hi Jeykrishnan! It
The price for this issue was increased would be great if you post this
because we had enclosed an additional query on our Facebook wall. You
CD—the ClearOS CD – in the copy that would get varied suggestions
was sold on the news stands. But the in- from the community, which we
crease in price was just for this issue. The are sure will help.
price of the magazine remains Rs 100.
Jeykrishnan Janardhanan: Thanks
a lot! I did that and got interesting
Loved reading E-Preneur Venture answers from the community. It
was indeed helpful.
Murali Krishnan: The article ‘Starting our
own E-Preneur Venture Using Open Source
Tools’, published in the January issue, is
indeed informative and insightful. Would love
to see more articles like this in OSFY.
Please send your comments or suggestions to:
Linux For You: Thanks a lot for the The Editor
compliment. We will convey your feed-
back to our author Uday Mittal, and D-87/1, Okhla Industrial Area, Phase I, New Delhi 110020
definitely try to incorporate more such Phone: 011-26810601/02/03, Fax: 011-26817563
articles in future editions. Email: osfyedit@efyindia.com

10  |  March 2013 | OPEN SOURCE FOR YOU


Admin Insight

For SMBs, Virtualisation is


the Way to Go!
The virtualisation market has gradually matured over the past few years, with most
enterprises adopting it today. And now, SMBs too are switching to it, on a large scale.

V
irtualisation has become almost mandatory Needless to say, virtualisation is currently the norm for
for all companies deploying IT solutions in modern-day IT infrastructure.
any way. It simplifies one’s IT infrastructure, Kashish Karnick, brand manager, IBM BladeCenter,
creating a more dynamic and flexible set-up. As B S India and South Asia, says, “Virtualisation is changing
Nagarajan, director, System Engineering, VMware the way people work. It allows customers to consolidate
India & SAARC, rightly puts it, “Virtualisation makes their workloads on to a fewer number of hardware
your IT infrastructure simpler and more efficient. systems. It is possibly one of the most important aspects
With virtualisation solutions, applications get in today’s IT world. It has led to an absolute overhaul
deployed faster, performance and availability soar, and of the computing industry. The awareness about
operations become automated, resulting in IT that’s virtualisation is growing and people are aware about the
easier and less costly to own and manage.” advantages it provides.”

100  |  March 2013 | OPEN SOURCE FOR YOU


Insight Admin

The latest trends in virtualisation customised offerings for SMBs. In fact, this is a
Increased percentage of virtualised workloads: One very important segment for a majority of companies.
of the trends that the Indian virtualisation industry is Nagarajan emphasises, “Virtualisation in the world of
witnessing is the increasing workload that customers are SMBs is growing by leaps and bounds. This sector will
virtualising. Nagarajan says, “I have been around in this continue to be our focus area this year as well. Some
industry for quite some time now, from the days when we of our offerings are strictly dedicated to SMBs, and we
had to literally struggle to make customers aware about are constantly trying to make them more affordable.
the benefits of virtualisation. From such a scenario, we The word SMB implies different things to different
moved to a phase when customers started virtualising a companies but for VMware, SMBs are companies that
few workloads for test and development; and today, I am are not necessarily small but whose IT infrastructure
glad to share that we have customers who have virtualised may be small or medium—for instance, a large textile
all the way from 50 per cent to around 80-90 per cent of firm could have a large business volume, but we
their data centres. In fact, there are a few customers who might classify it as an SMB from the IT infrastructure
are 99-100 per cent virtualised. The trend we are seeing is point of view. There is a lot of traction amongst the
that customers are comfortable increasing the percentage SMBs and SMEs for virtualisation. Let me give you
of workloads that are virtualised.” an example. Disaster Recovery (DR) is generally
Business-critical applications go the virtualisation associated with large customers with big data centres.
way: Bhaskar Jayakrishnan, director, Software Development, Not many small companies go beyond a certain point
Computing Systems Product Group, Cisco, talks of the when it comes to scaling up their IT infrastructure,
virtualisation trends in the domain of business critical as it is expensive and complex. But we all know that
applications. He says, “The other trend that we are observing IT is critical for any company, whether it is small or
(which is also the reason behind the emergence of the first big. A lot of small companies were not able to afford
trend) is the virtualisation of business critical applications. the expensive DR solutions previously. So starting
Gone are the days when customers would virtualise only this year, we have included the replication part which
those applications that are less critical. The companies used is used for DR as a free component in our existing
to virtualise only the applications that IT was very confident licences. As a result, even SMB customers will be able
about. They never touched the applications owned by to replicate their data and servers from one location to
businesses, like ERP and mail messaging. the other. So this is just one example.
“Some of these applications are extremely critical to “The other important example revolves around back-
organisations and they were not virtualised a few years ups, which are critical to every customer, be it an SMB or
ago. But now a number of customers are coming forward an enterprise. So we have included a back-up solution in
to virtualise their business critical applications like our licences, free of cost. This is an issue that every SMB
SAP, Oracle Business Suite, etc. There were never any faces. They are not able to afford more expensive back-up
security-related fears for these applications. Organisations software, so a part of the back-up solution is included in
worried about whether the critical application would run our package,” he adds. So the belief that virtualisation is
the same way on a virtual platform as it did on a physical not meant for SMBs and is only for bigger companies is
platform, and whether its performance would suffer. We gradually fading away.
have addressed most of these concerns now, and there are Karnick adds, “First of all, nobody implements a
enough ways to prove that your performance is not going technology just for the sake of it. People implement
down. You get the same performance and, in some cases, technologies to address their business problems. Most
it is even better—if you make the best use of the platform. customers spend a majority of their time and budget
Most vendors today are virtualisation friendly.” in solving their existing problems, which leaves them
Migration of workloads from UNIX to x86 with very little time and money to focus on newer
environments: Arun Kumar, general manager, Red Hat innovations that can help them grow. Typically, the
India, says, “India is a UNIX rich country, in the sense that function of IT is to keep things moving. Thankfully,
we have a lot of UNIX deployments in India, compared due to virtualisation, a lot of these problems are
to other countries. These days, we are seeing a number of resolved and the IT team is now able to think beyond
customers (thanks to the high cost of maintenance, growing the regular issues and take a step ahead in the direction
complexity, and so on) trying to move away from their of innovation.”
legacy UNIX environments to the x86 environment.”
By: Diksha P Gupta
SMBs are getting virtualisation-friendly
The author is assistant editor at EFY.
Most companies offering virtualisation solutions have

OPEN SOURCE FOR YOU | March 2013  |  101


For U & Me Case Study

How OSS Helped a Construction


Company Almost Halve its IT Budget!
SEW Infra has been able to save nearly 40 per cent of its IT budget by deploying open
source solutions.

O
pen Source India 2012 attracted a diverse The company has several projects
audience. Techies from all parts of the across India and Africa
world came to the convention to share and Shivaram Yeruva narrates, “When I joined SEW
understand the latest in open source technology. But it Infrastructure Ltd in September 2008, the company was
was Shivaram Yeruva, from the construction industry, in the middle of the Oracle ERP implementation. The
who presented a most interesting case study. This IT initial part of my role was to set up a data centre at the
infra lead of SEW Infrastructure narrated a success SEW office to host the production class servers. The goal
story about how open source technology not only was to enable speed and flexibility in server provisioning
helped him cut costs but also win over his colleagues while containing the costs. We looked into setting up
to the OSS cause. the entire environment in a virtual environment. Part of
SEW Infrastructure Limited (www.sewinfrastructure. the challenge was that Oracle EBS was not yet certified
com) was founded in 1959, and is currently headquartered to be hosted on virtual servers. With the support of the
at Hyderabad in India. The company is one of the largest management, I risked going for a virtual environment
civil infrastructure-engineering majors in the country. since the application was still under development. We

102  |  March 2013  |  OPEN SOURCE FOR YOU


Case Study For U & Me

looked into several options available in the market, but per the requirements. We
settled for XEN virtualisation, which is under GPL and found it easier to manage after
is an open source platform. deployment, as we could get
“Over the next few months, the environment not immense support from the
only proved to be absolutely stable but also offered the forums.”
flexibility required for rapid cloning, backup, server to However, Shivaram's quest
server migration. The fact that the servers were virtual did not end here. He wanted to
made no difference to the Oracle EBS application leverage open source tools to
and database admins. We deployed our entire data enable the end users as well.
centre on open source by using XEN virtualisation, He says, “We have deployed
iptables as firewall, Snort as the Intrusion Detection Shivaram Yeruva, IT infra lead, many open source software
System, Squid as the Internet filter/proxy, Nagios as SEW Infrastructure Ltd at the user level, which has
the network and device monitoring system, and Zci and helped in reducing our costs to a large extent. Earlier, we
OCS for asset management. used to purchase office tools and PDF tools to convert
“SEW’s construction sites are spread across the length the documents. But now, we are using OpenOffice and
and breadth of the nation, with some of them located in LibreOffice; we have many templates available for the
hard to reach places such as Arunachal Pradesh and North same. We use DIA for flow charts or organisation charts.
Sikkim. Our employees had to trek several kilometres to Gradually, we trained our employees to use Linux as
make a phone call and get in touch with the head office. their desktop OS. Initially, it was an uphill task, because
We set up a nationwide VoIP infrastructure on Asterisk they were used to Windows and breaking that mindset
running in the XEN environment that handles more than does take time. With some investment in training, and
half a million minutes of voice calls per year.” identifying and supporting the key change catalysts in the
organisation, we are getting good results in the transition
The challenges were many from Windows to Linux. After some initial hiccups, things
Shivaram’s belief in open source technology drove him have been smooth.”
to convince more and more colleagues in the industry Shivaram explains that his job as an IT manager is
about its benefits. to ensure the organisation’s growth, both technically and
He reminisces, “While we were discussing our financially. Adoption of open source technology definitely
ERP deployment on open source, the management required that extra bit of effort, but his conviction to make
was concerned about the post ‘go-live’ support. The it was much bigger than the hurdles he faced.
ERP implementation partner recommended against He summarizes his experience saying, “Go for
virtualisation since it was not supported by Oracle at that open source and try it; later, you'll love the flexibility it
point of time. Since we were still in the ‘development’ offers. Modify it as per your needs and cut your capital
mode, we went ahead and took that risk. We were expenditure. You will find new information on the
cautioned that it was not a standard procedure or a good forums every now and then that will help you enable
practice. Our CIO, Sidhartha Meka, supported us by innovative solutions. You will not be stuck with a vendor’s
trusting our technical expertise.” development and release cycles, and the frustration of
At the end of the day, it appears that what is dealing with its support processes for every issue.”
required is conviction and the technical knowhow.
Things fall in place if these two are perfectly aligned. Flexibility, and freedom that is free of cost!
Eventually, when the application was finally ready for SEW has saved at least Rs 100 million by believing in open
production level deployment, Oracle EBS was certified source solutions. Typically, provisioning of extra capacity
on Oracle’s VM. and users requires lengthy budgetary approval processes
Today, when he looks back, Shivaram feels good that hamper business expansion. With open source
about the fact that he could continue with his passion for this is hardly a challenge. Also, the use of open source
open source technology, while benefiting the company. architectures plants the organisation in an open standards
He says, “Being a non-IT company, we always oriented environment. This contrasts with the platform-
have budget limitations for IT infrastructure – which specific dependencies on the vendors' proprietary
was yet another reason to implement open source apps, technologies that are hard to migrate away from, and
apart from my passion for open source technology. also require specialised skills to manage.
When we went on to search for the appropriate open
source software for our company, we found quite a few By: Diksha P Gupta
alternatives. The beauty of open source is that it allows
The author is assistant editor at EFY.
complete flexibility and one can do modifications as

OPEN SOURCE FOR YOU  | MARCH 2013  |  103


Cisco Systems
Citrix Systems
Cisco
Hitachi Data
Systems
Intel
HP Microland
IBM

A List Of
MontaVista
Novell India
Pvt Ltd Cisco
NetApp
Oracle India PVT Ltd
Netweb

Virtualisation Solutions Providers


Technologies
HCL Technologies
HP Parallels
IBM RedHat
Wipro Vmware

Cisco Systems
Citrix Systems

Cisco Systems | Bengaluru


Cisco
Hitachi Data
Systems
Intel
HP Microland
IBM
MontaVista
SONA, which includes Cisco Network Virtualisation, encompasses both a vision for the evolution of enterprise
Novell India
Pvt Ltd Cisco IT and a pathway to get there. Cisco differentiates itself from most other vendors by adopting a systems-level
NetApp
Oracle India PVT Ltd
approach that integrates services throughout the infrastructure. Looking at the Cisco Catalyst switching portfolio,
Netweb
Technologies
it becomes apparent that a wide range of Layer 3 switches support network virtualisation. Other vendors have
HCL Technologies point solutions that are only applicable for limited areas within the campus network. Cisco Network Virtualisation
HP
is a primary component of the Cisco SONA framework.

Citrix Systems | Bengaluru


The desktop virtualisation system that centralises and delivers desktops to users anywhere, reduces desktop
TCO by up to 40 per cent and improves data security by centralising desktop management. XenDesktop delivers
a high definition user experience and personalised desktops over any connection.

Dell | Bengaluru
The solutions from Dell can help provide a flexible infrastructure for the data centre by providing access to data
for remote and mobile workforces using desktop virtualisation solutions. With virtualisation, you can count on
an approach that meets your growing needs. It will increase an organisation’s ability to meet evolving business
requirements by leveraging existing resources and scaling the infrastructure without the need to rip and replace.
Dell focuses on standards-based solutions, keeping the barriers to change low. With Dell, you will not be locked
into proprietary hardware implementations or management frameworks that may limit your options in the future.
LEADING

Hitachi Data Systems | Mumbai


Hitachi Virtual Storage Platform is the only 3D scaling storage platform designed for all data types. It is the only
enterprise storage architecture that flexibly adapts for performance, capacity and multi-vendor storage. Combined
with unique Hitachi Command Suite management software, it transforms the data centre.

HP India | Bengaluru
The Client Virtualization Access Service of HP provides multiple network access, flexible role-based access, a user-
friendly interface, and a secure printing network—all from a single access device. Using this unique technology
as part of a client virtualisation solution, HP can provide a unique user-focused interface to internal, secure,
partner, or cloud network resources—all from a variety of endpoint devices—ranging from desktops to tablets.

IBM | Bengaluru
IBM Virtualisation provides a logical rather than physical view of data, computing power, storage capacity and other
resources. IBM System Storage virtualisation helps provide centralised data management, reduced complexity,
and reduced costs. The IBM SmartCloud Virtualized Server Recovery service can help reduce your recovery time
and improve the reliability of your recovery infrastructure.

Intel | Bengaluru
Hardware-based Intel Virtualization Technology (Intel VT)1 improves the fundamental flexibility and robustness of
traditional software-based virtualisation solutions by accelerating key functions of the virtualised platform. This
efficiency offers benefits to the IT, embedded developer and intelligent systems communities.

104  | march 2013 | OPEN SOURCE FOR YOU


Cisco Systems
Citrix Systems
Cisco
Hitachi Data
Systems
Intel
HP Microland
IBM
MontaVista
Novell India
Pvt Ltd Cisco

Microland | Bengaluru NetApp


Oracle India PVT Ltd
Netweb
Technologies

Microland’s Desktop Virtualisation Business Value Assessment Service provides a holistic approach towards HCL Technologies
HP Parallels

adopting desktop virtualisation adoption. By using this service, enterprises will understand the state of readiness IBM RedHat
Wipro Vmware
of existing desktop infrastructure, the impact of desktop virtualisation on the organisation, the business case and Cisco Systems

ROI for a desktop virtualisation initiative, and obtain a high-level design road map for implementation. Citrix Systems
Cisco
Hitachi Data

MontaVista | Bengaluru
Systems
Intel
HP Microland
IBM
MontaVista

MontaVista offers several virtualisation solutions, including KVM Hypervisor (full virtualisation), Linux Containers Novell India
Pvt Ltd Cisco

(OS resource virtualisation) and MontaVista Bare Metal Engine (OS resource virtualisation and SoC hardware NetApp
Oracle India PVT Ltd
optimisation).The company’s virtualisation solutions are certified by Linux Standard Base (LSB) 3.0, Carrier Grade Netweb
Technologies
Linux specification (CGL 5.0) and SCOPE Alliance Linux Profile 1.1. An impressive level of six nines (99.9999%) HCL Technologies

in reliability (a downtime of less than 31.5 sec/year) has also been proven by the company.
HP

Novell India Pvt Ltd | Bengaluru


Novell offers a wide range of best-in-breed and robust virtualisation solutions. Some of its key virtualisation solutions
include the integrated Xen-based virtualisation solutions built on the capabilities of the SUSE Linux Enterprise
Server, Kernel Virtual Machine (KVM), Linux Containers, Hyper-V as well as Windows guest support for KVM.

NetApp | Bengaluru
With a NetApp agile data infrastructure, you can run mixed applications in a shared, virtual environment, achieve
increased demand and unlimited scalability for your virtual servers, and optimise storage resources for greater
efficiency, performance, ROI, and agility. You can also maintain continuous operations during updates, upgrades,
and refreshes; and integrate data protection with zero performance impact and faster recovery.

Netweb Technologies | New Delhi


Netweb Technologies provides server and desktop virtualisation to its customers. It is also active in the storage
solutions and HPC space, and maintains around 5000 servers a year. The firm operates in six cities across India,
and has a direct service and sales channel to the end customers.

Oracle India Pvt Ltd | Gurgaon


Oracle offers the industry's most complete and integrated virtualisation, from the desktop to the data centre. Going
far beyond simple consolidation, the company enables customers to virtualise and manage their full hardware and
software stack. Designed for efficiency and optimised for performance, Oracle's server virtualisation products
support x86 and SPARC architectures, as well as a variety of workloads such as Linux, Windows and Oracle Solaris.

Parallels | Seattle, USA


Parallels uses its open source OpenVZ project as its commercial hosting product for Linux virtual private servers.
High density and low cost are the two keywords you'll hear when experiencing a Parallels-based hosting solution.
These are the two main reasons why the world's largest hosting companies choose Parallels. But, the innovation
doesn't stop at Linux containerised virtual hosting. Parallels has also developed a containerised Windows platform
to maximise the number of Windows hosts for a given amount of hardware.

Red Hat | Pune


Red Hat Enterprise Virtualization is a complete virtualisation management solution for servers, powered by the
people who brought you Red Hat Enterprise Linux. With Red Hat Enterprise Virtualization, you can maintain
business continuity, to scale and integrate both Linux and Microsoft Windows workloads. Red Hat Enterprise

oPEN SOURCE FOR YOU | march 2013 | 105


Cisco Systems
Citrix Systems
Cisco
Hitachi Data
Systems
Intel
HP Microland
IBM
MontaVista
Novell India
Pvt Ltd Cisco
NetApp
Oracle India PVT Ltd
Netweb
Technologies
Virtualization for Servers 3.1 is built on Red Hat Enterprise Linux, a platform trusted by thousands of organisations
HCL Technologies on millions of systems around the world for mission-critical workloads. It instantly delivers Microsoft Windows
and Linux desktop operating environments to thousands of users from centrally managed servers in the data
HP Parallels
IBM RedHat
Wipro Vmware
centre. It lets users remotely access their individual desktops from nearly any client device, including thin clients
Cisco Systems
Citrix Systems
or re-purposed PCs. With Red Hat Enterprise Virtualization for desktops, you get cross-platform support and a
Cisco
Hitachi Data
great user experience with the freedom of an open source foundation.
Systems
Intel

VmWare | Bengaluru
HP Microland
IBM
MontaVista
Novell India
Pvt Ltd Cisco
NetApp
Oracle India PVT Ltd
VMware virtualisation lets its clients run multiple operating systems and applications on a single computer,
Netweb
Technologies
consolidate hardware to get vastly higher productivity from fewer servers, and save 50 per cent or more on overall
HCL Technologies IT costs. It also offers speed and simplifies IT management, maintenance, and the deployment of new applications.
HP

Wipro | Bengaluru
Wipro's Storage Virtualization Platform solution enables a virtualised platform for the development of storage
applications like mirroring and de-duplication in an R&D set-up, thereby enabling easy debugging of the components.
The storage virtualisation framework developed by Wipro is a convenient way to implement virtualisation
applications without getting into the kernel and device driver intricacies. This easy-to-debug model provides a
framework for easy testing of core algorithms.

Read Open Source For You:


Asia’s Leading Open Source Magazine

106  | march 2013 | OPEN SOURCE FOR YOU


TIPS
& TRICKS
How to check the date and time the system sudo kill “PID”
was rebooted
Here is a simple command to check the system’s …where PID is the process ID of Xorg.
reboot date and time: This will reload the XWindows System.

#last reboot
Note: You must have root access to use these
reboot system boot 2.6.18-53.el5 Sat Aug 6 18:02 commands
(8+04:45)
wtmp begins Sat Aug 6 18:02:07 2011 —Indermohan Singh,
indermohansinghk7@gmail.com
The command below will give you the date and time
the system was booted: Handling log files
As developers, we do a lot of testing after coding the
#who -b software and we frequently need to handle the log
files to identify the errors in the code of an application
system boot 2011-08-24 09:43 program. Given below are the steps to handle various log
files that are being generated on a Linux system.
—Sumit Chauhan,
sumit1203@gmail.com 1. Clearing a log/text file:

Reloading XWindows System $ >filename


Sometimes, while working on a Linux-based
computer, XWindows System doesn’t respond very The above command will clear all contents of the file.
well. Here are the steps to reload XWindows System 2. To view the log/text file:
in a non-responsive Ubuntu system.
1. First open the command mode by pressing: Ctrl + Alt + F2 $ tail -f filename
…and then entering your username and password.
2. Then run the following command: This command will display the file contents as and
when the log is written. It also displays the flow of the log.
top 3. To use more sophisticated tools on log files:

Search the process named ‘Xorg’ in the list. $ less filename


If it does not appear, wait for a few seconds. Then find
the PID of the ‘Xorg’ process, listed at the extreme left of This will display the log file contents. You can also use
the output on the top. the commands below while using less.
You can also get the PID using the command given below: a. To refresh the log automatically, press:

pgrep Xorg “f”

3. Now run the following command to kill the Xorg process: after issuing the less command.

108  |  march 2013 | OPEN SOURCE FOR YOU


Counting the number of files in a directory
b. To stop refreshing the logs, press: Here is a simple command that can count the
number of files in a directory (not the hidden ones):
CTRL + C
echo * | wc -w
c. To scroll up, press:
—Anil Awasare,
w anil.awasare@gmail.com

d. To scroll down, press: Find and move files


You can find and move files in two steps. Step 1
d enables you to find all files with .mp3 as the file
extension. In Step 2, you can move them.
e. To exit the mode, press: Step 1:

CTRL+C [narendra@ubuntu]$ find DIR_NAME -type f -iname “*.mp3”

and then press ./dir2/f4.mp3


./dir2/f3.mp3
q ./dir1/f2.mp3

—Pranavam Siddharthan,
pranavam.s@gmail.com Note: Replace DIR_NAME with your actual
directory name.
Changing file names from upper case to lower
To manually change the case (upper to lower or vice In the above example, you are only finding the files
versa) of a large number of files can be tedious. So, (that’s why you used -type f) that have extension ‘.mp3’.
here is a script that can make life easy: Now you can move these files by using the ‘-exec’ option
of the ‘find’ command.
#to change uppercase filenames to lowercase Step 2:
#!/bin/sh
if [ $# -eq 0 ] ; then [narendra@ubuntu]$ find DIR_NAME -type f -iname “*.mp3” -exec
echo Usage: $0 Files mv {} /tmp/mp3/ \;
exit 0
fi Here, ‘{}’ matches each filename which is found by
for f in $* ; do the ‘find’ command. And ‘\;’ is used to indicate the end of
g=`echo $f | tr “[A-Z]” “[a-z]”` the command.
echo mv -i $f $g After executing this command, all mp3 files are moved
mv -i $f $g into the ‘/tmp/mp3’ directory.
done
—Narendra Kangralkar,
If you want to change the case from lower to upper, replace narendrakangralkar@gmail.com

g=`echo $f | tr “[A-Z]” “[a-z]”`

with
Share Your Linux Recipes!
g=`echo $f | tr “[a-z]” “[A-Z]”`
The joy of using Linux is in finding ways to get around
problems—take them head on, defeat them! We invite you
in the script. to share your tips and tricks with us for publication in OSFY
so that they can reach a wider audience. Your tips could be
related to administration, programming, troubleshooting or
—Anil Awasare, general tweaking. Submit them at www.linuxforu.com. The
anil.awasare@gmail.com sender of each published tip will get a T-shirt.

OPEN SOURCE FOR YOU | march 2013  |  109


offe
rS THE
month

Get Free 10%


Trial! eNlight Cloud Computing
Services by ESDS
OFF!
Welcome 2013!
Test how our Cloud Works:
http://demo.enlightcloud.com/ Direct 10% discount on every course!
Login Details:
Username: demo@demo.com; Password: demo Coupon Code: 2013welcome
watch Hurry!d till Contact us on +91-98877 89124
Offer to is For more information, ali
out th 3
‘1 call us on 1800-209-3006/+91-253-6636500 Offer vrch 2013! or write to info@grras.com
March a
or email us at sales@esds.co.in 31st M Catch us on facebook.com/grras

www.esds.co.in www.grras.org

20% FRANCHISE
OFF! Offers!
20% Discount on RHCVA course
Partner with a Global Brand!
Get trained at "India's Most Loved Linux
Training Company" offering 20% Discount Get 50% off on franchise fees!
on RHCVA course. Be your own boss with
significant earning potential
Hurry!d till Contact Hurry!d till Contact us at +91-98868 79412 /
ali ali
Offer vrch 2013! Ms. Shivani Sharma on +91-9310024501 Offer vrch 2013! +91-80-42425000 or write to
a a
31st M or write to info@networknuts.net & 31st M info@astTECS.com
mention COUPON CODE: OSFY

www.networknuts.net www.astTECS.com

Free Get
1 month
Training! Free Get 1 month Free
Pay for 1 & Get 1 Absolutely Free! one month free Fully Managed Enterprise Class
Dedicated Server Intel Xeon Quad Core,
Linux Plus Solaris Bundle Offer! 16GB RAM, 2 x 1TB HDD in Indian Data
Get Trained & Certified on RHEL6 and Center with FREE Plesk Control panel
Avail Solaris Training absolutely FREE!!!
Hurry!d till Hurry!d till *On pre-payment of six months.
ali ali
Offer vrch 2013! Contact Tuhin on +91-98300 75018 Offer vrch 2013! Call us at +91 (22) 6781 6699 or write to
a a sales@qualispace.com & mention
31st M 31st M
COUPON CODE: OSFY

www.aemk.org www.qualispace.in

Live Get free


Online advertisement
Session
Live online session Add an Ad to your Ad for Free!!!
“Live online session on "
Implementing Replication & High New Financial year offer!! Pay for
Availability in PostgreSQL" 1 advertisement and get another absolutely
free in your favourite Open Source Magazine.
arch, 7
am Price: $99 only, Hurry!d till
12th M:30am IST Write to us at ali
Offer vrch 2013! Contact Omar on +91 995 888 1862
to 11 trainingsindia@enterprisedb.com a
31st M or write to efyenq@efyindia.com.
for more details & group discounts."

www.enterprisedb.com www.linuxforu.com
CALENDAR FOR-2013
eVENTS TO LOOK OUT FOR IN 2013
Date Name of the event description location website
From identifying the building The Taj Mahal Hotel,
blocks for a successful Mobile New Delhi http://www.fleming-
The Mobile Strategy strategy to understanding the Contact: Kia Harry, Mar- gulf.com/confer-
5th – 6th Mar, 2013
Summit power of analytical data from all keting Executive; +91 enceview/The-Mobile-
the mobile sources, this summit 8105095358; kia.harry@ Strategy-Summit/408
has it all. fleminggulf.com

Industry's only event to deliver the


insights, tools and relationships http://www.gartner.com/
Gartner Symposium/ITxpo Madinat Jumeirah Hotel,
5th – 7th Mar, 2013 necessary to create, validate and technology/symposium/
Dubai, U.A.E. Dubai, U.A.E.
execute transformative business dubai/
technology strategies.

A place for thousands of information


http://www.interop.com/
6th – 10th May, 2013 Interop, Las Vegas technology professionals to gather Mandalay Bay, Las Vegas
lasvegas/
for networking.

This Summit offers guidance on


Gartner IT Infrastructure turning today's improvements http://www.gartner.com/
13th – 14th May, 2013 Operations & Data Center in IT infrastructure and process Grand Hyatt, Mumbai technology/summits/
Summit efficiency into tomorrow's business apac/data-center-india/
advantage.

A focused conference that will bring


NIMHANS Convention http://www.cloudcon-
23rd – 24th May, 2013 Cloud Connect together the entire ecosystem of the
Center, Bengaluru nectevent.in/
cloud.

http://www.gartner.com/
Gartner Business Intelligence This summit provides Business
technology/summits/
10th – 11th Jun, 2013 & Information Management Intelligence professionals and IT ex- Grand Hyatt, Mumbai
apac/business-intelli-
Summit ecutives with world class research.
gence-india/

Through the Global High on


Cloud Summit will address the
Mumbai
issues, concerns, latest trends,
Contact: Prashanth Nair;
new technology and upcoming
Sr. Conference Producer; http://www.theglobal-
The Global High on Cloud innovations on the Cloud platform
12th – 14th Jun,2013 Contact No.: +91-80- highoncloudsummit.
Summit which will give an open forum
41154921; E-mail ID : com/
and opportunity to everyone in
contactus@besummits.
the industry to come together and
com
share their ideas & updates and
provide a global outlook.

Being the Asia’s largest integrated


www.CommunicAsia.
CommunicAsia2013 / Enter- info communication technology Marina Bay Sands,
18th – 21st Jun, 2013 com & http://www.goto-
priseIT2013 event, it is instrumental in connect- Singapore
enterpriseit.com/
ing the ICT industry.

Interop New York offers sessions


and networking opportunities open
to all attendees including Vendor http://www.interop.com/
30th Sep – 4th Oct, 2013 Interop, New York Javits Center, New York
Sessions, Cloud and Virtualization newyork/
Theater Sessions, InteropNet tours
and classes and Speed Networking.

Gartner Symposium/ITxpo, The world's most important gather-


21st – 23rd Oct, 2013 Goa N.A.
Goa ing of CIOs and senior IT executives.

It is the premier Open Source NIMHANS Convention


conference in Asia targeted at Center, Bengaluru
http://osidays.com/
13th – 15th Nov, 2013 Open Source India nurturing and promoting the Contact: Atul Goel; Ph-
osidays/
Open Source ecosystem in the 011-26810601/2/3; E-mail:
subcontinent. osidays@efyindia.com

110  |  March 2013 | OPEN SOURCE FOR YOU


Mainstream Enterprise
Adoption of
Open Source Databases
A conversation with Ed Boyajian,
CEO, EnterpriseDB

Are enterprises embracing open source database software today?


Absolutely. In 2012 we counted 32 of the Fortune 500 as customers and 47 of the Global 1000. That
includes some of the biggest IT users in the world. IT operations at the Federal Aviation Administration,
the US State Department, Fujitsu, Sony-Ericsson and Sony Online Entertainment are all using Postgres
or Postgres Plus from EnterpriseDB. Interestingly, also noteworthy, companies like VMware, Microsoft
(through its acquisition of Skype), Apple and Facebook (through its acquisition of Instagram) are using
PostgreSQL. We are at the beginning of an explosion.
Companies are finding that for a fraction of the cost of traditional databases, PostgreSQL can deliver the
sophisticated features and capabilities they require. PostgreSQL has had decades of hardening and
development by a talented and committed community of developers as well as a fast-growing,
supportive ecosystem of database specialists.

How difficult is it to migrate to a new database?


EnterpriseDB has developed a proven Oracle compatibility solution that enables our customers to run
many Oracle applications using Postgres Plus. Postgres Plus natively supports many of Oracle’s system
interfaces, facilitating migrations with minimal cost, risk and disruption. Existing technical staff – from
developers to DBAs to operations teams – leverage existing Oracle skills to build and manage Postgres
Plus databases. EnterpriseDB also has developed a comprehensive migration program that begins with
an Oracle migration assessment and provides support and assistance with the process all the way
through to deployment.

What happens after Postgres databases are deployed?


Regardless of whether an organization is deploying applications based on community PostgreSQL or
Postgres Plus, EnterpriseDB provides a portfolio of solutions that ensure success. We have made the
long-term commitment to meeting the demands of the enterprise with Postgres-specialized products,
Hurry! Offer expires September 30, 2012
support, and services. What’s more, we are continually developing new Postgres database
enhancements and sponsoring the efforts of the PostgreSQL community. More than 2,000
organizations around the world turn to EnterpriseDB for Postgres-related products and services.

Contact us today about : • Software Subscriptions • Technical Support 24x7x365


• Migration Assessments • Training for Administrators and Developers • Professional Services
*
Call: +1 781-357-3390 or 1-877-377-4352 (US Only), Email: info@enterprisedb.com

EnterpriseDB Software India Private Limited


Unit # 3, Ground Floor, Godrej Castlemaine, Sassoon Road Pune – 411001
Test, develop and T deploy your
+91 20 application
3058 9500 Fon VMware
+91 vCloud
20 3058 9502powered cloud
www.enterprisedb.com
Avail free cloud credit worth ` 25,000*, visit www.cloudinfinit.com for more details
Powered By

www.facebook.com/linuxforyou

Vinay Gowda: Mthura Startx Aviwe Musa:


I have installed Ubuntu 12.10 on my lenovo(G580) How do I install WVdial on Backtrack 5 R2 offline?
laptop, but the network(wired) is not up. Can any one Like . comment
help me?
Riya Patankar: Go to the backtrack repo site,
Like . comment
search for the package, download it and install it. It
Riya Patankar: Have you tried running ifup eth0 or has some dependencies- approximately 3 (as far as
dhclient eth0 as root ? I remember).

Avinash Kumar Chaurasia: What does it say? Pos- Mthura Startx Aviwe Musa: Riya, thank you
mate.
sibly your ethernet is not supported. First check
the ethernet specifications. Then install ethernet
driver for your hardware.

Vinay Gowda: #ifconfig eth0 --> eth0: error fetch- Bera From-Vindhyanagar Somnath:
ing interface information: Device not found Is there any way to install Arduino IDE on Raspberry
#ifconfig eth0 up --> eth0: ERROR while getting PI ? Any research anywhere?
interface flags: No such device. Like . comment
Even I tried to install the drivers, but non of them
are working. Binoy Xavier Joy: Yes you can. Enter sudo
apt-get install arduino in terminal.
Avinash Kumar Chaurasia: I don't know what driv-
ers you are trying. It must be hardware specific. Bera From-Vindhyanagar Somnath: Thanks,
but on my wheezy linux Raspberry Pi, it's not
Spencer Allen: I recommend investing in a USB working.
Wifi adapter.Sometimes the Kernel needs to be
patched in order to support the latest hardware. It Binoy Xavier Joy: Update first and then try.
Run this first. sudo apt -get update.
seems to happen most frequently with networking
adapters and it can take a long time for the Kernel Bera From-Vindhyanagar Somnath: Even
patches to get developed and make their way to then ...it says unable to locate package arduino.
the various distros. So having a network adapter Yes... it works now... Thanks!
that you can plug into any machine that is already
supported is a huge bonus. Here's a list of currently
supported USB Wifi adapters to choose from. http://
wireless.kernel.org/en/users/Devices/USB Ashwith Rego:
Is there a way I can make Gnome 3.4 extensions work
on 3.6? The Axe Menu extension is really neat but the
developer hasn't updated it for Gnome 3.6 yet.
Safiyat Reza: I want to build a custom system based on Like . comment
GNU\Linux for use by (primarily) my parents and friends
Riya Patankar: Go to the jason file of the exten-
(almost all novice). Which Linux OS should I start out with, sion and replace 3.4 with 3.6.
to build upon it? Please suggest a small, all stripped OS,
which is rock solid stable, so that I only will have to Ashwith Rego: Thanks! I was able to enable
custom compile and build the applications on it. the extension with that but it looks like there is
Suggest a powerful base system. still a problem. If I click the menu once, it works.
After that, every subsequent click opens the
Like . comment
Documents directory.

Spencer Allen: What you described is Arch. Riya Patankar: Search the same extension on
https://wiki.archlinux.org/index.php/The_Arch_Way extensions.gnome.org.

Riya Patankar: It's better if you opt directly for Ashwith Rego: I did. The developer is yet to
Pear OS. update it for Gnome 3.6. It worked fine on 3.4.

Jatin Khatri: Is it something like http://www.linux- Riya Patankar: Then, that's your hard luck.
Either search an alternative or wait for its update.
fromscratch.org/?

Image quality is poor as the photos have been directly taken from www.facebook.com

12  |  March 2013  |  OPEN SOURCE FOR YOU


Q&A Facebook

Akram Wazeer: Joko Rasminto:


find / user tom > /home/tom.files Hi, how to install Ubuntu on Windows 7 starter?
find / user tom -exec cp {} /tmp/tom / \ ; Like . comment

useradd tom -s /sbin/nologin


Can any linux geek let me know whether these com-
Spencer Allen: https://www.virtualbox.org/.
mands are correct? Also, if possible let me know
how to extend a volume group via physical extents Joko Rasminto: Thank you..
and also an example on how to reduce a existing
volume group by 100MB?
Like . comment
Sumant Garg: You can also make a dual boot
Jatin Khatri: system.
1) it must be find / -user tom > /home/tom.files , ( if
you want to find files created by user tom and what
to get a list of that file ( tom.file ) in tom's home Magimai Prakash:
directory) Why most of the Linux distributions have Python 2.7
2) it must be find / -user tome -exec cp {} /tmp/ and why not Python 3?
tom \; I.E find /path/to/search -name "*.doc" Like . comment
-exec cp {} /path/to/copy/to \; ( this command will
copy .doc files from the given path and copy it to Spencer Allen: 1. Python 3 is new.
said path ) 2. Python 3 is not backward compatible with Python
3) it's ok if you wnat to add user tom with no intrac- 2, so simply using Python 3 instead Python 2 will
tive login to system break the system.
3. It will break existing apps.
Python 2.7 is the final major release of Python 2.x
Abhishek Yadav: series, so it will remain in the distros even after
switching to Python 3.
Which open source OS is good for linux beginners?.
Like . comment
Magimai Prakash: Thank you..
Riya Patankar: Mint, Pear OS, Ubuntu for
absolute beginners fedora for beginners, arch
and Slackware for advanced users. Manas Halder:
I have multi-booted operating System- one is Windows
Tlhologelo Mabitle: Ubuntu. XP and another one is CentOS 6.2. I am using Airtel 3G
Dongle for Internet. The problem is that: If CentOs first
Ix Mundz: Suse. boots, then Airtel 3G dongle does not detect the net-
work. But after Booting WIN XP 2, if I restart and boot
CentOS 6.2, then Airtel 3G Dongle works and shows it
Subin M Thevalakkattu: Fedora. is ready for the internet. Can anyone help me?
Like . comment

Riya Patankar: Try wvdial.


Pradeep Singh:
Can any one help me in understanding the relation Yogesh Jadhav: Insert your dongle in back side of
between ISCSI and FTP? I think both works for data the USB port instead of the front one and then try.
transfer. If I am right in my thinking, then why we intro-
duced ISCSI?
Like . comment
Karthigeyan Kith: How to use Windows office
Jeet Singh: AFAIK : ISCSI is for Netgear NAS :: document in Linux?
and FTP for a wider approach. Please correct me if I Like . comment
am wrong.
Debashis Sarkar: odt or doc format opens in
libre office.

Pradeep Singh: Karthigeyan Kith: What about others like


Hey friends, I want to get a USB Internet Data card for Excel?
1GB/month high speed access. Which will be the best
service provider in terms of speed and coverage area? Riya Patankar: Libreoffice spreadsheet is just
- Airtel/Vodafone/Reliance/Tata/BSNL/IDEA/MTS or any an example of such softwares.
other? The device should support Linux OS!
Like . comment Subin M Thevalakkattu: Open windows of-
fice document in Libre office application.
Jeet Singh: Tata is best bet. But again it depends
on your locality .. "AFAIK Tata is best in terms of Sumant Garg: You can also use Apache open
speed and network. I personally used it in Mumbai,
office in Linux.
Rajasthan and Punjab.

Image quality is poor as the photos have been directly taken from www.facebook.com

OPEN SOURCE FOR YOU | MARCH 2013  |  13


Enterprising Solutions,
Enabling Businesses

Visit EnterpriseIT2013 if you are from the following industries...

Banking & Education Government / Healthcare Logistics / Hospitality /


Finance Military / Defense Transportation Retailers / Services
Tablets
Lava E-Tab Xtron Champion Computers Videocon VT 71
Simmtronics XPad X1010 Wtab 705 Talk
OS:
Android 4.1 aka Jelly Bean OS: OS:
OS: Android 4.0 Android 4.0
Android 4.0 Launch Date:
February 2013 Launch Date: Launch Date:
Launch Date: February 2013 January 2013
February 2013 MRP:
` 6,499 MRP: MRP:
MRP: ` 6,330 ` 4,799
` 8,399 ESP:
` 6,499 ESP: ESP:

NEW NEW NEW NEW


ESP:
` 8,399 ` 6,330 ` 4,529
Specification: Specification: Specification:
Specification: 7-inch IPS multi touchscreen, 7-inch (17.8 cm) capacitive
17.8 cm capacitive
10.1-inch capacitive 1024 x 600 pixels screen touchscreen, 800 x 480
touchscreen, 480 x 800
touchscreen, 1024 x 600 pixels resolution, 1.5 GHz dual core pixels screen resolution, 1.2
pixels screen resolution,
screen resolution, 1.2 GHz processor, 3500 mAh battery, GH processor, 3200 mAh
1.5 GHz processor, 4 GB
processor, 5,600mAh battery, 2 MP rear camera, 8 GB inter- battery, 4 GB internal memory, expandable up to
internal memory, expandable
0.3MP front-facing camera, 8 GB internal memory, nal memory, expandable up to 32 GB, WiFi 32 GB, 3G, Wifi
memory up to 32 GB, it has built-in support
expandable up to 32 GB, 3G, Wifi
for 2G network

NXG Xtab A9 Plus HCL Me V1 Spice Stellar Pad Mi-1010 Lava eTab Z7H
OS: OS:
Android 4.0 OS:
Android 4.1 aka Jelly Bean OS:
Android 4.0
Launch Date: Android 4.0 Launch Date:
January 2013 Launch Date:
January 2013 Launch Date:
January 2013
MRP: January 2013 MRP:
` 8,990 MRP:
` 7,600 MRP:
` 5,499
` 7,999
NEW
ESP: ESP:
` 7,600 ESP:
` 6,990 ESP:
` 5,499
Specification:
` 7,899
Specification: Specification:
17.7-cm (7-inch) IPS Specification: 25.6-cm (10.1-inch)
display touchscreen, 1.2 GHz processor, 3,600 7” WVGA capacitive touch 17.7-cm (7-inch) capacitive display
IPS display touchscreen, 1.5 GHz dual-core touchscreen, 1 GHz processor, 2,800 mAh
mAh battery,2 MP rear and VGA front-facing screen,800 x 480 pixels processor,7,600 mAh battery, 3 MP rear and
camera, 8 GB internal storage, expandable via screen resolution, 1 GHz battery,0.3 MP front camera,4 GB internal
VGA front camera, internal storage of 16 GB, storage, expandable up to 32 GB 3G, Wifi
microSD, 3G via dongle, WiFi cortex processor,3200 expandable up to 32 GB, 3G, Wifi
mAh battery, 2 MP rear
camera 0.3 MP front camera, 4 GB internal memory,
expandable up to 32 GB, 3G, WiFi

Karbonn Smart Tab 8 Velox iBerry Auxus CoreX2 iBerry Auxus CoreX4 Videocon VT10
OS: OS:
OS:
Android 4.1 aka Jelly Bean OS:
Android 4.0 Android 4.1 aka Jelly Bean
Launch Date:
Android 4.1 aka Jelly Bean
Launch Date: Launch Date:
January 2013 Launch Date:
December 2012 December 2012
MRP:
December 2012
MRP: MRP:
` 7,025 MRP:
` 15,990 ` 11,200
ESP:
` 10,990
ESP: ESP:
ESP:
` 7,025 ` 15,990 ` 11,200
` 10,990
Specification: Specification:
20.3-cm (8-inch) ca- Specification: Specification:
24.6-cm (9.7-inch) IPS 25.6-cm (10.1-inch) IPS
pacitive display touch- 17.7-cm (7-inch) IPS display
display touchscreen, 1.6 display touchscreen,
screen, 1024 x 768 pixels screen resolution 1.5 touchscreen, 1.6 GHz dual-core
GHz quad-core processor,7,200 mAh battery, 2 MP 1280 x 800 pixels screen resolution, 1.5 GHz
GHz dual-core processor, 4,500 mAh battery, 3 processor, 4,100 mAh battery, 2 MP
rear and VGA front camera, 16 GB internal storage, dual-core processor,6,800 mAh battery,2 MP
MP rear and VGA front camera,1.5 GB internal rear and 0.3 MP front camera, 8 GB
expandable up to 64 GB, 3G, Wifi front and rear camera,8 GB internal storage,
storage, expandable upto 32 GB, WiFi internal storage, expandable up to
expandable up to 32 GB, 3G, WiFi
64 GB, 3G, Wifi

Simmtronics XPAD X-720 Lenovo Ideapad A2107 Intex iBuddy Connect Go Tech funTab All New
OS:
Android 4.0 OS: OS:
OS:
Android 4.0 Android 4.0
Android 4.0 Launch Date:
December 2012 Launch Date: Launch Date:
Launch Date:
December 2012 December 2012
December 2012 MRP:
` 13,999 MRP: MRP:
MRP:
` 7990 ` 4000
` 4,600 ESP:
ESP:
` 13,999 ESP: ESP:

` 4,600 Specification: ` 7990 ` 4000


Specification: 17.7-cm (7-inch) HD display Specification: Specification:
touchscreen, 1024 x 600 17.7-cm (7-inch)
17.7-cm (7-inch) 17.7-cm (7-inch) capacitive
pixels screen resolution, 1 capacitive display, 1 GHz
capacitive display touchscreen, 1 GHz processor, VGA display touchscreen, 1
GHz Mediatek processor, 2 MP processor, 2 MP rear and
front camera, 2,800 mAh battery, 4 GB internal memory, GHz processor, 3,600
rear and 0.3 MP front camera, VGA front camera, 3,000
expandable up to 32 GB, Wi-Fi, 3G via dongle mAh battery, 0.3 MP front
16 GB internal memory, expandable up to 32 mAh battery, 4 GB internal camera, 4 GB internal memory, expandable up to
GB 3G, WiFi memory, expandable up to 32 GB via 32 GB, 3G, WiFi
microSD, 3G, WiFi

18  |  March 2013 | OPEN SOURCE FOR YOU


Tablets

 No Need To Pay For Software.


Your Window to FREE professional Software
FREE DOWNLOAD

Karbonn Smart Tab10 Mercury mTAb StreaQ


OS:
Android 4.1 OS:
Launch Date: Android 4.0
December 2012 Launch Date:
MRP: December 2012
` 10,940 MRP:

ESP:
` 11,499
` 10,940 ESP:

Specification: ` 11,499
(9.7-inch) capacitive display touchscreen, 1.5 Specification:
GHz processor, 6,000 mAh battery, 2 MP rear 17.8-cm (7-inch) capacitive multi-
camera, 1 GB RAM, 3G, WiFi touch screen, 1024 x 600 pixels
screen resolution, 1.2 GHz processor,
2 MP rear camera, 4 GB built-in stor-
age, expandable to 32 GB, 3G, WiFi
INSTALLATION

Karbonn Cosmic Smart Tab Swipe Legend Tab


OS:
Android 4.1 OS:
Launch Date: Android 4.0
December 2012 Launch Date:
MRP: December 2012
` 10,280 MRP:
ESP: ` 11,999
` 10,280 ESP:
Specification: ` 11,999
24.6-cm (9.7-inch) capaci- Specification:
tive display touchscreen, 7-inch TFT LCD capacitive
MAINTENANCE

1.5 GHz processor, 6,000 touchscreen, 800 x 400 pixels


mAh battery, 1 GB RAM, 2 MP rear and screen resolution, 1.5GHz
VGA front camera, Wi-Fi,3G via dongle processor, 2 MP rear and 1.3
MP front camera, 4 GB internal
memory, expandable up to 32
GB, 3G, WiFi

Laptops
Wishtel PrithV
OS:
Android 4.0
Ambrane Mini
OS:
Launch Date:
December 2012 Android 4.0
E-mail: contact@myOpenSourceStore.com, www.myOpenSourceStore.com

Launch Date:
MRP:
` 3,300 November 2012
MRP:
ESP:
` 5,499
` 3,300
NEW
ESP:

Specification: ` 5,499
7-inch TFT (LCD), capacitive Specification:
display, 800 MHZ processor,
7 inches TFT capacitive
2800 mAh battery, 0.3 MP
touch screen, 800 x 480 pixel
camera, supports up to 32GB
screen resolution, 1.2 GHz
*The logos used in this banner are the properties of their individual organizations.

MicroSD Card3G, WiFi


processor, 3000 mAh battery, Built-in 0.3 MP camera, WiFi

Netbooks
Samsung N100 ASUS EeePC X101
OS: OS:
MeeGo MeeGo
Launch Date: Launch Date:
August 2011 August 2011
Contact us : 080-4242-5042,

MRP: MRP:
` 12,290 ` 12,499
ESP: ESP:
` 11,840 ` 12,000
Specification: Specification:
25.7 cm WSVGA anti-reflective LED,1024×600 pixel screen 25.7 cm LED-backlit screen, Intel Atom processor N455 CPU,
resolution,1.33GHz Intel ATOM processor, 1GB DDR3 memory, 1GB DDR3 RAM expandable upto 2GB, 220GB storage, Bluetooth
Intel GMA 3150 graphics, 250GB HDD, 3 cell (40 W) battery, 4-in-1 3.0, Wi-Fi 802.11 b/g/n, 17.6mm thick, 920g.
card reader, 1.03kg.
Retailer/Website:
Retailer/Website: Eurotech Infosys, Nehru Place, Delhi, 9873679321
Croma Store, Saket, New Delhi, +91 64643610

OPEN SOURCE FOR YOU | March 2013  |  19


OPENGADGETS

SMARTPHONES

Micromax A116 Canvas HD Spice Stellar Buddy Mi 315 Lava IRIS 351 Intex AQUA Wonder
OS:
OS:
Android 4.1 aka Jelly Bean Android 2.3 OS: OS:

Launch Date: Android 2.3 Android 4.1 aka Jelly Bean


Launch Date:
February 2013 February 2013 Launch Date: Launch Date:

MRP: February 2013 February 2013


MRP:
` 15,000 ` 3,400 MRP: MRP:
` 3,899 ` 9,990
ESP:

NEW NEW NEW NEW


ESP: ESP:
` 15,000 ` 3,400 ESP:
` 3,899 ` 9,990
Specification:
Specification: Specification: Specification:
3.2-inch capacitive
12.7-cm (5-inch) touchscreen, 1 GHz proces- 3.5-inch capacitive 4.5 inch capacitive
IPS LCD touchscreen, sor, 1400 mAh battery, 3.2 touchscreen, 320 x 480 touchscreen,1 GHz dual core
1280 X 720 pixels screen MP rear camera, 170 MB pixels screen resolution, 1 processor, 960 X 540 pixels screen
resolution, 1.2GHz quad internal memory, expand- GHz processor, 1300 mAh resolution,1 GHz dual core proces-
core processor,8MP rear able up to 32 GB, supports battery, 2 MP camera, 110 sor, 1800 mAH battery, 8 MP rear
camera, 4GB of internal 2G network, WiFi MB internal memory, expandable up to 16 GB, Wifi camera, 1.93 GB internal memory,
storage and supports microSD card up to 32GB, GPS with
expandable upto 32 GB, 3G, WiFi
GLONASS and A-GPS, 3G, Wifi

Micromax A27 Ninja Umi X1 Videocon A27 Lava Iris 501


OS: OS:
Android 2.3 OS: Android 4.0 OS:
Launch Date: Android 4.0 Launch Date: Android 4.0
February 2013 Launch Date: February 2013 Launch Date:
MRP: February 2013 MRP: January 2013
` 3349 MRP: ` 5,999 MRP:
ESP: ` 19,999 ESP: ` 9,999
` 3349
Specification:
NEW ESP:
` 9,999 NEW ` 5,999
Specification:
NEW ESP:
` 9,999 NEW
8.8-cm (3.5-inch) Specification: 4.0-inch WVGA Specification:
capacitive touchscreen,480 × capacitive touchscreen, 1 GHz
11.4-cm (4.5-inch) HD display 5.0 WVGA touchscreen, 480 x
320 pixels screen resolution, 1 processor, 512 MB RAM, 1,500
touchscreen, 1280 x 720 pixels 800 pixels screen resolution,
GHz processor, 1400 mAh bat- mAh battery, 3 MP rear, front
screen resolution, 1 GHz proces- 1 GHz processor, 2300 mAh
tery, 2 MP rear camera, 160 MB VGA camera,3G, Wifi
sor, 1,750 mAh battery, 8 MP rear battery, 512 MB RAM, 5 MP rear
internal memory, expandable up and 2 MP front camera, 3G, Wifi camera, memory expandable up
to 16 GB, 2G, WiFi to 32 GB, 3G, WiFi

Spice Stellar Pinnacle Mi-530 iBall Andi 4.5Q HTC Butterfly NXG XFAB Mini 2
OS: OS:
OS:
Android 4.0 Android 4.1 aka Jelly Bean OS: Android 4.1 aka Jelly Bean
Launch Date: Android 4.1 aka Jelly Bean Launch Date:
Launch Date:
January 2013 January 2013 Launch Date: January 2013
MRP: January 2013 MRP:
MRP:
` 13,999 ` 11,490 MRP: ` 15,000
` 49,900
NEW NEW NEW NEW
ESP: ESP:
ESP:
` 13,999 ` 10,799 ESP: ` 12,490
Specification: ` 45,990 Specification:
Specification:
11.4-cm (4.5-inch) Specification: 11.9-cm (4.7-cm) IPS
1.2 GHz dual-core processor, qHD display touchscreen, 1 GHz display touchscreen, 1.2 GHz
2,550 mAh battery, 8 MP 12.7-cm (5-inch) full-HD display
dual-core processor, 2,050 mAh touchscreen, 1920 x 1080 pixels screen dual-core processor, 1 GB RAM,
rear and 5 MP front-facing battery, 512 MB RAM, 8 MP rear 2,000 mAh battery, 12 MP rear
camera,16 GB internal storage resolution, 1.5 GHz quad-core processor,
and VGA front-facing camera,4 GB 2,020 mAh battery, 2 GB RAM,8 MP rear and 2 MP front-facing camera, 4
capacity, expandable up to 32 GB, 3G, WiFi internal storage, expandable up to GB internal memory, expandable
and 2.1 MP front-facing camera, 16 GB
32 GB, 3G, WiFi internal storage, expandable via microSD, 3G, WiFi up to 32 GB, 3G, Wifi

Huawei Ascend G600 Huawei Ascend G330 Zync Z5 Phablet Lava Iris 501
OS:
OS: OS: Android 4.0 OS:
Android 4.0 Android 4.0 Launch Date: Android 4.0
Launch Date: Launch Date: January 2013 Launch Date:
January 2013 January 2013 MRP: January 2013
MRP: MRP: ` 11,990 MRP:
` 14,990 ` 11,490 ESP: ` 10,000
ESP: ESP:
` 9,490
NEW NEW
ESP:
` 14,990 ` 10,990 Specification: ` 10,000
Specification: Specification: 5 inches TFT LCD capacitive Specification:
4.5-inch LCD IPS 4-inch capactive touchscreen, 1 GHz processor,
12.7-cm (5-inch) WSVGA
QHD display touchscreen, touch screen display, 800 × 2500 mAh battery, 8 MP rear
display, 1 GHz dual-core
960 x 540 pixels screen 480 pixels screen resolution, camera, internal memory
processor,2,300 mAh battery,
resolution,1.2GHz dual-core 1 GHz dual-core Qualcomm 4G and expandable up to 32
5 MP rear camera and VGA
processor,1,930 mAh battery,8 processor, 1,500 mAh bat- GB,3G, WiFi
front camera, 4 GB internal
MP rear camera,4 GB internal memory, expandable up to tery, 5 MP rear camera, 4 GB storage, expandable up to 32
32 GB, 3G, Wifi internal memory, expandable up to 32 GB, 3G, Wifi GB, 3G, Bluetooth, Wi-Fi

20  |  March 2013 | OPEN SOURCE FOR YOU


OPEN GADGETS

SMARTPHONES
Zync 5-Inch Z5 Swipe F1Phablet Byond Phablet PIII Huawei Ascend G330
OS: OS:
OS:
Android 4.0 OS: Android 4.0
Android 4.0 Android 4.1 aka Jelly Bean Launch Date:
Launch Date:
Launch Date:
December 2012 Launch Date: December 2012
January 2013 December 2012 MRP:
MRP:
MRP:
` 8990 MRP: ` 10,990
` 9,490 ` 15,000
ESP: ESP:
ESP:
` 9,490 ` 8990 ESP: ` 10,990
Specification: ` 15,000 Specification:
Specification:
12.7-cm (5-inch) TFT 12.7-cm (5-inch) capacitive Specification: 10.1-cm (4-inch) capacitive dis-
display touchscreen, 1 display touchscreen,1 15.2-cm (6-inch) display touch- play touchscreen, 1 GHz dual-core
GHz processor,2,500 mAh GHz processor,2,500 mAh screen, 1 GHz dual-core processor, processor, 1,500 mAh battery, 5
battery,8 MP rear and 0.3 MP battery,5 MP rear and 0.3 MP 2,500 mAh battery, 8 MP rear and MP rear and 0.3 MP front camera,
front camera, 4 GB internal front camera,internal memory VGA front camera, 3G,Wi-Fi 4 GB internal storage, expandable
storage, expandable up to 32 4 GB, expandable up to 32 up to 32 GB, 3G, WiFi
GB, 3G, Wifi GB, 3G, WiFi

Videocon A20 Videocon A30 Samsung Galaxy Music Duos Lava Iris N400
OS:
OS: OS: Android 4.0 OS:
Android 2.3 Android 4.0 Launch Date: Android 4.0
Launch Date: Launch Date: December 2012 Launch Date:
December 2012 December 2012 MRP: December 2012
MRP: MRP: ` 8,999 MRP:
` 4,999 ` 7,299 ESP: ` 6,399
ESP:
ESP: ` 8,999 ESP:

` 4,999 ` 7,299 Specification: ` 6,399


Specification: Specification: 7.6-cm (3-inch) QVGA Specification:
8.8-cm (3.5-inch) capacitive 10.1-cm (4-inch) capacitive display touchscreen, 850 MHz
4-inch TFT capacitive touch-
display touchscreen, Android display touchscreen, 1 GHz processor, 1,300 mAh battery,
screen, 400 x 800 pixels screen
2.3 aka Gingerbread, 1 GHz processor, 1,500 mAh battery, 5 3 MP rear camera, 512 MB
resolution, 1 GHz processor, 1500
processor, 1,350 mAh battery, MP rear and VGA front camera, RAM,4 GB internal memory,
mAh battery, 5 MP camera, 127
3 MP rear and VGA front 3G, WiFi expandable up to 32 GB, Wifi
MB internal memory, expandable
camera, 3G, Wi-Fi up to 32 GB, 3G, Wifi

iBall Andi 4.5H Karbonn A30 Lava’s Xolo A800 ZOPO ZP900 S
OS: OS:
OS:
Android 4.0 Android 4.0 Android 4.0 OS:
Launch Date: Launch Date:
Launch Date: Android 4.0
December 2012 December 2012 December 2012 Launch Date:
MRP: MRP:
MRP: December 2012
` 14,995 ` 12,990 ` 11,999 MRP:

ESP: ESP: ` 15,999


ESP:
` 12,490 ` 11,500 ` 11,999 ESP:

Specification: Specification: ` 15,999


Specification:
4.5 inches (11.43 cms) capaci- 4.5 inch IPS LCD capacitive Specification:
5.9-inch capacitive
tive touchscreen, 960 x 540 touchscreen, 960 x 540 pixels 5.3 inch QHD touchscreen,
touchscreen, 480 x 800
pixels screen resolution, 1 GHz screen resolution, 1600 mAh 1 GHz Dual Core processor.8
pixels screen resolution, 1 GHz
dual-core processor, 1600 mAH battery, 8 MP camera, 4 GB MP camera,4 GB internal
processor, 2500 mAh battery,
battery, 8 MP rear camera, 4 internal memory, expandable up memory, expandable up to 32
8 MP camera, 4 GB internal
GB internal memory, expand- to 32 GB, 3G, Wifi GB, 3G, Wifi
memory, expandable up to
able up to 32 GB, 3G, WiFi
32 GB, 3G, Wifi

Lava Iris N320 Lava Xolo A700 Karbonn A15 Karbonn A5+
OS: OS: OS:
Android 2.3 Android 4.0 OS:
Android 2.3
Launch Date: Launch Date: Android 4.0 Launch Date:
November 2012 November 2012 Launch Date:
November 2012
MRP: MRP: November 2012 MRP:
` 4,499 ` 9,999 MRP:
` 5,990
ESP: ESP: ` 5,899
ESP:
` 3,999 ` 9,999 ESP:
` 4,894
Specification: Specification: ` 5,899
Specification:
8.12-cm (3.2-inch) capacitive 11.4-cm (4.5-inch) IPS capacitive Specification:
3.5 inch capacitive touch
touch screen, 240 x 320 pixels touchscreen, 960 x 540 pixels 10.2-cm (4-inch) LCD capacitive screen, 320 x 480 pixels screen
screen resolution, 1 GHz proces- screen resolution, 1 GHz dual core touchscreen, 800 x 480 pixels resolution, 1 GHz processor,
sor, 1400 mAH battery, 2 MP rear processor, 5 MP rear camera, 4 GB screen resolution, 1 GHz proces- 1420 mAh battery, 3 MP
camera, 100 MB internal memory, internal memory, expandable up to sor, 1,420 mAh battery, 3 MP rear camera, micro SD card slot
expandable up to 32 GB, WiFi 32GB, 3G, WiFi camera, micro SD card slot sup- supporting up to 32GB of
porting up to 32GB of expandable expandable memory 3G, Wifi
memory, 3G, WiFi

OPEN SOURCE FOR YOU | March 2013  |  21


FOSSBYTES
Ubuntu phones to LibreOffice 4.0 released
At a time when Microsoft is

hit stores in October planning to bring out Office for


Linux, LibreOffice has reached its
version 4.0. The new LibreOffice
has been released by The Document
Foundation. It has several major
improvements, like API changes and
support for the Content Management
Interoperability Services (CMIS)
standard. The new version also
has better import and export of
native file formats for Microsoft
Office programs, along with further
improvement of Visio import filters
with the addition of the 2013 version.
One major addition in this release
of LibreOffice includes the first
release of Impress Remote Control
App for Android, which is currently
supported by some of the Linux
distributions. The second release of
the app is expected to arrive soon,
which will be supported on all
It's official! The much-awaited Ubuntu-based smartphones will make their platforms—Windows, MacOS X, and
debut in October. It has been confirmed that the first lot of Canonical's Ubuntu all Linux distributions and binaries.
Phone OS-based smartphones would arrive in the market by October this year. LibreOffice Impress Remote is a free
As reported by the Wall Street Journal, Mark Shuttleworth, founder and CEO remote control app for presentations.
of Canonical, has stated that the Ubuntu smartphones will be “available in two With this, you can control your
large geographic markets in October 2013.” Meanwhile, app developers can run LibreOffice presentations from your
the Ubuntu Phone OS on the Samsung-made Google Nexus smartphone. Android smartphone.
For developers, the Ubuntu Phone OS supports both native and Web or HTML5
applications. Web apps are first class citizens on Ubuntu, with APIs that provide
deep integration into the interface. "HTML5 apps written for other platforms can be
adapted to Ubuntu with ease, and we’re targeting standard cross-platform Web app
development frameworks like PhoneGap to make Ubuntu ‘just work’ for apps that
use them,” the official post states.
Unlike Android, the Ubuntu Phone OS doesn't include many screen buttons and The new version doesn't
depends mostly on edge swipes. include many changes in terms
of visual appearance, compared
You can now run Android natively inside the Windows OS to the 3.6.x LibreOffice series.
Wish to enjoy the complete Android experience on your Windows PC without a However, LibreOffice 4.0 comes
glitch? The developers at Socketeq have now made this possible. You can run the with several tweaks in its user
Android OS inside the Windows OS. The developers have made their software, interface. The dialog boxes in this
WindowsAndroid, available for testing. release are rendered. Other additional
WindowsAndroid runs Android on the Windows kernel instead of Linux. It is improvements in the user interface
an ultra-swift transition because it takes away the emulation layer which is present include Unity integration along with
otherwise. WindowsAndroid currently works with Google's Android 4.0 (ICS). All support of Firefox Themes (better
you need is the knowledge of how to work with the Android OS beyond its standard known as Personas), which gives
smartphone housing. So, if you are someone who has never hacked a smartphone or LibreOffice a personalised look.
tablet before, do take your time to try this one out. But if you wish to try it out, you

22  |  March 2013  | OPEN SOURCE FOR YOU


FOSSBYTES

can have fun running apps, 3D games and all of that, Socketeq promises.
What is even more interesting is that you can work on Android depending upon Now Android will help
the set-up you have in your Windows machine. turbocharge wireless routers!
WindowsAndroid can currently work on Windows 8, Windows 7 and droidifi is developing an Android
Windows Vista, and the software can be downloaded from the Socketeq website. firmware upgrade for the latest Wi-Fi
All you need to do is enter your email and some basic information. But before devices that unlocks their full potential,
you press the download button, be sure of what you are going to do. Also, states the Kickstarter page for Droidifi.
don't forget to check out BlueStacks, which helps in pushing Android apps to The developers want to port the
Windows and Mac computers. Android smartphone operating system
to wireless routers that can help power
Nokia 'open' to Android OS for tablet, says Nokia CEO them efficiently. It
Nokia CEO, Stephen Elop, revealed that Nokia plans to is expected that the
build its own tablet and it would look at all possibilities first version will
(i.e., Android and Windows) for its OS. be supported on
Nokia as a hardware brand has always been trusted the Cisco EA6500,
by users across the globe. The only drawback for the Netgear R6300 and
Finnish handset maker over the past few years has been ASUS RT-AC66U.
its reluctance to use Android instead of the more costly The above mentioned routers use
Windows OS. Tech freaks across the globe have listed IEEE 802.11ac to help them unleash
their dream smartphone/tablet to be a Nokia device Wi-Fi speeds of up to 1.7Gbit/s. In
running the Android operating system. addition, they consist of a Gigabit
Stephen Elop, CEO, Nokia Considering the not-so-positive response to the Ethernet switch, USB ports, and
Windows 8-based tablet, it would definitely make sense if Nokia is looking at processing power, memory and
offering its tablets at an affordable price range and could compete with Acer, Asus, flash of 128 MB. The developers
Samsung, Amazon Kindle, Nook HD and many others. So, for the time being, let's have even demonstrated an alpha
sit back and enjoy the idea of an Android Nokia tablet. version of the firmware, which can
be administered using a browser via
Valve urges Windows’ Steam users to switch to Linux an HTML5 interface. Basic wireless
If reports are to be believed, and Ethernet functionality has also
Valve's Steam gaming been implemented, but, say the
platform is making waves on developers, the alpha is still lacking a
the Linux operating system robust firewall, QoS functionality, port
as well, and Valve is now forwarding and other features. Droidifi
promoting Steam for Linux is based on Android 4.2.2 (JellyBean),
to Windows users. At Steam’s with the Linux 3.6.11 kernel used
website, Valve has launched in that version getting a number of
a ‘Join the Beta’ promotion drivers added to it, stated a report.
suggesting that users of According to the developers, a
other platforms, especially simple firmware upgrade will add
Windows, give ‘Steam for dozens of features and capabilities,
Linux’ a shot. Valve has even including downloadable Android apps.
included a download link to get Ubuntu 12.04 LTS. With this, those who want to try This potential would mean that the
Steam for Linux can get started instantly by installing Ubuntu 12.04 LTS with a click. router will have improved Wi-Fi power,
This might be seen as a smart move from Valve, as Microsoft will take a couple simple connection of multiple wireless
of years at least to release the successor of Windows 8. If Windows users are alerted routers (mesh networking), and the
that switching to Linux is a piece of cake and requires no extra investment apart ability to run Android apps on the router.
from the hardware compatibility, we can expect several users to abandon Windows OpenWRT and DD-WRT
or, at least, run Linux as well. router firmware also offer similar
Valve has begun listing the minimum Linux system requirements for games that functionality to Droidifi. They both
are available on Steam for Linux. These system requirements support almost all of are Linux-based and can function on a
Steam's first-party titles. On the hardware front, users would need at least 512 MB much wider range of wireless routers.
of RAM along with a 2 GHz processor.

OPEN SOURCE FOR YOU | March 2013 | 23


FOSSBYTES

The 'Me Against Rape' Android app to


JavaScript to be the improve safety of women
default language for Here comes an Android app that will help women to safeguard their right to
GNOME freedom of mobililty and security.
JavaScript is becoming a force to Named 'Me Against Rape', this safety mobile application has been developed by
reckon with. GNOME developers three engineers from Nashik in Maharashtra. The app is available for free download
have at last decided to stick to from the Google Play store for Android. It is for both smartphones and tablets.
JavaScript to write applications The app allows users to raise an alarm by sending a text message along with
for the desktop environment. the location details to a pre-selected number. The app keeps sending updates of the
However, the developers are still changing location to the number every ten minutes, making tracking easy. It does
recommending C to write system not end here. The mobile can also start recording the incident, in case the victim
libraries. “During the GNOME wants to use it as evidence in court.
Developer Experience Hackfest
this week, one of the major goals Mozilla introduces 'Boilerplate'
we identified was the need to to help developers make Firefox OS apps
pick a single language to give Mozilla is running its Firefox operating system for smartphones on top gear, as
a simple answer to those who developer Robert Nyman has announced a tool, which will help developers to start
ask, 'How do I write a GNOME creating applications for the Firefox OS or even porting an existing Web application
app?' Our decision is to support to it. Dubbed the Firefox OS Boilerplate App, the tool will have several basic
JavaScript as the first class features, which almost all applications have in common. “The idea is to avoid any
language for GNOME application dependency on external libraries or resources, but rather be self-contained,” wrote
development,” read a blog posting Nyman in a blog post.
by Collabora engineer and “As the name implies, Firefox OS Boilerplate App will provide you with the
GNOME developer, Travis Reitter. most basic features to get started with building an app from scratch, or tools to port
Explaining the reason for your existing Web app. The easiest way to get started with installing it and testing
choosing JavaScript, Travis added, the various features is to navigate to the Firefox OS Boilerplate App in the Web
“Our language of choice needs to browser on a Firefox OS device or in the Firefox OS Simulator,” added Nyman.
be dynamic and high level. There is
already momentum in the GNOME Use your Android phone to pay your bills!
Project for JavaScript; it's used The Reserve Bank of India has given the
in GNOME Shell and GNOME go-ahead to a special card reader that
Documents. There's a lot of work will allow you to pay your bills via your
going into the language to make it Android phone. Priced at Rs 1500, the
especially fast, embeddable, and cigarette box-sized card reader that will
framework-agnostic. JavaScript is come along with an Android phone, can
increasingly being seen as a first class perform all tasks that a POS terminal
desktop programming language; can. Citibank has taken the first step to
it is being used in Windows 8, in adopt this technology, which has been
mobile platforms, and for local developed by Bengaluru-based Ezetap
Web applications. JavaScript is Mobile Solutions. The company has
self-contained; it doesn't come with obtained regulatory clearances for the
its own set of core libraries, which launch of the card reader.
makes it more convenient for us To use the technology, the card reader has to be connected to an Android-based
when integrating it into the platform.” smartphone and a specified app is also required to run it. The merchants can also
Until now, there were no install the app on their mobiles, which can update their systems about the payment.
specific set of tools to write an According to the report, “The technology is not something new; the only difference
application for the GNOME is that while earlier innovations involved a separate platform, this one replicates the
desktop environment. With this card POS and somewhat blurs the lines between credit card and mobile payments.”
announcement, JavaScript will
become the default language for Twitter rolls out Android update with new features
GNOME applications. Twitter, the social messaging company, is rolling out its latest update for
Android devices being used across the globe. This update is said to come

24  |  March 2013  | OPEN SOURCE FOR YOU


FOSSBYTES

with new features that improve discovery and search on the site. The features
are: 'Discover', 'Search', 'Connect' and 'Links'. The most important of the new
features is the 'Discover' tab. This enables users to discover all the content in
the tab by turning it into one giant, single stream that contains tweets, activities,
trends and account suggestions. The new 'Discover' tab will be available on
Android devices. Apart from retrieving content, navigation between ‘Activity’
and ‘Trends’ is also possible at the top of the ‘Discover’ tab.
Next up is the 'Search' feature, which displays all relevant streams, similar
to the stream in 'Discover', at one place. The ‘Connect’ feature now provides
a simpler experience; the default view is ‘Interactions’, which shows you new
followers, re-tweets and mentions. If you prefer to view only your ‘Mentions’ in
‘Connect’, you can adjust the default in ‘Settings’–find the 'Connect tab' option
and select 'Mentions only'.
And finally, there’s 'Links'. This feature lets you click on a URL in a tweet, go
directly to that website from any timeline, and get to content highlighted on Twitter
faster. Earlier, this was more cumbersome and lengthy. These updates are expected
to offer a better experience for Twitter’s global user base.

A bracelet that can boot Ubuntu on any PC!


Barcelona-based Now Computing has come up with an Ubuntu product,
TRAINING PARTNER

which can make your computer childproof. Now Computing has launched an
Ubuntu-based bracelet that can be plugged into a PC or a Mac to boot the Ubuntu
Linux distribution. Dubbed as StormFly, it's a USB 3.0-based wristband. “When
you plug StormFly into a Mac or PC, you reboot the computer, interrupt the boot
process and then redirect all of the computer hardware to run everything from
StormFly,” according to the company.
The StormFly device has been priced at US$ 59 and is a 16 GB USB 3.0 flash
drive with a bootable version of Ubuntu. But what is the point of having this
device? “StormFly is perfect as a family computing solution. Unfortunately, the
younger family members (and older ones) can often download the wrong things
and slow the family computer down. Because StormFly acts as an independent
computer, the operating system on the PC you use it on will not even turn on.
Bottom line - if everyone uses a StormFly you prevent problems on your home
computer. Happy kids. Happy you,” explained a company source.

Speak and compose a mail with Chrome 25 Beta


A cursory glance at the headline and it might seem like a scene
straight out of a sci-fi movie. But we are talking about the
beta version of Google Chrome, which comes with the
Web Speech API for developers. “With the inclusion
of the Web Speech API for developers, users can start
enjoying new, interactive experiences with Web apps—
you can compose an e-mail by just speaking. With this
new JavaScript API, developers can integrate speech
recognition into their Web apps. So, in the near future, you’ll
be able to talk apps into doing all sorts of things,” an official posting stated.
If the feature works flawlessly, it would be welcomed by almost everybody. “Using
your voice to search on your computer or phone is handy, and also if you could dictate
documents, have a freestyle rap battle, or control game characters with your browser
using only your voice. To make sure your Chrome installation isn’t being slowed down,
the new Chrome Beta will automatically disable some extensions on Windows that may
have been added by third party programs without proper acknowledgement from users.

OPEN SOURCE FOR YOU | March 2013 | 25


FOSSBYTES

A new map editor for OpenStreetMap


Google doles out Raspberry The OpenStreetMap project has got a new Web-based map editor dubbed as
Pis to students iD editor from MapBox. The map editor is based on JavaScript and the D3.js
In an effort to boost coding data visualisation library, and has been
knowledge among school children, added in this alpha release. The Knight
Google has announced a generous Foundation had issued a grant back in
grant, through which 15,000 September, which funded the development
Raspberry Pi Model B mini of the new map editor. The new iD editor
computers will reach school kids in will replace the OpenStreetMap project's
the UK. The Raspberry Pi Foundation current editor, Potlatch 2. The iD editor,
will be giving away these mini which was developed in association
computers after selecting the children with the author of Potlatch 2, Richard
they believe would benefit from the Fairhurst, doesn't require Flash to run.
Raspberry Pi. Google’s executive The OpenStreetMap editor is mainly
chairman, Eric Schmidt, along with employed to bring in updates to existing
Raspberry Pi founder, Eben Upton, maps. Developers can add new roads,
visited Cambridge, and taught coding buildings and landmarks, based either on a user's recorded GPS traces, or
to local kids in a classroom recently. manually, by detecting aerial imagery, which is available for the OpenStreetMap
With Google's grant, more students project. So, with an easier map editor, existing developers would be able to
will have access to the Raspberry draw new contributors to the project, and the map data set will significantly
Pi, which will help them get hands- improve.
on knowledge in a varied range of
educational open source code. As to Meet NanoWatch—a Linux watch-cum-phone
how the Raspberry Pi Foundation Dumb wrist watches are getting smarter with time. Taiwan-based WiMe has
will shortlist students, “We’re going introduced its smart watch, dubbed the
to be working with Google and six NanoWatch, which includes support for
UK educational partners to find the voice calls. This means, you can make
kids who we think will benefit from voice calls from your watch and not just
having their very own Raspberry Pi. talk to your buddies. You can even listen
CoderDojo, Code Club, Computing to music as it includes a Yamaha music
at Schools, Generating Genius, Teach chip. Priced at US$ 99, the NanoWatch
First and OCR will each be helping runs on embedded Linux and sports a
us identify those kids, and will also 3.9-cm (1.54-inch) resistive touch LCD
be helping us work with them,” the with a 240x240 pixel resolution. The NanoWatch measures 51.6 mm x 38 mm
Raspberry Pi site reported. x 10.2 mm in size and comes with 256 MB ROM, a 4 GB internal microSD
Initiatives like these indicate that card, and a SIM card slot WiMe supplies a headset, a wristband, a micro USB
big companies like Google understand cable and a clipper along with its NanoWatch. You can either wear the watch
the importance of imparting quality or can hang it on your neck and even clip the watch to your shirt.
education to future innovators. With
this grant, Google clearly showcased Enjoy Windows apps on Android!
that it cannot wait for governments Here's news for techies with Android gadgets who wish to have a Windows
to take serious steps to build our OS experience. You can now run Windows apps on Android-based
future. “We’re incredibly grateful for smartphones and tablets. Wine for Linux is soon going to establish itself on
Google’s help in something that we, mobile devices and will be dubbed as Wine for Android. If you are new to
like them, think is of vital importance. Wine, here is a brief introduction. Wine is open source software, which allows
We think they deserve an enormous Windows-based applications to run on UNIX-based operating systems.
amount of credit for helping some of To be more precise, its compatibility layer allows Windows applications to
our future engineers and scientists run on POSIX-compliant operating systems like Linux, Mac OSX and BSD.
find a way to a career they’re going to Wine functions differently; instead of simulating internal Windows logic like a
love,” the posting on the Raspberry Pi virtual machine or emulator, the open source software translates Windows API
site added. calls into POSIX calls on the go, thus offering better performance.

26  |  March 2013  | OPEN SOURCE FOR YOU


OSFYClassifieds
Classifieds for Linux & Open Source IT Training Institutes

WESTERN REGION SOUTHERN REGION Contact Person: Benila Mendus


Contact No.: +91-9447294635
Linux Training & Certification *astTECS Academy Email: training@carnaticindia.com
Courses Offered: RHCSA, Courses Offered: Basic Asterisk Course, Branch(es): Kochi, Kozhikode,
Thrissur, Trivandrum
RHCE, RHCVA, RHCSS, Advanced Asterisk Course, Free PBX
Website: www.ipsr.org
NCLA, NCLP, Linux Basics, Course, Vici Dial Administration Course
Shell Scripting,
(Coming soon) MySQL Address (HQ): 1176, 12th B Main, Linux Learning Centre
HAL 2nd Stage, Indiranagar, Courses Offered: Linux OS Admin
Address (HQ): 104B Instant Plaza, Bangalore - 560008, India & Security Courses for Migration,
Behind Nagrik Stores, Contact Person: Lt. Col. Shaju N. T. Courses for Developers, RHCE,
Near Ashok Cinema, Contact No.: +91-9611192237 RHCVA, RHCSS, NCLP
Thane Station West - 400601, Email: info@asterisk-training.com
Maharashtra, India Website: www.asttecs.com, Address (HQ): 635, 6th Main Road,
Contact Person: Ms. Swati Farde www.asterisk-training.com Hanumanthnagar,
Contact No.: +91-22-25379116/ Bangalore - 560 019, India
+91-9869502832 Contact Person: Mr. Ramesh Kumar
Advantage Pro Contact No.: +91-80-22428538,
Email: mail@ltcert.com Courses Offered: RHCSS, RHCVA,
Website: www.ltcert.com 26780762, 65680048 /
RHCE, PHP, Perl, Python, Ruby, Ajax, +91-9845057731, 9449857731
A prominent player in Open Source Email: info@linuxlearningcentre.com
NORTHERN REGION Technology Branch(es): Bangalore
Website: www.linuxlearningcentre.com
GRRASLinuxTrainingandDevelopmentCenter Address (HQ): 1 & 2 , 4th Floor,
Courses Offered: RHCE,RHCSS,RHCVA, Jhaver Plaza, 1A Nungambakkam Veda Solutions
CCNA,PHP,ShellScripting(onlinetraining High Road, Chennai - 600 034, India Courses Offered: Linux Programming
isalsoavailable) Contact Person: Ms. Rema and Device Drivers, Linux Debugging
Contact No.: +91-9840982185 Expert, Adv. C Programming
Address (HQ): GRRASLinuxTrainingand Email: enquiry@vectratech.in
DevelopmentCenter,219,HimmatNagar, Website(s): www.vectratech.in Address (HQ): 301, Prashanthi Ram
BehindKiranSweets,GopalpuraTurn, Towers, Sarathi Studio Lane, Ameerpet,
TonkRoad,Jaipur,Rajasthan,India Duestor Technologies.
Hyderabad - 500 073, India
Contact Person: Mr.AkhileshJain Courses Offered: Solaris, AIX, RHEL,
Contact Person: Mr. Sajith
Contact No.: +91-141-3136868/ HP UX, SAN Administration(Netapp,
Contact No.: +91-40-66100265 /
+91-9983340133,9785598711,9887789124 EMC, HDS, HP), Virtualisation(VMWare,
+91-9885808505
Email: info@grras.com Citrix, OVM),Cloud Computing,
Email: info@techveda.org
Branch(es): Nagpur,Pune Enterprise Middleware.
Website: www.techveda.org
Website(s): www.grras.org,www.grras.com
Address (H.Q.): 2-88, 1st floor, Sai Nagar
Colony, Chaitanyapuri, Hyderabad - 060 Eastern Region
Network NUTS Contact Person: Mr. Amit
Courses Offered: RHCE, RHCVA, RHCSS, Contact Number(s): +91-9030450039, Academy of Engineering and
RHCA, CCNA, Linux Clustering, VMware +91-9030450397. Management (AEM)
Vsphere ICM E-mail id(s): info@duestor.com Courses Offered: RHCE, RHCVA, RHCSS,
Websit(es): www.duestor.com Clustering & Storage, Advanced Linux, Shell
Address (H.Q.): A-184, Sukhdev Market, Scripting, CCNA, MCITP, A+, N+
Bhism Pitamaha Road, Kotla Mubarakpur,
New Delhi. IPSR Solutions Ltd. Address (HQ): North Kolkata, 2/80
Contact Person: Ms.Shivani Sharma Courses Offered: RHCE, RHCVA, Dumdum Road, Near Dumdum Metro
Contact No.: +91-9310024501, RHCSS, RHCDS, RHCA, Station, 1st & 2nd Floor, Kolkata - 700074
91-11-46526980/81/82 Produced Highest number of Red Hat Contact Person: Mr. Tuhin Sinha
professionals in the world Contact No.: +91-9830075018, 9830051236
Email: info@networknuts.net
Branch(es): Preet Vihar (Ms.Kavita Kashyap Address (HQ): Merchant's Association Email: sinhatuhin1@gmail.com
[M:+91-9310024502]) Building, M.L. Road, Kottayam - 686001, Branch(es): North & South Kolkata
Website(s): www.networknuts.net Kerala, India Website: www.aemk.org
Innovation

Many Good Things, With An Open Twist


Gone are the days when ‘open source’ was a concept that applied mainly to the arts and software.
Today, open source fires innovation in many things, from gadgets and cars to prosthetic limbs and
advanced military vehicles. Every month, in this section, we take a peek at the open source aspects
of some interesting devices, applications, tools, etc.

Truly the car of the future cloud for up to 60


Visteon Corporation has developed the e-Bee, a concept car based students. It facilitates
on the Nissan Leaf. It has all the automotive electronics you would what Marvell calls
like to see in your future car – and if Visteon’s estimate is right, Classroom 3.0, by
your dream might come true by 2020. The e-Bee has everything enabling the delivery
from entertainment and mobility solutions to safety and comfort. It of educational content
is filled with loads of technology, including a personalised human- and applications via a
machine interface (HMI), touch-screen instrument panels that give range of mobile devices
information on vehicle controls and social media connections, a including smart phones
head-down projected main display in front of the driver, a rear view and tablets. The device
with 360-degree visibility and augmented reality features, tech- is powered by Marvell's
agnostic wireless charging, near-field communications (NFC) for high-performance, low-power ARMADA 300 series system-on-a-
a personal link between user and vehicle, climate control system, chip (SoC) and the company’s industry leading Avastar 88W8764
cloud connectivity and car-to-car communications to improve wireless chip. Network connectivity is through Gigabit Ethernet,
driver information about collisions, hazardous roads, curve speed and peripheral devices can be connected using USB 2.0 or Wi-Fi.
warnings and traffic flow, and much more. The open twist: The SMILE Plug runs on a completely
open source platform, which makes it easy to develop or port any
additional learning applications. It is based on Arch Linux for
ARM, NODE.js, and Stanford’s Mobile Inquiry-Based Learning
Environment (SMILE) and software development kit (SDK). Other
open components include the Node Package Manager, the Plugmin
administration API and UI (that runs on Android-based client
devices) and the SMILE Junction Server Administration Client.

An open source prosthetic hand


When Richard Van As of South Africa lost four of his fingers in
The open twist: e-Bee’s extremely advanced audio, video a sawing accident, he stumbled upon the designs of a prosthetic
and information platform is based on open technology, and is hand on YouTube. Together, Van As and the original developer
designed to be upgraded automatically throughout the car’s Ivan Owen from Washington perfected the designs to suit Van As.
lifetime. Using open architecture and open source software that Soon, they decided to make this a worldwide campaign to help
meet GENIVI standards, this solution can operate as both the those who needed prosthetic hands, and uploaded the designs of
HMI and Media-Oriented Systems Transport (MOST) master and their body-powered device in the public domain. They continue
provide up to four independent instances of HMI. The system to work on the designs, and welcome donations, suggestions and
integrates a wide range of functions into a single scalable module improvements. They also received two 3D printers as a donation
while providing varied connectivity features from Bluetooth from Makerbot, which allows them to synthesise their designs.
and Wi-Fi to Internet connectivity, remote HMI configuration, In January, they used these designs to develop a 3D-printed
and software and feature updates. The open software solution prosthetic hand, which they called Robohand, for a South African
leverages features developed by several open source software five-year old boy called Liam, who was born without fingers on
GENIVI members, maximising re-use and robustness, while his right hand. The Robohand suits Liam quite well, and he is now
reducing the engineering costs to develop such complex systems. able to play, take care of his personal needs and attend school—
where he shows off his mechanical fingers!
Micro-clouds for a ‘connected’ classroom The open twist: Robohand is a typical example of low-
One of the best devices demonstrated at CES 2013 was Marvell’s tech mechanics, fast-prototyping and the power of open source.
SMILE Plug, which is an easy-to-use, low-power cloud computer It is made of 16 3D-printed pieces and 28 common, off-the-
that claims to turn a normal classroom into a connected, secure and shelf items like nylon cord, nuts, bolts and rubber thimbles.
highly-interactive learning environment by setting up a micro- The prosthetic hand is controlled by a system that reacts to the

28  |  March 2013  |  OPEN SOURCE For You


Innovation

resolution of 96 DPI. While there are quite a few open source printer
designs already available on the Web, none are powder-based.
Budding felt that powder-based printers have a specific application
in the field of ceramic materials. His design and code have been
open-sourced, and are available on his Github page (http://pwdr.
github.com/). While the current design only prints in one colour,
the technology could be used to develop a full-colour powder-based
printer, thanks to the open design. You could also try to replace the
inkjet with a laser, turning the system into a selective laser sintering
(SLS) tool. There is also scope to improve the inkjet head, find some
movements of the arm. Apparently, Van As and Owen do not seek way to dispose of the excess powder, or enhance the user-interface.
any profits from their design—they just want to get enough funds In one of his articles, however, writer Joseph Flaherty issues a word
to create prosthetic fingers for whoever needs them, which is why of warning to entrepreneurial readers: “Budding claims that the core
they decided to publish the information in the public domain. patents on this technology expired in 2010, but 3D Systems, ZCorp’s
The original designs are available at http://chaincrafts.blogspot. parent company, has recently flexed its legal muscles to defend other
in/2012/08/finger-prosthesis-design-details.html, and Liam’s hand disputed patents, so perhaps you should consult a patent attorney
design is available at http://www.thingiverse.com/thing:44150. before putting a model on Kickstarter.”
The designs will soon be made available in more detailed formats.
By publishing these designs in a public forum, they now fall Design a tank with open source META toolkit
under the concept of ‘prior art’ (http://en.wikipedia.org/wiki/ The USA’s Defense Advanced Research Projects Agency
Prior_art). This means that the developers have given away their (DARPA) has developed open source software called META
right to patent the design, while also ensuring that others cannot that enables anyone to become a tank engineer. The tool will be
patent it, thus keeping it free and public. released shortly, and apparently the framework can achieve the
design, manufacture, integration and verification of complex
New powder-based 3D printing technology ground vehicles 5X faster than the conventional design-build-
Alex Budding, a researcher at the University of Twente, Singapore, test approach. DARPA has also launched a series of contests, the
has developed a new rapid-prototyping technology called Pwdr, a FANG Design Challenges, which encourage engineers to use the
powder-based technology that can be extended to enable multi-colour toolset to develop vehicles such as an amphibious tank. The details
3D printing. Pwdr is made entirely with off-the-shelf components. are available on http://www.vehicleforge.org/. The VehicleFORGE
The chassis, tool head and electronics can be purchased for less than website will allow social collaboration around open source vehicle
€1000 and assembled within a few hours using Budding’s designs. design to compete in the FANG Design Challenges.
Instead of using layers of melted plastic, Pwdr uses an HP inkjet The open twist: META is completely open source. It is not
cartridge. It deposits a liquid binder, mixed with ink, onto a layer based on any one particular approach, metric, technique or tool.
of white gypsum power. Then a roller drags a thin layer of powder The goal of META is to develop model-based design methods
across the surface. The process is repeated till the whole object is for cyber-physical systems that are extremely complex and
formed, layer over layer. Then, the object has to be removed from the heterogeneous. It features a structured design flow employing
printer, dusted off and dipped in clear glue that helps solidify it. hierarchical abstraction and model-based composition of
electromechanical and software components. It further optimises
system design, and uses probabilistic formal methods for the
system verification, thereby dramatically reducing the need
for expensive real-world testing and design iteration. DARPA
also aims to develop a component and manufacturing model
library for a given airborne or ground vehicle systems domain
through extensive characterisation of its features, interactions and
properties, right down to the numbered part level. The library
will also include context models to reflect various operational
environments, and develop a verification flow that generates
probabilistic ‘certificates of correctness’ for the particular cyber-
physical system based on stochastic formal methods.

By: Janani Gopalakrishnan Vikram


The open twist: Pwdr has a maximum build size of 125mm
x 125mm x 125mm, a minimum vertical step size of 50 microns, The author is a technically-qualified freelance writer, editor and
hands-on mom based in Chennai.
and speed of around 1 minute per layer. It has a pretty decent print

OPEN SOURCE For You | March 2013  |  29


Developers Overview

Develop Android Apps with Ease


This article deals with everything related to developing applications for Android. Starting
from the basic Android architecture and design philosophy, to helping you get acquainted
with the technical stuff before you can develop your app.

M
ost of us already have an Android device, or Why learn Android
have at least experienced the Android UI. As many of you would already know, Android is an open
Android smartphones and tablets are the devices source, Linux-based OS optimised for use on handheld devices.
everyone now yearns for; so what causes such a frenzy Although Android started with mobile phones and moved on
over Android? I believe it is a combination of the power of to tablets, many new consumer electronics devices have been
Android apps and the developer ecosystem. The ease with developed based on Android; these include cameras, set-top
which developers can develop and implement Android apps boxes, and even laptops. Since the devices supporting Android
and monetise them is phenomenal, and it is time people are increasing, so are the opportunities to develop more and
interested in this technology learn how to get started with more new and innovative apps for them. With Google now
Android app development. allowing developers to charge for their apps in Indian rupees,

30  |  March 2013 | OPEN SOURCE FOR YOU


Overview Developers

there could not be a better time to learn Android. requested permissions during the app installation. Besides
permissions, the components of the app, the minimum API
Android architecture level required, the hardware and software features used, and
Android is developed on a layered architecture, with libraries the API libraries that the application should be linked with—
and drivers forming the lower abstraction layers, and the all these must be declared in the manifest file.
framework, applications, etc, forming the top layers. Each An Android app can have four types of components. It is
layer provides the necessary services to the layers above and important to understand each component type, and how it is
below them. This layered architecture ensures that there are no useful, so let's briefly cover each.
ambiguities, and the app developer has access to all the APIs. a. Activity: This represents an activity done by the user in your
app. For example, in a camera app, the camera viewfinder
Applications screen and the image browser screen are separate activities.
An activity of your app can be invoked by other apps also,
Application Framework
if they have the permission, and vice-versa, while the users
Libraries feel as if the activity is part of the app they are using. Such
Android Runtime
architecture allows for better code and functional usage.
Linux Kernel
b. Services: These run in the background while the user
continues to interact with the app in the foreground. They
The Android app are used for cases where you need to fetch data, record a
Let's cover some basics regarding app development, so you get sound or play music in the background. As you would have
an idea about how it works and can plan to develop your app. guessed, a service doesn’t provide a user interface; at most,
Android apps are developed in Java, so you should be clear there can be a notification for completion of the service.
about Java and object-oriented programming concepts (if not, c. Content provider: This is the component that provides
at least the concepts of classes and objects should be known). data to the app, i.e., any application can query or modify a
The Eclipse IDE for Android development can easily be database through the content provider. So, when you have
downloaded from the Android website. This download includes proper permissions, you can use the content provider to
the ADT (the Android Development Tools) packaged with the read or modify the user data.
IDE. If you already have Eclipse, then you can download only d. Broadcast receivers: The system interacts with the apps via
the ADT, and install it as a plug-in for Eclipse. ADT makes broadcasts, if required. For example, when the battery is low,
sure you have all the latest packages and libraries required for or the screen gets turned off, the system issues a broadcast
Android apps, and the latest Android image for emulation. to all applications. The broadcast receivers respond to the
The Eclipse IDE creates the file organisation for your broadcasts, and initiate the corresponding service.
app. After the app is developed, all the code, resources, and Now that we’ve been through the different aspects and the
everything that is part of your app should be archived together basic information about Android app development, I hope you
to form a .apk (Android package) file. This is the file that is are excited about getting started on developing a real Android
installed on the Android device. Eclipse does the archiving app, which I will begin with in the next article. Till then, get
part also, so that you can focus on the app development. ready with ideas for what your app will do!
During or after app development, the IDE also lets you
run your app on a real Android device (if you have any) via a By: Nitish Kumar Tiwari
USB connection, or a virtual Android device. With this, you The author is based in Bengaluru, India, and works as a software
can test and debug your app very easily. developer for a FOSS-based firm. In his free time, he likes to
dabble with open source software and share his experiences.
The manifest file, an XML file, is a major component of
Other interests include movies and travelling. Contact him at
an Android app. First, it allows you to declare the permissions Nitish.tiwari@techocube.in.
the app requires. The user will be prompted with all the

EXCELLENT EMAIL INFRASTRUCTURE SOLUTIONS


WITH UNMATCHED SERVICE SUPPORT!
TechnoMail - Enterprise Email Server Anti SPAM,
Anti Virus, Email Content Filtering
1, Vikas Permises, 11 Bank Street,
Firewall, Internet Access Control Content Filtering, Site Blocking
Fort Mumbai, India-400 001,
Bandwidth Management System
Mobile: 09167399917.
Managed Email Hosting Solutions
Email: info@technoinfotech.com

OPEN SOURCE FOR YOU | March 2013  |  31


Developers Let's Try

This article aims to provide a clear and concise discussion about the basics of futexes, and
how they could be used to implement user-space synchronisation mechanisms on Linux.

S
o what are futexes? They are a kernel mechanism ƒƒ Semaphores involve making a system call each time, be it
(in the form of a system call), using which fast user- contended or uncontended. Hence, they are slower.
space synchronisation can be implemented. The kernel ƒƒ Thin locks initially try user-level locking (using atomics),
interface for futexes looks like what is shown below: similar to spin locks. If it fails, they inflate the lock and
only try OS-level locking (similar to semaphores). But
int futex(int *uaddr, int op, int val, const struct timespec inflating happens only once, the first time a contention is
*timeout, seen. Then on, they stay inflated. Again, there's system
int *uaddr2, int val3); call overhead, once the lock is inflated.
In order to address some of these issues, futexes were
The second param, op, can have several values, of which added to the Linux kernel to enable library developers to
the following two are relevant for this discussion: implement a fast user-space synchronisation mechanism. How
ƒƒ FUTEX_WAIT: The kernel checks if the value at uaddr is this done?
is the same as val; if so, it then blocks the calling thread/
process. If not, it then returns with EWOULDBLOCK. Note: This discussion is based on the paper ‘Futexes
The last two parameters are ignored for this op, and the are Tricky’ by Ulrich Drepper.
timeout parameter is not relevant, at least for now.
ƒƒ FUTEX_WAKE: The kernel wakes up at most val Using the above futex system call interface, fast user-
processes waiting on this futex. The last three parameters space synchronisation mechanisms can be implemented.
are ignored for this operation. 1) The condition wait-signal mechanism: This is typically
So why do we need futexes? Take a look at the traditional used in producer-consumer problems, similar to what
user-space synchronisation mechanisms: pthread_cond_wait and pthread_cond_signal provide.
ƒƒ Spin lock involves spinning on a variable in user space if The following code snippet shows how this may be
the lock is not available. No context switch to kernel space implemented:
is necessary. Spin locks are great if the size of the critical
section is known to be small, or if there is no alternate class event {
work to be executed after blocking the thread. A lot of public:
research has highlighted the limitations of spin locks—not event () : val (0) { }
scalable with multi-cores, fairness issues, etc. void ev_signal () {

32  |  March 2013 | OPEN SOURCE FOR YOU


Let's Try Developers

++val; critical section. In unlock(), only one thread is woken up


futex_wake (&val, INT_MAX); at a time. This is kind of an optimisation, which works just
} fine with respect to correctness.
void ev_wait () { Although this seems to work, it has several problems.
futex_wait (&val, val); The correctness problem (1): Consider the following
} scenario. The lock is taken by thread T1, and T2 and T3
private: execute lock() almost at the same time. Let us suppose the
int val; lock() code gets executed in the following manner:
}; Initially, assume val is 1;

Here, the consumer threads call ev_wait() and pass T2


in the current value of val (which is the same as what is T3
stored at &val); hence, it is blocked. Note the semantics lock()
of the futex_wait() call above—although the interface atomic_inc (val) //now val=2, c=1 lock()
shown here is slightly different. The producer thread calls
ev_signal(), which increments the value of val and calls atomic_inc (val) //val=3, c=2
futex_wake() to wake up all the waiting threads (all since futex_wait (&val, c + 1); //value(val)=3
INT_MAX is passed as val; again, a different interface is atomic_inc (val) //now val=4, c=3
shown here, for the sake of discussion).
Note here that incrementing val before calling futex_ futex_wait (&val, c + 1); //value(val)=4
wake() is not really necessary, but here it is done to avoid a
race condition. Let us suppose a new consumer thread had In the above sequence, both futex_wait calls fail, since
read the old value of val and was context-switched before the actual value of val (3 and 4 as shown in the code) is
calling futex_wait(). Now, after the producer called ev_ not the same as what is being passed as second arg (c+1 =
signal(), if the futex_wait() is invoked in the new consumer, 2 and 3 respectively). This sequence may repeat forever,
it would not block, since the value of val is not the same as making the program incorrect.
what it had originally read. The correctness problem (2): In case of interrupts, a
2) Implementing mutual exclusion (mutexes): The single thread may keep getting interrupted exactly when
following code illustrates one simple, trivial way to it calls futex_wait(). This system call returns whenever
implement mutual exclusion using the above futex an interrupt occurs. Hence, a single thread may keep
interface: incrementing val until it overflows and becomes 0.
A performance-related problem: The futex_wake() call
class mutex { can be avoided in unlock() in the uncontended case.
public:
mutex () : val (0) { } Better mutex implementation
void lock () { Consider the following revised implementation, which fixes
int c; these issues:
while ((c = atomic_inc (val)) != 0)
futex_wait (&val, c + 1); class mutex2 {
} public:
void unlock () { mutex () : val (0) { }
val = 0; void lock () {
futex_wake (&val, 1); int c;
} if ((c = cmpxchg (val, 0, 1)) != 0)
private: do {
int val; if (c == 2 || cmpxchg (val, 1, 2) != 0)
}; futex_wait (&val, 2);
} while ((c = cmpxchg (val, 0, 2)) != 0); ///
Here, a zero value for val represents an unlocked Interesting
mutex. Any other value represents a locked one. It is easy }
to see how this provides mutual exclusion. When two void unlock () {
different threads call lock() at the same time, only one of if (atomic_dec (val) != 1) {
them finds that the old value was non-zero, and only that val = 0;
thread is put to sleep. Hence, only one thread enters the futex_wake (&val, 1);

OPEN SOURCE FOR YOU | March 2013  |  33


Developers Let's Try

} Kernel support for futexes


} At the kernel level, each futex has a unique ID, which is the
private: struct page pointer and the offset within the page. This way, even
int val; though the futex variable may have different virtual addresses
}; across processes, the physical address is the same, hence
providing synchronisation. The reference count of the page is
Here, we use 3 states instead of 2: 0 – unlocked, 1 incremented, so that it is not swapped out of memory even when
– locked + no contention, and 2 – locked + contention. the process is sleeping. The futex structure on which a process is
Also, this code uses cmpxchg(), which also returns the sleeping is placed on the kernel stack of the process.
old value. If the lock was free, the thread simply gets A hash table maps the futex ID (uaddr param, above) to
the lock, sets it to 1 and returns. If the lock was already per-thread/per-process futex_q structs. When futex_wait() is
taken, there are two cases: called by a thread, a new futex_q object is created for it and
a) In the uncontended case, nobody else is contesting added to the appropriate hash table entry. When futex_wake()
for the lock; hence, its value is 1. We indicate that there's a is called, the same is used to wake up the sleeping process.
waiting thread by setting the value to 2. Do refer to the links below about futex implementation at
b) In the contended case, the value is already 2. The the kernel level, for more details.
check (c==2) succeeds and the thread simply blocks. But
if the futex_wait() fails (because of unlock() code waking References
it up, or an interrupt), then it would have to try to set the
[0] http://www.cis.temple.edu/~giorgio/cis307/readings/futex0.pdf
value of lock again. But here (in the while() statement), [1] http://www.cis.temple.edu/~giorgio/cis307/readings/futex.pdf
we try to set it from 0 to 2 directly, since we don't know [2] http://locklessinc.com/articles/mutex_cv_futex/
at this point if we are the only ones who are locking. [3] http://lwn.net/Articles/360699/
There may be many waiting. [4] http://lwn.net/Articles/267968/
Now, in the lock code there's no question of overflow, since
the highest value it reaches is 2. This fixes both correctness By: Chandan Apsangi
problems 1) and 2) discussed above. In the unlock code, check The author is currently doing a Masters in Computer Science
that the state is contended, and only then call futex_wake(). at NC State University in the US, with a focus on multi-core
operating systems and optimisations.
This fixes the performance problem discussed earlier.

You can mail us at osfyedit@efyindia.com. You can send this form to


‘The Editor’ - D-87/1, Okhla Industrial Area, Phase-1, New Delhi-20. Phone No. 011-26810601/02/03, Fax: 011-26817563

34  |  March 2013 | OPEN SOURCE FOR YOU


How To Developers

Android’s favourable licence, established application ecosystem and well-recognised


user experience has made it the preferred platform for any modern embedded system.
The pluggable architecture enables integration with a variety of desirable software and
hardware components with low coupling. At the same time, support for a range of hardware
platforms enables the designing of cost-effective low-end devices like digital watches,
as well as sophisticated high-end devices like in-vehicle infotainment systems and home
automation systems. This article covers the crucial steps of analysing an enterprise’s needs,
understanding SoCs, and deciding which device addresses the need while fitting the budget.

T
he first step in creating a custom device is to have a requires a custom device solution for its field sales team
clear picture of what the device is required to do, and that visits client sites at various locations in India.
what the company’s budget is. Depending on these two ƒƒ The company has a budget limit of Rs 5000 per device, and
factors, the exact hardware requirements can be figured out. would need the solution deployed for 3000+ field workers.
For instance, if the device is required for the stock management ƒƒ The primary use cases are shown in the following diagram
staff of a grocery centre, then the bar-code scanning capability on the next page.
would be required and it may be appropriate to choose a small Looking at the above system requirements and the users’
form-factor smartphone for the task, with Android version 2.2 need to show presentations and product details to prospective
or above. If the device is to be designed for sales people to customers, a tablet form factor, with Wi-Fi capability and
upload customer data on the go, then Wi-Fi connectivity would Android 2.3+ seems suitable for the target requirement.
be desirable, and a tablet form-factor with Android 2.3 or above
would work well for such a requirement. Identify device hardware
In order to understand the complete workflow of device Once the system requirements are identified, the second step
creation, let us consider the following target system as a is to decide on hardware requirements. Though creating a
sample scenario: custom device may be useful for very specific use cases and
ƒƒ The AGROSTAR company deals in a wide range of bulk production, enterprises prefer successful devices that are
agriculture products covering a range of requirements already in use in the market. So let us learn more about the
from crop protection to animal health. AGROSTAR device hardware and the hardware profiles used by popular

OPEN SOURCE FOR YOU | March 2013  |  35


Developers How To

handles Wi-Fi, GPS/GLONASS, and Bluetooth on most

agrostar Sales Personnel cases


Submit visit & location details devices. Some Android devices that use this SoC include
the HTC One S, Asus Transformer Pad Infinity, North-
√userv Manage Schedule
American HTC One X, HTC EVO 4G LTE, Sony Xperia S,
√userv North American Samsung Galaxy S3, and others.
√userv Submit customer details
ƒƒ Samsung Exynos 4 Quad: Samsung has its own SoC
√userv platform, the ARM based Exynos family. The latest
√userv Synchronise product documentation addition, the Exynos 4 Quad, packs a 1.4 GHz quad-
Sales Personnel core ARM Cortex-A9 CPU and the ARM Mali-400
View product documentation MP4 quad-core GPU. The processor supports 3D
gaming, fast multi-tasking, and HD video recording
and playback. The Exynos 4 Quad is used in the Galaxy
S3 (international version) and in the Meizu MX Quad.
Android devices in the market today. Previous Exynos generations can be found in the
Galaxy S2, Galaxy Note, Galaxy Tab 7.7, Galaxy Tab
An overview of device hardware 7.0 Plus, Galaxy S, Droid Charge, Exibit 4G, Infuse
The device hardware largely consists of a System-on-Chip 4G, and also in non-Samsung devices such as the
(SoC) and miscellaneous accessories. A SoC typically consists Meizu MX and Meizu M9.
of the following components: ƒƒ Texas Instruments OMAP 4: The latest TI OMAP SoCs
ƒƒ CPU: In the case of Android, most processors on the family is the fourth generation of OMAPs, or OMAP
SoCs are based on ARM technology. 4, which has a dual-core ARM Cortex-A9 45nm-based
ƒƒ Memory: Memory is required to perform the various tasks architecture. These offer PowerVR graphics. Some
smartphones and tablets are capable of, and therefore SoCs Android devices that pack TI OMAP 4 SoCs include
come with various memory architectures on board. Motorola Atrix 2, Motorola Droid 3, Motorola Droid
ƒƒ GPU: The graphics processing unit is responsible for Bionic, Motorola Droid RAZR, Motorola Xyboard,
handling complex 3D games on the smartphone or tablets. some Samsung Galaxy S2 models, Amazon’s Kindle
GeForce, Adreno, ARM Mali and Power VR are some of Fire, Samsung Galaxy Tab 2 7.0, Samsung Galaxy Tab 2
the popular GPU models available in the market. 10.1, Samsung Galaxy Nexus, LG Optimus 3D and LG
ƒƒ Northbridge: This component handles communications Optimus Max.
between the CPU and other components of the SoC, ƒƒ ST-Ericsson NovaThor: NovaThor SoCs come with a
including the Southbridge. 1 GHz or 1.2 GHz dual-core ARM Cortex-A9 processor,
ƒƒ Southbridge: This is a second chipset, usually found on single-core ARM Mali 400 GPUs, and wireless support
computers, that handles various I/O functions. In some (GSM/EDGE/HSPA/HSPA+, depending on the model
cases, a Southbridge can be found on SoCs too. used). Some devices that rely on this SoC include the
ƒƒ Cellular radios: Some SoCs also come with certain Sony Xperia P, Sony Xperia U, Sony Xperia Sola,
modems on board that are needed by mobile operators. Samsung Galaxy Ace 2, Samsung Galaxy Beam and the
ƒƒ Other radios: Some SoCs may also have other HTC Sensation for China.
components responsible for other types of connectivity, ƒƒ Rockchip: Rockchip is a series of SoC integrated
including Wi-Fi, GPS/GLONASS or Bluetooth. Again, circuits manufactured by the Fuzhou Rockchip
the Snapdragon S4 is a good example. Electronics Company. These integrated circuits are
ƒƒ Other circuitry mainly for embedded systems applications in mobile
Some of the well-recognised SoCs in the market are entertainment devices such as smartphones, tablets,
described below: e-book readers, set-top boxes, media players, and
ƒƒ NVIDIA Tegra 3: The Tegra 3 comes with a quad-core personal video and MP3 players.
CPU, and is currently employed by various Android devices, ƒƒ AllWinner A1X: The AllWinner A1X, known under
including, but not limited to, the Asus Eee Transformer Pad, Linux as sunxi, is a family of SoC devices designed by
HTC One X (international version), the Asus Transformer AllWinner. Currently, the family consists of the A13
Pad 300, the LG Optimus 4X HD and others. and the A10. They incorporate the ARM Cortex-A8
ƒƒ Qualcomm Snapdragon S4: Snapdragon S4 has a dual- as the main processor, and the Mali 400 as the GPU.
core processor that’s similar to the ARM Cortex-A15 CPU. It is known for its ability to boot from an SD card, in
It also offers HD video recording and playing support, addition to the Android OS usually installed on the
integrated Adreno GPU capabilities, and packs in a 4G flash memory of the device. A10 (sun4i) is the current
LTE modem, which makes it a preferred choice by many full-featured SoC, whereas A13 (sun5i) has lower power
manufacturers planning to launch devices in the US. It also consumption, and is a lower-cost version of the A10,

36  |  March 2013 | OPEN SOURCE FOR YOU


How To Developers

which is designed primarily for tablet computers. The requirements. On examining the complete system
A13 does not have HDMI or SATA connections. requirements, we concluded that we would need a good
ƒƒ Intel Medfield (X86): Medfield SoCs are built with hardware configuration that has high-definition audio
32nm HKMG technology, and are based on x86 and video capabilities, as well as Bluetooth and Wi-Fi for
technology. They offer OEMs a 1.6 – 2 GHz single- communication. On exploring the current crop of SoCs
core processor and PowerVR’s SGX540 GPU. Some and the tablet market, an existing tablet model supporting
devices that use the Intel Medfield SoC are the Orange Android version 4.1 with an AllWinner SoC was found
San Diego (Santa Clara), the Lenovo K800 and the suitable for the prospect's requirements and budget.
Lava Xolo X900. To conclude, the existing models in the market might suit
an enterprise’s need, and in most cases, will prove to be an
Deciding device configuration economical option. However, there may be specific needs like a
All the next generation Android tablets and smartphones fingerprint scanner for an attendance terminal, or a card reader
available pack in one of the SoCs mentioned above. Sure, for a retail billing kiosk. In such cases, there may be a need for
every SoC manufacturer will promote its own brand with a custom device design to ensure in-built support for the extra
terms like, ‘power efficiency’, ‘high performance’, ‘3D accessories. Integrating existing device models with third-party
graphics’, ‘full HD video’, etc, but all these competing hardware may be considered as an alternative, depending on the
platforms will offer an overall enjoyable user experience, with deployment intricacies and budget restrictions.
few differences between them. The fact is that while choosing
a device, you should not only consider the SoC's capabilities, By: Pooja Maheshwari
but also other factors like display technology, wireless The author is a technical architect at Impetus Technologies. She has
connectivity, camera performance and storage. about 12 years of IT experience, with wide exposure in the design
Whatever be the current system requirements, the and development of enterprise mobility solutions, mobile device
management solutions and Android-based custom device solutions
hardware and Android version should always be chosen
for enterprises. She is currently involved in R&D and applicability of
keeping in view the future requirements of the target system. Embedded Android for enterprises in various segments.
Let us return to the AGROSTAR company’s

OPEN SOURCE FOR YOU | March 2013  |  37


Developers Let's Try

Have You Powered Your


Application with Memcached?
Developers know that in computer/network technologies, the speed of an application
is really important. Here, we are going to demonstrate how fast a memcached-powered
application will perform.

T
he article published in the March 2012 edition of Given below are the steps to set up an environment
OSFY (‘Speed up Your Cloud with Memcached’) for demonstrating the speed of a memcached-powered
covered the concepts related to memcached. In this application.
article, I aim to demonstrate just how much performance
improves if you use a memcached layer between your Step 1: Setting up the database
application and database. Create a database called ips in MySQL, and a table called
For example, consider a Web application. Any website ips_class inside it. Then generate a set of 33554431 IPs using
that is served up ‘dynamically’ probably has some static bash expansion:
components throughout the life of the page. Loading
such information each time through a database query is echo {192..193}.{0..255}.{0..255}.{0..255}
unacceptable. Let us consider a website that has a very
huge list of names in a database, which does not change Insert all these IPs into the table ips_class using LOAD
frequently—and this list has more than 3,000,000 rows of DATA INFILE [see http://dev.mysql.com/doc/refman/5.5/en/
data. Now, you want to display some of the names, which load-data.html]
match some user criteria (say, a user clicks on a button).
What happens if that page gets reasonably good traffic, and mysql> select count(*) from ips_class;
many users click that button to fetch the data? The database +----------+
will ‘cry’, right? In this case, every click made by each | count(*) |
user will make a direct call to the database, causing a really +----------+
unacceptable overhead to the database. Here, the importance | 33554431 |
of caching comes into the picture, and as a caching +----------+
mechanism, memcached will shine. 1 row in set (18.24 sec)

40  |  March 2013 | OPEN SOURCE FOR YOU


Let's Try Developers

Step 2: Setting up memcached $ python memcached_demo.py


Download the memcached source from http://memcached. Fetched from DB (Execution time = 17.4954309464 seconds)
org/ and install it. Start memcached on the local system on Total IPs in the DB
two ports, using the following commands: = 33554431
Fetched from DB (Execution time = 18.8784821033 seconds)
memcached -p 11212 & All IPs in DB which is matching to the regex 192.168.1.25*
memcached & = 192.168.1.25 192.168.1.250 192.168.1.251 192.168.1.252
192.168.1.253 192.168.1.254 192.168.1.255
I now have two memcached instances, one running on
port 11212 and the second on the default port (i.e., 11211). On second execution of the script:

$ telnet 0 11211 $ python memcached_demo.py


Trying 0.0.0.0... Cached Result (Execution time = 0.000431060791016 seconds)
Connected to 0. Total no. of IPs in the DB
Escape character is '^]'. = 33554431
Cached Result (Execution time = 0.00189614295959 seconds)
$ telnet 0 11212 All IPs in DB which is matching to the regex 192.168.1.25*
Trying 0.0.0.0... = 192.168.1.25 192.168.1.250 192.168.1.251 192.168.1.252
Connected to 0. 192.168.1.253 192.168.1.254 192.168.1.255
Escape character is '^]'.
You can clearly see the difference between the ‘Execution
What next? Get the memcached_demo.py script, for which time’ in both cases. Very impressive, right?
you can use the following command: Of course, there are many options, including invalidating
or expiring the data, in memcached. For more on the topic,
git clone git@github.com:sukujgrg/mysql_memcached.git delve deeper into the References.

What this script does


This script contacts the local MySQL database and References
executes two SQL fetch queries (below). On the first [0] http://www.ibm.com/developerworks/xml/library/os-
execution of the script, it will print the output of the query, memcached/index.html
which is directly fetched from the database, and will also [1] http://www.adayinthelifeof.nl/2011/02/06/
memcache-internals/
store that data in a locally running memcache instance. [2] http://dev.mysql.com/doc/mysql-ha-scalability/en/
From the next execution onwards, this script will directly ha-memcached-interfaces-python.html
fetch data from the memcache. The SQL queries to fetch [3] http://blog.echolibre.com/2009/11/memcache-and-
data in this script are: python-getting-started/

select * from ips_class where c_class like '192.168.1.25%'; By: Suku


select count(*) from ips_class; The author is an open source fan. Feel free to respond to this
article and direct your feedback to sukujgrg@gmail.com.
On first execution of the script:

THE COMPLETE M AGAZINE ON OPEN SOURCE Your favourite Magazine on Open


Source is now on the Web, too.

LinuxForU.com
Follow us on Twitter@LinuxForYou

OPEN SOURCE FOR YOU | March 2013  |  41


CODE
SPORT
Over the next few columns, we will take a look at data storage systems, and
Sandya Mannarswamy

how they are evolving to cater to the data-centric computing world.

L
ast month, we featured a special edition of in some of our past columns, I have not covered
‘CodeSport’, which discussed the evolution storage systems at all. So over the next few columns,
of programming languages over the past 10 I am going to discuss storage systems, and how they
years, and how they are likely to evolve over the have evolved over years to cater to the ‘Big Data’
coming 10 years. The article went on to hazard a explosion. I will take readers through some of the
guess that the ‘Big Data’ explosion would shift the challenging problems as well as the state-of-the-art
momentum to languages that make data processing research directions in this space.
simple and efficient, and make programs ‘data-
centric’ instead of the ‘code-centric’ perspective. A storage systems primer
Many of our readers had responded with their Let us start our journey into storage by
own views on how they see computing paradigms understanding some of the basic concepts and
evolving over the coming 10 years. Thanks a lot to terminology. In the traditional view of storage, we
all our readers for their feedback and thoughts. all know about the triumvirate of the CPU, memory
One of our readers, Ravikrishnan, sent me and disk, where the hard disk (also known as
a pertinent comment, which I want to share: secondary storage) is part of, or directly attached to
“Thank you for your article on the evolution of your computer, and acts as the permanent storage.
programming languages. Indeed, there is a heavy From now onwards, when I use the term ‘storage’,
momentum towards processing huge amounts of I actually imply the traditional secondary storage,
data using commodity hardware and software. While which acts as the backup to the main memory
the basic concepts and algorithms of computer (which is the primary storage). These include hard
science would continue to hold sway, the sheer scale disk drives, flash/SSD storage, tape drives, etc.
of the data explosion would require programmers Traditional HDDs are accessed using a variety
to understand and apply algorithms where data does of protocols such as SCSI, ATA, SATA and SAS.
not fit in main memory. Hence programmers need SCSI stands for Small Computer System Interface
to start worrying about data latency of secondary and is a parallel peripheral interface standard widely
storage such as flash SSD/disk storage systems. used in personal computers for attaching printers
In a way, the shift towards data-centric computing and hard-disks. ATA is another interface used for
means more intelligent storage systems, and a need attaching disks; also known as IDE, wherein the
for programmers to understand about state-of-the-art controller is integrated into the disk drive itself, ATA
storage systems, where big data is stored, processed is also a parallel interface like SCSI and both have
and preserved. While this is not a traditional topic their equivalent serial interfaces namely, Serial SCSI
covered in ‘CodeSport’, given the importance of (abbreviated as SAS) and Serial ATA (abbreviated
data storage in a ‘Big Data’ world, it would be great as SATA) which allow a serial stream of data to be
if ‘CodeSport’ does a deep-dive into state-of-the-art transmitted between the PC and the disk drive.
storage systems in a future column.” Note, however, that in the traditional view of
It was a timely reminder for me. While I have storage, it is part of the compute server, since it is
discussed various ‘Big Data’ computing paradigms directly attached to the server and is accessed through

42 | March 2013 | OPEN SOURCE FOR YOU


Guest Column CodeSport
it. It is not an independent addressable
LAN
entity, and is not shared across multiple
computers. Typically, this is known as
Disk Disk Disk
‘Direct Attached Storage’ (DAS). Access
to the data in secondary storage is through User
the server to which it is attached; hence, if
the server is down due to some failure, the
Server 1
data becomes inaccessible. Also, as data
storage requirements increase, we need to
have greater storage capacity. We produce User
2.5 quintillion bytes of information every Disk Disk Disk
day, out of the Web searches we do, the
online purchases we make, the mobile calls
we make, and the social network presence
we have (a quintillion is 1000 x 1000 x Server 2
1000 times a billion). Given the volume of User
Big Data that gets produced, the storage Disk Disk Disk
requirements go on increasing exponentially.
However, in case of Direct Attached Storage,
the number of I/O cards (for example, SCSI
cards) that can be connected to a computer Server 3
User
is limited. Also, the maximum length of a
SCSI cable is 25 M. Given these restrictions,
the amount of storage that can be realised Figure 1: Disks on Server 2 are full
using the conventional directly attached
storage is limited. Also note that DAS results LAN
in uneven storage utilisation. If one of the
servers has used up all its disk storage and
needs further storage, it cannot use any free User
storage available in the other servers. This is
shown in Figure 1, where disks on Server 2
are full, whereas there is excess disk capacity Server
available on Servers 1 and 3. However, it is
not possible for Server 2 to use them.
As opposed to the traditional server- User
centric paradigm we have seen above, Storage Network
in a storage-centric view, storage exists
as an independent entity, apart from the
compute servers. Storage can be addressed Server
independently, from multiple servers. A User
simple form of a storage network is shown
in Figure 2, where we can visualise the SCSI Disk
cables of the computers having been replaced
with connections to the network storage.
Though the storage is an independent entity
on a network, to the operating system running User Server
on the compute server, it appears as if locally
attached to the compute server. Figure 2: Storage network
Two popular forms of storage-centric
architectures are Network Attached Storage (NAS) and iSCSI (internet SCSI). SANs provide block-level access
Storage Area Network (SAN). The latter (SAN) allows to storage, just like traditional locally attached storage.
storage entities to exist in a network, which can be accessed In contrast, in the case of Network Attached Storage or
from compute servers using either special protocols such NAS, a dedicated storage computer exists as an entity
as Fibre-Channel or standard TCP/IP protocols such as on the network, and is accessible from multiple compute

oPEN SOURCE FOR YOU |March 2013 | 43


CodeSport Guest Column

servers concurrently. Unlike a SAN, a NAS provides passion for expanding and sharing his knowledge with all
file-level storage semantics to multiple compute servers, developers. Rest in peace, Aaron.
appearing as a file server to the operating system running
on the compute server. Internally, the NAS file server My ‘must-read book’ for this month
would access the physical storage at block level to access This month’s must-read book suggestion comes from one of our
the actual data, while this is transparent to the OS on readers, Aruna Rajan. She recommends the book ‘Introduction
the compute server, which is exposed only to file-level to Information Retrieval’ by Christopher D. Manning,
operations on the NAS server. Prabhakar Raghavan and Heinrich Schütze. This book focuses
Hybrids of SAN and NAS also exist. Since there is no on various information retrieval techniques, including the most
file system concept for SANs, various file protection and popular one of Web search engines. The book is available
access-control mechanisms need to be taken care of in the online at http://nlp.stanford.edu/IR-book/html/htmledition/
OS running on the compute server. In case of NAS, file irbook.html. Thank you, Aruna, for your suggestion.
protections and access control can be enforced at the NAS If you have a favourite programming book/article that you
server. The next concept we need to understand in the storage think is a must-read for every programmer, please do send me
domain is Scale-up Storage vs Scale-out Storage, which we a note with the book’s name, and a short write-up on why you
will discuss next month. think it is useful, so I can mention it in the column. This would
help many readers who want to improve their coding skills.
Remembering Aaron Swartz If you have any favourite programming puzzles that you
It has been almost two months since the death of Aaron would like to discuss on this forum, please send them to me,
Swartz. Most of us would have read about the enormous along with your solutions and feedback, at sandyasm_AT_yahoo_
outpouring of grief caused by this tragic loss. Aaron Swartz DOT_com. Till we meet again next month, happy programming
was a programmer first and foremost, and the reason I and here’s wishing you the very best!
wanted to mention him in our column was not just because
he was a well-known activist who fought for the freedom
By: Sandya Mannarswamy
of information on the Internet, but because he is a sterling
example of what differentiates a great programmer from the The author is an expert in systems software and is currently in
a happy state between jobs. Her interests include compilers,
run of the mill. He had an enormous enthusiasm for building multi-core technologies and software development tools. If
software that solves challenging problems. He was involved you are preparing for systems software interviews, you may
in the development of the RSS format, wrote the Web.py find it useful to visit Sandya’s LinkedIn group ‘Computer
framework, and was a technical architect of reddit.com, Science Interview Training India’ at http://www.linkedin.com/
groups?home=&gid=2339182.
just to mention a few examples of his work. He had a great

OSFY Magazine Attractions During 2013-14


Month Theme Featured List
March 2013 Virtualisation Virtualisation Solution Providers

April 2013 Open source Databases Certification & Training Solution Providers

May 2013 Netwok monitoring Mobile Apps

June 2013 Open Source application development Cloud

July 2013 Open Source on Windows Web Hosting Providers

August 2013 Open Source Firewall and Network security E-mail Service Providers

September 2013 Android Special Gadgets

October 2013 Kernel Special IT Consultancy

November 2013 Cloud Special IT Hardware

December 2013 Linux & Open Source Powered Data Storage Network Storage

January 2014 Open Source for Web development and deployment Security

February 2014 Top 10 of Everything on Open Source IT Infrastructure

44 | March 2013 | OPEN SOURCE FOR YOU


Let's Try Developers

Build Your Own Web Page


With QForms
QForm is the state-conscious, event-driven object management system for creating
Web pages. QForm is the ‘C’ and ‘V’ of the MVC architecture of QCubed. It relieves you
from typing HTML code for every single element, and dealing with monotonous and
repetitive code for handling user actions.

T
he entire world is moving to the Web. Socket What is a state anyway?
programming is becoming passé for even lower- When I say stateless, I mean to convey that in most cases,
level programs as JavaScript catches on with JSON, when we log into a Web application, the server does not
while other Web technologies such as Web sockets promise know the state of the application on the client side. Which
better results in an increasingly distributed world. We have elements are being displayed, which ones are hidden, and
become habituated to using Web services that promise to what can be done on the page—the server knows none of
be reliable. Facebook, Twitter, GMail, and even WordPress this. To make sure that an invalid request does not cause
and Drupal, all deliver the content so well that we often a security breach, and to assure the right response for
forget that the Web is a stateless mess. No machine every request, a number of methods are in use. In most
remembers anything about a previous action, primarily cases, cookies are used to validate a user’s identity and
because HTTP does not support states. authenticity, and the programmer has to build a system that

OPEN SOURCE FOR YOU | March 2013  |  45


Developers Let's Try

could keep track of what the user does in his browser. protected $btnSubmit;
This is important to make sure that the server side of the // Text labels
application does not send any invalid or unnecessary data protected $lblMessage, $lblResult;
to the client. QCubed, using its QForm library, however, protected function Form_Create() {
takes a snapshot of the page and saves it on the server side // Set message at top
before sending the HTML to the client. This state is used in $this->lblMessage = new QLabel($this);
later requests from the client. This technique improves the $this->lblMessage->Text = "<strong>Create new Blog
application reliability, and reduces the programmer’s work Post</strong>";
and complexity of design by a very large margin. // Define Title input box
$this->txtTitle = new QTextBox($this);
What is QForm? // Define Body input box
In the previous article, we have already looked at $this->txtBody = new QTextBox($this);
Codegen, which helps build forms, and takes care of the // make it a textarea
‘Model’ part of QCubed’s MVC architecture. QForm $this->txtBody->TextMode = QTextMode::MultiLine;
is the part of QCubed that handles the ‘View’ and // Submit Button
‘Controller’ parts of MVC. QForm is responsible for $this->btnSubmit = new QButton($this);
creation of the page, along with elements (we would call $this->btnSubmit->Text = 'Submit';
them controls) on the page (text-boxes, buttons, text, $this->btnSubmit->AddAction(new QClickEvent(), new
etc.) and helps the developer determine the events that QAjaxAction('btnSubmit_Click'));
will trigger actions, and the way in which those actions // Result text
are to be handled. Before we go into code, let us first $this->lblResult = new QLabel($this);
answer an interesting question: “If QForm handles the }
Web page, why is it named QForm, not QPage?”
The reason is, QCubed treats the entire page as a ‘Form’ protected function btnSubmit_Click($strFormId,
that submits to itself. This technique makes sure that the $strControlId, $strParameter) {
client does not have to know the names of other files used // Create new post
in the process, nor their paths, nor their function names—a $objNewPost = new Post();
better level of security, you see! For example, if you allow // Load defaults
the user to insert data in newpost.php, while insert_newpost. $objNewPost->Initialize();
php handles the values from the form submission and inserts // Assign values from the form
data into the database, then a bug in insert_newpost.php can $objNewPost->Title = $this->txtTitle->Text;
possibly open a plethora of vulnerabilities! QCubed would $objNewPost->Body = $this->txtBody->Text;
normally hide the information about which file handles // Save
which request on the server. This technique has another $objNewPost->Save();
benefit; it helps handle multiple events and actions easily. // Saved. Show the result
Now, without further ado, we will delve into the code. $this->lblResult->Text = "Post was saved";
// Empty the textboxes
Building the first Web page in QCubed $this->txtTitle->Text = '';
In previous articles, we created a small MySQL database to $this->txtBody->Text = '';
store blog posts and comments. Let us create a Web page }
that allows us to insert a new blog post in the database. }

Code NewPost::Run('NewPost');
Create a file named newpost.php in the root directory of your
QCubed installation, and put the following code in it: And in the same directory, create another file named
newpost.tpl.php, and put the following in it:
<?php
require_once 'qcubed.inc.php'; <html><head>
<title>Create new Blog Post</title>
class NewPost extends QForm { <link rel="stylesheet" type="text/css" href="<?php echo __
// Declaring elements—Input Boxes CSS_ASSETS__ . "/styles.css" ?>" />
protected $txtTitle, $txtBody; </head><body>
// Submit button <?php $this->RenderBegin(); ?>

46  |  March 2013 | OPEN SOURCE FOR YOU


Let's Try Developers

<p>
l oc al h ost / l f y / n ewp ost . p h p
<?php $this->lblMessage->Render(); ?><br>
<strong>Title</strong> <?php $this->txtTitle->Render(); ?> <strong>Create New Blog Post</strong>
<br> Title
<strong>Body</strong> <?php $this->txtBody->Render(); ?>
<br>
<?php $this->lblResult->Render(); ?> <br>
<?php $this->btnSubmit->Render(); ?> <br>
</p>
<?php $this->RenderEnd();?>
Body
</body></html>
Submit
Then visit the newpost.php file in your browser; the
output should look like Figure 1. Before you think that Figure 1: Initial form created by Form_Create()
the strong HTML tag at the top is because of an error
somewhere, let me tell you that such output is expected; behaviour and database interactions; they can have their
we will know why shortly. own validation logic and are highly reusable. For example,
you could create a calculator panel that can do basic math
Understanding the code functions. Once you have created the panel, you can use
QForm separates the presentation layer and program logic it on any page by adding just a couple of lines; there is no
into two different files. The newpost.php file contains the need to write the same code over and over again for every
logic of the page (controller), while the newpost.tpl.php page. Since controls can be nested, the concept of parent
governs the layout (view). We begin with the logic. becomes important in controlling the behaviour, placement
The first line of the controller file includes the qcubed. and visibility.
inc.php file from the root directory of your QCubed QLabel is a control that, when rendered, will create text
installation. This readies the framework capabilities to be on the page. We set the text to be displayed using the QLabel’s
used throughout the file. Next, we define a class NewPost, Text property by doing:
which is derived from the QForm class. Before we
proceed with creating the HTML controls (such as text- $this->lblMessage->Text = "<strong>Create new Blog Post</
boxes, buttons, etc), we define them as class members. strong>";
If these variables are not defined as class members but
as local variables inside the Form_Create function, you In a very similar fashion, we define other controls.
would not be able to render them, much less handle any The two text-boxes txtTitle and txtBody are to allow
actions on them. This is because the layout is created the user to input the title and body of a blog post; the
by the view file, which has no access to variables in the btnSubmit button is to submit these values to the server.
Form_Create function but can access class members. For most QControls, the Text property defines the text
The initial behaviour and content is determined by they would display. For example, QLabel’s Text will appear
the Form_Create function. In this function, we define the directly where rendered; QButton’s Text will appear on
controls (HTML elements). For example, when we do: the button; QTextBox’s Text will appear as the text in the
input box. Every control has some common properties and
$this->lblMessage = new QLabel($this); some unique ones. For example, the TextMode property
can exist in only QTextBox-based controls (QTextBox,
Here we actually tell QCubed to make an lblMessage QIntegerTextBox and QFloatTextbox) and can convert the
class member variable of type QLabel, with the current text-box to a text-area, a password input control, or an
QForm as the parent. The $this variable passed to the QLabel HTML5 ‘search’ text-box.
constructor indicates that the parent of lblMessage is the It is noteworthy that the Text of the label lblResult was kept
current QForm class. blank, only so we could change it to something else later on.
The concept of parent is very important to HTML This line:
controls in QCubed (QCubed calls them QControls). One
of the biggest features of the QForm and QControl library $this->btnSubmit->AddAction(new QClickEvent(), new
is that it allows you to create sophisticated composite QAjaxAction('btnSubmit_Click'));
controls and panels using other child controls. These
controls and panels can have their own layout, defined adds an action to the btnSubmit button for a click

OPEN SOURCE FOR YOU | March 2013  |  47


Developers Let's Try

event. The AddAction function takes two parameters— using the ActionParameter property of the QControl.
the event, and the action. When specifying the event In most cases, you would not need to use them,
type, in most cases, creating a new event object inline is but they are needed to be present in the event-handler
enough and recommended. QCubed supports all events function. With time, you would discover that these three
allowed by JavaScript, and you can choose any one of parameters can help you reduce coding efforts and cut
them. The second parameter is the action, which can be short development time even more.
one of these three types: Now we take a look at what the event handler
1. QServerAction: This will reload the entire page with does. Inside the event handler, we create a new blog
the changes defined in the event-handler function. post object named $objNewPost. (Remember, QCubed
When a QServerAction is executed, the client sends an creates classes for each of your tables, and your rows
HTTP POST request over the wire. The server receives are treated as objects of the table class.) Like we did
the request and runs the event-handler function, in the last article, we initialise the object with database
and makes any required visual changes to the page defaults, set the value of the post title and body, and
accordingly, and then sends back the entire page, thus save the post. We also set the text of lblResult to
reloading the page. ‘Post was saved’ and empty the text-boxes txtTitle and
2. QAjaxAction: This will render the changes without txtBody. There are a few points worth noting:
reloading the page (using AJAX). In this case, the 1. We retrieve the values input into QTextBox controls
client submits the form using an AJAX request. The by just fetching theirText property value. The same
server runs the event-handler function, and records any property is used to set the values as well (as we did for
changes needed for the layout. These changes are then the QButton and QLabels). You do not have to make any
transformed and sent to the client for reflecting the extra effort to retrieve values from $_POST or $_GET
changes on screen. arrays, anywhere.
3. QJavaScriptAction: This will call a JavaScript function 2. Though all the actions are taken via AJAX, QCubed
on the client side. In this case, the event-handler does not require us to deal with the low-level
function must be present on the client side. No calls JavaScript, and XmlHttpRequests and responses. You
are made to the server. do not write any HTML to be sent. Just set the values
All these actions would take one parameter—the name to what you want, and QCubed will calculate what
of the function to be called when the event occurs. In our needs to be done by itself.
case, the function btnSubmit_Click will be called when 3. The event handler does not return any value—event-
btnSubmit is clicked. In case of QJavaScriptAction, the handler functions will not return values. If you want to
function passed in as the argument must have the braces terminate the function conditionally (e.g., if the input
included in the call, and the function must be present on in the txtTitle text-box was blank), then simply return
the client side—either included in another JS file, or inline without any value.
in the document. QCubed cannot validate the availability 4. The server keeps a copy of the state of the
of the event-handler functions, and it is the developer’s application on the client side, and every time
job to make sure that they exist. the page updates itself via a QServerAction or
Our event-handler function btnSubmit_Click takes in QAjaxAction, the server updates and syncs the
three parameters: copy of the page state. You do not need to worry
1. strFormID: This is the FormID (same as the class name). about what data the variables contain on the server
2. strControlID: This is the control ID of the HTML side—they always contain the last submitted value.
element that initiated the action. Control IDs are If you use the back button, the server knows that
generated automatically by QCubed when a new you clicked the back button (well, not exactly, but
control is created. These are the same ones used for it's safe to assume it at the outset of our journey
the id attribute of the element when it is rendered. The with QCubed) and uses the corresponding state to
developer can enforce a desired ID by supplying it as the produce the HTML. Whatever be the case, in the
second parameter to the constructor, like: end, you will not have to go through anomalies.
All the code in the controller file is useless if you
$this->lblResult = new QLabel($this, ‘resultLabel’); do not Run the file. To run the file, we need to call the
public static function Run, with the class name as the
This will set the control ID of lblResult to ‘resultLabel’. parameter. This function is built into QForm, and is not
QCubed allows only alphanumeric control IDs. meant to be written manually. It tells QCubed to search
3. strParameter: This is any extra parameter that needs to for the template file in the same directory. By default, it
be passed to the function. This parameter can be set by would look for a file with the same name but ending in

48  |  March 2013 | OPEN SOURCE FOR YOU


Let's Try Developers

‘.tpl.php’ instead of ‘.php’. If you want to use a different Create new Blog Post
file as the view file, you may pass the filename as a second Title
parameter to the Run function, like:

NewPost::Run(‘NewPost’, ‘newpost_alternate.tpl.php’);

This will force QCubed to use newpost_alternate.tpl.php


as the template file. Such a technique can be used to create
multiple layouts for the same page! Body

Submit
The view file
The view file contains the HTML skeleton of the page. The Figure 2: With HtmlEntities set to false, QLabel honours HTML code in 'Text'
only thing you do not have to write in this file is the HTML
for the individual controls, which you defined in the controller HTML layout from behaviour. Chances of messing up
file. You would instead call the Render function on those HTML and PHP code are lower than ever. Since ‘model’
controls—this makes sure that QCubed takes control of is automatically taken care of by Codegen, we are not
their behaviour. The view file would typically begin with the going to worry about that.
HTML head section containing the page title, and any extra 2. Event-driven: You define a control, bind it to an event,
JS and CSS to be loaded. You might want to create a static and write the event-handler function for the same. QForm
PHP page to be ‘included’ for the purpose. Remember that, does the rest.
as of now, QCubed does not come with any special functions 3. AJAX is easy: One does not need to write JS functions,
to help you with the HTML head section. All controls must remember form element names and IDs, and there is no
be rendered between two lines: ‘$this->RenderBegin();’ and need to deal with the $_POST array either. QCubed does
‘$this->RenderEnd();’. An attempt to render a control beyond the dirty work, allowing you to focus on ‘what’ to do
these boundaries will cause the framework to produce an error rather than ‘how’ to do.
and halt. It is advisable to put the RenderBegin() function just 4. AJAX to page reloads and vice versa: Changing the
after the body tag begins, and RenderEnd() just before the behaviour of an action from a ‘full page reload’ to
body tag closes. Again, controls will not render themselves ‘AJAX based’ can be done by changing just one
unless you ask them to. If you removed the line ‘$this- word—the action type.
>btnSubmit->Render();’ from the view file, then the submit 5. Less HTML than ever: QCubed produces HTML code for
button will disappear from the page. single elements, while you have to take care of only the
And now, the one question we left unanswered—why overall page structure. Combined with Codegen, it means
does lblMessage show the strong tags on the page instead roughly 80 per cent reduction in the amount of HTML and
of making the text bold? It is because QCubed enables the JavaScript you would write otherwise. Also, the fact that
htmlentities function for the text in all QLabel variables. In most HTML code is automatically generated means that you
the Form_Create() function, just set: have to deal with far fewer syntax errors in HTML code.
6. Stateful: The server knows the state of the page on the
$this->lblMessage->HtmlEntities = false; client side, and that improves security as well as ease of
use for the programmer.
You will see (Figure 2) that the strong tag gets back its This article hardly scratches the surface of QForm. There
importance! are a lot of other powerful features built into QForm; some
interesting ones include—control and form validation, custom
Behaviour controls, database-based session handling, centralised form
The page behaviour is pretty obvious. It will accept the title state handling, HTML input validation and purification for
and body of a post, and when the Submit button is hit, it preventing XSS attacks, and so on. We will peek into a few of
creates a new post and saves it to the database, erases the them in the next article of this series.
contents of the title and body input boxes, and displays a
message that the post was saved. By: Vaibhav Kaushal
The author is a 25 year old Web developer from Bengaluru who
The real power of QForms also happens to be a core contributor to QCubed. He loves
Throughout this article, we have discovered some of the core writing for technology magazines when he is not busy fiddling
around with QCubed or developing his website (http://www.c-
features and functionalities of QForms. Here is how they help you: integration.com/), where he gives QCubed-related advice.
1. Separate View and Controller files: QForm separates the

OPEN SOURCE FOR YOU | March 2013  |  49


Exploring Software Guest Column

Anil Seth

Video Subtitle Translation


This column looks at how to make MOOC videos accessible
to non-English speakers.

T
he news that California State Universities were tying up crowd-sourcing. The quantum of content is too large to be translated
with Udacity for inexpensive MOOC (massive open online within a useful timeframe for all languages of interest. Furthermore,
courses) for credit was not surprising. The only surprise is the content of technical courses is likely to be unambiguous, and not
the speed with which the changes are taking place. I am inclined to open to subtle differences in the interpretation of words and phrases.
agree with the analysis on TechCrunch (http://goo.gl/fRppX) that this Machine translation may provide the answer.
online project is going to end college education, as we know it. The If you search the Web for open source machine translation
advantage is that a wealth of options will become available for all to engines, you will find Moses (http://www.statmt.org/moses/), a
learn. The disadvantage is that most of the content will be in English. statistical translator, and Apertium (http://www.apertium.org/), a rule-
Can the videos in English be accessible to students not very based translator. Moses' capabilities are, in principle, similar to the
comfortable with the language? They would benefit a lot if subtitles software used by Google and Microsoft. However, it does not come
(http://en.wikipedia.org/wiki/Subtitling) are provided in their language. with language models and datasets for carrying out translation—so,
So how does one go about getting content with language for it to be useful, you need to provide language models and training
subtitles in it? The time and effort required to translate the content datasets. Apertium, however, comes with translation capabilities for
into the vast number of languages would be huge. Crowd-sourcing a number of language pairs. The current list and status can be seen at
can be an answer, for example, by using http://www.amara.org/. http://wiki.apertium.org/wiki/List_of_language_pairs.
Unfortunately, the progress in pure open source tools is likely
Subtitling/captioning and the Web to be slow. The reason is fairly obvious; Web-based translators from
Video players can merge video frames with subtitles while playing. Google, Microsoft and others provide excellent functional alternatives.
There are numerous formats available for subtitling; the basic content, These sites have a wealth of data, e.g., pages from multi-lingual sites,
though, will be similar. Each subtitle is a text line to be displayed, along which may be used for training and fine-tuning translations.
with information about when to start the display and when to stop. If same-language subtitles are available, you may rely on
The best way to provide this information is by specifying the starting machine translation for generating subtitles in a language for which
time and the end time, or the duration for each subtitle. This makes the a machine translator is available. YouTube provides this feature
subtitle file independent of the frame rate at which a video file may for translated captions on its site by using Google Translate, e.g.,
be created. One common format is the SubRip (.srt extension), which http://www.youtube.com/watch?v=1St0tJVGCW8. So, the easiest
was the basis of another useful format, WebVTT, which may become option is to use Google or Bing translators on the Web. Several
widespread, as it is now a W3C standard. W3C has a competing timed open source tools had been created to translate subtitles using the
text (TTML) standard, which is an XML document, intended to ensure Google Translate API. However, these tools no longer work after
interoperability of streaming video and captions on the Web. changes in the usage policy of Google's Translate API, but they
However, the HTML5 video element supports a track element, may be modified to use Microsoft's translation API instead.
which can be used to specify the subtitle file, perhaps in WebVTT We can hope that the MOOC course videos will make same-
format, and meet the needs of streaming video with captions in a language captions available, so that machine translation can
user-defined language. spread this knowledge to an even wider group of learners.
It is common these days to have same language subtitles (http:// A side lesson: The sudden changes in the usage policy for the
en.wikipedia.org/wiki/Same_language_subtitling) for television and Google Translate API reinforce the need for pure open source
video. The obvious advantage is that it makes content accessible to solutions for translation applications as well as for language
the hearing-impaired. Another advantage is its educational value. models and translation datasets. The generosity of commercial
It helps practice reading as an incidental and sub-conscious part sites will be aligned with their commercial interests and cannot
of entertainment. However, on the Web, it has an even greater be taken for granted.
significance, which is probably why Google has been in the forefront of
the WebVTT format—it allows video content to be searched easily! By: Anil Seth
The author has earned the right to do what interests him. You can
Machine translation of captions find him online at http://sethanil.com/, http://sethanil.blogspot.com/
and reach him via email at anil@sethanil.com.
Manual translation is time-consuming and expensive, even with

50  |  March 2013 | OPEN SOURCE FOR YOU


Let's Try Developers

Programming Socket in C (TCP)


This article explores the basics of writing programs in C using BSD ‘sockets’ in the IP version
4 protocol. The article published in the January 2013 issue of OSFY covered UDP socket
programming; here, we take a look at socket programs using TCP (Transmission Control Protocol).

C
onsider a network application—say, a file transfer client.c and lfy_tcp_server.c. In this example, there is another
program. It has a client and server. The client connects file, functions.c, which contains some common utility functions
to the server to request files for download, or to for both client and server. Please download these from Github,
transfer files to the server (upload). Such applications need https://github.com/mybodhizone/lfy_tcp_socket, after which
to conform to some protocol; the most common is TCP/IP, they need to be compiled to make executables—say, myclient
which is segregated into layers like the application, transport, and myserver. Run these in two terminals, as shown below:
network and link layers. Sockets help us get the services of
the transport layer (TCP, UDP or SCTP sockets). Using RAW [localhost tcp]$ gcc lfy_tcp_server.c functions.c -o myserver
sockets, you can directly get the services of the network layer. [localhost tcp]$ ./myserver
With TCP, first a connection is established, then data is TCP Server: Waiting for new client connection
transferred, and then the connection is terminated. To establish Server: Connection from client -127.0.0.1
a connection, three packets are exchanged between client and Server: Received from client:hello
server, and after this ‘handshake’, data transfer takes place. In
normal scenarios, one side initiates connection termination; and [localhost tcp]$ gcc lfy_tcp_client.c functions.c -o myclient
four packets are exchanged for a proper termination. [localhost tcp]$ ./myclient 127.0.0.1 11710
Client - Trying to connect to server
What does a socket program look like? Client - Connected Successfully to server
A typical socket program would have two source files, one for Enter Data For the server or press CTRL-D to exit
the server and one for the client. Our files are named lfy_tcp_ hello

OPEN SOURCE FOR YOU | March 2013  |  51


Developers Let's Try

Data Sent To Server function returns a socket descriptor (IPv4, SOCK_STREAM


Received from server: (TCP)) in the variable sd. An address structure struct sockaddr_
hello in (whose declaration is in the file /usr/include/netinet/in.h in
Enter Data For the server or press CTRL-D to exit Linux) is needed; you can get it by including the header file
<netinet/in.h>. In the client code, you need to populate this
If you have read the previous article in this series, you address structure (the serveraddress variable) with the address
will know that my client and server are both running on the family, server IP address, and port number. Note that this needs
same Fedora 15 system in two terminal windows. The server to be populated in big-endian order, so use functions/macros like
listens on the ‘port number’ 11710 on the loop-back address htons and inet_addr. Here, htons(atoi(argv[2])) transforms the
127.0.0.1. When the client requests some service from the string the user passes as the command-line argument into a big-
server, the server processes it and waits for another client or endian short integer. Similarly, inet_addr(argv[1]) transforms the
another request from the same client. As before, the service IP address command-line argument into a 32-bit IPv4 address in
simply returns the string received from the client. big-endian order.
Now let's take simple algorithms for the TCP client and
server. First, the client: Next, call the connect function in the client:

Get the socket descriptor (using the socket function). ret = connect (sd, (struct sockaddr*)&serveraddress, sizeof
Update a socket address structure with the server's IP (serveraddress));
address and port.
Complete TCP's three-way handshake by calling the connect If successful, it means that TCP three-way handshake
function. is completed and you get a connected socket, which can be
Get data for sending through the socket and send it over the used to send or receive data. Now you can use the ‘read’ and
socket. ‘write’ functions to read/write data. An important point to
Receive data from the socket (from the server). Here, the be noted here is that, UDP deals with entire datagrams, but
process waits—that is, gets blocked. TCP is a byte oriented protocol.This requires the receiver
Close the socket descriptor. to understand how much data to read. But this information
should come from the sender. Or it can so happen that the
A simple TCP server algorithm: sender sends some data, which the receiver reads and then
waits to receive more data. Now if the sender closes the
Get the socket descriptor (using the socket function). connection, the “read” function will return a value of 0, in the
Update a socket address structure with the local address and receiver's side. This might be used by the receiver to know
port number. that the peer has closed the connection. But once a connection
Associate (bind) the above address with the socket. is closed, the sender will not be able to send any more data.
Call the “listen” function. It again will have to initiate connection request. This may be
Repeat forever { undesirable, but this is the feature of TCP. The code below
Get blocked in “accept” call, till it returns a tries to read ‘n’ (passed as argument) bytes of data from the
connection descriptor. socket descriptor ‘sd’ to storage (address of a variable or
serve_client (connection descriptor) { name of an array).
Receive data from a client (Here the process waits
that is get blocked) int myread (int sd, int n, void* buffer) {
Process Received data (Specific to the particular int ret = 0;
problem) int pointer = 0;
Send data to this client. int totnoofbytes = 0;
If client closes connection, while (1) {
then ret = read (sd, buffer + pointer, n -
close connection descriptor. totnoofbytes);
break (continue waiting in accept) if (0 > ret) {
else perror (“I am getting error in
continue with this function (server_client) read!!\n”);
return -1;
} }
} totnoofbytes = totnoofbytes + ret;
pointer = pointer + ret;
Now, please refer to the downloaded source code. The socket //totnoofbytes = 0 means, nothing more to

52  |  March 2013 | OPEN SOURCE FOR YOU


Let's Try Developers

read write a signal handler for Ctrl-C and do any required cleanup;
if ((totnoofbytes == n) || (ret == 0)) { I've omitted this aspect to keep things simple.)
return totnoofbytes;
} References
} [1] Stevens, W. Richard and Rago, Stephen A. ‘Advanced
} Programming in the Unix Environment’, 2nd Edition, Pearson
Education
[2] Stevens W. Richard, Fenner Bill, Rudoff A.M., ‘Unix Network
Similarly, while writing data, there is a function called Programming’ (The sockets Networking API – Vol -1), Third
‘mywrite’. These utility functions are in functions.c. The bind Edition, Pearson Education
function associates a local address with the socket, and is normally [3] Useful Internet links are given below:
a. Internet Protocol Specification: http://www.ietf.org/rfc/rfc791.txt
used on the server side. Check out the following code: b. User Datagram Protocol(UDP): http://www.ietf.org/rfc/rfc768.txt
c. Transmission Control Protocol: http://tools.ietf.org/html/rfc793
serveraddress.sin_family = AF_INET; d. For general programming/data structures tutorials: http://
serveraddress.sin_port = htons (MYPORT); //PORT NO www.mybodhizone.com/
e. For programming related questions and answers:
serveraddress.sin_addr.s_addr = htonl (INADDR_ANY); //IP http://www.ask.mybodhizone.com/
ADDRESS
ret = bind(sd, (struct sockaddr*)&serveraddress, sizeof Acknowledgement
(serveraddress)); I would like to thank Tanmoy Bandyopadhyay for his help in
reviewing this article.
The server’s port number and IP address (and address By: Swati Mukhopadhyay
family) that are stored in the socket’s address structure are
The author has more than 12 years of experience in academics
associated with the socket descriptor using the bind function. and corporate training. Her areas of interest are digital logic,
The purpose of htonl (INADDR_ANY) is to use a ‘wild-card’ computer architecture, computer networking, data structures,
address—if the server has multiple IP addresses, it can receive Linux, programming languages like C and C++, shell scripting
data on any of these. The listen function is used to change the and Python scripting. For any queries or feedback, she can be
reached at swati.mukerjee@gmail.com.
state of the socket, so it can now accept connections. It also
specifies the queue size of pending connections, to be retrieved.
Note the server-side accept function; the first argument
is the listening socket (descriptor-created using the socket
call). The function blocks till a client connects; whenever
it returns successfully, a new connection socket is returned,
which can be used to communicate with a particular client.
Also note the second and third arguments of accept—the
address structure that will be populated with the client's
IP address and port number, and the length, which will be
updated accordingly:

length = sizeof (cliaddr);


connfd = accept (sd, (struct sockaddr*)&cliaddr, &length);

In my example, the server is an ‘iterative’ server, which


means that it can serve, at most, one client at a time. You can
try to make it a concurrent server by using the fork or pthread_
create calls. Also note the use of the inet_ntop function:

printf (“Data Received from %s”,


inet_ntop (AF_INET, &cliaddr.sin_addr,
clientname, sizeof (clientname)));

This converts 32-bit IPv4 addresses (in network byte


order) into dotted decimal notation (presentation format), and
stores it in the clientname array.
The server code runs infinitely; to terminate it, press
Ctrl-C. (While you are writing your own code, it's better to

OPEN SOURCE FOR YOU | March 2013  |  53


Developers How To

Try Your Hand at the


Dropbox API for Android
For cloud and Android
developers, Dropbox is a very
handy service. It offers cloud
storage and a nifty tool to
sync data. One of Dropbox's
biggest advantages is that it
is so simple and easy to use—
particularly the developer
API provided. This allows
developers to harness the
power of the cloud effectively.
This article will focus on the
basics of the Dropbox API,
and how to integrate it with
your Android apps.

B
efore we get started, you need to set up Eclipse and
the Android SDK on your system; there's plenty of
information about that on the Net, so I'll skip it.

Setting up Dropbox access


Setting up the Dropbox access for your app is relatively easy
and straightforward. First you have to go to the Apps page of Extract the files, and copy the contents of the lib folder into
your Dropbox account (https://www.dropbox.com/developers/ your Android project's lib folder. You can use the DBRoulette
apps) and then create a new app. Once it is created, you will sample project in the examples folder as reference while doing
get the app key and the app secret key. These are unique this. After copying the libraries, tweak the AndroidManifest.
values to your app, and are used for authenticating the xml file so that your app has sufficient permissions to access
connection between Dropbox servers and your app, and hence the required resources. Add the following code to your
should not be shared. Also note the type of access specified Manifest file, under the application tag:
when you create your app. There are two types of access you
can specify: DROPBOX, which allows your app to access <activity
your entire Dropbox folder, or APP FOLDER, which only android:name="com.dropbox.client2.android.AuthActivity"
allows your app to access the folder specifically created for android:launchMode="singleTask"
your app. Now, let’s proceed to create a new Android project android:configChanges="orientation|keyboard">
in your Eclipse environment. <intent-filter>
<!-- Change this to be db- followed by your app key
Configuration -->
Once you have created your Android project in Eclipse, <data android:scheme="db-APP-KEY" />
download the Dropbox SDK for Android from the Dropbox <action android:name="android.intent.action.VIEW" />
site (https://www.dropbox.com/developers/reference/sdk). <category android:name="android.intent.category.

54  |  March 2013 | OPEN SOURCE FOR YOU


How To Developers

BROWSABLE"/>
<category android:name="android.
intent.category.DEFAULT" />
</intent-filter>
</activity>

Note: In the line <data


android:scheme="db-APP-KEY" />,
replace the APP-KEY with your application
key obtained from the Dropbox site.

Also, you must specify in your Manifest


file that your application will need to access
the Internet. Hence, add an INTERNET
permission in the manifest section, as follows:

<uses-permission android:name="android.
permission.INTERNET"></uses-permission>

Now, move on to authenticating the app.

Authentication
Before looking at the code, try and understand Figure 1: Authentication
how the authentication takes place. You supply
the app key, the secret app key and the access
type, which you obtained during the creation of
the app on the Dropbox page, to create a new
session. Now, your app needs to be authorised
through the official Dropbox mobile app or
Dropbox mobile website. So, at this point, the
user will be redirected to a page (Figure 1) that
will request permission to access the user's
Dropbox. Once the user accepts the app request,
you will have the user's access token pair, which
you can use to make various API calls. Once
the app is authenticated, it will be redirected
back to the activity it was executing before the
authentication call. After control is returned, you
must finish the authentication, binding the user's
access tokens to the current session. It is also
important to store these tokens somewhere after
you obtain them, because if you do not, then the
app will need to be authorised by the user every
time it is restarted.
Here is the code for the above-mentioned
steps. The comments specify which parts of the
code correspond to each step. Figure 2: Dropbox App

//Create a new Session private final static AccessType atype=AccessType.APP_FOLDER;


private DropboxAPI<AndroidAuthSession> auth; //Change to AccessType.DROPBOX if you selected dropbox access type.
private final static String akey="INSERT- AppKeyPair appkeys = new AppKeyPair(akey, askey);
ACCESS-KEY-HERE"; AndroidAuthSession session=new AndroidAuthSession(appkeys, atype);
private final static String askey="INSERT- auth=new DropboxAPI<AndroidAuthSession>(session);
SECRET-ACCESS-KEY-HERE";

OPEN SOURCE FOR YOU | March 2013  |  55


Developers How To

//User accepting the request for permission. Downloading a file


auth.getSession().startAuthentication(MainActivity.this); Downloading is simple—use the getFile method to download
your file, and store it on your Android device. The code
//Return to your app to download a file from Dropbox (the same one you just
@Override uploaded) is:
protected void onResume() {
super.onResume(); File f=new File(getFilesDir()+"/test.txt");
if(auth.getSession().authenticationSuccessful()) { if(!f.exists())
try { f.createNewFile();
auth.getSession().finishAuthentication(); is=new FileOutputStream(f);
AccessTokenPair tok=auth.getSession(). DropboxFileInfo e1=auth.getFile("/test.txt", null, is,
getAccessTokenPair(); null);
storeKeys(tok.key, tok.secret); //store the user's
tokens somewhere for reuse. Obtaining file metadata
}catch(Exception e){Log.d("info", "error", e);} This is arguably the most useful feature of Dropbox.
} } Most applications work by making decisions based
on the metadata of a given file. The Dropbox API
provides a method called metadata, which returns
Note: In the last step, you override the onResume information related to the file, like last modified,
function, which is the default callback when the control revision, path, etc. This information is handy when you
returns to your app after authentication. want to use previous versions of the file, or when you
need some form of version control. A sample use of the
At this point, you should have the Dropbox API set up metadata method is as follows:
on your Android system, and your session should also be
authenticated. If you have the user's tokens stored somewhere, Entry meta = auth.metadata("/test.txt", 1, null, false,
it is recommended that you start off this section by null);
reinitialising the access keys, to avoid user reauthentication.
You can do this by using the following lines of code: Now, putting everything together, the complete code
for the MainActivity.java of your Android project is
AccessTokenPair access = getStoredKeys(); available at: http://www.linuxforu.com/article_source_
//retrieve the stored tokens. code/march13/Dropbox_Android.zip.
auth.getSession().setAccessTokenPair(access); Writing apps that use the Dropbox API is
straightforward. The ease of use and flexibility of
the API make it a great way to provide cloud support
Note: In order to keep things simple, this tutorial has for your app. The API has support for many different
not implemented the storeKeys and getStoredKeys methods. platforms like Android, iOS, Python and Ruby,
They should ideally be implemented when developing and also has many third-party APIs, which extend
actual apps, as explained above. Dropbox support for most other platforms as well.
When you face a problem using the API, a great
Let’s now look at the most important part of the API— the file resource to look at is the Dropbox Developers' site, at
operations using Dropbox. https://www.dropbox.com/developers/start/, which has
a detailed overview about the use of the API.
Uploading a file Finally, the Dropbox API for Android is a quick
You can simulate reading a file using the ByteInputArray to and powerful way of allowing your applications to take
operate on the contents of a given string. Any file on your advantage of cloud storage. Android, being a prominent
device may also be used, by specifying the path to the file. A mobile development platform, needs tools to provide
call to the putFile method uploads the file to Dropbox. The seamless integration with cloud services, and the Dropbox
code for uploading a file is shown below: API does exactly this.

String content="Hello World!!";


By: Sahil Chelaramani
ByteArrayInputStream ip=new
ByteArrayInputStream(content.getBytes()); The author is an open source activist, who loves Linux,
Python and Android. He is a third-year student at the Goa
Entry e1=auth.putFile("/test.txt", ip, content. Engineering College (GEC).
length(), null, null);

56  |  March 2013 | OPEN SOURCE FOR YOU


Let's Try Developers

Introducing Celery for Python+Django


For background task processing and deferred execution in Python with Django, Web
developers and system admins can try out Celery.

A
synchronous mass email delivery, clickstreams 5. Retrying tasks.
like the number of hotels being watched or the 6. Enhancing the user experience.
number of likes, image resizing, video processing,
connecting to third-party APIs, enhancing the user Celery architecture
experience by executing tasks in the background rather than Task queues are used to distribute work across workers.
in the request-response loop, or executing a large number Celery task queues are based on the Advanced Message
of queries on a database for reporting... these are some of Queue Protocol. By default, it uses RabbitMQ as its
the scenarios in which you might want to use distributed job message broker; however, users are not limited to
queues in order to scale your application. Job queues also RabbitMQ but can use Redis, MongoDB or Beanstalk too.
separate the tasks to execute in real-time from those to be Figure 1 depicts this process.
scheduled for later. There are many use cases in which job Step 1: The AMQP receives a task from the client, which
queues help you achieve better user experiences. This article may be a Web app or a Python program.
introduces readers to the use of Celery to leverage this in Step 2: The workers constantly monitor the queue; as
Python and Django applications. soon as a message is dropped in the queue, one of the workers
Celery is based on distributed message-passing for picks it up and executes it.
asynchronous task queues/job queues. It is capable of Step 3: Depending on the configuration, it may or may not
supporting both real-time operations as well as scheduled save the result, once it has finished processing the execution.
jobs. The tasks can be run on a single worker or multiple
workers concurrently, to take advantage of multi- Setting up Celery
processing. Celery provides a powerful and flexible Although the choice of message broker is entirely your decision,
interface for defining, executing, managing and monitoring for this article, I assume we are using RabbitMQ (it's what I
tasks. A Celery system can consist of multiple workers and use in production, too). Before installing Celery, you must have
brokers, yielding high availability and horizontal scaling. RabbitMQ installed and running (start it with rabbitmq-server
Celery is suitable for applications that need to achieve any start). Then, all you need to install Celery is pip install –U celery
of the following: and you're ready to create your first program using Celery.
1. Execute tasks asynchronously. Make a project folder, and in it, create a file tasks.py,
2. Distributed execution of expensive processes. which will contain the tasks you want to perform using
3. Third-party API usage. Celery. Here's a sample program I’ll be using to fetch JSON
4. Periodic/ scheduled tasks. and read its contents:

OPEN SOURCE FOR YOU | March 2013  |  57


Developers Let's Try

To achieve the third, you need to configure this setting in


1 2
WebApp AMQP your tasks.py file, as follows:
W1

celery = Celery('tasks', backend='amqp', broker='amqp://


W2
guest@localhost//')

W.N.
Now the message queue is configured to save the result of
Workers the job. You can configure any back-end that you wish to use
3 here. This is how an immediate task is executed, though there
might be use-cases wherein you would want to run scheduled
Result Backend
jobs. To run a task as a scheduled task, you need to define the
schedule in the decorator of the task, as follows:
Figure 1: Block diagram of Celery architecture
@periodic_task(run_every=datetime.timedelta(minutes=1))
from celery import Celery def print_name():
print "Welcome to Tutorial"
#Configure celery.
celery = Celery('tasks', broker='amqp://guest@localhost//') The entry for period can be in the form of timedelta or
in the form of cron too. Now the command for running the
@celery.task #Decorator which defines the underlying daemon would be:
function as a celery task.
def fetch_data(json_name): celery worker -A tasks --loglevel=INFO –B # Where B means
sleep(10) running
url_to_open = "http://localhost/%s" % json_name
req = urllib2.Request(url_to_open) CeleryBeat is used for periodic tasks; if the argument –B
opener = urllib2.build_opener() is not passed, then it will not run periodic tasks.
f = opener.open(req) Next, let’s look at how we can integrate Celery with Web
data_fetched = simplejson.load(f) frameworks—in this case, Django.
print data_fetched
return data_fetched Integrating Celery with Django
Create a Django project using django-admin.py startproject
Now run the celery daemon from the terminal using the simple_django_project, and then create an app in the project
following command: with python manage.py start app celery_demo. Next, install
django-celery with pip install django-celery and then modify the
celery worker -A tasks --loglevel=INFO settings.py file to configure the message queue, as shown below:

These are the minimum arguments you need to pass to import djcelery
start the service. Other options like events, concurrency levels djcelery.setup_loader ()
and CeleryBeat can also be passed as arguments. You’ll learn
about them later in the article. INSTALLED_APPS = (
In another terminal, use the Python interpreter to call the ...
tasks module file: 'Djcelery' ,
)
>>> from tasks import add, fetch_data
>>> result = fetch_data.delay('sample.json') BROKER_HOST = "localhost"
BROKER_PORT = 5672
Next, track the task state/fetch the result. There are a variety of BROKER_USER = "myusername"
ways to achieve this, depending on your use case. For example: BROKER_PASSWORD = "mypassword"
ƒƒ You just want to execute the task, and don’t want to save BROKER_VHOST = "myvhost"
the result.
ƒƒ You might want to check if the task has finished Next, sync the database with python manage.py syncdb,
executing, or is still pending. after which create tasks.py inside the app. Now you can create
ƒƒ Do you want to save the result in the message queue itself,
or in MySQL or a back-end of your choice? Continued on page 60...

58  |  March 2013 | OPEN SOURCE FOR YOU


Guest Column Joy of Programming

S.G.Ganesh Why Care About Design Smells?


Design smells are poor solutions to recurring implementation
and design problems. This article gives readers an overview
on what design smells are, why we should be concerned about
them, and what we can do to fix them.

M
artin Fowler describes design smells as “structures
in the code that suggest (sometimes they scream
for) the possibility of refactoring.” Design smells java.util.Date
are known by various other names, such as code smells,
design flaws, design anti-patterns, etc. Martin Fowler
popularised the term ‘smells’ in his book on refactoring, and
this is the term known to most programmers today.
Why should we care about design smells? Because they
are ‘problem patterns’ that can negatively impact the quality java.sql.Date java.sql.Time
of the design, and ultimately affect the quality of the software.
One way of looking at the cost of taking short-cuts to address
immediate concerns is that the project accumulates ‘technical Figure 1: An example of the ‘refused bequest’ smell from JDK
debt’. In other words, when we take short-cuts and don’t do
the right thing, we have to pay a price for it—a form of ‘debt’. means ‘not accepting inherited property’. In the context
Over a period of time, if not addressed, this debt accumulates of object-oriented programming, a refused bequest means
and when it crosses a threshold, it can result in completely ‘derived classes reject what is inherited from the base class’.
derailing the software project. The stories of such failed Why is it a problem? Because it violates Liskov’s Substitution
projects are all too common. Note that this phenomenon is Principle (LSP), which is a cardinal rule in OO programming/
common in both commercial and open source projects. design. LSP states that, “We should be able to use a base
Consider a software development project that was led reference/pointer without being aware of whether it's pointing to
by an inexperienced designer. Assume that the project was a derived object or not.” When there is no logical or conceptual
delivered under tight schedules, and the main objective of the ‘is-a relationship’ shared between the base and derived classes,
project was to satisfy all the functional requirements elicited we cannot use a base pointer/reference without knowing if it is
from the customers, without providing much focus on Non- pointing to the base type object or the derived type object.
Functional Requirements (NFRs). This short description of Let us look at an example of this smell from the open
the project is in fact sufficient for you to understand that the source Java Development Kit (JDK). The java.util.Date
code will have numerous smells! Now, let’s explore why. class supports both date and time functionality. The class has
One cause of design smells is when the designer makes two derived classes: java.sql.Date and java.sql.Time, which
wrong design decisions – a mistake that inexperienced represent date and time responsibilities (see Figure 1). The
designers are prone to make. Another cause is tight java.sql.Date class supports only date-related functionality,
development schedules. When a project is developed under and throws exceptions if time-related functionality is invoked!
stiff and implausible deadlines, programmers and designers Consider the following code segment, for example:
take numerous ‘short-cuts’, i.e., they do what works instead
of doing what is right. From the code, you can observe these java.util.Date date1 = new java.util.Date(2013, 01, 01);
short-cuts in the form of design smells. When functionality System.out.println(date1.getSeconds());
completion is the main focus of software development and // prints 0 since zero seconds elapsed
when NFRs are not given due importance, it results in sloppy // from the start of the day
design, which gets noticed as design smells.
Let us discuss a specific smell to get a better java.util.Date date2 = new java.sql.Date(2013, 01, 01);
understanding of the subject. System.out.println(date2.getSeconds());
One of the smells described by Martin Fowler is the // throws java.lang.IllegalArgumentException
‘refused bequest’. The word ‘bequest’ means ‘a gift of // since time related methods
personal property by will’. So, the term ‘refused bequest’ // are not supported in java.sql.Date

open source for you | march 2013 | 59


Joy of Programming Guest Column

As you can see, the ‘refused bequest’ smell respectively, to avoid having the same names (though in
can have a real effect on the users of the software: different packages).]
when programmers use these two classes, they can Unlike ‘refused bequest’, most other smells don’t have
unexpectedly get an IllegalArgumentException. Since visible or directly perceivable effects on the end software
JDK is a public API, it is difficult to fix this mistake, quality. However, that doesn’t mean they are not important. An
since changing the interface of these classes will result in analogy would be the internal cracks in a bridge or a building.
breaking backward compatibility. These cracks may not immediately cause the structure to
So how can one fix (i.e., refactor) this smell? Clearly, collapse, but if left unaddressed, they would develop further
java.sql.Date and java.sql.Time require parts of the and will eventually bring down the structure. Similarly, design
functionality from java.util.Date. So, if these classes use smells, whether their impact is externally perceivable or not,
composition and contain an instance of the java.util.Date have a real impact on the quality of the software. If they are left
class, this problem could be solved. unaddressed, they can wreak havoc and eventually result in the
[As an aside, it is a bad practice to use the same name failure of the software project.
for both the base and derived classes—the name of both
base and derived class is Date, in this case. The compiler
accepts it because the base and derived classes are located By: S G Ganesh
in different packages. To address this problem, the names The author works for Siemens (Corporate Research &
of the classes java.sql.Date and java.sql.Time could be Technologies), Bengaluru. You can reach him at sgganesh at
gmail dot com.
changed to java.sql.SQLDate and java.sql.SQLTime

Continued from page 58...


a URL entry in urls.py that maps to a function in view, which Monitoring Celery
will be used to call the tasks that we have defined in tasks.py. First of all, to manage Celery, you need to switch events on—
Run the Celery daemon now, with the following commands: start the Celery daemon with the option -E, so the command
would become python manage.py celeryd -l info -c 2 –B –E.
python manage.py celeryd -l info -c 2 # Without CeleryBeat This starts to capture events, and now you can monitor your
python manage.py celeryd -l info -c 2 –B # With CeleryBeat workers, task states, etc, using:
ƒƒ Celery command-line utilities
This is a simple method to integrate Celery with Django. ƒƒ Django-Celery admin
ƒƒ Flower: A real-time Celery Web-monitor
Adding multiple workers Celery is one of the most stable systems available. It is very
Now scaling workers is not a concern—all you need is to easy to get started with, very simple to configure, fast at executing
ship your tasks app to a new machine, set up Celery and just millions of tasks, and flexible, as almost any component of
start running it. The Celery daemon will start talking to the Celery can be used on its own, changed, or configured as per
message queue, and multiple workers will start executing requirements. Some other great features of Celery are:
tasks. Celery makes sure that your task is executed once, and 1. Designing workflows: To chain multiple tasks, you can use
not by multiple workers. canvas to divide your tasks into sub-tasks.
2. Webhooks: To enjoy the power of Celery using other
Monitoring languages like PHP, Ruby, etc.
As your application grows, so will the need to make it more 3. Routing: Send tasks to a particular queue rather than any
stable and robust. To achieve this, you need to monitor all the queue, and to implement all the routing mechanisms that
components of your Celery set-up. the message broker supports.
There are loads of other great features of Celery, which are
beyond the scope of this article. I am sure that if you have a
Monitoring RabbitMQ use-case, chances are that you can do it with Celery.
To check the number of messages in your queues via the
console, simply run rabbitmqctl-status, which will list all By: Konark K. Modi
queues, with the number of messages in each queue. For The author works as a senior systems engineer with Website
a GUI-based output, you can simply install the RabbitMQ Operations at Makemytrip.com, and is a technology enthusiast at
heart. Follow him at: @konarkmodi.
management plug-in.

60 | march 2013 | OPEN SOURCE FOR YOU


Let's Try Admin

Going Virtual With OpenVZ


This article is an introduction to OpenVZ, an open source container-
based virtualisation solution for Linux.

I
n computing, virtualisation is the creation of a virtual Storage virtualisation: This is the union of multiple
version of a hardware platform, operating system, storage network storage devices into something that appears to be a
or network resource. Let's briefly look at each type. single storage unit. It provides abstraction on top of various
Hardware virtualisation: This provides an storage techniques, and hence enables flexibility.
environment to create virtual machines and there are three Memory virtualisation: This decouples RAM from
different types—full, partial, and para-virtualisation. In individual systems in the data centre, and aggregates them
full virtualisation, each OS instance and its applications into a virtualised memory pool, which can be made available
run in a separate VM on top of virtual hardware. The to any computer in the virtual environment.
computer system is available as a software construct with Software virtualisation: Broadly, we can categorise this
the same behaviour as a physical computer system. There into three types:
are two types of full virtualisation: bare metal, by which ƒƒ OS-level virtualisation, by which multiple virtualised
the hypervisor runs on the underlying hardware, without a environments (multiple isolated user-space instances) can
host OS; and hosted virtualisation, by which the hypervisor be hosted within a single instance.
runs on top of the host OS (such as Windows or Linux). ƒƒ Application virtualisation is related to hosting individual
In partial virtualisation, the virtual machine simulates applications separated from the underlying OS.
multiple instances of much of an underlying hardware ƒƒ Service virtualisation is emulating the behaviour of
environment—specifically, address spaces—but not the dependent components that are needed to execute an
entire OS. In computing, para-virtualisation is a technique application for development or testing purposes.
that represents a software interface to virtual machines Data virtualisation: This is the process of abstracting
that is similar, but not identical to, that of the underlying databases, files, etc, with the use of a single data access layer.
hardware resources. Desktop or client virtualisation: This is the
Network virtualisation: Here, the physical network is virtualisation technology of separating the desktop from the
segmented into logical parts to provide network virtualisation physical machine.
by combining network resources such as switches, NICs,
firewalls, load balancers, VLANs, storage devices, Ethernet OpenVZ
and Fiber Channel, as well as network functionality into OpenVZ is a container-based virtualisation solution for Linux.
a single, software-based network administrative entity. In It creates multiple isolated and secure Linux servers known as
internal network virtualisation, a host is configured with guest Virtual Private Servers (VPS) on a single physical machine.
containers to create a virtual network in a box. In external Figure 2 depicts its architecture. Each container or VPS performs
network virtualisation, networks are shared or sub-divided and executes instructions exactly like a stand-alone server. A
into virtual networks using VLANs and switches. VPS has root access, users, processors, memory, IP addresses,

OPEN SOURCE FOR YOU | March 2013  |  61


Admin Let's Try

VIRTULIZATION
Hardware Network Storage Memory Software Data Software
• Full • Internal • Block • Application • OS Level • Database • Virtual
• Bare-Metal Network Virtulization Level • Application desktop
• Hosted Virtulizaion • File • OS Level • Service Infrastructure
• Partial • External Virtulization Integration • Hosted Virtual
• Para Network Desktop
Virtulization

Figure 1: Types of virtualisation

files, system libraries and configuration files, applications, ports, ƒƒ OpenVZ has undergone a thorough security audit, which
and routing rules. OpenVZ is an open source product available was performed by Solar Designer.
under the GNU GPL (General Public License). ƒƒ IPsec is supported inside containers since kernel version 2.6.32.
So how do OpenVZ containers differ from the traditional ƒƒ OpenVZ technology scales up to thousands of CPUs and
virtual machine architecture? Well, they run on the same OS terabytes of RAM.
kernel as the host system, but allow multiple Linux variants in Therefore, the benefits include near-zero overhead,
individual containers. This single-kernel implementation enables strong isolation, improved flexibility, efficiency, and quality
running containers with much less overhead. Hence, OpenVZ of service. Note that Oracle, DB/2, WebLogic, WebSphere
offers higher efficiency and manageability than traditional and other big applications run efficiently inside OpenVZ
virtualisation technologies. It uses a single patched Linux kernel, containers. Applications and services need not be OpenVZ-
and as a result can run only Linux—and doesn't have the overhead aware. Along with standardised server management, note
of a hypervisor (a tiny part of the CPU resources is used on that OpenVZ kernels are based on Red Hat Enterprise Linux
virtualisation—around 1-2 per cent); it is fast and efficient. kernels, which are conventional and well maintained. By
default, OpenVZ restricts container access to physical devices,
OpenVZ features making containers hardware-independent.
The main features are listed below. Its limitations are that OpenVZ supports only Linux
distributions and not Windows. The /dev/loopN devices are
P Root access
Users, Processors,
Root access
Users, Processors,
P Root access
Users, Processors,
Root access
Users, Processors,
often restricted in deployments, which restricts the ability to
H H
h o Memory, Files,
Applications
Memory, Files,
Applications
h o Memory, Files,
Applications
Memory, Files,
Applications mount disk images. OpenVZ is restricted to providing only a
y s Virtual Private Server Virtual Private Server
y s Virtual Private Server Virtual Private Server
t t few VPN technologies based on Point-to-Point Protocol (PPP),
s s
i
OpenVZTemplate
i
OpenVZTemplate
such as PPTP Point-to-Point Tunnelling Protocol (PPTP),
Open VZLayer Open VZLayer
c #
Host OS
c #
Host OS
Layer 2 Tunnelling Protocol (L2TP) and TUN/TAP (virtual
a 1 a 2
Hardware Hardware network kernel devices).
l l
Network Network
OpenVZ Use-Cases
Figure 2: OpenVZ architecture Development Developers and testers need access to dif-
and testing ferent Linux variants to develop and test an
ƒƒ OpenVZ uses a single kernel (Linux) implementation and application—hence, testing and develop-
hence it is as scalable as the Linux kernel. ment groups often require a lot of hardware
resources. By using OpenVZ, developers
ƒƒ Virtualisation overhead is very low (approximately
and testers can create multiple partitions
1-2 per cent). with different Linux variants and configura-
ƒƒ Live migration of VPS and the checkpointing feature tions residing on one physical host.
allows users to migrate a VPS from one physical host to
Hosting Useful to have isolated users and cost-
another without needing to shut down the VPS. efficient containers that behave like a
ƒƒ Resource management allows OpenVZ to share server, to support multiple versions of an
available host system resources among VPSs in an application, and offer easy administration.
efficient manner; it guarantees QoS—not only providing
performance, resource isolation, and protection from A comparison of OpenVZ with its counterparts
denial-of-service attacks, but also collecting usage How does OpenVZ compare with other virtualisation
information to monitor the system’s health. technologies such as Xen, KVM, VirtualBox, VMware Player
ƒƒ By default, direct access to hardware is not available. and VMware Workstation? Table 1 gives a comparison.

62  |  March 2013 | OPEN SOURCE FOR YOU


Let's Try Admin
Table 1
VMware VMware ESX/
OpenVZ Xen KVM VirtualBox
Player ESXi

Type of hypervisor Hosted Bare-metal Hosted Hosted Hosted Bare-metal

Proprietary, free
of charge for
GPL
License GPL GPL GPL version 2 personal non- Proprietary
version 2
commercial
use
Windows, Linux,
NetBSD, FreeBSD,
Host OS sup- Mac OS X x86, Windows,
Linux Linux, Linux, Il- No host OS
ported Solaris, FreeBSD, Linux
Solaris lumos
eComStation
Windows,
Linux, Sola-
Windows,
ris, FreeBSD,
FreeBSD, Linux, Sola-
DOS, Linux, Mac OSx86 (as
NetBSD, ris, FreeBSD,
FreeBSD, OS X Server, FreeBSD), vir-
Linux, OSx86 (as
Guest OS sup- Linux vari- Linux, FreeBSD, Haiku, tual applianc-
Solaris, FreeBSD), vir-
ported ants Solaris, OS/2, Solaris, es, Netware,
Windows tual appliances,
Windows Syllable, Win- OS/2, SCO,
XP & 2003 Netware, OS/2,
dows BeOS, Haiku,
Server SCO, BeOS,
Darwin, others:
Haiku, Darwin,
run arbitrary
OS
USB support Yes - Yes Yes Yes Yes

Live migration Yes Yes Yes Yes No Yes


Yes (Vz-
Snapshots per VM Yes Yes No Yes
dump)
GUI Yes (EasyVZ) Yes Yes Yes Yes Yes

Installation and configuration vzkernel-headers.i686 : Header files for the Linux kernel for
1. Download the repository file and (all these steps must be use by glibc
performed as the root) put it in the ‘/etc/yum.repos.d’ directory: Name and summary matches only, use "search all" for
everything
wget http://download.openvz.org/openvz.repo
4. Install vzkernel.i686 with yum install vzkernel and it will
2. Import the GPG key that belongs to the repository: automatically update the GRUB bootloader.
5. Edit /boot/grub/menu.lst to verify the OpenVZ kernel
rpm --import http://download.openvz.org/RPM-GPG-Key-OpenVZ entry.

3. Find the OpenVZ kernel package: title OpenVZ (2.6.32-042stab072.10)


root (hd0,0)
yum search vzkernel kernel /vmlinuz-2.6.32-042stab072.10 ro
vzkernel.i686 : The Linux kernel root=UUID=954e09c7-75ba-426d-aeca-c79d00ed3d16 rd_NO_LUKS
vzkernel-debug.i686 : The Linux kernel compiled with extra rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16
debugging enabled crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb
vzkernel-debug-devel.i686 : Development package for building quiet
kernel modules to : match the debug kernel initrd /initramfs-2.6.32-042stab072.10.img
vzkernel-devel.i686 : Development package for building kernel title CentOS (2.6.32-279.el6.i686)
modules to match: the kernel root (hd0,0)
vzkernel-firmware.noarch : Firmware files used by the Linux
kernel 6. After installing the OpenVZ kernel, you need to install

OPEN SOURCE FOR YOU | March 2013  |  63


Admin Let's Try

user-level tools for OpenVZ (yum install vzctl vzquota); The client can be run on the same machine:
vzctl is used to perform different tasks on VPSs such as
Start, Stop, Create, Destroy, Set parameters, etc, while cd gui/
vzquota is used to manage the VPS quotas. python ezvz.py
7. Edit /etc/sysctl.conf and add or modify the following settings:
8. Load the new settings with sysctl –p Monitoring system resource consumption
9. Open /etc/vz/vz.conf and set NEIGHBOUR_DEVS to all. It is possible to check the system resource statistics from within a
10. SELinux needs to be disabled; edit /etc/sysconfig/selinux VPS, which allows you to understand what particular resource limits
and set the value of SELINUX to disabled. are preventing an application from starting. These statistics report the
11. Reboot the system. You can check the release with uname current and maximum resources consumption for the running VPS,
–r and should get something like 2.x.xx-xxxstabxxx.x. and can be obtained from the /proc/user_beancounters file:
12. OpenVZ is installed in a way that it is possible to boot the
system either with OpenVZ support or without it. At present, vzctl exec 101 cat /proc/user_beancounters
it is not possible to create VPSs. Different VPSs can run
different versions of Linux. A VPS is based on a specific Monitoring memory consumption
OS template; OS templates are packages available with Users can monitor memory parameters for the hardware node and
OpenVZ. You need to install the corresponding OS template for particular VPSs:
in OpenVZ to create a VPS. After you install at least one
OS template, you can create any number of VPSs with the vzmemcheck –v
help of standard OpenVZ utilities, and can configure their
network, and work with these VPSs as you work with fully The –v option is used to display the memory information for
functional Linux servers. First download a CentOS template: each VPS.

wget http://download.openvz.org/template/precreated/centos- Enabling VPN for a VPS


6-x86_64.tar.gz A Virtual Private Network allows you to establish a secure network
connection over an insecure public network. It is possible to set up a
13. Copy the downloaded template into /vz/template/cache. VPN for a separate VPS via the TUN/TAP device.
14. Each VPS must have its own unique ID (here, we used 1. The tun module needs to be loaded before OpenVZ is started;
121) and create the VPS with: you can load it with:

vzctl create 121 --ostemplate centos-6-x86_64 --config basic lsmod | grep tun or modprobe tun

15. Set a hostname and IP address for the VPS: 2. Allow the VPS to use the TUN/TAP device:

vzctl set 121 --hostname testvps.com --save vzctl set 121 --devices c:10:200:rw –save
vzctl set 121 --ipadd 192.168.0.201 –save
3. Create the subsequent device inside the VPS and set the proper
16. You can now start the VPS with vzctl start 121; stop it permissions.
with vzctl stop 121 and restart it with vzctl restart 121.
References
EasyVZ: OpenVZ management GUI
[0] http://en.wikipedia.org/wiki/Comparison_of_platform_
EasyVZ is a GUI management console for OpenVZ. It lets virtual_machines
you easily create, destroy, manage and monitor VPSs. The [1] http://en.wikipedia.org/wiki/Network_virtualization
pre-requisites for using it are: [2] http://en.wikipedia.org/wiki/Storage_Virtualization
1. You have to have an OpenVZ-enabled kernel running. [3] http://en.wikipedia.org/wiki/Memory_virtualization
[4] http://wiki.openvz.org/Main_Page
2. All OpenVZ utilities need to be installed. [5] http://wiki.openvz.org/VPS_vs_Dedicated
3. To create new VPSs, you need templates installed in /vz/ [6] http://wiki.openvz.org/Use_cases
template/cache. [7] http://sourceforge.net/projects/easyvz/
The source distribution contains two directories; the [8] http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf
backend directory contains the server source code. Start the
server on the OpenVZ node that you intend to manage: By: Mitesh Soni
The author is a Technical Lead at iGATE. He is in the Cloud
cd backend/ Services (Research & Innovation) Group and loves to write about
new technologies. Blog: http://clean-clouds.com
python server.py

64  |  March 2013 | OPEN SOURCE FOR YOU


Overview Admin

Ensuring Security on
Open Source Virtual Platforms
We must thank IT virtualisation, as it led us to cloud technology. Today’s IT infrastructures are
already running their mission-critical business applications on virtual machines. Like physical
infrastructure, virtualisation is also cursed with cyber security challenges. This article talks
about a typical open source virtualisation solution, along with the steps to secure it.

A
s we know, a virtual server is a resource-based machine, whereby each virtual machine (VM) can run
instance of an operating system. It consumes the its own (copy of an) OS. Since this layer works together
pre-configured amount of CPU speed, memory and with the HAL, it provides great flexibility for us to select
disk space from the physical hardware. An important low- the OS, or assign a dedicated CPU and other resources to
level software component called HAL (Hardware Abstraction a particular machine. Figure 1 shows the basic building
Layer) sits in between the physical hardware and the operating blocks of the virtualisation architecture. A component
system (OS). HAL is responsible for converting OS calls into called the virtual session manager runs in parallel with
a set of CPU instructions and vice-versa, thus enabling high- guest instances in order to allocate system resources
level application stacks to run smoothly. HAL also makes the and monitor usage. In theory, there are three types of
OS independent of the hardware components, and thus makes virtualisation. The first type is called a hypervisor, which
it portable across multiple physical platforms. means it is fully virtual, wherein all guest instances are
Virtualisation is achieved by adding another low- kept separate from each other. In the second type, called
level software layer along with HAL, which allows us to para-virtualisation, the guest systems know about each
simulate multiple virtual machines on a single physical other. This is achieved by semi-abstraction of the physical

OPEN SOURCE FOR YOU | March 2013  |  65


Admin Overview

layer that communicates with the HAL and guest OSs, thus
Guest Application infecting the entire infrastructure hosted on a physical server.
There are viruses specifically designed for this purpose. The
most critical moment for causing hypervisor infection is
Guest Instance (OS) during the installation phase.
Guest OS security: From a system administrator’s
point of view, the VMs are pretty much the same as physical
Host OS Virtualization Layer servers. Hence, all the security management techniques for
physical machines apply to the VMs too. Leaving guest OSs
unpatched, or not performing the correct security lockdown,
Physical Hardware
can result in serious vulnerabilities.
Guest communication security: It is highly
Virtualization Layers
likely that guest OSs hosted on the same virtualisation
Figure 1: Virtualisation architecture—the basic blocks infrastructure will communicate with each other. This
TCP communication is usually routed through a redirector
and OS layers. The benefit in this method is that it takes a service, which is part of the hypervisor layer. Hence,
lower toll on system resources, resulting in faster guests— there is no packet transmission on the physical network
but it compromises on security. The third type is called card of the physical server hosting the infrastructure.
OS-level virtualisation, in which the abstraction layer While this improves communication speeds, it introduces
simulates multiple instances of the host OS. Hypervisor is a limitation whereby Intrusion Detection Systems cannot
the most famous type of installation. detect network-layer problems. This limitation needs to be
addressed correctly, else it can make serious vulnerabilities
Xen open source virtualisation invisible to security monitoring.
As we all know, the open source world has been blessed with Guest hopping attacks: In this type, the attacker
Xen, which provides the great features of an industry-standard can gain control of one of the guests (VMs), and then
hypervisor technology. Xen allows us to create multiple guest make use of a famous exploit called ‘hypervisor escape’,
instances and seamlessly schedules CPU time, and partitions which can let attackers traverse from one guest system to
memory spaces. The Xen architecture contains three main another (called guest hopping), thus infecting the whole
components: the hypervisor layer, the domain manager and infrastructure. This attack is usually used to create zombie
the guest instances. machines, which are then used to plant a distributed denial
The Xen domain manager is a kernel component that runs of service attack.
before any other guest instance can be started. It provides Management console attacks: Each virtualisation
functions such as allowing the creation of child domains, infrastructure provides a Web-based console interface for
creating and managing virtual devices for guest domains, and administrators to add/remove machine resources or to
also controlling network and disk resources. Guest instances monitor the guest OSs. This console can introduce Web-layer
are not allowed to access hardware resources directly—in attacks, which can help attackers gain control of the virtual
fact, they communicate with the domain manager through infrastructure.
proxy calls to ask for access. They also update the domain Hyperjacking: In this rare type of attack, the attacker
manager about their online or offline status. gains control of the physical host, and creates a bogus VM.
Alternatively, the attacker can get hold of an existing test virtual
Securing open source virtualisation instance, which was deployed during the initial installation
As we discussed earlier, the OS HAL layer and hypervisor phases. Such instances are usually ignored, and hence left
components work hand-in-hand to achieve virtualisation. un-patched, thus making for vulnerable components. Attackers
However, it also means that the invasion of any of these can make use of such machines for malicious purposes. Besides
components can effectively make the entire virtual layer and these that are specific to virtualisation servers, others, such
guest instances vulnerable to cyber attacks. It is very important as authentication attacks, man in the middle, packet crafting,
to keep in mind that virtualisation is a software component, and denial of service, etc, also apply.
can be affected by programmatic as well as man-made cyber
attacks, just like any physical server infrastructure. Securing a Virtualisation security
virtual infrastructure is done by effectively securing each of the The following table shows the various system components
layers that form it. Let's first talk about typical attacks that can of the virtualisation infrastructure, and the corresponding
render a virtualisation infrastructure insecure. security layers required for end-to-end security.
Hypervisor attacks: This is a serious type of attack,
whereby the attacker exploits a vulnerability of the hypervisor Continued on page 69....

66  |  March 2013 | OPEN SOURCE FOR YOU


Let's Try Admin

A Look at the Basics of LVM


This article deals with Logical Volume Management (LVM) and looks at how to set it up.

M
any years ago, when 2 GB of storage was Within these VGs, you can create partitions, called Logical
considered a lot, I beamed with pride after installing Volumes (LVs). The operating system will never know the
two hard disks, each 2 GB. With 4 GB, I was sure difference; the behaviour is the same as accessing any regular
of never running low on space. Such pride is shortlived, as disk/partition. The benefits of LVM over regular filesystems
we know. Down the road, it was a limitation when I wanted include: dynamic resizing of VGs, and live snapshots of
to install more software into my Linux distro (those were the partitions without unmounting them. Let's now jump right in to
days when Red Hat Linux was the thing to have) and the disk how to set up LVM on our system. The OS I'm using for this is
that had my root partition just didn’t have the space. There Ubuntu 12.10. There are two scenarios in which one would set
had to be some way to resolve the issue; after all, my system up LVM: while performing a Linux install, or post-installation.
had a total of four gigs, right? Was there a way I could, well, LVM can be configured using command-line and GUI tools. I
‘combine’ the two drives? Yes, there was: three letters of pure shall walk you through all of this.
genius, LVM. Logical Volume Management, put simply, is a
concept that combines physical drives and makes them appear
as contiguous spaces.

The basics of LVM


LVM is a virtual layer that sits sandwiched between the
operating system and your storage devices, i.e., hard disks. It
creates groups of your hard disks, called Volume Groups (VGs).

OPERATING SYSTEM AND DATA

LOGICAL VOLUMES

PHYSICAL DISKS AND


VOLUMES

Figure 1: What LVM actually does (is) Figure 2: Starting LVM partitioning

OPEN SOURCE FOR YOU | March 2013  |  67


Admin Let's Try

Figure 5: Initialising a disk/entity

Figure 3: The LVM configuration tool

Figure 6: Initialising a disk/entity

Figure 4: Initialising a disk/entity

Setting up LVM during Install


Ubuntu’s default installation image does not allow LVM,
so we will use the Ubuntu Alternate Install disc. Grab the
alternate ISO from the Ubuntu Download page (it's under
‘Additional options’) and boot from it. I would like to go
on record to state that I was able to do all the steps below
using the standard ISO of Ubuntu 12.10 as well—which
means the alternate ISO is not required, even though
Internet sources claim one must use the alternate ISO for Figure 7: Unused space now available in the existing VG
LVM support.
On the disk partitioning screen (Figure 2), select ‘Erase Let's install the GUI tool ‘system-config-lvm’. Initially
disk and install Ubuntu’; check the ‘Use LVM with the new available only from the Fedora RPM, this tool is now supported
Ubuntu installation’ and click ‘Continue’. After selecting from the Ubuntu repos, thus saving you a lot of work including
the LVM partitioning option on the previous screen, the ‘transcoding’ the RPM to DEB using alien. To install it is now
installer will automatically select the main hard drive to use as simple as issuing the following command at a terminal:
for initialising the LVM set-up. The installer will then write
a basic layout to disk. That’s about it. The installer now sudo apt-get update
installs GRUB—which happens in the MBR, since the BIOS sudo apt-get install system-config-lvm
can’t read LVMs. Any extra /boot partition required will
automatically be created, and the installer will then proceed Once installation is complete, fire it up from the main
with the rest of the installation. menu (search for ‘LVM’), or you can launch it from a
It’s super easy, isn’t it? Now, using LVM tools, you can terminal with sudo system-config-lvm. The application's main
configure your LVM to add or remove more disks, extend or screen is shown in Figure 3.
shrink volumes, etc. Next, I will show you how to add a new disk and partition
(physical volume) to the volume group, and extend the
Setting up or configuring LVMs existing (root) logical volume. So, let’s touch upon adding
in an existing system and editing logical volumes.
I will show you how to configure or modify the previously Adding a new disk/partition to an existing volume
created volumes. The same steps may be used to set up a fresh group: The uninitialised disk is shown in the ‘Uninitialised
LVM configuration if you have Ubuntu already installed. Entities’ branch; so initialise it by hitting the ‘Initialise

68  |  March 2013 | OPEN SOURCE FOR YOU


Let's Try Admin

Entity’ button, dragging the slider. Drag as required, and hit ‘OK’! This
and the tool will add the unused space to your LV.
proceeds to warn This is how LVM configuration is done using the GUI.
you and perform The command-line provides you with a comprehensive set
initialisation of commands to do this, but it's risky for a new user, since a
(Figures 4 and 5). wrong command can cause you to lose data.
Once initialised, LVM is very useful, since you can add, extend and
the partition is remove volumes irrespective of the physical disks in the
moved into the system; you can combine disks to appear as single drives.
‘Unallocated LVM eases upgrading and extending disk capacities.
Volumes’ (Figure Fundamentally, working with LVM is almost the same
6) branch. Here, as working with regular partitions; the only difference is
click the ‘Add to that in the case of LVM, we deal with a ‘logical’ space
Existing Volume and its relation to ‘physical’ space—also known as
Group’ button, storage virtualisation. I hope this article has whetted your
which prompts Figure 8: Editing a Logical Volume appetite to explore storage technologies in greater depth.
you to select the Have fun!
volume group (VG) to which you will add this partition.
This adds unused space to your ‘ubuntu’ VG (Figure 7). By: Siddharth Mankad
Then edit an LV, and add this unused space into it (Figure The author is a new media designer, with an affinity for
8). Select the LV adjacent to the unused space, and hit the physical computing, computer software and code, as well
Edit button. Note that you can now extend the volume by as country music.

Continued from page 66....

Virtualisation layer Security implementation each instance may run a different make or version. Hence,
Physical host • Physical security a unified patch-management solution that can cater to
• Firewall heterogeneous systems needs to be deployed. The same is
• Intrusion Detection System true for the anti-virus software.
Host OS • OS hardening Besides patching, each OS should be hardened and
• Access control configured for correct security accesses. As mentioned earlier,
Virtual HAL • Install from genuine source the communication between guest instances is not visible on
• Avoid stray instances the physical network interface; hence, an intrusion detection
• Apply security patches system should be deployed. The correct way to do this is to
Guest OS • OS hardening dedicate one guest instance on each virtual infrastructure
• Access control for the purpose of packet sniffing and intrusion detection.
• Patching Physical security for virtual servers is very crucial, because
Guest application Application-level security installa- stealing a physical machine means stealing more than one
tions and controls VM, thus resulting in serious data theft or infrastructure
breakdown. For VMs hosted in the demilitarised zone, a
Implementing security for a virtualisation infrastructure proper perimeter defence system comprising firewalls and
is a methodical and multi-step process. We need to begin UTM devices should be deployed too.
with the physical infrastructure, followed by the installation
and the hardening of OS on it. If Xen server is being
By: Prashant Phatak
installed from scratch, getting an infection-free copy of
The author has over 22 years of experience in the field of IT
the distribution is critical. The next step is to configure
hardware, networking, Web technologies and IT security. Prashant
user-level security, enabling access only to administrators, runs his own firm named Valency Networks in India (http://www.
to create, delete or modify the guest OSs. It should be valencynetworks.com) providing consultancy in IT security design,
ensured that no stray guest instances are left lingering on security penetration testing, IT audits, infrastructure technology
and business process management. He can be reached at
the infrastructure, and should be deleted if found. While
prashant@valencynetworks.com.
configuring guest OSs, it is important to remember that

OPEN SOURCE FOR YOU | March 2013  |  69


Admin Let's Try

Deploying a Ticket Request


System with OTRS
In the current business scenario, customer management plays a major role in the success or failure
of a company. Tracking issues and giving clients the necessary support and assistance in real time
is crucial in providing quality service. This article covers an open source solution to help you in
serving your customers with greater efficiency.

O
TRS (Open-source Ticket Request System) is free install mysql* command to install the MySQL database, and
and ticket-free system software that can be used to then start the service with service mysqld start.
provide your customers a platform to raise issues that Now all the required packages are installed, and it’s time
need to be resolved. This article leads you through the steps to to start the database configuration for OTRS. Follow the steps
deploy it and get a feel for it. given below:
OTRS is based on Perl, so you must have Perl installed
on your system. I am using RHEL6, which bundles the cd /opt/otrs
Perl packages, so all I need is to issue the yum install perl*
command, and Perl will be installed. Now, you need to Open /opt/otrs/README.database to assist you in
download OTRS before you can install and test it. Get it configuring the database for OTRS. I am using MySQL, so
from http://www.otrs.com/en/open-source/get-otrs/software- I’ll go with the MySQL steps of this file. Issue the following
download/. Once you have downloaded it, follow the steps commands at your command prompt:
indicated below:
ƒƒ Double-click the RPM file or install it using the rpm mysql -u root -p -e 'create database otrs charset utf8'
command. It will also ask for a few dependencies to be mysql -u root -p otrs < scripts/database/otrs-schema.mysql.
installed, which you can do. sql
ƒƒ OTRS runs on a Web-based interface, so you need to install mysql -u root -p otrs < scripts/database/otrs-schema.mysql.
Apache using the yum install httpd* command, and start the sql
httpd service using the service httpd start command. mysql -u root -p otrs < scripts/database/otrs-initial_insert.
ƒƒ Now, you need to install your database server—issue the yum mysql.sql

72  |  March 2013 | OPEN SOURCE FOR YOU


Let's Try Admin

Figure 1: OTRS first screen


command. Also make sure to adjust your firewall and
SELinux settings, or turn them off. Next, point your browser
to http://localhost/otrs/index.pl and you’ll get the login screen
of OTRS. Log in with the OTRS admin account username
root@localhost and the default password root.
After successfully installing OTRS, it’s time to see it
working. Let’s create a customer and then this ‘customer’ can
raise a ticket. Click the CUSTOMERS tab in the home screen,
and fill in the necessary details of that customer and submit it.
Now point your browser to http://localhost/otrs/customer.pl
and log in with the newly created customer credentials. I have
created a user named vinayak and logged in with this account.
Once logged in, just click New Ticket to raise a ticket. Once
you’ve typed your problem statement, submit it, so that it can
be tracked and resolved.
Again log in to the admin account as before, and under
the New Tickets section, you’ll see the ticket the customer
had raised. Just click the link to view it. If you click Lock,
it signifies that this ticket is currently being processed—
someone's taking care of it. So here, the cycle of raising a
ticket and acknowledging it is complete. Now we can take the
necessary actions to resolve this problem.
This was a basic overview of how OTRS can raise and
manage trouble tickets. I can't cover all aspects of this
cool tool here, so I suggest you visit its website for more.
Figure 2: Raising a ticket You can also test-drive OTRS at http://www.otrs.com/en/
software/otrs-help-desk/online-demo/. Keep exploring and
mysql -u root -p otrs < scripts/database/otrs-schema-post. wait for my next article!
mysql.sqlmysql -u root -p -e 'GRANT ALL PRIVILEGES ON otrs.*
By: Vinayak Pandey
TO otrs@localhost IDENTIFIED BY "otrs" WITH GRANT OPTION;'
mysql -u root -p -e 'FLUSH PRIVILEGES;' The author is a Red Hat Certified Engineer on RHEL6, spending
most of his time exploring open source tools and technologies,
while fine tuning his Linux machine.
Start the OTRS service using the service otrs start

OPEN SOURCE FOR YOU | March 2013  |  73


Admin Let's Try

Kick-Starting
Virtualisation with VirtualBox

This article looks at some quick steps for installing, configuring and working with
Oracle VM VirtualBox.

V
irtualisation has been growing in popularity ever since deleted after some time. This actually helps save time and the
it first appeared on the scene in the early 1960s, as an cost of procuring unnecessary hardware.
effective and reliable way to share compute resources There are a lot of open source as well as commercial OS
across mainframes by the creation of multiple virtual machines, virtualisation software on the market, each with its own pros
each running with their own defined RAM and disk space. and cons. Here’s a quick comparison between some of the most
Virtualisation software adoption gained impetus from the year widely used OS virtualisation products: QEMU, Oracle VM
2005 onwards and has grown ever since, faster than anyone VirtualBox, VMware Player and Parallels Desktop 8 for Mac.
(including the experts) imagined. There are three main areas of
IT where virtualisation is currently making inroads—network Introduction to VirtualBox
virtualisation, storage virtualisation and server virtualisation; VirtualBox is a cross-platform virtualisation software designed to
but for this article we are going to look at a much simpler run on most modern x86 systems. Initially developed by a company
version called Operating System Virtualisation. named Innotek, VirtualBox was bought over by Sun Microsystems
Operating System Virtualisation enables users to create in 2008 and is now developed by Oracle Corporation as part of
multiple guest operating systems (OS) within a single ‘host’ its family of virtualisation products. VirtualBox is installed on
OS (see Figure 1). The host OS is the one that you see when an existing host OS as a simple application. You can then create
you start your computer. Each guest OS is provided with additional virtual machines (VMs) with this, which contain guest
some definite RAM and CPU from the host machine, for operating systems. Each guest OS gets its own virtual environment
its consumption. Such virtualisation is useful when you are that comprises some dedicated CPU, RAM as well as hard disk
aiming to do research, testing or development work, where space. Besides these, VirtualBox also provides some additional
virtual machines can be flexibly provisioned, used, and then useful features such as:

74  |  March 2013 | OPEN SOURCE FOR YOU


Let's Try Admin
Features QEMU Oracle VM VirtualBox VMware Player Parallels Desktop
VMware Player is an x86
QEMU (short for virtualisation software
‘Quick EMUlator’) is application made by VM-
Parallels Desktop for
emulation software ware, Inc. It is installed
Oracle VM VirtualBox is a Mac by Parallels Inc
that provides a set on an existing host OS
cross-platform virtualisa- is software providing
Definition of dynamic device as an application. This
tion software meant for hardware virtualisation
models that enable host application allows
x86-based systems. for Mac PCs with Intel
it to run a variety of additional guest operat-
processors.
unmodified guest ing systems to be loaded
operating systems. and run, each with its
own virtual environment.
Paravirtualisation and
porting or hard-
Method of ware virtualisation.
x86 Virtualisation x86 Virtualisation x86 Virtualisation
operation Runs on x86, ARM,
Sparc64-32, Open-
RISC

x86, x86-64, IA-64,


PowerPC, SPARC x86, x86-64, Intel VT-x, x86, x86-64, Intel VT-x,
Host CPU x86, Intel VT-x
32/64, ARM, S/390, AMD-V AMD-V
MIPS

x86, x86-64, Alpha,


ARM, CRIS, LM32,
M68k, MicroBlaze,
Guest CPU MIPS, OpenRisc32, x86 and x86-64 x86 and x86-64 x86 and x86-64
PowerPC, S/390,
SH4, SPARC 32/64,
Unicore32 and Xtensa

Windows, Linux, Windows, Linux, Mac


Supported Mac OS X, Solaris, OS X x86, Solaris,
Windows and Linux Mac OS X
host OS FreeBSD, OpenBSD FreeBSD and eComSta-
and BeOS tion

Windows, Linux, Solaris,


Windows, Linux, DOS, Linux, Mac OS X
FreeBSD, OSx86 (as
Mac OS X, Solaris, Server, FreeBSD, Haiku, Windows, Linux, FreeB-
Supported FreeBSD), virtual applianc-
FreeBSD, OpenBSD, OS/2, Solaris, Syllable, SD, OS/2, eComStation,
guest OS es, Netware, OS/2, SCO,
BeOS and others; Windows and others; DOS, Solaris and Haiku
BeOS, Haiku, Darwin and
runs arbitrary OS runs arbitrary OS
others; runs arbitrary OS

Provides
guest OS No Yes Yes Yes
drivers
Snapshots
Yes Yes No Yes
facility
Commercial
Yes (with a commercial
support No Yes Yes
licence)
availability
GPL version 2; full ver- Proprietary, free of
Licensing GPL/LGPL sion with extra enterprise charge for personal non- Proprietary
features is proprietary commercial use
Costing Free Free Free Commercial
Product
http://goo.gl/890fO http://goo.gl/HLYfh http://goo.gl/K0g5F http://goo.gl/BD825
Link

OPEN SOURCE FOR YOU | March 2013  |  75


Admin Let's Try

wget -q http://download.virtualbox.org/virtualbox/debian/
APPLICATION APPLICATION
oracle_vbox.asc -O- | sudo apt-key add -

Next, add the repository from where you are going to


Windows 2008 RedHat VM
R2 VM download VirtualBox:

sudo sh -c 'echo "deb http://download.virtualbox.org/


virtualbox/debian $(lsb_release -sc) contrib" >> /etc/apt/
VIRTUAL MACHINE MONITOR
sources.list'
(VirtualBox)

Next, update your Ubuntu system with the necessary


HOST OPERATING SYSTEM packages and updates, and then install VirtualBox:
(Ubuntu 12.10 Desktop)

sudo apt-get update


HOST HARDWARE
sudo apt-get install virtualbox-4.2

CPU Network RAM Hard Disk


The installation will take some time to complete. Once
done, you can start VirtualBox with the terminal command
Figure 1: A virtual system
virtualbox, and you should have VirtualBox up and running.
ƒƒ Shared folders: With this feature, you can permanently or
temporarily connect your host OS folders and use them as sudo apt-get install linux-headers-3.5.0-17-generic
a network drive in your guest OS. sudo /etc/init.d/vboxdrv setup
ƒƒ Snapshots: A snapshot of the guest OS can be taken at
any point. This helps you to revert the state of your guest Note: ‘Failed, trying without DKMS’ is a very
OS in case something goes wrong with it. common error faced while installing VirtualBox on
ƒƒ State saving: When you close the OS window, you are Ubuntu systems. To solve this, first download the correct
given the choice of sending a shut down signal, powering Linux headers depending on the description of the
off, or saving the current state. error message, then run the vboxdrv setup command to
ƒƒ Seamless mode: Like Parallels on Mac, this integrates the recompile the kernel module and install it, and you should
guest OS with your host OS’ desktop. be able to launch VirtualBox successfully.
The latest release of VirtualBox (v4.2.6) additionally comes
with Windows Aero support and guest VM cloning facilities. A Windows Server 2008 R2 VM
Once you have your VirtualBox set up, creating VMs is a fairly
Installation and configuration on Ubuntu 12.10 simple process. The following steps outline the VM creation process
VirtualBox can be installed on Windows, Solaris, Linux and for Windows 2008 R2 Server. You'll need the Windows 2008 R2
the Mac iOS. In this section, we look at how to install and Server ISO DVD image (you can download a 60-day trial from
configure VirtualBox on Ubuntu 12.10 Desktop (Quantal http://technet.microsoft.com/en-us/evalcenter/dd459137.aspx).
Quetzal). There are two ways of doing this. The first would Launch VirtualBox and click the New icon to create a new
be to manually download the VirtualBox DEB file from VM. You will now see a New Virtual Machine Wizard, which
https://www.virtualbox.org/wiki/Downloads to your Ubuntu walks you through the steps of selecting virtual resources for
system and run it. However, this does not work all that well at your Windows VM. The first dialogue box helps you select
first run; you may run into some complications like missing the type and version of the OS you are going to install as the
dependent packages or even issues with the kernel driver. All guest OS. Provide a suitable name for the VM here as well.
these can be solved, but take time and effort—so let’s explore Once done, click Next, then select the amount of RAM you
the easiest way. Simply launch a terminal window and run the want to allocate to this VM.
commands given below.
Note: Always set VM RAM to less than that of your
host (physical) machine’s RAM, since the host OS will
Note: In Linux, launch a terminal window using require RAM for running itself and other applications.
the key combination Ctrl–Alt–T; Mac users need to
substitute Ctrl with the Cmd key. 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
The first step is to add a software repository key into the Virtual Disk Wizard. Select the correct Type of hard disk that you
sources.list.d/virtualbox.list file: want for your VM, and provide a suitable size (in GB) for it.

76  |  March 2013 | OPEN SOURCE FOR YOU


Let's Try Admin

Figure 3: Windows installer screen


Figure 2: VM configuration
RAM and CPU resources, and power on the virtual machine!
That’s it for now. Stay tuned for more such tutorials
Note: You can always add more hard disks to your and articles!
VM after it’s created.
Once you have created the VM, you are now ready to power References
it on. A sample final configuration is shown in Figure 2. Power [1] https://www.virtualbox.org/
on your VM by clicking the ‘Start’ icon. Once started, you will [2] http://en.wikipedia.org/wiki/Comparison_of_
platform_virtual_machines
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 By: Yohan Wadia
press Right Ctrl–H to reset your VM, and you should see the The author is a senior software engineer and part of the Cloud
Windows 2008 R2 Server welcome screen, as shown in Figure 3. Services Team (Research and Innovation) at iGATE. An avid
In a similar way, you can create Linux and Windows VMs blogger and technologist, he loves exploring all upcoming
using your VirtualBox set-up. Simply select the correct OS technologies and trends in the IT industry. Blog: http://www.
yoyoclouds.com/.
type and version from the wizard, create a hard disk, allocate

OPEN SOURCE FOR YOU | March 2013  |  77


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.

M
any enterprises use Microsoft Exchange for corporate Exchange. This means LDAP for a global address book, SMTP
e-mail; usually, there's no avoiding it. While Exchange to send messages, IMAP to browse messages on the server
can provide IMAP/POP services, these are frequently in any folder, POP to retrieve inbox messages only, CalDAV
disabled citing security reasons, leaving Outlook Web Access for calendar support, and CardDAV for personal contacts
(OWA) as the only hope for users of non-Microsoft mail user sync. Thus, any standards-compliant client can be used with
agents (MUAs). But losing important emails is one of the Microsoft Exchange. The DavMail gateway is implemented in
major concerns, due to the limited space provided by Exchange Java, and should run on any platform. Releases are tested on
Server. Apart from this, there are many Linux enthusiasts and Windows, Linux (Ubuntu) and Mac OS X. Tested successfully
government authorities who have now stopped working on with the iPhone (gateway running on a server).”
Windows due to the increasing popularity of Ubuntu and similar Figure 1 shows various applications using DavMail (the
Linux distros. Moreover, organisations invest huge amounts on yellow icon) to connect to OWA (Outlook Web Access)
purchasing MS Outlook for each desktop. and Exchange. Using OWA instead of proprietary MAPI or
MS Exchange uses proprietary MAPI protocols, which IMAP/SMTP protocols itself ensures secure communication
are incompatible with the open protocols that Thunderbird with the server. For smartphones, DavMail is used as a
and other clients use. So here’s a nice solution that lets you dedicated host to provide SMTP and IMAP services to those
use any email client to connect to Exchange Server with a devices, hiding all the server configuration from those so-
third-party gateway, in a secure way (optional encryption) and, called less secure Internet devices. It also supports set-up of
of course, it’s free. The popular FOSS website SourceForge. calendars and CardDAV protocol to sync address books.
net explains its architecture: “The main goal of DavMail is to We tested DavMail 3.9.9 using Thunderbird 13.0.1 (you
provide standards-compliant protocols in front of proprietary can explore the latest versions) with Lightning (a Thunderbird

78  |  March 2013 | OPEN SOURCE FOR YOU


Let's Try Admin
Microsoft
Exchange
IMAP
SMTP OWA
LDAP on MS
Caldav
WebDavEWS

Evolution
IMAP DevMail
SMTP WebDav Server
LDAP WebDavEWS
Linux Caldav
Carddav

WebDavEWS
Thunderbird
Lightning IMAP
Saga IMAP SMTP
SMTP
Windows CalDav Caldav
Carddav
IMAP
SMTP
LDAP
Carddav
Cal
Adress
Mail Book

Mac OSX

Figure 1: DavMail and mail applications

Figure 3: LDAP settings—part 1

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. Figure 4: Calendar settings
Download and install Mozilla Thunderbird from http://
www.mozilla.org/thunderbird/ and DavMail from http:// Note: We recommend you uncheck the option ‘SMTP
davmail.sourceforge.net/download.html. save in sent’ in DavMail -> Advanced settings. This will
avoid having two copies of an email in Sent Items.
DavMail configuration
After installation, you can find DavMail running in your Thunderbird account configuration
system tray. Right-click it and select Settings. In the Main tab, Run Thunderbird after installation. The first run will start a
enter your Outlook Web Access URL (see Figure 2). Leave wizard to create an account. Enter your name, email ID and
the rest as it is. Go to the Proxy tab and enter your proxy the password given to you by your IT support team and click
details if you are behind a proxy server; else, skip this. Continue. Now Thunderbird will try to auto-configure the
Now, DavMail is running on our desktop itself— account; just stop it by clicking the Stop button. You should get
localhost. If it's installed for use as a service on a a plain configuration screen with some default values. Click
dedicated host, you'd use the IP address/hostname for that the Manual Setup button and set up localhost as the server
system in your email client settings—for instance, as is hostname, and the ports defined in DavMail: POP port 1110,
shown below for Thunderbird. IMAP port 1143 (for receiving email from Exchange); and

OPEN SOURCE FOR YOU | March 2013  |  79


Admin Let's Try

SMTP port 1025 (to send emails). you need the Lightning add-on, which you can easily install
Also ensure that Connection Security (in Server Settings from https://addons.mozilla.org/en-US/thunderbird/addon/
for the account) is None (that's for the connection between lightning/. Next, from Thunderbird's File menu choose New
Thunderbird and DavMail), and configure the other account -> Calendar. Select On the Network and click OK. Select
settings according to your requirements. Format as CalDAV (see Figure 4). Enter Location as ‘http://
Next, let’s look at LDAP configuration. In your Account localhost:1080/users/my_name@domainname.com/calendar’
Settings dialogue box, select Composition & Addressing in the (sample setting, replace with your details). DavMail's
left pane and choose Use a different LDAP server (Figure 3). CalDAV port is 1080. Click Next. Enter some nickname for
Click Edit Directories, and you will be shown an LDAP server your calendar, and click Next and Finish.
configuration dialogue box. Click the Add button to add your local
LDAP server. Here are some sample settings (except the port): Note: There are various add-ons available other
ƒƒ Name: Exchange than CalDAV for Thunderbird, like ‘Exchange 2007/2010
ƒƒ Hostname: localhost Calendar and Task Provider’ and ‘Provider for Microsoft
ƒƒ Base DN: ou=people Exchange’, which are also useful for calendar configuration
ƒƒ Port number: 1389 (the port set in DavMail configuration; in Thunderbird. The first one looked very useful—it
allowed me to specify ‘Out of Office’ settings and
Thunderbird will use this to fetch address books from
automatic responses to meeting requests—but remember
Exchange so it can auto-complete email addresses in new that it's not supported for Thunderbird 15 or later.
messages.)
ƒƒ Bind DN: domainname\username Voilà! That’s it. Now you are ready to use Thunderbird
Click OK twice to return to Composition & Addressing, through DavMail to access MS Exchange Server. Go ahead
and select the newly created Exchange entry under Use a and enjoy the beauty of FOSS!
different LDAP server.
By: Pranav Chauhan
Calendar configuration The author works as an IT analyst in a well-known Indian software
Now you need to synchronise your calendar with Exchange exporting company, and takes an interest in exploring open source
software to spread awareness about using it in day-to-day life.
Server to receive event notifications in Thunderbird. For this,

THE COMPLETE MAGAZINE


ON OPEN SOURCE

www.electronicsforu.com www.eb.efyindia.com www.linuxforu.com www.ffymag.com www.efyindia.com

80  |  March 2013 | OPEN SOURCE FOR YOU


Cloud Corner For U & Me

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!

A
ccording to Gartner's analysis, cloud computing Explaining the need for cloud computing in a start-
has the potential to change IT in a big way. Gartner up set-up, Rajesh Shetty, vice president, Cisco India and
analysts opine, “It may end up removing the last SAARC, says, “Cloud computing is the most reliable and
vestiges of the captive IT organisation that owns its enterprise, scalable platform for a start-up as well as for an SMB,
as surely as the enterprise owns IT.” It’s not just enterprises because it can fit itself perfectly, as per their requirements.
and SMEs that are leveraging cloud technology; start-ups are Start-ups or SMBs, unlike large organisations, do not have
not far behind. India, a country at par with many of the majors a big IT team; nor do they have all the required resources in
with respect to entrepreneurship, is seeing a spike in this trend. terms of infrastructure or budgets. So, the cloud is a solution
Start-ups are taking that extra step of getting on to the cloud that they can resort to, as they would get a very scalable and
and making the most of this phenomenon. reliable global infrastructure, which is easy to use and cost-
effective from the ROI perspective.”
Why do start-ups need the cloud? With cloud computing, start-ups do not have to worry
The cost of IT infrastructure consumes a good share of the about creating their own IT infrastructure or employing
budget of any organisation. Start-ups that are already short manpower to manage it. They can simply get it done by
of funds in the initial stages feel the heat of expensive IT the cloud service providers. Reiterating what Shetty said,
infrastructure. So, if a solution can cater to almost all their Ajit Gadge, manager, Sales Engineering, and database
IT needs at a lower cost and with fewer worries, they go for solutions architect for India, South-East Asia, Australia
it. The cloud is the answer for them. Yet, despite the fact and New Zealand, EnterpriseDB, said, “The cloud
that the cloud is a must-adopt trend currently, companies can deliver a reliable global infrastructure to a small
are taking their time in giving away direct control of their organisation at an affordable price. Small organisations
IT infrastructure to someone else. across India are looking forward to the cloud and I

OPEN SOURCE FOR YOU  | MARCH 2013  |  81


For U & Me Cloud Corner

think the Indian market is a perfect place to have cloud How a start-up benefited from the cloud
computing in place. From the business owner’s point of Vserv.mobi, a mobile ad network company, is a
view, the adoption of cloud computing may not be an easy start-up that leverages cloud technology in a big way.
and quick decision to make as one would have to totally Ashay Padwal, co-founder and chief technology of-
rely on some third party and its IT infrastructure, but once ficer, Vserv.mobi, explains the business model, “We
host mobile advertisements for our clients. We need
the entire picture is made clear, the industry would soon
to be totally flexible and scalable in order to offer our
start adopting cloud computing.”
services perfectly. On a given day we may have only
It is not about just the cost of the equipment, at the end 20,000 ads to host, but the next day our clients may
of the day. It is about the total infrastructure costs. Shetty demand hosting of 100,000 advertisements. This
adds, “If you want to set up a data centre, the equipment kind of scalability is possible only with the cloud. The
would take about 20 to 25 per cent of the overall cost of the need for elasticity, when we are unable to estimate
data centre, but the other associated IT resources like power, the changing hardware requirements from day to
back-up and cooling require more investments. One would day, is one of the crucial reasons that propelled us to
need trained manpower to manage the entire set up as well. deploy a cloud solution in our organisation.”
So, the story doesn't end with the initial investment of the
equipment cost. It’s the life cycle cost that matters.” companies from all spheres would look at using cloud
Some of the advantages that cloud solutions offer a start- computing in a big way.”
up are listed below.
Low cost: The cloud will always win over physical Cloud telephony:
storage drives when it comes to money. For a start-up, the An emerging solution for start-ups
cloud can help reduce the IT budget significantly. Owning One emerging trend amongst start-ups and SMBs is
and maintaining physical storage requires more IT spending, the adoption of cloud telephony. This can be simply
and creating data backups can also make a huge dent in IT defined as configuring a telephone in a browser.
budgets. Through cloud telephony, one can virtually carry the
Easy access: The cloud ensures hassle-free access desk phones on the browser, and make and receive
to stored data. From a start-up or SMB's point of view, calls through the computer itself. Cloud telephony is
maintaining a separate IT team to maintain data will be a solution that cuts costs by about five to six times
unaffordable. Also, for non-technical small business owners, compared to setting up the traditional infrastructure for
the cloud can ensure reliable access to data. an ePABX system, with telephone lines and handsets.
Scalability: The cloud provides the advantage of Ambarish Gupta, chief executive officer, Knowlarity
scalability. A business can scale up or down on the cloud (a cloud telephony company) explains, “A start-up
infrastructure, as per its requirement. The scalability can doesn't need to invest in the hardware required for
happen within no time and without much investment. fixed landlines, when it goes for cloud telephony. The
Automation: With cloud computing, IT admins of traditional telephony set-ups work best when one sets
start-ups need not worry about maintaining applications. up a proper office. For start-ups, there are hardly any
One doesn't need to invest in a team to keep the file storage offices in the beginning. So cloud telephony works best
system updated, as most of the applications that run on the for their connectivity from which ever location they
cloud are capable of getting updated automatically. are.” Cloud telephony can help in better management
of time along with the provision for remote working,
The cloud bridges the gap between start-ups and increase overall efficiency.
and enterprises
V Ramachandran, country manager, Converged Worries about data security
Infrastructure & Cloud Solutions, Cloud Systems, HP India, Cloud computing does provide multiple benefits, but start-
says, “Cloud technology has the potential to bridge the gap ups are still sceptical about data security. Experts opine
between a small and a large enterprise. With the cloud, small that small organisations can opt for the cloud any time, but
organisations can benefit from the services of world class IT larger organisations are a bit hesitant to give direct control
infrastructure. The cloud is slowly spreading its wings across of their IT infrastructure to some third-party vendor. Gadge
the horizon, as it offers a tremendous amount of reach. Even opines, “Before opting for a cloud solution, customers
government departments are now exploring the possibilities should evaluate the contract with the service provider. They
of empowering themselves with the cloud as it gives a big should be aware enough to understand the security checks
boost in providing services to the citizens. Apart from being in the cloud solution.”
a cost-effective solution, the cloud can help in managing
both resources as well as data effectively. Given the growing By OSFY Bureau
number of small businesses in India, the day is not far when

82  |  march 2013  |  OPEN SOURCE FOR YOU


For U & Me Insight

mind, which was originally born at AT&T Labs. Dennis Mandriva to be saved from collapsing. Now, by combining
Ritchie and Brian Kernighan were the key people who created efforts to further develop Mandriva Linux, which now comes
UNIX. Their book about C language programming became under the Rosa Linux name, RosaLab envisions converting Rosa
a truly classic edition in Russia, on the basis of which many Linux into a Russian nationwide distribution—but who knows
generations of engineers are taught. The flexibility of Linux, what the future holds. However, saving the company in 2010
the prevalence of the C language, and the philosophy of basically brought along many benefits. According to DistroWatch
UNIX caused such widespread interest. statistics (http://distrowatch.com/stats.php?section=popularity),
One of the first commercial companies that started Mandriva (or should I say Rosa Linux) again gained popularity.
working on the market was IPLabs Linux Team in 1998. It In addition, a couple of other companies tried to develop
was initially involved in localisation activities, but later began their own distributions, though Linux wasn’t their core
to sell box versions as well—ranging from Mandrake to Red business. This way, MOPSLinux appeared on the Russian
Hat and SuSE. Its tight cooperation with MandrakeSoft made market in 2004, originally developed by the Network
it possible to create its own Linux distribution. In 2001, such company only for its own internal projects. The company was
distro-building experience led to the creation of a software-only a developer of information systems for local administration
company called AltLinux, with its own distribution carrying the units and enterprises. MOPSLinux is based on Slackware with
same name as the company. After years of Linux experience, Russian localisation and includes a number of applications
AltLinux now has the fourth largest repository in the world— developed in-house. The company offered technical support,
Sisyphus. The AltLinux company builds server distributions for both free and on a subscription basis. Unfortunately, in 2010
OEM companies and also builds desktop versions, as well as the company ceased Linux distribution, and apparently closed
participating in government activities like the ‘School Project’. down—the financial crisis touched Russia too. Although
In the fall of 2008, AltLinux produced the SKIF 4.1 distribution several efforts were made to keep this distribution under the
for the national supercomputer SKIF-MSU. In 2009, the AgiliaLinux name, there are serious doubts it could continue
company opened up a sales centre in Porto Alegre, Brazil. being purely a voluntary project.
In the year 2000, SWsoft had also decided to try its luck However, a better example is the experience of the Calculate
in the Linux world. It dedicated a special unit ASPLinux, company, for which the Linux business also isn’t a major
which was supposed to bring a fully localised Russian focus at all, because it produces cardboard and corrugated
distribution (with the same name—ASPLinux) based purely cardboard packaging. The company created a distribution
on Red Hat. It must be noted that the ASPLinux distro wasn’t called CalculateLinux for its own needs, when transferring its
a simple clone of Red Hat, because it used several in-house- IT infrastructure to Linux in 2007. CalculateLinux is based on
developed applications. For example, instead of LILO, it ran Gentoo Linux. Corporate graphical designers helped with the
ASPLoader—a graphically enabled boot-strap utility. There distribution’s UI; that’s why CalculateLinux has gained such
were also ASPInstaller and ASPDiskManager—a master disk popularity outside the mother company. Besides, free help is
partitioning utility. ASPLinux Server versions were pre- provided online via IRC and Jabber services.
installed with virtualisation products named Virtuozzo—some All other distros could be considered more or less
open-source portions of which later evolved into OpenVZ amateurish and non-professional from the business
technology. Due to certain reasons, the development of this perspective—especially since all of them are designed for
distribution came to an end in 2008. Quite possibly SWsoft, home users, and based on modern versions of either Ubuntu
already known as Parallels Inc, considered that it was or Fedora from Red Hat.
commercially viable to develop the virtualisation business When we start to discuss corporate Linux versions, both
itself, rather than evolve in the Linux-friendly direction only. IT integrator companies and government agencies tend to use
That’s why we now see such brilliant technology as OpenVZ original and unmodified distributions such as RHEL, SLES,
available almost in every hosting provider. CentOS, Debian and AltLinux Server. It should also be noted
The story behind the MandrakeSoft company and its that the Ministry of Defence has its own versions of Linux
influence on the Russian Linux market was not simply limited called MCBC—a Mobile System for the Armed Forces. The
by AltLinux in the late 90s. In 2007, Russian-based firm government research institute created it early in 2003 on a
Mezon opened up a Mandriva Center of Competence located Red Hat Linux base, with broad consultancy support from one
in St Petersburg. This enabled the firm to get the Mandriva of Russia’s Red Hat partners. Fundamentally, there’s nothing
distribution certified to be used in the government sector, as special about MCBC though—a simplified UI interface a
well as in places where confidential information was stored la Windows95 and certified internal components to monitor
and processed. Moreover, three years later in 2010, the NGI access to the system. What could be particularly interesting
Fund (with a Russian background) bought off majority stakes is the fact that MCBC has been ported to MIPS, x86 and
both in Mandriva as well as in the Russian company PingWin SPARC platforms. The system is distributed among large
Software. This made it possible to perform systems integration government customers on a paid basis and isn’t available in
and generate a new company—RosaLab. This step also allowed the public domain.

84  |  MARCH 2013  |  OPEN SOURCE For You


Insight For U & Me

Another Russian company that creates exciting business is really a huge one, because when some kind of problem arises,
solutions is Etersoft. It sells its boxed solutions built upon there’s usually a solution outside of this closed world. For
a heavily redefined WINE package. Thus, one of the most example, you should try to find fixes for Ubuntu packages not
promising products is SELTA@Etersoft—a universal SQL- within the Ubuntu world only, but among Debian users too!
queries translator from T-SQL into pgSQL. Such transformation The third big problem is that engineering and IT personnel
allows the use of the PostgreSQL server for a number of training is done with Microsoft products. This situation
applications designed purely to work with Microsoft SQL is rather typical for middle schools, as well as for higher
Server only. So how does the translator work? It parses requests education institutions. The courses devoted to UNIX topics
to MS SQL system tables, and adapts them transparently to are organised and created mostly by enthusiasts or organised
PostgreSQL notation. So you don’t need to interfere either with by big vendors—so such training can be considered as
the server or the client program. Many companies that can’t supplementary to the selling channel of Linux software and
completely transfer their business onto a Linux platform (due to middleware. The education policy in this aspect is still driven
Microsoft SQL Server or Win32-applications) choose SELTA@ by the country’s educational agency.
Etersoft and WINE@Etersoft and happily launch Win32- But the real surprise comes from a place no one expected
applications within GNU/Linux environments. before. First, Russia has a national search giant—Yandex. It
Now let me describe the problems that occur with uses Linux for its own purposes—server infrastructure. So it’s
GNU/Linux once it is deployed in real life by Russian allocated its resources to maintain the huge repository of core
companies. The main problem is the quality and experience Linux distributions: AltLinux, ArchLinux, ASPLinux, CentOS,
of the technical personnel, who’re primary responsible for Debian, Ubuntu, Slackware, Mandriva, and others. It has also
the transformation project—from Windows to Linux. The provided space for such office suites as OpenOffice, LibreOffice
vast majority have never faced any UNIX system before. and Mozilla. They mirror kernel.org, VLC, MySQL, KDE,
Therefore, they have great difficulty orienting themselves GNOME and some others. From this perspective, the national
to the UNIX philosophy and they follow one simple software repository is already here. Moreover, the agreements on
principle—dumb replacement of one Windows GUI with a free peering are achieved with a number of local ISPs throughout
similar-looking GUI, but under the Linux logo. Naturally, the whole country. This fact alone creates an ideal opportunity
the features that make Linux a truly unique system aren’t for sharing any distro. In addition to free access to the Yandex
reclaimed and aren’t used at all. repository, it also provides free hosting facilities to video,
The second reason is a difficult-to-eradicate myth about the pictures, Web hosting, etc. So there’s no problem in distributing
importance of a nationwide distribution. If there had been one any books, presentations or videos on Linux.
created earlier, with Russian (Hindi, Brazilian, you name it) SMB-sized companies that have Linux-familiar IT staff
localisation and other bells and whistles, it would be distributed silently migrate their network infrastructure onto Linux/
in a blink of an eye. However, the long history of AltLinux shows FreeBSD/OpenSolaris, because its mission-critical nature allows
another trend—there could be, de-facto, an already existing firms to have 24x7 business. Occasionally, the government
national distribution. In our case, AltLinux has no rudiments of sector behaves similarly, unless there’s particular Win32
the original MandrakeLinux because AltLinux was completely software imposed from the federal government level. Having
redesigned 10 years ago. There already exists a great channel to IT infrastructure based on Debian, Ubuntu or CentOS allows a
spread AltLinux both on CDs/DVDs, as well as multiple tutorials government institution to save money, and instead of spending
written by AltLinux authors for teaching and learning purposes, on Microsoft products, it can purchase more hardware or order
and there’s great support from the company. But there’s still custom software. The bigger advantages are from professionals
Windows domination. Why? On the one hand, there is strong that come to the government sector from commercial companies.
pressure from both the Microsoft side and from the financial They bring experience and knowledge with them and that is most
department of any enterprise that decides to purchase Win32/ important—the desire to change the infrastructure to be the one
Win64 products only. This can be explained only by this fact— ‘right’ standard. Unfortunately, this is a temporary scenario, due
real ignorance of whatever systems exist outside the Microsoft to the financial crisis and other local factors. Once the business
world. However, even when decision makers are aware of Linux/ situation improves, such personnel return to the private sector
UNIX, their reason is usually this one: “We have specialists where wages are usually higher.
familiar with Microsoft, but we haven’t any Linux specialists. In Russia, there exists an analogy to the Linux
Therefore, we take Microsoft.” Strange, isn’t it? Sadly, the truth Foundation, known as the Russian Association for Free
is that sometimes, companies do not even have an IT department Software (RASPO). The idea behind it is rather strong, but
with sufficient Microsoft experience. unfortunately this committee tends to operate like a software
Another big problem is a strong existence of other myths ‘club’—promoting the business ideas of its members and not
(this is particularly evident with MCBC Linux): “There exists general Linux principles, as it should. Having been created in
a purely native (Russian/Indian/German) Linux innovation and 2009, nobody can see it in a big, serious project, though.
only selected specialists are keen to understand it.” This problem Continued on page 88...

OPEN SOURCE For You | MARCH 2013  |  85


For U & Me Review

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.

O
ne of the biggest problems faced by data-centre acquisition cost of the hardware, and the running cost of the
operators is the amount of power consumed and platforms. You can think of
dissipated by the servers. As a result, there is a lot these data centres as energy-
of focus on building low-power servers these days. ARM constrained systems. A data
processors are known for their low-power capabilities, but centre gets allocated a certain
have traditionally been used more in mobile devices and amount of power, and it must
laptops than in supercomputers. However, in the last couple generate as much revenue as
of years, there has been a lot of interest in building ARM- it can, and minimise running
based servers, and such products are being launched by costs. As the servers are
companies like Boston, Marvell, Tilera and Calxeda. One specialist machines, there
that seems very promising is Boston’s Viridis, an energy- is an opportunity for silicon
efficient data-centre solution based on Calxeda’s low-power, and systems companies to
ARM-based System-on-Chip (SoC). optimise platforms for a
specific application. ARM
Guru Ganesan, managing director,
ARM—a logical choice for data centres ARM, India Operations
has proved in the mobile
“In data centres, the server is the revenue-generating asset phone space that the way
of the business, and there is a strong business motivation to ahead is development of highly integrated SoC devices,” says
look at new technology. Companies look to drive down the Guru Ganesan, managing director, ARM, India Operations.

86  |  March 2013  |  OPEN SOURCE FOR YOU


Review For U & Me

Venkat Ramana, vice says David Power, technical


president, Hinditron Infosystems, head of the HPC group, Boston
a premier business and technical Ltd, UK.
support partner of Boston Ltd At the heart of Viridis is SoC
in India, says, “With energy- technology, which integrates the
efficient computing being the central processing unit (CPU),
major focus area in the realm of networking and input-output
high-performance computing (I/O) onto a single server chip.
(HPC), it is time to explore Viridis uses Calxeda’s ARM-
alternatives to the current based EnergyCore SoCs, which
industry-standard processors. In consume less than 5W of power.
this context, presently, the ARM These are interconnected by a
architecture seems to be the most Venkat Ramana, vice president, Manoj Nayee, Manoj Nayee, special highly scalable fabric
ideal candidate. ARM processors Hinditron Infosystems managing director, Boston Ltd, UK that offers extremely low latency
are available from many vendors, and have the required high-bandwidth communication between all servers. This fabric
economies of scale because of their sheer volume and wide is coupled with an intelligent management controller for power
deployment in the mobile market.” and fabric optimisation and management, for energy-proportional
Calxeda’s EnergyCore is one of the first ARM-powered computing. The Viridis platform has five core chips, of which
SoCs that has been specifically designed to address the one is reserved for the management engine; only four cores are
server market. Ganesan feels that Calxeda is uniquely placed exposed to the operating system. Thus, the management and fabric
because the well-funded start-up focuses solely on the server do not interfere with the host performance. The disk I/O allows for
industry, while other ARM silicon partners that are entering up to 5 SATA devices to be populated per host, for users with data-
or intend to enter the server market are engaged in other intensive requirements.
application areas to generate revenue. By far, EnergyCore is Manoj Nayee, managing director, Boston Ltd, UK, says,
the most highly-integrated server processor on the market. “Using the very same CPU technology that powers many
In addition to including networking and storage interfaces of today’s mobile consumer devices, the Viridis offers
on-chip, the chip uses a special fabric to remove the need around 90 per cent improvements in energy efficiency and
for traditional top-of-rack switches and external baseband density. These building blocks of high-end computing are
management controller devices, significantly reducing system set to radically change the economics of large-scale data
power and cost. In terms of applications also, it is specifically centres, sparking innovation in emerging fields such as cloud
tuned to the needs of data-centre applications, such as Web computing, data modelling and analysis (often called ‘Big
hosting, storage servers, data analytics and content streaming. Data’), scientific research and media streaming.”
Boston’s Viridis was one of the first ARM-powered server
platforms to enter the market, and the first to be available in Low-power engineering
India. It was also the first to work so closely with Calxeda and According to Power, the platform had to undergo a lot of
make full use of the EnergyCore SoC. engineering to get the product down to the power levels seen today.
These include: silicon optimisations, EnergyCard optimisations,
Viridis—a quick overview power-optimised fabric settings, optimised power supply, baffles to
“Boston was the first company in the world to launch server- improve airflow, memory/RAM settings, and fan settings.
grade products based on “ARM was always the technology we had planned on using
ARM. We had a deep for our Viridis product. It had to be ARM, as we wanted to bring
engagement with Calxeda a really disruptive green technology to the server market. Power
in bringing our solutions to consumption (and the cost!) was becoming a real headache
the market, and Viridis is the for a lot of our customers, and ARM was one of the leading
result. The Viridis system is low-power chips in the market. We have a very close working
designed from the ground up relationship with ARM, and their roadmap is very exciting. We
to deal with the requirements have also been engaged with Canonical (Ubuntu) and Red Hat/
of scale-out data-centre Fedora, who are heavily involved in porting their distributions
workloads, with the internal to the ARM platform; I'm delighted at the progress that has been
fabric capable of scaling made in this space, particularly to provide users with a familiar
to over 4000 nodes today working environment (both for development and administration).
(without the need to go to a David Power, technical head, This combination made the choice of ARM a very compelling
top-of-rack switch) and future HPC group, Boston Ltd, UK proposition. You also have communities and organisations such
releases that will scale to hundreds of thousands of nodes,” as Linaro (http://www.linaro.org/), which are investing a lot of

OPEN SOURCE FOR YOU  | MARCH 2013  |  87


For U & Me Review

time to get familiar development tools ported to ARM. Some of Go, go, Linux!
the best feedback we have had from developers and testers is that Boston has adopted the best of Linux technologies. It is
they didn't even realise they were running on ARM hardware,” using Canonical's Ubuntu 12.10 and Red Hat's Fedora 17
explains Power. development releases on Viridis, because these flavours
Intel is also talking of a 6W processor for servers now, so apparently have very good support for Calxeda’s version of
how would ARM fare compared to that? While Intel’s move is ARM SoCs. The other ARM-based server products from Dell,
a clear acknowledgement of the need for low-power servers, HP and Mitac are also Linux-based.
there is still a lot to be done before Intel’s 6W processor can Ganesan says, “Hardware is irrelevant without software.
compare with a 5W server. Viridis is a 5W server, which The data-centre companies are focused on leveraging open
includes all the components required for operation in a data source software as broadly as possible, and so is the software
centre (power measured at the wall, including motherboard, strategy provided alongside Viridis. ARM and Calxeda have
network, cooling fans, memory, disk, etc). “When you add all been working for multiple years to ready Linux distributions
such factors to Intel’s processor, it will be significantly higher for the EnergyCore device.”
than 5W. Intel will undoubtedly introduce a SoC product “Linux was always our No 1 choice for OS, and it had
down the line, but at that point we expect to have Viridis v2 to be that way,” boasts Power! The majority of the WWW
(or possibly v3) ready for the market, which will have further infrastructure is running some variant of a LAMP stack (http://
performance/watt improvements,” says Power. news.netcraft.com/archives/category/web-server-survey/). Most
Others also appear to be in favour of ARM at present. Dell of the world’s clouds and cloud infrastructures are running Linux,
announced the Copper platform in May 2012. This is a platform with OpenStack being a good example. In the HPC space too,
based on an ARM-powered SoC from Marvell. Mitac in Taiwan over 93 per cent of the world’s most powerful supercomputers
also announced and demonstrated a Marvell-powered server at are also running Linux (http://www.top500.org/statistics/list/).
Computex in June 2012. HP has shipped a number of Calxeda- Finally, the ‘Big Data’ space, which is dominated by Hadoop and
based development platforms (called Redstone) to enable Hadoop derivatives, is running Linux! With these being the main
companies to start porting and evaluating the benefit of ARM- focus areas for Viridis, Linux was a de-facto choice!
based server technology for their applications. A US company
called Penguin Computing, focused on data analytics platforms, By: Janani Gopalakrishnan Vikram
is also shipping a Calxeda-powered platform. Dell has announced The author is a technically-qualified freelance writer, editor and
a programme called Iron, using a 64-bit server SoC device from hands-on mom based in Chennai.
Applied Micro, which is likely to ship later this year.

Continued from page 85...


The same group has a newly born ‘National Software and not to disperse its efforts onto different initiatives—this is still
Platform’ initiative, which was formed last summer. The unclear. Anyway, time will show who was right. And in August
objectives of this initiative were declared to be too broad— 2011, Red Hat opened its Moscow office. Although it doesn’t
ranging from the creation of a national Linux distribution yet plan to bring in development resources, no one can predict
(another one, in addition to existing MCBC and AltLinux?) exactly how this will affect the corporate Linux sector in Russia.
to setting up the policy on how to use (F)OSS within the In general, we note just one thing: the current state of Linux in
government sector. It’s hard to believe this national platform the local market reminds us of chaos. Amazingly, there’s always
will be effective, because the participants are the same RASPO something new that’s born out of such chaos!
mentioned earlier, plus a number of non-profit enterprises and
several government research institutions. Will it be able to make
References
another corporate Russian distribution? Probably, it will. But
[1] http://en.wikipedia.org/wiki/Unix_philosophy
what about a stable and strong community? This question still
[2] http://www.altlinux.com/
remains open. At the moment, higher efficiency is shown by [3] http://en.wikipedia.org/wiki/SWsoft
the middle-size private companies, which can create the finest [4] http://en.wikipedia.org/wiki/OpenVZ
products compared to those from state-owned enterprises. [5] http://www.rosalab.ru/
[6] http://www.calculate-linux.org
Miracle? Yes, it’s true. Russia ignites technologies and specialists
[7] http://www.yandex.com/
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. By: Anton Borisov
P.S. A small update: In September, the AltLinux company The author has specialised in Linux and FOSS technologies
announced its withdrawal from the RASPO board. Either this for more than a decade. His professional spheres of interest
include, but are not limited to, robotics, embedded systems,
decision was connected to fundamental differences between statistics and algorithmic methods.
RASPO members, or the company decided to focus on Linux

88  |  March 2013  |  OPEN SOURCE FOR YOU


Interview For U & Me

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...

Q What 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
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.
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
Q Have 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

OPEN SOURCE FOR YOU  | MARCH 2013  |  89


For U & Me Interview

JUDCON, we talked about some newer technologies and "You will be amazed at the level of
we find that participants are interested in knowing the open source education happening in
technologies in detail. We discussed technologies like the this country. Java is taught in almost
cloud and how it is being used across the globe. We have
talked about being cloud-ready from the very beginning, in
every institution. I have spoken to
terms of footprints, energy consumption, etc. It’s good to a lot of people who vouch for the
see questions around these from the audience. In India, a fact that Linux and Java are taught
large number of people are updated about technology and in most of the Computer Science
we had some really intelligent questions coming our way.
We got to know some interesting facts about the audience
degree courses."
here. Bengaluru is No 1 in terms of using the technology.
It’s not just about continuing with the old technologies but look to market themselves.
also adopting the new ones. So on all these fronts, JUDCON Think about it from the market perspective. Let’s look
India is a unique event. at the example of Sun Microsystems. The growth of Sun
Microsystems was because of educational institutions.

Q You have JUDCON events globally. Which of the lot is


the best and why?
Bruno: The best depends on both the speakers' perspective
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.
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
Q In 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
as the local audience. Obviously, there are a large number that direction?
of local customers, SIs and students. It was a wide spectrum Bruno: We will develop reference architectures. We will
of attendees that we saw but the reason I say that JUDCON develop tools that allow you to be proactive. Writing new
India has a global impact is because it is huge in its size and code every time something changes is very cumbersome
the people who attend the sessions take away a lot for their to me. So when you know the requirements, you go for
customers. That's a unique differentiator for JUDCON India. different iterations. The requirements keep changing
for many reasons, whether due to market changes or

Q Sure, 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?
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
Arun: You will be amazed at the level of open source challenge for any software development organisation is
education happening in this country. Java is taught in how many times you reinvent the wheel. Any SI has to
almost every institution. I have spoken to a lot of people work to cut short the time for development, which has
who vouch for the fact that Linux and Java are taught in a direct impact on the ability of the business to respond
most of the Computer Science degree courses. In India, to the market changes. India has a lot of regulation.
even people doing Electronics Engineering end up taking So keeping in mind those regulation changes, we have
Linux or Java. So, for people who are spending their time to see how quickly we can adapt our applications to
and energy in understanding open source, such an event is the changing environment. Think of customers in the
an extension of that. Even in FUDCon we see enormous insurance industry, who have to face a lot of regulatory
participation from people in education institutions. They changes. In that kind of environment, they have to be
are using Linux, which is a great operating system to absolutely prepared for whatever changes that may come
teach at college because its source code is free. When I in. I think this is a new way of developing applications,
did my engineering, we only talked about device drivers. which is far more agile and allows you to be more
It was all theory. I could not look at the device driver code responsible as a business.
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
Q One criticism that comes your way is that JBoss is still
tagged as a 'vulnerable open source application'. How
do you defend that?
with students to give them the real picture. So, it’s not Bruno: Like any software, we also come across bugs
just restricted to the conference but goes beyond it. The but we fix them within no time. We have a mechanism
students want to know the technicalities and want to add in place as an enterprise to deliver the fixes to our
those details in their resumes as well. That is how they customers. This is not restricted to just JBoss. This goes

90  |  march 2013  |  OPEN SOURCE FOR YOU


Interview For U & Me

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.

Q OSFY 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
Arun Kumar, general manager, Red Hat India
the Red Hat Price Subscription,
which is precisely for this purpose. The community exists
"A lot of reports point towards bugs to give away their innovations and to help build a product.
in Java. That doesn't mean Java is But it is not directly responsible for support. If every
inherently insecure. I think security is developer in this world starts looking at the open source
not just a function of technology, it’s a community as a support forum, there will no development
and innovation. Using the community to foster the
function of process, compliance and innovation makes sense. The moment you cross the
how well-structured you are to be able boundary regarding the extent of support you need, that is
to handle that." when you move from a community product to an enterprise
product. Then, that support will come with a subscription
out for all our solutions. So many years after launching, model and the upgrades. If I look at it from the India
we are comfortable to say that JBoss is one of the best. perspective, I think it is fairly immature. We need to
It is not just about vulnerabilities, but about the ability understand that the community is not there for support, but
to respond and fix them quickly when they are found. If it is there to foster innovation and that is how it should be.
you deep dive into the whole scenario, we have two types This is a general problem in this part of the world. People
of users: one set wants ease of use and the other wants a in the other parts of the world are pretty clear that if it is a
stricter scenario from the beginning. We listened to those community product, then don't expect any support. They
needs two years ago and we addressed the security issues know that if they want any support, they have to move to
right at the very beginning. We have learnt from the past an enterprise product. There you have companies like us
when JBoss was too vulnerable because it was too open. offering support. We are available on call. The experts are
That was the time when we got a hint about this problem there to answer your questions.

OPEN SOURCE FOR YOU  | MARCH 2013  |  91


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.

A
fter going through basic programming on the bench scale(000023.450) # Number of digits after the decimal
calculator, it's time to explore its functional power. 3
As mentioned earlier, you can do functions with the sqrt(2) # Square root of 2
bench calculator (BC). Unlike C, it has built-in functions, 1.41421356237309504880
where as standard math functions, and user-defined functions sqrt(-1) # Square root of -1 is an error
are similar to C. Runtime error (func=(main), adr=4): Square root of a negative
number
Built-in functions ibase=2 # Changing the input base to 2
The BC’s built-in functions are: x=read() # Wait to read the input in binary and then display
ƒƒ length(expr) – returns the number of significant digits in 1100 # This is the input
expr. x # Display the read value in the default output base 10
ƒƒ read() – reads a number from standard input in the base 12
dictated by the ibase variable. quit # Get out
ƒƒ scale(expr) – returns the number of digits after the
decimal point in expr. Wait! Are those all the built-in functions? What about
ƒƒ sqrt(expr) – returns the positive square root of expr, given the previously used print? In BC, print is not a function;
that expr is non-negative. the missing () indicates it is actually a statement, like if,
Here's a sample execution of the above functions: for, ... and its syntax is print <list>, where <list> is a
comma-separated list of strings and expressions. (If you
$ bc -ql have not yet got the hang of this word expression, it is
length(000023.450) # Number of significant digits a statement of numbers and variables operated with the
5 various operators and functions.)

92  |  March 2013  |  OPEN SOURCE For You


Let's Try For U & Me

Standard math functions {


When BC is invoked with the -l option, the math library is also product *= current_num
loaded, making available for use the following six math functions: }
ƒƒ s(x) – returns sine of x (x is radians) return product
ƒƒ 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 And then, you can use that function, as follows:
ƒƒ e(x) – returns the value of e raised to the power of x
ƒƒ j(n, x) – Bessel function of integer order n of x $ bc -ql functions.bc # Load the functions while invoking
All these functions operate with the scale dictated by the bc
built-in variable scale, which is by default, set to 20. Here's a factorial(10) # Compute the factorial of 10
sample execution: 3628800
quit
$ bc -ql
scale # Show the current scale As you now have factorial, you can even calculate the
20 series of e, i.e., 1 + 1/1! + 1/2! + ..., say up to 1/20 for a
pi=4*a(1) # Calculate pi as tan-1(1) is pi / 4 good enough approximation. Here's how it would go:
pi # Show the value approx. to 20 decimals
3.14159265358979323844 $ bc -ql functions.bc
s(pi/3) # Calculate sine of 60° - should sqrt(3)/2 exp=1
.86602540378443864675 for (i = 1; i <= 20; i++)
sqrt(3)/2 # value for comparison – note the approx. error {
.86602540378443864676 exp += (1/factorial(i))
c(pi/3) # Calculate sine of 60° - should be 0.5 }
.50000000000000000001 exp # Display the computed value of e
l(1) # log(1) 2.71828182845904523525
0 e(1) # Compare with the standard math function
e(1) # Value of e1 approx. to 20 decimals 2.71828182845904523536
2.71828182845904523536 quit
quit
And, as in C, if you need a function only to do actions
If all this sounds too geeky and mathematical, let's forget and not return anything, void is the way:
it, and do some simple stuff; let's write simple user-defined
functions. $ bc -ql
define void designer_print(v) {
User-defined functions print "---{", v, "}---"
Here is how you write a user-defined function (to add two }
numbers) in BC: designer_print(100) # Print 100 with the designs
---{100}---
$ bc -ql quit
define add(x, y) {
return (x + y) Having covered the fundamentals of these functions in
} BC, we will dive into its recursive functional power in the
add(3, add(4, 5)) # Lets add 3 with the sum of 4 & 5 next issue.
12
quit By: Anil Kumar Pugalia
The author is an open source hardware and software
Given that, the factorial code from our previous learnings can hobbyist, with a passion for mathematics. His exploration with
be converted into a function as follows (say, in functions.bc): 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
define factorial(n) { from that, he experiments with Linux and embedded systems
product = 1 to share his learnings through his weekend workshops. Learn
for (current_num = 1; current_num <= n; current_num more about him and his experiments at http://sysplay.in. He can
+= 1) be reached at email@sarika-pugs.com.

OPEN SOURCE For You | March 2013  |  93


For U & Me Open Strategy

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...
Peter Chang, country manager, Asus

Q Asus 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
Q Do you think being the maker of a Nexus tablet adds to
your existing reputation? How would you take advantage
of the Nexus tag?
tablet PC, Google chose Samsung for the 25.4-cm (10-inch) We hope to continue with the push that we got from the Nexus
variant of the tablet. Any reasons? brand. Asus made Nexus 7, which although not launched in
It is totally Google's prerogative to choose its OEM partners. India officially, has become a great success worldwide. We
As you must have observed, it keeps the ball rolling. We have don’t know about the upcoming Nexus devices—whether we
had a good relationship with the Android maker and we look would make them or not—since Google has a multi-brand
forward to more such tie-ups. strategy with respect to its Nexus devices. In the future, we are

94  | MARCH 2013  |  OPEN SOURCE FOR YOU


Open Strategy For U & Me

hopeful about getting the opportunity to make another Nexus "The Indian market is different just
device, as our Nexus 7 tablet has done very well.
because Indians really research a
lot about a product before buying
Q The 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 it, which, in a way, is good for us as
the Indian market? they will understand Asus better."
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
Q You 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
is any other product that can give an experience similar to that III towns in India?
of the Nexus 7 at the same price point. Since the last two years, we have always been focused on coming
up with new stores because we believe a channel is very important

Q So 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?
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
We are still working on the official launch of the device. We is growing, consumers in Tier III or Tier IV cities in India are
will keep the fans of Nexus updated about the official launch. learning about Asus. Brand consciousness is slowly growing in
rural areas as well. So, people want to feel the difference in a

Q On 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
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
popular than Wi-Fi in the country. to more people. Thus, a store is an ideal marketing tool. Asus is
We are planning to launch the 3G version of the Nexus 7 in India. becoming popular in smaller cities and towns across India. We are
getting more sales from Tier II and Tier III cities across the country

Q When can we expect the Nexus 7 3G to come to India?


Hopefully, we will launch the tablet by the first half of 2013.
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

Q At what price will it be available here?


Pricing is yet to be worked out. Looking at the market of
sales of tablets as compared to their urban counterparts.

a 17.7-cm (7-inch) tablet in India, the price could be roughly


around Rs 20,000. Q Yet 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

Q What 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
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
launching them globally. In India, the premium sales do exist, but designing a product like Padfone?
we also try to keep our focus on value for money. We have a lot At Asus, we take design and innovation seriously. We like to
of products in India, which offer good value for the money spent. experiment with new types of products and see how the market
Even in the low end segment, we prioritise on the designs of responds to it. The idea behind launching Padfone is to cater to
the product. The Indian market is different just because Indians the people who want a good smartphone as well as a tablet in a
really research a lot about a product before buying it, which, in a single device. The device is meant for those people who want
way, is good for us as they will understand Asus better. to have the experience of a smartphone on a large screen. For
example, when you are travelling, if you carry the Padfone, then

Q Android 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
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.
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
Q When can we expect the Padfone 2 smartphone-cum-
tablet in India?
We had launched the original Padfone in India last year.
for further developments. But at the moment, we would be Mobile phone is a new product for us. So, our idea is to
focusing on Android for our products. We don’t have any plans open the channel with Padfone first, and then expand our
to work on Firefox or Ubuntu, as of now. Continued on page 99...

OPEN SOURCE FOR YOU  | MARCH 2013  |  95


For U & Me Career

Chart a Successful, Recession-


Proof Career in Virtualisation
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.

A
s the globe wrestles with a plummeting for years to come, the OSFY team interacted with the
economy, organisations are looking to industry leaders to get an insight into what it takes to
technologies like virtualisation to optimise make a career in this hot arena.
their IT resources and scale down infrastructure costs. At a time when the recruitment market does not
Whether it’s for storage or servers, the desktop or for seem to be too buoyant, it becomes important to
networks, Indian enterprises, too, have realised the grab the attention of HR managers. And a bagful of
effectiveness of this emerging technology and are natty virtualisation skills can help one get noticed,
increasingly turning to virtualisation. Not surprisingly, even in the sluggish economy, believes Ankit Oberoi,
virtualisation is growing at a fast clip with an co-founder and managing director of Innobuzz
accompanying need for experts in this domain to Knowledge Solutions, New Delhi. “What makes
meet the industry demand. Various recent studies also virtualisation hot as a trend is the fact that it helps
indicate that IT professionals armed with virtualisation lower the operating costs and offers many benefits.
skills are among the most sought-after employees. With For example, server virtualisation rules out the need
virtualisation promising to offer strong career prospects for numerous physical servers, which would not only

96  |  MARCH 2013  |  OPEN SOURCE FOR YOU


Career For U & Me

be more uneconomical, but will also accompanied with skills in C and C++,
require more space and the use of will boost employability. In a nutshell, Winner of Best
more resources. Naturally, the demand virtualisation professionals will do well
for virtualisation professionals is high if they are highly proficient in operating Redhat Training
and there is a shortage of dexterous
IT professionals in this domain.
systems, storage, networking, security,
etc.”
Partner Award
This is definitely a perfect time for And do certifications in this since 2005
interested candidates to cash in on domain shore up one’s career
this opportunity,” says Oberoi. prospects? “Certifications, though
The scope of a career in this terrain not mandatory, definitely boost one’s
is immense. Interested candidates can employability in the virtualisation
choose between storage, network, domain and give candidates that
desktop and application virtualisation. extra edge over their non-certified
Explains Ravinder Kumar, technical counterparts during the hiring
manager for virtualisation, Koenig process. But only certification from
Redhat Training & Global Certification
Solutions, New Delhi, “The areas a reputed firm or authority will make
where one can make a career a difference. After all, what matters
in virtualisation are in software is the sound technical skill base of a
development, systems administration, professional,” adds Sinha.
quality engineering, systems support, Industry stalwarts claim that
marketing and more. Systems or as virtualisation is a revolutionary
virtualisation administrators manage model, it has made steady inroads
applications, and monitor how into the open source ecosystem, too,
these applications work together in thus opening a slew of opportunities
a virtualised environment; quality for IT professionals. Alok
engineers test desktop virtualisation Srivastava, chief executive officer
software, and kernel developers play a and founder of Network NUTS, New
key role in advancing the technology. Delhi, opines, “Earlier, companies
With actualisation becoming did not have much choice and they
mainstream, the conventional IT roles resorted to proprietary virtualisation
too have undergone a sea change, solutions. Now, with an upbeat open
with recruiters looking for candidates source virtualisation ecosystem,
proficient in virtualisation.” large businesses are heavily relying
While enterprises are increasingly on open source for economic
leaning towards virtualisation to advantages. A few enterprises in
Students Placed
leverage their IT resources, it is Hyderabad are planning to migrate
in Wipro, HP,
important to understand the skillsets their servers to Red Hat. The bigger IBM, TCS,
one needs to have to match the the size of the companies, the more Tripod, Comtel,
demand. Tuhin Sinha, owner and CTO number of servers will be based on Daidem, PCS,
of the Academy of Engineering and open source. Naturally, the demand CMS, Redhat &
Management, Kolkata (AEM), shares, for open source professionals Many More.....
“The skillsets vary and depend on what becomes high. In our institute, we
domain of virtualisation one wants do receive requests from various
to get into – development, support, companies to provide training to
services or marketing. The basic their employees on Red Hat Linux
requirement is to have knowledge of Certification.”
the systems for software development So, if you wish to give a fillip to
careers in this spectrum. A basic your employability chances, a career in
knowledge of the Linux kernel, virtualisation is just for you!
KOLKATA
2/80, Dum Dum Road,
1st & 2nd Floor, Kol - 74
By Priyanka Sarkar Contact : 9830075018 / 9830051236
The author is a member of the editorial team. She loves to weave in and out the little visit us at : www.aemk.org
nuances of life and scribble her thoughts and experiences in her personal blog.

OPEN SOURCE FOR YOU  | MARCH 2013  |  97


For U & Me Interview

Open source technology will bring


in a services-based model with a
reasonable opex and zero capex
myOpenSourceStore.
com is an open
source solutions
provider catering to
businesses worldwide.
Devasia Kurian,
managing drector,
myOpenSourceStore.
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.
Devasia Kurian, managing drector, myOpenSourceStore.com

W hat is happening with open source technology w.r.t.


businesses and organisations?
The adoption rate is low in comparison with proprietary
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
alternatives; but there is pressure on enterprises to meet reasonable opex and zero capex. The industry will welcome
customer requirements with fewer resources and to find this movement whole-heartedly.
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
Q What 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
considerable financial savings. Government institutes and PSUs source technology in a system, it needs to understand the
are looking forward to more adoption and implementation of long-term implication on the business. Since the decision to
OSS in their IT infrastructure. The increasing awareness of shift to open source is a long-term objective and incurs costs,
open source in the public and government sector has been one the company needs to evaluate multiple factors.
of the significant developments in IT technology. Some of them are:
ƒƒ Does the software offer sufficient features for the near future?

Q How is open source affecting the commercial software


business model?
As we know, a liberal licensing policy makes open source
ƒƒ Will it scale up based on the organisation’s requirements?
ƒƒ Is there adequate documentation on installation,
configuration and trouble shooting?
software accessible free of charge, along with the source ƒƒ Will the service provider offer support on installation,
code, which can then be customised by the user as per configuration and maintenance, and…
requirements. This drastically reduces costs, ensures less ƒƒ Is there a large online community supporting the software?
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
Q Does the open source approach have any drawbacks for
organisations?
Though open source software is free software, which can
effectiveness and easy customisation. be modified, customised and is cost effective, there are
Open source technology will revolutionise the current certain limitations.

98  |  MARCH 2013  |  OPEN SOURCE FOR YOU


Interview For U & Me

ƒƒ Many developments in the OSS world occur very fast, "It is important to know how open
almost at the same time. It is hard to keep track of which source software will be used within
one is the latest version of a particular software. the business environment in terms of
ƒƒ In most cases, there is no proper support service for
installation, configuration or troubleshooting.
professional implementation and has to
ƒƒ There is also the risk of open source software be viewed with a clear focus."
stagnating, due to developer distraction or the loss of
motivation and resources. is important to know how open source software will be used
within the business environment in terms of professional

Q What are the problems impeding the widespread


adoption of open source technologies?
implementation and has to be viewed with a clear focus.

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
Q What 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
download software for free, but that requires support in terms of world. As the market is maturing, organisations in India have
seamless installation and implementation. We should, therefore, slowly started accepting the advantages of open source platforms
provide support to enterprises, right from product selection and and encouraging collaboration. Open standards is a key facilitator
installation configuration to maintenance (all on one platform), for customisation and innovation, and the Indian developer
thereby accelerating the adoption of open source technology. community is creating OSS for a wide range of applications. With
the increasing adoption of business applications by the Indian small

Q What 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
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
organisation’s and CIO’s IT strategy. Second, one has to are in discussions regarding the adoption of open source software,
select the right set of resources. The companies have to work e.g., the Indian Railways is supporting the deployment of Asterisk,
towards creating an end-to-end solution comprising product an open source telephony platform, for all new developments in
selection, and support for installation and maintenance. It internal telephone services.

Continued from page 95...


channel with Padfone 2. Due to the innovative design of as big brands are slowly entering the market. Previously,
the Padfone, the product cycle is a little bit longer. Also, tablets were sold in the mobile shops. In 2013, the IT
people need time to understand the two-in-one feature of channel will also rush to get tablets.
the Padfone device. This is the main reason for the delay in
the launch of Padfone 2 in India.
Q Recently, Acer launched its Iconia B1 tablet under the
sub-10k category. What are the key challenges for Asus

Q Asus 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?
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
Primarily, what we have seen from the other players in the low- are observing the experience of other brands. Also, we don’t
end Indian tablet market is that there is actually huge potential. want to compromise on the product’s features and the quality.
The local tablet brands have helped us by introducing tablets So, having a product with a good design and features, while
to Indians beforehand. We believe that the local brands have at the same time keeping the price low, is a major challenge
initiated the trend and have also developed the initial demand for Asus. We are reviewing all the possibilities of launching a
in the Indian market. After the initial market is created, people good product at a decent price.
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.
Q How is Asus planning to market its upcoming Android-
based 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

Q What kind of response have you observed in India with


respect to tablet PCs?
In India, last year saw the tablet business start off. We
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
believe around 2 million tablet units were sold in India in market, and hope that people will like the quality being offered
2012. This year, we can expect the sales to increase greatly, to them from a brand.

OPEN SOURCE FOR YOU  | MARCH 2013  |  99


Admin Insight

For SMBs, Virtualisation is


the Way to Go!
The virtualisation market has gradually matured over the past few years, with most
enterprises adopting it today. And now, SMBs too are switching to it, on a large scale.

V
irtualisation has become almost mandatory Needless to say, virtualisation is currently the norm for
for all companies deploying IT solutions in modern-day IT infrastructure.
any way. It simplifies one’s IT infrastructure, Kashish Karnick, brand manager, IBM BladeCenter,
creating a more dynamic and flexible set-up. As B S India and South Asia, says, “Virtualisation is changing
Nagarajan, director, System Engineering, VMware the way people work. It allows customers to consolidate
India & SAARC, rightly puts it, “Virtualisation makes their workloads on to a fewer number of hardware
your IT infrastructure simpler and more efficient. systems. It is possibly one of the most important aspects
With virtualisation solutions, applications get in today’s IT world. It has led to an absolute overhaul
deployed faster, performance and availability soar, and of the computing industry. The awareness about
operations become automated, resulting in IT that’s virtualisation is growing and people are aware about the
easier and less costly to own and manage.” advantages it provides.”

100  |  March 2013 | OPEN SOURCE FOR YOU


Insight Admin

The latest trends in virtualisation customised offerings for SMBs. In fact, this is a
Increased percentage of virtualised workloads: One very important segment for a majority of companies.
of the trends that the Indian virtualisation industry is Nagarajan emphasises, “Virtualisation in the world of
witnessing is the increasing workload that customers are SMBs is growing by leaps and bounds. This sector will
virtualising. Nagarajan says, “I have been around in this continue to be our focus area this year as well. Some
industry for quite some time now, from the days when we of our offerings are strictly dedicated to SMBs, and we
had to literally struggle to make customers aware about are constantly trying to make them more affordable.
the benefits of virtualisation. From such a scenario, we The word SMB implies different things to different
moved to a phase when customers started virtualising a companies but for VMware, SMBs are companies that
few workloads for test and development; and today, I am are not necessarily small but whose IT infrastructure
glad to share that we have customers who have virtualised may be small or medium—for instance, a large textile
all the way from 50 per cent to around 80-90 per cent of firm could have a large business volume, but we
their data centres. In fact, there are a few customers who might classify it as an SMB from the IT infrastructure
are 99-100 per cent virtualised. The trend we are seeing is point of view. There is a lot of traction amongst the
that customers are comfortable increasing the percentage SMBs and SMEs for virtualisation. Let me give you
of workloads that are virtualised.” an example. Disaster Recovery (DR) is generally
Business-critical applications go the virtualisation associated with large customers with big data centres.
way: Bhaskar Jayakrishnan, director, Software Development, Not many small companies go beyond a certain point
Computing Systems Product Group, Cisco, talks of the when it comes to scaling up their IT infrastructure,
virtualisation trends in the domain of business critical as it is expensive and complex. But we all know that
applications. He says, “The other trend that we are observing IT is critical for any company, whether it is small or
(which is also the reason behind the emergence of the first big. A lot of small companies were not able to afford
trend) is the virtualisation of business critical applications. the expensive DR solutions previously. So starting
Gone are the days when customers would virtualise only this year, we have included the replication part which
those applications that are less critical. The companies used is used for DR as a free component in our existing
to virtualise only the applications that IT was very confident licences. As a result, even SMB customers will be able
about. They never touched the applications owned by to replicate their data and servers from one location to
businesses, like ERP and mail messaging. the other. So this is just one example.
“Some of these applications are extremely critical to “The other important example revolves around back-
organisations and they were not virtualised a few years ups, which are critical to every customer, be it an SMB or
ago. But now a number of customers are coming forward an enterprise. So we have included a back-up solution in
to virtualise their business critical applications like our licences, free of cost. This is an issue that every SMB
SAP, Oracle Business Suite, etc. There were never any faces. They are not able to afford more expensive back-up
security-related fears for these applications. Organisations software, so a part of the back-up solution is included in
worried about whether the critical application would run our package,” he adds. So the belief that virtualisation is
the same way on a virtual platform as it did on a physical not meant for SMBs and is only for bigger companies is
platform, and whether its performance would suffer. We gradually fading away.
have addressed most of these concerns now, and there are Karnick adds, “First of all, nobody implements a
enough ways to prove that your performance is not going technology just for the sake of it. People implement
down. You get the same performance and, in some cases, technologies to address their business problems. Most
it is even better—if you make the best use of the platform. customers spend a majority of their time and budget
Most vendors today are virtualisation friendly.” in solving their existing problems, which leaves them
Migration of workloads from UNIX to x86 with very little time and money to focus on newer
environments: Arun Kumar, general manager, Red Hat innovations that can help them grow. Typically, the
India, says, “India is a UNIX rich country, in the sense that function of IT is to keep things moving. Thankfully,
we have a lot of UNIX deployments in India, compared due to virtualisation, a lot of these problems are
to other countries. These days, we are seeing a number of resolved and the IT team is now able to think beyond
customers (thanks to the high cost of maintenance, growing the regular issues and take a step ahead in the direction
complexity, and so on) trying to move away from their of innovation.”
legacy UNIX environments to the x86 environment.”
By: Diksha P Gupta
SMBs are getting virtualisation-friendly
The author is assistant editor at EFY.
Most companies offering virtualisation solutions have

OPEN SOURCE FOR YOU | March 2013  |  101


For U & Me Case Study

How OSS Helped a Construction


Company Almost Halve its IT Budget!
SEW Infra has been able to save nearly 40 per cent of its IT budget by deploying open
source solutions.

O
pen Source India 2012 attracted a diverse The company has several projects
audience. Techies from all parts of the across India and Africa
world came to the convention to share and Shivaram Yeruva narrates, “When I joined SEW
understand the latest in open source technology. But it Infrastructure Ltd in September 2008, the company was
was Shivaram Yeruva, from the construction industry, in the middle of the Oracle ERP implementation. The
who presented a most interesting case study. This IT initial part of my role was to set up a data centre at the
infra lead of SEW Infrastructure narrated a success SEW office to host the production class servers. The goal
story about how open source technology not only was to enable speed and flexibility in server provisioning
helped him cut costs but also win over his colleagues while containing the costs. We looked into setting up
to the OSS cause. the entire environment in a virtual environment. Part of
SEW Infrastructure Limited (www.sewinfrastructure. the challenge was that Oracle EBS was not yet certified
com) was founded in 1959, and is currently headquartered to be hosted on virtual servers. With the support of the
at Hyderabad in India. The company is one of the largest management, I risked going for a virtual environment
civil infrastructure-engineering majors in the country. since the application was still under development. We

102  |  March 2013  |  OPEN SOURCE FOR YOU


Case Study For U & Me

looked into several options available in the market, but per the requirements. We
settled for XEN virtualisation, which is under GPL and found it easier to manage after
is an open source platform. deployment, as we could get
“Over the next few months, the environment not immense support from the
only proved to be absolutely stable but also offered the forums.”
flexibility required for rapid cloning, backup, server to However, Shivaram's quest
server migration. The fact that the servers were virtual did not end here. He wanted to
made no difference to the Oracle EBS application leverage open source tools to
and database admins. We deployed our entire data enable the end users as well.
centre on open source by using XEN virtualisation, He says, “We have deployed
iptables as firewall, Snort as the Intrusion Detection Shivaram Yeruva, IT infra lead, many open source software
System, Squid as the Internet filter/proxy, Nagios as SEW Infrastructure Ltd at the user level, which has
the network and device monitoring system, and Zci and helped in reducing our costs to a large extent. Earlier, we
OCS for asset management. used to purchase office tools and PDF tools to convert
“SEW’s construction sites are spread across the length the documents. But now, we are using OpenOffice and
and breadth of the nation, with some of them located in LibreOffice; we have many templates available for the
hard to reach places such as Arunachal Pradesh and North same. We use DIA for flow charts or organisation charts.
Sikkim. Our employees had to trek several kilometres to Gradually, we trained our employees to use Linux as
make a phone call and get in touch with the head office. their desktop OS. Initially, it was an uphill task, because
We set up a nationwide VoIP infrastructure on Asterisk they were used to Windows and breaking that mindset
running in the XEN environment that handles more than does take time. With some investment in training, and
half a million minutes of voice calls per year.” identifying and supporting the key change catalysts in the
organisation, we are getting good results in the transition
The challenges were many from Windows to Linux. After some initial hiccups, things
Shivaram’s belief in open source technology drove him have been smooth.”
to convince more and more colleagues in the industry Shivaram explains that his job as an IT manager is
about its benefits. to ensure the organisation’s growth, both technically and
He reminisces, “While we were discussing our financially. Adoption of open source technology definitely
ERP deployment on open source, the management required that extra bit of effort, but his conviction to make
was concerned about the post ‘go-live’ support. The it was much bigger than the hurdles he faced.
ERP implementation partner recommended against He summarizes his experience saying, “Go for
virtualisation since it was not supported by Oracle at that open source and try it; later, you'll love the flexibility it
point of time. Since we were still in the ‘development’ offers. Modify it as per your needs and cut your capital
mode, we went ahead and took that risk. We were expenditure. You will find new information on the
cautioned that it was not a standard procedure or a good forums every now and then that will help you enable
practice. Our CIO, Sidhartha Meka, supported us by innovative solutions. You will not be stuck with a vendor’s
trusting our technical expertise.” development and release cycles, and the frustration of
At the end of the day, it appears that what is dealing with its support processes for every issue.”
required is conviction and the technical knowhow.
Things fall in place if these two are perfectly aligned. Flexibility, and freedom that is free of cost!
Eventually, when the application was finally ready for SEW has saved at least Rs 100 million by believing in open
production level deployment, Oracle EBS was certified source solutions. Typically, provisioning of extra capacity
on Oracle’s VM. and users requires lengthy budgetary approval processes
Today, when he looks back, Shivaram feels good that hamper business expansion. With open source
about the fact that he could continue with his passion for this is hardly a challenge. Also, the use of open source
open source technology, while benefiting the company. architectures plants the organisation in an open standards
He says, “Being a non-IT company, we always oriented environment. This contrasts with the platform-
have budget limitations for IT infrastructure – which specific dependencies on the vendors' proprietary
was yet another reason to implement open source apps, technologies that are hard to migrate away from, and
apart from my passion for open source technology. also require specialised skills to manage.
When we went on to search for the appropriate open
source software for our company, we found quite a few By: Diksha P Gupta
alternatives. The beauty of open source is that it allows
The author is assistant editor at EFY.
complete flexibility and one can do modifications as

OPEN SOURCE FOR YOU  | MARCH 2013  |  103


Cisco Systems
Citrix Systems
Cisco
Hitachi Data
Systems
Intel
HP Microland
IBM

A List Of
MontaVista
Novell India
Pvt Ltd Cisco
NetApp
Oracle India PVT Ltd
Netweb

Virtualisation Solutions Providers


Technologies
HCL Technologies
HP Parallels
IBM RedHat
Wipro Vmware

Cisco Systems
Citrix Systems

Cisco Systems | Bengaluru


Cisco
Hitachi Data
Systems
Intel
HP Microland
IBM
MontaVista
SONA, which includes Cisco Network Virtualisation, encompasses both a vision for the evolution of enterprise
Novell India
Pvt Ltd Cisco IT and a pathway to get there. Cisco differentiates itself from most other vendors by adopting a systems-level
NetApp
Oracle India PVT Ltd
approach that integrates services throughout the infrastructure. Looking at the Cisco Catalyst switching portfolio,
Netweb
Technologies
it becomes apparent that a wide range of Layer 3 switches support network virtualisation. Other vendors have
HCL Technologies point solutions that are only applicable for limited areas within the campus network. Cisco Network Virtualisation
HP
is a primary component of the Cisco SONA framework.

Citrix Systems | Bengaluru


The desktop virtualisation system that centralises and delivers desktops to users anywhere, reduces desktop
TCO by up to 40 per cent and improves data security by centralising desktop management. XenDesktop delivers
a high definition user experience and personalised desktops over any connection.

Dell | Bengaluru
The solutions from Dell can help provide a flexible infrastructure for the data centre by providing access to data
for remote and mobile workforces using desktop virtualisation solutions. With virtualisation, you can count on
an approach that meets your growing needs. It will increase an organisation’s ability to meet evolving business
requirements by leveraging existing resources and scaling the infrastructure without the need to rip and replace.
Dell focuses on standards-based solutions, keeping the barriers to change low. With Dell, you will not be locked
into proprietary hardware implementations or management frameworks that may limit your options in the future.
LEADING

Hitachi Data Systems | Mumbai


Hitachi Virtual Storage Platform is the only 3D scaling storage platform designed for all data types. It is the only
enterprise storage architecture that flexibly adapts for performance, capacity and multi-vendor storage. Combined
with unique Hitachi Command Suite management software, it transforms the data centre.

HP India | Bengaluru
The Client Virtualization Access Service of HP provides multiple network access, flexible role-based access, a user-
friendly interface, and a secure printing network—all from a single access device. Using this unique technology
as part of a client virtualisation solution, HP can provide a unique user-focused interface to internal, secure,
partner, or cloud network resources—all from a variety of endpoint devices—ranging from desktops to tablets.

IBM | Bengaluru
IBM Virtualisation provides a logical rather than physical view of data, computing power, storage capacity and other
resources. IBM System Storage virtualisation helps provide centralised data management, reduced complexity,
and reduced costs. The IBM SmartCloud Virtualized Server Recovery service can help reduce your recovery time
and improve the reliability of your recovery infrastructure.

Intel | Bengaluru
Hardware-based Intel Virtualization Technology (Intel VT)1 improves the fundamental flexibility and robustness of
traditional software-based virtualisation solutions by accelerating key functions of the virtualised platform. This
efficiency offers benefits to the IT, embedded developer and intelligent systems communities.

104  | march 2013 | OPEN SOURCE FOR YOU


Cisco Systems
Citrix Systems
Cisco
Hitachi Data
Systems
Intel
HP Microland
IBM
MontaVista
Novell India
Pvt Ltd Cisco

Microland | Bengaluru NetApp


Oracle India PVT Ltd
Netweb
Technologies

Microland’s Desktop Virtualisation Business Value Assessment Service provides a holistic approach towards HCL Technologies
HP Parallels

adopting desktop virtualisation adoption. By using this service, enterprises will understand the state of readiness IBM RedHat
Wipro Vmware
of existing desktop infrastructure, the impact of desktop virtualisation on the organisation, the business case and Cisco Systems

ROI for a desktop virtualisation initiative, and obtain a high-level design road map for implementation. Citrix Systems
Cisco
Hitachi Data

MontaVista | Bengaluru
Systems
Intel
HP Microland
IBM
MontaVista

MontaVista offers several virtualisation solutions, including KVM Hypervisor (full virtualisation), Linux Containers Novell India
Pvt Ltd Cisco

(OS resource virtualisation) and MontaVista Bare Metal Engine (OS resource virtualisation and SoC hardware NetApp
Oracle India PVT Ltd
optimisation).The company’s virtualisation solutions are certified by Linux Standard Base (LSB) 3.0, Carrier Grade Netweb
Technologies
Linux specification (CGL 5.0) and SCOPE Alliance Linux Profile 1.1. An impressive level of six nines (99.9999%) HCL Technologies

in reliability (a downtime of less than 31.5 sec/year) has also been proven by the company.
HP

Novell India Pvt Ltd | Bengaluru


Novell offers a wide range of best-in-breed and robust virtualisation solutions. Some of its key virtualisation solutions
include the integrated Xen-based virtualisation solutions built on the capabilities of the SUSE Linux Enterprise
Server, Kernel Virtual Machine (KVM), Linux Containers, Hyper-V as well as Windows guest support for KVM.

NetApp | Bengaluru
With a NetApp agile data infrastructure, you can run mixed applications in a shared, virtual environment, achieve
increased demand and unlimited scalability for your virtual servers, and optimise storage resources for greater
efficiency, performance, ROI, and agility. You can also maintain continuous operations during updates, upgrades,
and refreshes; and integrate data protection with zero performance impact and faster recovery.

Netweb Technologies | New Delhi


Netweb Technologies provides server and desktop virtualisation to its customers. It is also active in the storage
solutions and HPC space, and maintains around 5000 servers a year. The firm operates in six cities across India,
and has a direct service and sales channel to the end customers.

Oracle India Pvt Ltd | Gurgaon


Oracle offers the industry's most complete and integrated virtualisation, from the desktop to the data centre. Going
far beyond simple consolidation, the company enables customers to virtualise and manage their full hardware and
software stack. Designed for efficiency and optimised for performance, Oracle's server virtualisation products
support x86 and SPARC architectures, as well as a variety of workloads such as Linux, Windows and Oracle Solaris.

Parallels | Seattle, USA


Parallels uses its open source OpenVZ project as its commercial hosting product for Linux virtual private servers.
High density and low cost are the two keywords you'll hear when experiencing a Parallels-based hosting solution.
These are the two main reasons why the world's largest hosting companies choose Parallels. But, the innovation
doesn't stop at Linux containerised virtual hosting. Parallels has also developed a containerised Windows platform
to maximise the number of Windows hosts for a given amount of hardware.

Red Hat | Pune


Red Hat Enterprise Virtualization is a complete virtualisation management solution for servers, powered by the
people who brought you Red Hat Enterprise Linux. With Red Hat Enterprise Virtualization, you can maintain
business continuity, to scale and integrate both Linux and Microsoft Windows workloads. Red Hat Enterprise

oPEN SOURCE FOR YOU | march 2013 | 105


Cisco Systems
Citrix Systems
Cisco
Hitachi Data
Systems
Intel
HP Microland
IBM
MontaVista
Novell India
Pvt Ltd Cisco
NetApp
Oracle India PVT Ltd
Netweb
Technologies
Virtualization for Servers 3.1 is built on Red Hat Enterprise Linux, a platform trusted by thousands of organisations
HCL Technologies on millions of systems around the world for mission-critical workloads. It instantly delivers Microsoft Windows
and Linux desktop operating environments to thousands of users from centrally managed servers in the data
HP Parallels
IBM RedHat
Wipro Vmware
centre. It lets users remotely access their individual desktops from nearly any client device, including thin clients
Cisco Systems
Citrix Systems
or re-purposed PCs. With Red Hat Enterprise Virtualization for desktops, you get cross-platform support and a
Cisco
Hitachi Data
great user experience with the freedom of an open source foundation.
Systems
Intel

VmWare | Bengaluru
HP Microland
IBM
MontaVista
Novell India
Pvt Ltd Cisco
NetApp
Oracle India PVT Ltd
VMware virtualisation lets its clients run multiple operating systems and applications on a single computer,
Netweb
Technologies
consolidate hardware to get vastly higher productivity from fewer servers, and save 50 per cent or more on overall
HCL Technologies IT costs. It also offers speed and simplifies IT management, maintenance, and the deployment of new applications.
HP

Wipro | Bengaluru
Wipro's Storage Virtualization Platform solution enables a virtualised platform for the development of storage
applications like mirroring and de-duplication in an R&D set-up, thereby enabling easy debugging of the components.
The storage virtualisation framework developed by Wipro is a convenient way to implement virtualisation
applications without getting into the kernel and device driver intricacies. This easy-to-debug model provides a
framework for easy testing of core algorithms.

Read Open Source For You:


Asia’s Leading Open Source Magazine

106  | march 2013 | OPEN SOURCE FOR YOU


TIPS
& TRICKS
How to check the date and time the system sudo kill “PID”
was rebooted
Here is a simple command to check the system’s …where PID is the process ID of Xorg.
reboot date and time: This will reload the XWindows System.

#last reboot
Note: You must have root access to use these
reboot system boot 2.6.18-53.el5 Sat Aug 6 18:02 commands
(8+04:45)
wtmp begins Sat Aug 6 18:02:07 2011 —Indermohan Singh,
indermohansinghk7@gmail.com
The command below will give you the date and time
the system was booted: Handling log files
As developers, we do a lot of testing after coding the
#who -b software and we frequently need to handle the log
files to identify the errors in the code of an application
system boot 2011-08-24 09:43 program. Given below are the steps to handle various log
files that are being generated on a Linux system.
—Sumit Chauhan,
sumit1203@gmail.com 1. Clearing a log/text file:

Reloading XWindows System $ >filename


Sometimes, while working on a Linux-based
computer, XWindows System doesn’t respond very The above command will clear all contents of the file.
well. Here are the steps to reload XWindows System 2. To view the log/text file:
in a non-responsive Ubuntu system.
1. First open the command mode by pressing: Ctrl + Alt + F2 $ tail -f filename
…and then entering your username and password.
2. Then run the following command: This command will display the file contents as and
when the log is written. It also displays the flow of the log.
top 3. To use more sophisticated tools on log files:

Search the process named ‘Xorg’ in the list. $ less filename


If it does not appear, wait for a few seconds. Then find
the PID of the ‘Xorg’ process, listed at the extreme left of This will display the log file contents. You can also use
the output on the top. the commands below while using less.
You can also get the PID using the command given below: a. To refresh the log automatically, press:

pgrep Xorg “f”

3. Now run the following command to kill the Xorg process: after issuing the less command.

108  |  march 2013 | OPEN SOURCE FOR YOU


Counting the number of files in a directory
b. To stop refreshing the logs, press: Here is a simple command that can count the
number of files in a directory (not the hidden ones):
CTRL + C
echo * | wc -w
c. To scroll up, press:
—Anil Awasare,
w anil.awasare@gmail.com

d. To scroll down, press: Find and move files


You can find and move files in two steps. Step 1
d enables you to find all files with .mp3 as the file
extension. In Step 2, you can move them.
e. To exit the mode, press: Step 1:

CTRL+C [narendra@ubuntu]$ find DIR_NAME -type f -iname “*.mp3”

and then press ./dir2/f4.mp3


./dir2/f3.mp3
q ./dir1/f2.mp3

—Pranavam Siddharthan,
pranavam.s@gmail.com Note: Replace DIR_NAME with your actual
directory name.
Changing file names from upper case to lower
To manually change the case (upper to lower or vice In the above example, you are only finding the files
versa) of a large number of files can be tedious. So, (that’s why you used -type f) that have extension ‘.mp3’.
here is a script that can make life easy: Now you can move these files by using the ‘-exec’ option
of the ‘find’ command.
#to change uppercase filenames to lowercase Step 2:
#!/bin/sh
if [ $# -eq 0 ] ; then [narendra@ubuntu]$ find DIR_NAME -type f -iname “*.mp3” -exec
echo Usage: $0 Files mv {} /tmp/mp3/ \;
exit 0
fi Here, ‘{}’ matches each filename which is found by
for f in $* ; do the ‘find’ command. And ‘\;’ is used to indicate the end of
g=`echo $f | tr “[A-Z]” “[a-z]”` the command.
echo mv -i $f $g After executing this command, all mp3 files are moved
mv -i $f $g into the ‘/tmp/mp3’ directory.
done
—Narendra Kangralkar,
If you want to change the case from lower to upper, replace narendrakangralkar@gmail.com

g=`echo $f | tr “[A-Z]” “[a-z]”`

with
Share Your Linux Recipes!
g=`echo $f | tr “[a-z]” “[A-Z]”`
The joy of using Linux is in finding ways to get around
problems—take them head on, defeat them! We invite you
in the script. to share your tips and tricks with us for publication in OSFY
so that they can reach a wider audience. Your tips could be
related to administration, programming, troubleshooting or
—Anil Awasare, general tweaking. Submit them at www.linuxforu.com. The
anil.awasare@gmail.com sender of each published tip will get a T-shirt.

OPEN SOURCE FOR YOU | march 2013  |  109


CALENDAR FOR-2013
eVENTS TO LOOK OUT FOR IN 2013
Date Name of the event description location website
From identifying the building The Taj Mahal Hotel,
blocks for a successful Mobile New Delhi http://www.fleming-
The Mobile Strategy strategy to understanding the Contact: Kia Harry, Mar- gulf.com/confer-
5th – 6th Mar, 2013
Summit power of analytical data from all keting Executive; +91 enceview/The-Mobile-
the mobile sources, this summit 8105095358; kia.harry@ Strategy-Summit/408
has it all. fleminggulf.com

Industry's only event to deliver the


insights, tools and relationships http://www.gartner.com/
Gartner Symposium/ITxpo Madinat Jumeirah Hotel,
5th – 7th Mar, 2013 necessary to create, validate and technology/symposium/
Dubai, U.A.E. Dubai, U.A.E.
execute transformative business dubai/
technology strategies.

A place for thousands of information


http://www.interop.com/
6th – 10th May, 2013 Interop, Las Vegas technology professionals to gather Mandalay Bay, Las Vegas
lasvegas/
for networking.

This Summit offers guidance on


Gartner IT Infrastructure turning today's improvements http://www.gartner.com/
13th – 14th May, 2013 Operations & Data Center in IT infrastructure and process Grand Hyatt, Mumbai technology/summits/
Summit efficiency into tomorrow's business apac/data-center-india/
advantage.

A focused conference that will bring


NIMHANS Convention http://www.cloudcon-
23rd – 24th May, 2013 Cloud Connect together the entire ecosystem of the
Center, Bengaluru nectevent.in/
cloud.

http://www.gartner.com/
Gartner Business Intelligence This summit provides Business
technology/summits/
10th – 11th Jun, 2013 & Information Management Intelligence professionals and IT ex- Grand Hyatt, Mumbai
apac/business-intelli-
Summit ecutives with world class research.
gence-india/

Through the Global High on


Cloud Summit will address the
Mumbai
issues, concerns, latest trends,
Contact: Prashanth Nair;
new technology and upcoming
Sr. Conference Producer; http://www.theglobal-
The Global High on Cloud innovations on the Cloud platform
12th – 14th Jun,2013 Contact No.: +91-80- highoncloudsummit.
Summit which will give an open forum
41154921; E-mail ID : com/
and opportunity to everyone in
contactus@besummits.
the industry to come together and
com
share their ideas & updates and
provide a global outlook.

Being the Asia’s largest integrated


www.CommunicAsia.
CommunicAsia2013 / Enter- info communication technology Marina Bay Sands,
18th – 21st Jun, 2013 com & http://www.goto-
priseIT2013 event, it is instrumental in connect- Singapore
enterpriseit.com/
ing the ICT industry.

Interop New York offers sessions


and networking opportunities open
to all attendees including Vendor http://www.interop.com/
30th Sep – 4th Oct, 2013 Interop, New York Javits Center, New York
Sessions, Cloud and Virtualization newyork/
Theater Sessions, InteropNet tours
and classes and Speed Networking.

Gartner Symposium/ITxpo, The world's most important gather-


21st – 23rd Oct, 2013 Goa N.A.
Goa ing of CIOs and senior IT executives.

It is the premier Open Source NIMHANS Convention


conference in Asia targeted at Center, Bengaluru
http://osidays.com/
13th – 15th Nov, 2013 Open Source India nurturing and promoting the Contact: Atul Goel; Ph-
osidays/
Open Source ecosystem in the 011-26810601/2/3; E-mail:
subcontinent. osidays@efyindia.com

110  |  March 2013 | OPEN SOURCE FOR YOU


Mainstream Enterprise
Adoption of
Open Source Databases
A conversation with Ed Boyajian,
CEO, EnterpriseDB

Are enterprises embracing open source database software today?


Absolutely. In 2012 we counted 32 of the Fortune 500 as customers and 47 of the Global 1000. That
includes some of the biggest IT users in the world. IT operations at the Federal Aviation Administration,
the US State Department, Fujitsu, Sony-Ericsson and Sony Online Entertainment are all using Postgres
or Postgres Plus from EnterpriseDB. Interestingly, also noteworthy, companies like VMware, Microsoft
(through its acquisition of Skype), Apple and Facebook (through its acquisition of Instagram) are using
PostgreSQL. We are at the beginning of an explosion.
Companies are finding that for a fraction of the cost of traditional databases, PostgreSQL can deliver the
sophisticated features and capabilities they require. PostgreSQL has had decades of hardening and
development by a talented and committed community of developers as well as a fast-growing,
supportive ecosystem of database specialists.

How difficult is it to migrate to a new database?


EnterpriseDB has developed a proven Oracle compatibility solution that enables our customers to run
many Oracle applications using Postgres Plus. Postgres Plus natively supports many of Oracle’s system
interfaces, facilitating migrations with minimal cost, risk and disruption. Existing technical staff – from
developers to DBAs to operations teams – leverage existing Oracle skills to build and manage Postgres
Plus databases. EnterpriseDB also has developed a comprehensive migration program that begins with
an Oracle migration assessment and provides support and assistance with the process all the way
through to deployment.

What happens after Postgres databases are deployed?


Regardless of whether an organization is deploying applications based on community PostgreSQL or
Postgres Plus, EnterpriseDB provides a portfolio of solutions that ensure success. We have made the
long-term commitment to meeting the demands of the enterprise with Postgres-specialized products,
Hurry! Offer expires September 30, 2012
support, and services. What’s more, we are continually developing new Postgres database
enhancements and sponsoring the efforts of the PostgreSQL community. More than 2,000
organizations around the world turn to EnterpriseDB for Postgres-related products and services.

Contact us today about : • Software Subscriptions • Technical Support 24x7x365


• Migration Assessments • Training for Administrators and Developers • Professional Services
*
Call: +1 781-357-3390 or 1-877-377-4352 (US Only), Email: info@enterprisedb.com

EnterpriseDB Software India Private Limited


Unit # 3, Ground Floor, Godrej Castlemaine, Sassoon Road Pune – 411001
Test, develop and T deploy your
+91 20 application
3058 9500 Fon VMware
+91 vCloud
20 3058 9502powered cloud
www.enterprisedb.com
Avail free cloud credit worth ` 25,000*, visit www.cloudinfinit.com for more details

Das könnte Ihnen auch gefallen