Академический Документы
Профессиональный Документы
Культура Документы
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
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
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.”
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
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
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
A List Of
MontaVista
Novell India
Pvt Ltd Cisco
NetApp
Oracle India PVT Ltd
Netweb
Cisco Systems
Citrix Systems
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
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.
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
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.
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.
#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:
3. Now run the following command to kill the Xorg process: after issuing the less command.
—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
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.
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
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
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/
www.facebook.com/linuxforyou
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
Image quality is poor as the photos have been directly taken from www.facebook.com
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:
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
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.
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
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:
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
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:
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:
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
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.
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.
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.
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.
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,
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
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 () {
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
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
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)
LinuxForU.com
Follow us on Twitter@LinuxForYou
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
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
April 2013 Open source Databases Certification & Training Solution Providers
August 2013 Open Source Firewall and Network security E-mail Service Providers
December 2013 Linux & Open Source Powered Data Storage Network Storage
January 2014 Open Source for Web development and deployment Security
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
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(); ?>
<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
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
‘.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’);
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
Anil Seth
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
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
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
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:
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.
BROWSABLE"/>
<category android:name="android.
intent.category.DEFAULT" />
</intent-filter>
</activity>
<uses-permission android:name="android.
permission.INTERNET"></uses-permission>
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
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:
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...
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
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
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,
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
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.
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
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.
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.
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
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
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....
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.
LOGICAL VOLUMES
Figure 1: What LVM actually does (is) Figure 2: Starting LVM partitioning
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.
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
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
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:
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
wget -q http://download.virtualbox.org/virtualbox/debian/
APPLICATION APPLICATION
oracle_vbox.asc -O- | sudo apt-key add -
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
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
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,
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
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
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.
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...
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.
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.
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...
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.
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.)
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 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...
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
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.
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
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
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.”
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
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
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
A List Of
MontaVista
Novell India
Pvt Ltd Cisco
NetApp
Oracle India PVT Ltd
Netweb
Cisco Systems
Citrix Systems
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
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.
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
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.
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.
#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:
3. Now run the following command to kill the Xorg process: after issuing the less command.
—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
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.
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/