THE COMPLETE MAGAZINE ON OPEN SOURCE
Is Now Open Source For You
How To Choose The Best Wi-Fi Hotspot Device
Volume: 02 | Issue: 07 | Pages: 112 | April 2014
GET CREATIVE
New Ways To Develop Android Apps! GEEKY TOOLS
AppInventor2: To Create Cool Android Apps APP IT UP
Use Xposed Framework To Tweak Your Android STOCK UP YOUR TOOLBOX
Some Must-Have Android Apps For Sysadmins
ADMIN ZONE Will Private Clouds Enhance Your Business?
gPXE: A Troubleshooting Note For Sysadmins
Set Up Perl On Windows 7
www.cyberoam.com
Turning CIO into the next-generation catalyst Cyberoam NGFWs enable enterprise CIOs harness IT & network transformation with insights beyond security, helping them innovate, monetize and differentiate.
Key business benefits of Cyberoam NGFWs to CIOs: • Next-generation threat protection (also secures critical infrastructure / SCADA networks) • Wirespeed gigabit performance • Visibility into BYOD and Virtual environments • Easy compliance • On-appliance Web Application Firewall (WAF)
For more information contact marketing@cyberoam.com
Cyberoam Product Line : Network security appliances (Next-Generation Firewalls/UTMs)
Centralized Management (Hardware & Virtual)
© Copyright 2014 Cyberoam Technologies Pvt. Ltd. All Rights Reserved.
Centralized Reporting
Contents Developers 25
Use New Ways to Develop Android Apps
28
What’s More in Tracing with LTTng
38
Using Xposed Framework to Tweak Your Android
Admin 50
The Apache Spark Big Data Analytics Tool: Fast and Interactive
54 Set Up Perl Windows 7 58 Will Private Clouds
42 Create Cool Android Apps with AppInventor 2
Enhance Your Business?
62
Some Must-Have Android Apps for Sysadmins
67 70
Set Up an Open Virtual Switch Dish TV Reaps Rewards with TechnoInfotech’s Open Source Solution
Open Gurus 72
Have Fun with the Script Command
FOR YOU & ME
47 Programming Made Easy with MVC
78
What Does Open Source Offer the Differently Abled?
REGULAR FEATURES
82
Will a Career in Mobile Game Development be a Good Option?
08 You Said It...
86
Exploring Polynomial Manipulations in Maxima
88
Nokia’s Android Strategy is to go Google-less
10 Q&A Powered By
16 FOSSBytes 41 Editorial Calendar
11 Offers of the Month
107 FOSS Jobs 108 Tips & Tricks
OSFY Facebook
12 New Products
4 | April 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
www.cloudoye.com
TECHNOLOGY IS THE ADVANCEMENT AND
CLOUD IS THE POWER
MANAGED SERVICES AND SUPPORT
API AND CUSTOMER PORTAL ACCESS
MULTI-REDUNDANT STORAGE AND NETWORK
FAST & EASY RESOURCE PROVISIONING
USAGE BASED BILLING
AUTOMATED SERVER SNAPSHOTS
Sales: +91-120-666-7777, Support: +91-120-666-7718 Toll Free No.: 1800-212-2022, Email: sales@cloudoye.com
YOU SAID IT An innovation based on open source I am in my final year B.E. in Computer Science at Anjalai Ammal Mahalingam Engineering College at Thiruvarur in Tamil Nadu. I have developed an open source operating system from Debian Source (Linux) for ARM. It runs on Cubietruck–a single-board computer, which is a new embedded device released just one month ago. Would you have any suggestions on how best my work ought to be taken forward? —Pravin Selva, gselvapravin@gmail.com ED: Thanks for writing to us. It is nice to know about your achievement and many congratulations. After all, the spirit of FOSS lies in giving back to the community. According to us, the best way to let people know about your innovation would be through an article. Let us know if you can write for us about your work. We look forward to hearing from you regarding this.
Looking for content on open source proxy servers I would like to know more about any Linux-based open source proxy server that is easy to use. It would be great if you could provide some content about this topic in your magazine. I am sure a lot of readers will benefit from the articles. I hope you will consider my request. —S Sasikumar, lovelymicrobes@gmail.com ED: Thanks a lot for getting in touch with us and letting us know about your wishes. The topic is indeed good and we are sure it will be of interest to many of our readers. We have taken note of your suggestion and will definitely consider publishing articles on open source proxy servers in forthcoming editions. Till then, keep reading Open Source For You and feel free to give us more suggestions.
Non-delivery of magazine I have been a regular reader and a great fan of Open Source For You since I was in Standard 8. It would be great if you improve your delivery service as I have subscribed for the magazine for a two-year period, but it does not get delivered to me on a regular basis. In fact, earlier when I complained about this, I was sent two copies of ‘Electronics For You'! I am a computer science student and I need all
Share Your
the articles from the ‘Device Driver’ series urgently for my projects and academics. Due to the magazine not being delivered to me, I’ve missed them. I request you to arrange for the articles to be delivered to me as soon as possible as they are very useful. —Vikas Malviya, vikasm.dtu@gmail.com ED: Apologies for the inconvenience. We are forwarding this mail to our support team to immediately sort out this issue. Please feel free to contact Molly Nair (manager, Customer Support) at complaints@efyindia.com or call her up on 0112681 0601/ 02/ 03 (extension: 201 or 202). Meanwhile, you can browse through the series on device drivers on our website www. opensourceforucom. Here is the link: http://www.linuxforu.com/ tag/linux-device-drivers-series/. Hope this helps. On sharing my tutorial
Mahendhar Reddy: I have done a tutorial on ‘How to create your own Twitter using open source software?' Can you let me know how I can share my work with the open source community through your magazine? Thanks. Open Source For You: Hi Mahendhar.
That's a nice initiative. Can you write an article about it? Just ensure that the content is original and not published anywhere else. But first, you need to send us a mail at osfyedit@efyindia.com so that we can send you the editorial guidelines.
Ezines on Kindle devices
Arunprasad Rajkumar: I have been reading OSFY for the last four years and it is really awesome! I have a suggestion for you. Why don't you publish your ezines with Amazon so that they would be readable on Kindle devices?
Open Source For You: That's a nice
suggestion. Thanks. However, as of now, we do not offer that facility, but will definitely try and do so for future editions of our ezines.
Please send your comments or suggestions to: The Editor, Open Source For You, D-87/1, Okhla Industrial Area, Phase I, New Delhi 110020, Phone: 011-26810601/02/03, Fax: 011-26817563, Email: osfyedit@efyindia.com
8 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
Open Source For You Android application is now available for FREE on
Download it now
For any further queries Connect to us on
OpenSourceForU
OR write to omar.farooq@efyindia.com
Powered By
www.facebook.com/linuxforyou Santha Kumar Ravi Chandran: I have a HP laptop i5 -4th gen with 500 GB HDD and with Windows 7. I have an idea to change it to Windows 8 and with that I am going to install Ubuntu and Backtrack5. Please help me to install these three OSes and please help me to partition it in a best combination like Win 8= 200 GB and Ubuntu=150 GB and Backtrack=150 GB. Please guide me about this partition also and suggest me some HDD partitioning. Like . comment
Shivam Gupta: Hey Santha. Your question
is almost common to many other users. First thing install Windows 8 as you stated, {(why ?) because the Windows has a NTLDR loader which supports only Windows and not Linux, Where as Linux has GRUB loader which support both LINUX and windows. So, if you first Install Windows it would install NTLDR then afterwards Linux's GRUB would override it, and chainloader could be applied.} After you have installed Windows, create two primary partitions in HDD, one for BackTrack and one for Ubuntu. Second comes Ubuntu either install it by wubi.exe(present inside the iso only) or boot it in pendrive.(If you are a Beginner use wubi.exe). Now you would see NTLDR has been removed and GRUB overtook the chainLoader, Now time for Backtrack. Install backtrack in a USB stick (Via yumi i personally recommend it).Boot from PenDrive and choose Graphical Installation and then Choose your partiton you created for Backtrack> You are good to go ...!!! 3 top O.S. on your Screen. Caution: Select the partition carefully, or you may lose Data. First install Windows . While creating partition in Windows for backtrack and Ubuntu don't format them. Keeep them raw. Enjoy.
Grant Fitzgerald: What flavour of Linux can I install on an old PC that has AMD i686 processor, 1 GB RAM and 120 GB HDD? Like . comment
Anand Kethavarapu: Xubuntu or Linux Mint XFCE
would be good but anyway 1 GB can work with Ubuntu unity and Linux Mint Cinnamon. Maybe it will be little bit slow especially Unity. You could also try Lubuntu if you don't care about eye candy.
Dawn Foyles: I put Linux Mint on my old computers.
10 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
Wanlamsuk Nongrang: How to install Linux
Mint 16 on a Windows 8 laptop (Sony Vaio)?
Like . comment
Subin M Thevalakkattu: Do you mean dual
booting? I think there is no chance for the same due to the HDD developed by that type. But you can definitely install Linux dual boot. The original Windows may be uninstalled after the partitioning. This is certainly doable.
Wanlamsuk Nongrang: I read in Linux Mint 16 re-
lease notes, and it was written that it supports EFI but I need to turn off secure boot. So I disabled secure boot and tried to boot from my pen drive where I burnt the Mint 16 Cinnamon Live DVD. But still I could not boot into Mint. Later I found that if I change UEFI boot to Legacy boot, then I can boot to mint live dvd.. But I can't mount any of the NTFS partitions.
Wanlamsuk Nongrang: Hi am feeling a little
loss in the Internet speed on Centos 6 which was installed on dual-boot. Is there any configuration I need to do to optimise it for my broadband connection? I am using the pre-installed Firefox and updated the whole CentOS to the latest.
Like . comment
Anand Anand: Please check Netstat -NR and ensure your gateway is correctly configured. Alternatively you can perform an Internet BW test. Hope this helps. Pankaj Tiwari: This speed lag is from the very beginning. When I use Windows, it's fine with speed. I used Ubuntu and the speed was great..but there is something with CentOS which is making its Internet access speed slow. Fahad Ahmed: Is this the first time you faced this problem? Did you face this problem before you were using CentOS? Nivas Baskaran: Guys, what are the courses
a system administrator can do? Please suggest.
Like . comment
Anand Anand: You can even learn RHCA, else in the networking domain, you can learn CCNA or CCNP. Dawn Foyles: I put Linux Mint on my old computers.
offe
rS
One month free
2000 Rupees Coupon
(Free Trial Coupon)
Free Dedicated Server Hosting for one month Subscribe for our Annual Package of Dedicated Server Hosting & enjoy 1 month free service
Hurry!till 30th alid Offer vril 2014! Ap
THE monTH
For more information, call us on 1800-209-3006/ +91-253-6636500
No Condition Attached for Trial of our Cloud Platform Hurry!till 30th alid Offer vril 2014! Ap
35%
Get 10% discount
off & more Reseller package special offer ! Free Dedicated hosting/VPS for one month. Subscribe for annual package of Dedicated hosting/VPS and get 1 month FREE Contact us at 09841073179 or Write to sales@space2host.com
Hurry!till 30th alid Offer vril 2014! Ap
Hurry!till 30th alid Offer vril 2014! Ap
Subscribe for the Annual Packages of Dedicated Server Hosting & Enjoy Next 12 Month Free Services For more information, call us on 1800-212-2022 / +91-120-666-7777
www.goforhosting.com
20 % off on online training
Learn to master your field
Get flat 20% discount on every course Hurry!till 30th alid Offer vril 2014! Ap
Use coupon code: OSFYFEB2014 Contact us at +91-98877 89124 or Write to info@grass.com Catch us on facebook.com/grass
www.grras.org
Contact us @ 98409 82184/85 or Write to enquiry@vectratech.in
www.vectratech.in
Get 25% Pay Annually & get 12 Month Free Services on Dedicated Server Hosting
“Do not wait! Be a part of the winning team” Get 35% off on course fees and if you appear for two Red Hat exams, the second shot is free.
www.space2host.com
Get 12 Months Free
For more information, call us on 1800-212-2022 / +91-120-666-7718
www.cloudoye.com
www.esds.co.in
Hurry!till 30th alid r e Off vril 2014! Ap
Enjoy & Please share Feedback at sales@cloudoye.com
Off
PACKWEB
PACK WEB HOSTING ProX
Time to go PRO now
Considering VPS or a Dedicated Server? Save Big !!! And go with our ProX Plans
Hurry!till 30th alid Offer vril 2014! Ap
25% Off on ProX Plans - Ideal for running High Traffic or E-Commerce Websites. Coupon Code : OSFY2014 Contact us at 98769-44977 or Write to support@packwebhosting.com
www.prox.packwebhosting.com
To advertise here, contact Omar on +91-995 888 1862 or 011-26810601/02/03 or Write to omar.farooq@efyindia.com www.linuxforu.com
BUSINESS PAGES
FOSSBYTES Powered by www.efytimes.com
Microsoft releases open source Office 365 SDK for Android In a clear attempt to capitalise on the success of the Android platform and draw more users to Microsoft products, Microsoft has now released an open source SDK for Office 365. Microsoft Open Technologies, the company’s open source subsidiary, has released the SDK for the Android platform under the Apache License, version 2.0. It must be noted that Microsoft has had the Office Mobile for Microsoft 365 app in the Play Store for some time now. However, making the SDK open will help Android developers a great deal in accessing Office 365 data from their apps. In short, Office 365 is now more relevant to the vast Android user base. This SDK will make it possible to use data stored in Microsoft Office 365 from your Android Apps. For instance, Kingsoft Office and Documents To Go can now access your Office 365 data on your Android device. The SDK will provide access to: • Microsoft Exchange Mail • Microsoft Exchange Contacts • Microsoft Exchange Calendar • Microsoft SharePoint Lists • Microsoft SharePoint Files Further, it will be compatible with Android APIs 15 through 18 (4.03, 4.12, 4.22 and 4.3). KitKat users will have to wait a little longer to get their hands on the SDK.
Indian users of FB Messenger can now make free VoIP calls from Android devices
Facebook’s Messenger ‘VOIPFacebook’ has made its way into Indian Android devices, as the company has introduced the voice-calling feature for FB Messenger users. Facebook did not make an official announcement in the context, but as per various reports, the feature was rolled out some time in the last week. This feature was primarily introduced on Android-based devices in March 2013, but was not available in India until now. The voice-calling feature for the Facebook Messenger enables users to call their Facebook contacts for free via a 3G or Wi-Fi network. If you use Messenger, you can activate this feature on your smart device (smartphone or tablet) by first opening a message thread with a friend. Then tap the Android menu button and select Free Call. However, if you fail to see this option, the feature may not be operational at the moment on your device. 16 | April 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
Baxter Robot teaches students at the University of California
We have seen robots employed in manufacturing industries, in the medical field and even in the entertainment sector. Now they have branched out into a new career path at the University of California, Berkeley. A robot named Baxter now teaches students. ‘He’ has been invented by Rodney Brooks, founder of the start-up Rethink Robotics and one of the world’s most celebrated roboticists. Baxter teaches a class of about 30 students about the principles of using and coding for robotics, along with a professor. He runs on the open source Robot Operating System (ROS) which is embedded in his chest. With a friendly face and an animated screen programmed with a smile, Baxter has sensors in his head which help him to sense people nearby and adapt into an environment. At present, students use Python and other coding languages to control Baxter’s various sensors. Safety issues and the lack of a universal operating system were the two road blocks that earlier prevented robots from teaching. That said, Baxter is known to be one of the safest robots on earth. Also, he is powered by a universal operating system, based on which developers can build apps that can run across a variety of machines, as the OS supports app development. Students have even developed programs that enable Baxter to ‘clean up’ a table. Using its camera and other sensors, Baxter was able to identify the objects and move them back to their original resting spots. Compared to other robots, Baxter is cost effective too. While other robots cost around US$ 250,000, Baxter is available for US$ 22,000. Rethink Robotics had built an industrial robot with the same name in 2012. Industry experts believe that experiments like Baxter will revolutionise the teaching domain in the coming years.
FOSSBYTES Here comes a new sound card for Raspberry Pi!
Element 14, the distributor of Raspberry Pi, has launched a little sound card, the Wolfson Audio Card, created in collaboration with Wolfson Audio, for its hugely popular single-board computer. The $33 Wolfson Audio Card sits on Pi’s P5 pins and promises PC-like audio capture capabilities. It has all the features typically found on a sound card. Earlier, the Raspberry Pi had an audio output through its HDMI port. However, the new Wolfson Audio Card extends and improves the board’s qualities. This new card supports high-res audio up to 24-bit/192 kHz. The card outputs audio through a 3.5 mm line out. It also supports analogue and digital audio inputs along with 2W class-D speaker outputs. “With its comprehensive feature set, ease of use and extremely good audio quality, designers will have a completely new audio tool set to work from,” said David Shen, CTO, Element14. The company expects that the new audio card will be helpful to create video capture devices, networked audio receivers, and voice-over-IP applications.
A new wristband uses the pulse as the password
In keeping with the latest trend in wearable devices, here comes a new hi-tech wristband, which records the wearer’s pulse as a password. The band is a security device that authenticates you based on its reading of your pulse. A start-up company, Bionym, has developed the Nymi wristband. It uses dual electrodes, which are integrated into its clasp to sense the wearers’ pulse when they touch the clasp even for a few seconds. The device has an accelerometer and a gyroscope, and fitness apps are in development too. The sensors of Nymi can also be used for gesture recognition, so one can possibly incorporate movement and triggers into the authentication process, other than just the pulse reading of the original wearer.
Despite introducing the feature a year back in the US, Facebook did not launch it in most countries, with India being one of the new countries to get the service in the last few months.
Dropbox seeks to partner with Indian firms
San Francisco-based Dropbox Inc, the cloud storage firm, is reportedly looking to collaborate with Indian mobile service providers and Web companies. According to reports, while the firm doesn’t have any plans to set up offices in the country yet, it wants to reach the huge smartphone and Internet user base that India has. According to the report, Dropbox is currently holding talks with many Indian companies and large corporations. Dropbox VP, Business Development, Sujay Jaswa said that the talks are currently at the very early stages. The company is valued at around US$ 10 billion and has often been touted as the next Facebook or Twitter to come out from the Silicon Valley. India was recently found to be the fastest growing smartphone market in the world by research firm Gartner. This is the reason behind such companies taking an interest in the Indian market.
Fedora 21 to come out with crucial security, crypto upgrades
The Fedora Engineering and Steering Committee has approved a slew of new features in the latest iteration of Red Hat’s Fedora distro—Fedora 21. As the deadline for specifying the final changes in Fedora 21 draws nearer (April 8), it is now clear that the release will come with crucial security and crypto upgrades. Thanks to a new systemwide policy, all applications running on a given Fedora system can have a consistent level of cryptography set between them. This will unify the crypto policies used by different applications and libraries in Fedora 21. In terms of security, Fedora 21 would have a set of predefined levels that will individually define various cryptography related behaviours. The changes in crypto and security levels would eventually require changes in the likes of GnuTLS, recently marred by a longundetected bug that could have allowed potential data theft via a specially crafted encryption certificate. Keeping all this in mind, the final set of changes in Fedora 21 is still under wraps.
IBM brings Big Data to Bollywood
If you thought Big Data analytics was reserved for IT firms, think again. Technology giant IBM is bringing data crunching and analytics to Bollywood. According to a report by the Times of India (TOI), the company believes that Big Data analytics can help directors and producers make films that have a better chance of doing well, rather than merely relying on their instincts. The report further states that IBM used its data analytics technologies on the
18 | April 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
FOSSBYTES
Now you can withdraw cash from ATMs using Google Glass
Dominique Schroder, IT expert and assistant professor of cryptographic algorithms at the Saarland University in Germany, has come up with a new tool called ‘Ubic’, which would allow users of Google Glass to withdraw cash from ATMs, without losing their confidential data. Ubic essentially combines Google Glass with cryptographic methods and automated image analysis. Users will first need to identify themselves to the cash machine in order to access it. Ubic will use the public key to encrypt the one-way personal identification number (PIN). It will then seal it additionally with a digital signature. The result will show up on the screen in the form of a QR code that is basically a black-and-white pattern that carries a unique PIN at the lower end. The PIN will only be visible to the identified wearer of Google Glass, and not to anyone else. “Google Glass decrypts it and shows it in the wearer’s field of vision. Although the process occurs in public, nobody is able to spy on the PIN,” Schroder was quoted as saying. Moreover, the PIN is re-generated each time the customer uses the ATM, adding to greater security. Only the customer will be able to decrypt the encryption done by the public key, with the unique secret key. “As long as this is safely stored on the Google Glass, the user’s money is also safe,” Schroder added. Meanwhile, wearable technology is gradually becoming the order of the day. After Galaxy Gear, Samsung is planning to launch its version of Google Glass. According to a report from Korea Times, the Google Glass alternative, codenamed as Galaxy Glass, is poised to debut in the upcoming IFA trade fair, scheduled to happen in Berlin.
Calendar of forthcoming events Name, Date and Venue
Description
Contact Details and Website
4th Annual Datacenter Dynamics Converged April 24, 2014; Mumbai
The event aims to assist the community in the datacentre domain in exchanging ideas, accessing market knowledge and launching new initiatives
Email: info@datacenterdynamics. com; Ph: 22 6636 4332; http://www.datacenterdynamics. com/conference
Enterprise CIO Summit 2014 May 16, 2014; Mumbai
Around 150 CIOs, CTOs, vice presidents (IT), and heads of IT are expected to attend this summit. They will share and discuss strategies on expansion of business and the use of technology. Speakers at the summit will share their vision and the path-breaking ideas that helped them transform their business.
Uma Varma, Manager-Marketing & Operations; Email: uma.varma@ thelausannegroup.com; Ph: 8884023243; http://www.enterpriseciosummit. com/
9th Annual Datacenter Dynamics Converged May 26, 2014; Dubai
The event aims to assist the community in the datacentre domain by exchanging ideas, accessing market knowledge and launching new initiatives
Email: info@datacenterdynamics. com; Ph: 22 6636 4332; http://www.datacenterdynamics. com/conference
2nd Annual The Global 'High on Cloud' Summit May 28-29, 2014; Mumbai
The summit will address the issues, concerns, latest trends, new technology and upcoming innovations on the Cloud platform. It will be a open forum, giving an opportunity to everyone in the industry to share their ideas.
Email: contactus@besummits.com; Ph: 80-49637000; Website: http://www.theglobalhighoncloudsummit.com/#!about-thesummit/c24fs
4th Annual Datacenter Dynamics Converged September 18, 2014; Bengaluru
The event aims to assist the community in the datacentre domain in exchanging ideas, accessing market knowledge and launching new initiatives
Email: contactus@besummits.com ; Ph: 80-49637000; Website: http:// www.theglobalhighoncloudsummit. com/#!about-the-summit/c24fs
Open Source India, November 7-8, 2014; NIMHANS Center, Bengaluru
It is the premier Open Source conference in Asia that aims to nurture and promote the open source ecosystem in the sub-continent.
Atul Goel-Sr.Product & Marketing Manager; Email: atul.goel@efyindia. com; Ph: 0880 009 4211
5th Annual Datacenter Dynamics Converged; December 9, 2014; Riyadh
The event aims to assist the community in the datacentre domain by exchanging ideas, accessing market knowledge and launching new initiatives
contactus@besummits.com; Ph: 80 4963 7000; Website: http:// www.theglobalhighoncloudsummit. com/#!about-the-summit/c24fs
movie ‘Ram-Leela’ to predict that the movie would have a good first weekend. IBM was 73 per cent confident of its prediction, and indeed the movie did have a good first weekend and went on to become a big hit. IBM reportedly analysed over 700,000 posts on social networks like YouTube, Facebook and Twitter for 25 different films. The movies analysed include Kahaani, Agneepath, Barfi, Ek Tha Tiger, Bhaag Milkha Bhaag and Kai Po Che.
You can stream movie torrents to your Linux desktop!
To all the torrent users out there, here’s some good news! Now you can stream torrents to your computer. A new open source application called Popcorn Time will let users stream movie torrents in Linux, as well as in Windows and OS X. This application, a first of its kind, is for those who are too impatient to wait for a torrent to download! Popcorn Time lets users search the Web’s torrents immediately and even helps in choosing the best version for you. Currently in beta, there are no usage restrictions to using the app, as of now. However, torrent users might be aware beforehand about the legal issues that entail watching movies via streaming torrents. The same set of ‘legalities’ also apply with Popcorn Time. Further, you will be seeding movies as well, so take note that even as you’re leeching, you are also actively sharing the content as you watch it. Further, if you’re using a www.OpenSourceForU.com | OPEN SOURCE For You | April 2014 | 19
FOSSBYTES
Now you can add Shut down and Restart options to Ubuntu’s Unity Dash!
It is now possible to add powering on/off options to Ubuntu’s Unity Dash, a pleasant surprise for ardent Ubuntu users. This is possible through the new software called Atareao PPA, which adds the Shut Down, Reboot, Hibernate, Log Out and Lock Screen options to the Dash. The items can be found in the Dash almost instantly, after installation has completed. In case you don’t see them, you can log out and log in again to make the Dash detect the items. However, the downside is that all the options are promptless. Therefore, if you tend to accidentally click on things, this might not be very convenient for you. With Atareao, you will not be asked for confirmation when clicking on options. The software also has a few unrelated packages, some of which might be unstable. Therefore, it is advisable to add the repository, install what you need, and then disable it through Software Sources. To uninstall, simply open the Ubuntu Software Centre, search for ‘Power Commands’, and click on ‘Remove’. Meanwhile, in Ubuntu 14.04, users will be able to choose whether or not they want application menus to appear globally or locally. It’s been a long time coming, but finally it’s here, much to the relief of users. Canonical has now come up with a replacement for the much-criticised global menu bar. Prepare for the re-emergence of locally integrated menus!
metered Internet connection, there will be the usual bandwidth ramifications. Once you’re done watching your movies, they will be ‘…buried in a secret folder somewhere on your drive until you restart your computer. Then it will be gone for good,’ claim sources in Popcorn Time. Users can simply stream the movie again, later, as and when they desire. The app will be available only for the desktop. The developers have no plans for an Android or iOS version anytime soon.
Learn Linux for free from Harvard and MIT
The Linux Foundation will offer a Linux development course on edX, the massive open online course (MOOC) platform developed by the Massachusetts Institute of Technology (MIT) and Harvard University. The move is part of an edX effort to expand its course offerings to include content from non-academic institutions. The MOOC will offer the same material that is taught in its ‘Introduction to Linux’ class. Its content is designed for people with little to no experience in Linux and open source. People can start taking the MOOC this summer; the precise date will be announced next month. The MOOC Linux class will be free and available to anyone with a Web connection, though the foundation normally charges US$ 2,500 for the course that is already taught online and in person via authorised training partners. Previously, all edX content came from the Linux Foundation’s 32 member schools that include University of California (Berkeley), Dartmouth College and McGill University. The non-academic institutions that will join the edX exercise include International Monetary Fund, The Smithsonian Institution and Inter-American Development Bank. Seven academic institutions that joined edX members are from the likes of Colgate University, Hamilton College and Open Courseware Consortium.
Contact Delhi Police via an Android app
You can now lodge a complaint about lost items in Delhi via a much easier process as the Delhi Police has launched a mobile app for Android phones. The application is called Delhi Police Lost Report and is available in Google’s Play Store for free. The application will enable trouble-free lodging of an FIR with the Delhi Police for loss of articles/documents in Delhi. To reach out to the public and build a more peoplefriendly image, the app will help Delhites to register complaints about lost items without going to the station. The complainant has to provide details like the name, father’s or mother’s name, address, mobile no, email ID, location where the item got lost in Delhi, date and time of loss (optional), when lodging the complaint via the app. Once the complaint is lodged with ‘Lost Report’ and the register button is clicked, the complainant will get a LR number with other details that confirm the lodging of the report with the Delhi Police. You can further View and Download, or Save and Exit after getting the right prompt. Also, the complainant can retrieve the report by clicking the Retrieve button for future use. You can even verify the authenticity of the report by entering the LR number when visiting the website of the Delhi Police (http://delhipolice.nic.in).
20 | April 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
FOSSBYTES
Romania is considering Ubuntu in schools
Plagued by a slew of unlicensed or old unsupported versions of proprietary software like Microsoft Windows and Microsoft Office in many of its schools, the Romanian Education Ministry is now considering a switch to open source solutions like GNU/Linux, Ubuntu and Edubuntu, in particular. Recently, the Ministry released a tentative list of applications recommended to be used along with GNU/Linux: LibreOffice, Firefox, Inkscape, the GIMP, GNU Octave, FreeCAD, Geany and Lazarus, to name a few. However, as of now, the list is only ‘experimental’ with no specific information available regarding whether or not such a move will be made official at some point in time. “Until we can provide national support for this product, including localisation in Romanian and national minority languages, the decision to use this distribution is up to each school,” a statement from the Ministry said. Earlier, the Penn Manor High School in the US distributed as many as 1,725 ‘Linux’ powered laptops to its students. Linux has now become the part and parcel of the ‘entire’ institution. For almost a decade, it powered the servers and provided the platform for the school’s websites, storage, and learning management systems. So Linux was the natural choice when it came to providing its students the right learning tool. The Penn Manor High School has provided every student in grades 9-12 an Acer TravelMate laptop pre-loaded with Ubuntu 13.10.
Google Now launcher available in Google Play
Google has reportedly launched the Google Now launcher at the Google Play Store. The launcher, which was earlier called Google Experience, was only available to Nexus 5 users. The launcher can now be installed on all Android KitKat powered Nexus and Google Play edition devices. The Google Now launcher comes with a dedicated home screen on the left, and users can trigger automatic voice-search/actions by calling out “Ok Google” when on the home screen. The “Ok Google” command is currently supported in US English, UK English and Canadian English. The full feature list of the Google Now launcher includes: Google Now on the home screen, “Ok Google” ‘hotword’ support, faster search, a larger viewing area and an intuitive wallpaper picker. The Google Now launcher has aspects like the right information at just the right time, assistance around the clock, relevant suggestions, ‘You’re in control’, and many more. It supports weather reports, road and traffic routes, or even checking your favourite team’s score while they’re playing. It works in the background while the information is automatically organised into simple cards. Google claims that Google Now works the way you want, as it brings users customised and relevant information. The user can control the settings that determine the information Google Now provides.
A software that converts Android apps to Tizen OS!
Thanks to Korean software developer Infraware, developers will no longer have to sweat it out while manually porting their apps to Tizen OS. The software in question is the Polaris App Generator (PAG). Using PAG software, developers will be able to readily convert Android APKs into Tizen OS executable files. With a simple click, the software “… adds a standalone Dalvik runtime to the compiled code, allowing it to run in Tizen OS without any special tweaks,” said a statement from Infraware. However, the utility will come at a high price. Currently, the company is charging US$ 5,000 per app, applicable for a period of two years. The hefty price, the company claims, will prevent pirates from misusing PAG. Unfortunately, even as the service is raring to go, there is no sign of a ‘true’ Tizen smartphone yet. And by the looks of it, there is still a long way to go before we actually see one! The Tizen Association is a Samsung and Intel-led industry group that has been guiding the Linux-based OS’ development. It must be noted that Tizen is one of the only projects backed by a company as massive as Samsung, but having made so much money on Android, one wonders why Samsung is looking to leave it in the first place? If a leaked screenshot of a phone, currently doing the rounds on the social media, is anything to go by, then Samsung ZEQ 9000 could very well be the much awaited phone from the South Korean giant featuring the ‘Tizen’ OS. The screenshot was leaked by a Korean publication called ‘Moveplayer’.
22 | April 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
OSFYClassifieds Classifieds for Linux & Open Source IT Training Institutes IPSR Solutions Ltd.
WESTERN REGION
SOUTHERN REGION
Linux Lab (empowering linux mastery) Courses Offered: Enterprise Linux & VMware
*astTECS Academy Courses Offered: Basic Asterisk Course, Advanced Asterisk Course, Free PBX Course, Vici Dial Administration Course
Courses Offered: RHCE, RHCVA, RHCSS, RHCDS, RHCA, Produced Highest number of Red Hat professionals in the world
Address (HQ): 1176, 12th B Main, HAL 2nd Stage, Indiranagar, Bangalore - 560008, India Contact Person: Lt. Col. Shaju N. T. Contact No.: +91-9611192237 Email: info@asterisk-training.com Website: www.asttecs.com, www.asterisk-training.com
Address (HQ): Merchant's Association Building, M.L. Road, Kottayam - 686001, Kerala, India Contact Person: Benila Mendus Contact No.: +91-9447294635 Email: training@ipsrsolutions.com Branch(es): Kochi, Kozhikode, Thrissur, Trivandrum Website: www.ipsr.org
Advantage Pro Courses Offered: RHCSS, RHCVA, RHCE, PHP, Perl, Python, Ruby, Ajax, A prominent player in Open Source Technology
Linux Learning Centre Courses Offered: Linux OS Admin & Security Courses for Migration, Courses for Developers, RHCE, RHCVA, RHCSS, NCLP
Address (HQ): 1 & 2 , 4th Floor, Jhaver Plaza, 1A Nungambakkam High Road, Chennai - 600 034, India Contact Person: Ms. Rema Contact No.: +91-9840982185 Email: enquiry@vectratech.in Website(s): www.vectratech.in
Address (HQ): 635, 6th Main Road, Hanumanthnagar, Bangalore - 560 019, India Contact Person: Mr. Ramesh Kumar Contact No.: +91-80-22428538, 26780762, 65680048 / +91-9845057731, 9449857731 Email: info@linuxlearningcentre.com Branch(es): Bangalore Website: www.linuxlearningcentre.com
Address (HQ): 1104, D’ Gold House, Nr. Bharat Petrol Pump, Ghyaneshwer Paduka Chowk, FC Road, Shivajinagar Pune-411 005 Contact Person: Mr.Bhavesh M. Nayani Contact No.: +020 60602277, +91 8793342945 Email: info@linuxlab.org.in Branch(es): coming soon Website: www.linuxlab.org.in Linux Training & Certification Courses Offered: RHCSA, RHCE, RHCVA, RHCSS, NCLA, NCLP, Linux Basics, Shell Scripting, (Coming soon) MySQL Address (HQ): 104B Instant Plaza, Behind Nagrik Stores, Near Ashok Cinema, Thane Station West - 400601, Maharashtra, India Contact Person: Ms. Swati Farde Contact No.: +91-22-25379116/ +91-9869502832 Email: mail@ltcert.com Website: www.ltcert.com
NORTHERN REGION GRRASLinuxTrainingandDevelopmentCenter Courses Offered: RHCE,RHCSS,RHCVA, CCNA,PHP,ShellScripting(onlinetraining isalsoavailable) Address (HQ): GRRASLinuxTrainingand DevelopmentCenter,219,HimmatNagar, BehindKiranSweets,GopalpuraTurn, TonkRoad,Jaipur,Rajasthan,India Contact Person: Mr.AkhileshJain Contact No.: +91-141-3136868/ +91-9983340133,9785598711,9887789124 Email: info@grras.com Branch(es): Nagpur,Pune Website(s): www.grras.org,www.grras.com
Duestor Technologies Courses Offered: Solaris, AIX, RHEL, HP UX, SAN Administration (Netapp, EMC, HDS, HP), Virtualisation(VMWare, Citrix, OVM), Cloud Computing, Enterprise Middleware. Address (H.Q.): 2-88, 1st floor, Sai Nagar Colony, Chaitanyapuri, Hyderabad - 060 Contact Person: Mr. Amit Contact Number(s): +91-9030450039, +91-9030450397. E-mail id(s): info@duestor.com Websit(es): www.duestor.com
Eastern Region Academy of Engineering and Management (AEM) Courses Offered: RHCE, RHCVA, RHCSS,Clustering & Storage, Advanced Linux, Shell Scripting, CCNA, MCITP, A+, N+ Address (HQ): North Kolkata, 2/80 Dumdum Road, Near Dumdum Metro Station, 1st & 2nd Floor, Kolkata - 700074 Contact Person: Mr. Tuhin Sinha Contact No.: +91-9830075018, 9830051236 Email: sinhatuhin1@gmail.com Branch(es): North & South Kolkata Website: www.aemk.org
FOSSBYTES
Google Play Store version 4.6.16 out with better in-app purchase protection
Google has rolled out a new update for the Play Store. Version 4.6.16 of the client has some really nice features including mass install support and the much needed option to always ask for a password for in-app purchases. Batch install support should make life much easier whenever you’re loading all of your apps onto a new phone. You can now select multiple apps by going to My Apps < All and install them in one go. You will obviously need to individually accept app permissions first. The updated Play Store client now also comes with the option of ‘Always ask password for purchases’. This replaces the earlier on/ off toggle for dealing with passwords for purchases. The change should be particularly useful for parents whose children often use their phones.
Qualcomm announces LTE integrated 64-bit Snapdragon chips
Qualcomm has reportedly launched its 64-bit eight-core Snapdragon chips. The mobile chips are called the 600 Series and come with LTE network handling The new 64-bit mobile chip is noted to be faster than Apple’s equivalent. The 601 is pin compatible with the slower Snapdragon 401, which implies that the manufacturers can swap it out with ease, without much engineering. The cores are ARMv8 compatible, which are backward-compatible with 32-bit applications. This is a consideration, since there is very little that runs at 64 bits in the non-iOS ecosystem. The chip will be available in the market in October, this year, and the company is likely to start shipping by next year. The new Snapdragon chip has a 1.5GHz speed, and the 600 Series will also have Qualcomm’s Adreno 405 GPU that will bring DirectX 11.2 and Open GL ES3.0 to phones.
Here’s an all new ARM-based Linux PC!
UK-based Cloudsto has launched a new ARM-based Linux computer. The Rikomagic MK902 LE comes pre-loaded with Ubuntu Linux and is available via the Cloudsto shop for around US$ 159. Meanwhile, there’s also an Android version available, which can be purchased from Geekbuying and AliExpress for around US$ 105. The Rikomagic MK902 LE is powered by a Rockchip RK3188 ARM Cortex-A9 quad-core processor along with 2 GB of RAM. The device comes with 8 GB or 16 GB of storage, further expandable via a microSD card slot. Connectivity options include HDMI, four full-sized USB ports, 802.11n Wi-Fi and 10/100 Ethernet. It comes preloaded with PicUntu 4.5, which is a custom version of Ubuntu 13.04 made for devices that run on Rockchip processors. Basic Ubuntu apps work pretty well on the Rikomagic MK902 LE. However, in case you’re looking for an immersive multimedia experience, the device is simply not meant for you. RK3188 chips are known to offer no support for hardwareaccelerated graphics or video; therefore, gaming and video playback on the device is not something to boast about, and clearly, the company doesn’t intend to do more on this front. If you’re looking for a ‘better’ multimedia device, the Android version might be better suited for your needs.
Google to launch Android 4.5, Nexus 8 in July
Google is hosting the I/O 2014 developer conference from June 25-26, but the company is likely to make the big announcements about its upcoming products in July. Google has, so far, revealed no plans to bring out a new update in the Android OS at its yearly event. The Android maker is expected to officially launch the Android 4.5 version with a new tablet, touted to be the Nexus 8, in the month of July. No further details on the new Nexus 8 have been revealed yet. Google may establish the 20.3-cm (8-inch) Nexus 8 tablet by the end of April with primary shipments of two million units, and ASUS might again be the partner in the development of the new Android-powered tablet. Google is also reported to have dropped development of a 17.7-cm (7-inch) Nexus tablet, succumbing to the heavy competition in the segment. The company will now try to focus on the 20.3-cm (8-inch) segment, since this segment has less competition. At the moment, the most notable 20.3-cm tablets in the market are from Samsung— the Galaxy Note 8.0 and Galaxy Tab Pro 8.4, and G Pad 8.3 from LG.
LibreOffice version 4.2.1 is out!
The Document Foundation has announced a minor update for LibreOffice, OSS’ very own answer to Microsoft Office. LibreOffice version 4.2.1 comes with some changed and added menu entries, as the release note states. The update follows LibreOffice 4.2. “LibreOffice 4.2 was extremely ambitious, in terms of code refactoring. Because of this, we planned an extensive quality assurance cycle, based on automated tests followed by QA sprints in December and January, but we were not able to catch all the issues. Based on early adopters’ feedback, developers and QA experts have jumped in immediately, and have solved the most urgent problems in less than three weeks, showing the importance of our large community,” Thorsten Behrens, chairman, Document Foundation was quoted as saying. LibreOffice 4.2.1 for Windows will allow multiple user interface languages. Meanwhile, the Mac version has done away with the mediawiki extension. LibreOffice 4.2 was targeted towards early adopters and was another significant step forward for the best free office suite ever.
24 | April 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
Insight
Developers
s y a W w e Use N
p o l e v e D o t
s p p A d i o r d An This article clears the air about the general perception that Android apps must be written only in Java. Advances in the mobile development environment have made it possible to create hybrid apps without working with Java, by using cross-platform tools such as PhoneGap.
A
ndroid is currently the most widely used mobile operating system in the industry, across the world. It came into existence in 2007 and, ever since, there has been a boom in Android-based smartphones. This has not only resulted in a large number of devices and apps entering the market, but has also created a whole new world of programming for developers. The Android API is exposed in Java, and those who are well versed with Java do not find it much of a challenge to develop Android apps. But for those who do not know Java, it is difficult to jump into Android app development. This is why new ways to develop Android apps are being sought, which has paved the path for hybrid mobile apps. The mobile development environment has evolved greatly since 2007 and has witnessed a number of new
trends. Among them is the birth and evolution of hybrid mobile apps. Mobile apps are broadly categorised as native apps, Web apps and hybrid apps (see Figures 1 and 2). Native apps are developed using the underlying native technology of the mobile platform. For instance, in our case, native Android apps are developed using Java. Web apps, or specifically, mobile Web apps are those that are optimised to be viewed from smartphones. These are normal Web applications developed using HTML5, CSS and JavaScript, and have been modified to be rendered perfectly in various form factors, including those at the lower end in the smartphone space. Hybrid apps utilise the best of both worlds. It is the general opinion that Web development is easier with technologies like HTML5, CSS3 and JavaScript, and the developer base is much www.OpenSourceForU.com | OPEN SOURCE For You | April 2014 | 25
Developers
Insight JavaScript code wrapped in a webview container and packaged as native apps. To illustrate the concept of hybrid apps in more depth, let’s try and understand how it all actually works. In general, each mobile platform offers a webview container—a UI control/element that helps the user to render HTML5 code inside it. At times, there is a need to show some website or other Web pages within the context of a native app. This is when webview is most useful, and it’s this functionality that has opened the doors to hybrid apps. A hybrid app is nothing but a webview control that fits the entire page (Figure 3). So if I were to express this in an ‘Android way’, it would be something like what follows:
Figure 1: Native vs hybrid vs Web
<?xml version="1.0" encoding="utf-8"?> <WebViewxmlns:android="http://schemas.android.com/apk/ res/android" android:id="@+id/webview" android:layout_width="fill_parent" android:layout_height="fill_parent" /> Hybrid App
Web App
Native App
Figure 2: Native vs hybrid vs Web
This is your user interface. It is a web browser instance. 100% width & 100% height
Those familiar with Android development will be able to make sense of the above code snippet. In Android native development, we usually declare the UI controls and elements in that Activity’s XML file. So, for our sample Activity, using the above code, I have created a webview control that fits the entire screen (fill_parent for both layout_height and layout_width). Now, one can write the entire code like it’s a Web application and exploit this webview to render the Web page. The Android developers’ page has a comprehensive tutorial on how to use webview to make an application: http://developer.android.com/ guide/webapps/webview.html In the past few years, a lot of cross-platform tools (CPTs) have emerged for making hybrid apps that let you code in a different language and package your code for Android devices, iOS devices, etc. Most of these tools offer coding languages such as HTML5, CSS3 and JavaScript. Their underlying architecture is almost similar to what we’ve just discussed. With hybrid apps, the biggest myth is related to performance and accessing device-specific
Figure 3: Webview container
larger compared to, say, Java alone. Hence, a way was found to package the Web application code and run them as apps on mobile devices. This is how hybrid mobile apps have found their way into the industry. Hybrid mobile apps are nothing but HTML5, CSS3 and 26 | April 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
Figure 4: PhoneGap architecture
Insight features, especially hardware jquery-mobile features like the camera, GPS, js etc. With the ever evolving mobile platforms and hybrid styles development frameworks, Index performance is no longer a concern. Figure 5: Sample folder structure Coming to accessing device-specific features, there are various CPTs that have JavaScript wrappers, which expose such functionality so that one can access the hardware of the device using JavaScript code. One such CPT is PhoneGap (now known as Cordova). It does two major things - it helps to package the Web page code and expose it as a native application, and it also provides JavaScript wrappers that offer access to the device hardware (Figure 4). These wrappers have a pretty simple underlying concept. Let us consider the example of Android. If I need to access the camera of an Android device, I can use the Camera API. Now, to write a wrapper, one needs to write a library that inherently calls the Camera API. There are a lot of ways to achieve this. The wrappers are customised, the webview is customised, but internally, the method used is on lines similar to what’s been discussed here. We will now look at a way in which one can create a hybrid app. I will not cover the code because, essentially, it is a normal Web page. Instead, I will focus on how to package it. The most important thing here is to ensure that your Web application follows SPA (Single Page Architecture). One can have multiple and external HTML5 pages, but that is generally not how hybrid apps are designed. The easiest way to package a Web app as a hybrid app is to use build. phonegap.com. For instance, let us consider the folder structure shown in Figure 5 (I’ve used jQuery Mobile, which is a popular framework for making hybrid mobile apps and mobile Web apps). Now, we need to zip this into a single zip file. Then, this file needs to be uploaded on build.phonegap.com. There is a lot more involved behind the scenes, such as the config.xml, but for now, we can skip that.. Once the zip is uploaded, the cloud platform will automatically generate a hybrid app for us, for this particular build (see Figure 6—I’ve used the Ionic framework, another hybrid development framework based on AngularJS). Experienced developers of native apps might prefer to use Eclipse and the Android SDK as the hybrid way might seem a bit complex to them. They can directly create a sample Android app, and have a single Activity, for which they can define a webview control and then perform the HTML5 magic there. Those interested in cross-platform development can definitely jump into
Developers
Figure 6: PhoneGap build
hybrid development. For such developers, PhoneGap is a nice place to begin, and just reading a sample of what’s available there (http://phonegap.com/2012/05/02/ phonegap-explained-visually/) can help a lot in understanding PhoneGap and how it works. By: Manit Singh Kalsi The author works as a mobile evangelist in the Mobility Centre of Excellence at Genpact Headstrong Capital Markets. He is a Java and JavaScript developer, who enjoys exploring new technologies and frameworks. When not coding, he is either strumming his guitar or playing video games. Follow him @manitsinghkalsi.
PACKWEB
PACK WEB HOSTING ProX
Time to go PRO now
www.packwebhosting.com
0-98769-44977 support@packwebhosting.com
A Leading Web & Email Hosting Provider
Specialists in
Hosting Sites built with
OpenSource Technologies
ProX Plans
Have a High Traffic Website? Considering VPS/Server? Visit prox.packwebhosting.com Wordpress
Joomla
Why Us?
Magento
Drupal
• cPanel Hosting • One Click Installation • Solid Support • Multiple Hosting Plans
• 4000+ Hosting • 2000+ Clients • 6500+ Domains • 11+ Years Experience
Trust Us. Trust our Ability.
www.OpenSourceForU.com | OPEN SOURCE For You | April 2014 | 27
Developers
Let's Try
What’s More in Tracing with LTTng The next big step is to trace userspace applications and understand how to view the overwhelming trace information easily using some GUI tools. Read on to dive deeper into tracing.
I
n the article that appeared in the March 2014 issue of OSFY, I introduced tracing and, more specifically, LTTng. I included a small section towards the end in which you could generate a small kernel trace. Now, it's time to have a look at more advanced use cases. In this article, I will introduce LTTng for tracing applications in userspace. Eventually, we'll discuss how to use the power of the Eclipse Tracing and Monitoring Framework (TMF) and other tools to gather information from combined userspace and kernel traces, using a real life example.
Userspace tracing with LTTng
If you remember, we enabled tracepoint in the kernel the last time, and gathered data and information about this. What if 28 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
you wanted to trace specific ‘points’ in your application at the userspace level, at the same blazingly fast speed! As an example, consider that you want to know how much time a handle_newconnect() call takes in your Web server and how it interacts with the system. Or maybe you wish to know why the APT (package manager for Debian/Ubuntu) takes so much time installing your package? (Hint: It blocks for about 37 per cent of total elapsed time. But why, and where?) Before we find the answers to all those questions, let us look at the thttpd Web server. Let us first make it ready for LTTng/ UST-the userspace tracing library of LTTng. The first step is inserting a tracepoint function call in a specific function in the thttpd source. This is known as instrumenting the application. For that we need something called the tracepoint provider.
Let's Try Let’s start by adding the tracepoint call in our target function-handle_newconnect(). I have created my own repos of clean and instrumented versions with minor edits (which allow it to get compiled properly), but original versions can be found on http://www.acme.com (Jef Poskanzer).
#endif /*__cplusplus */
wget http://step.polymtl.ca/~suchakra/osfy/thttpd-clean.tar.gz tar -xvf thttpd-clean.tar.gz && cd thttpd-clean
For instrumenting the function, there are three basic steps. These are given below.
/* * thttpd_tp.c */ #define TRACEPOINT_CREATE_PROBES #include "thttpd_tp_provider.h"
Tracepoint declaration
Tracepoint call
First, prepare the tracepoint provider header: This provides a tracepoint declaration in which you can specify the tracepoint provider (TP) name, arguments, payload variable types, fields and expressions. Refer to the lttng-ust man page for detailed field types that you can use. Some examples are ctf_integer, ctf_float and ctf_string. The TRACEPOINT_ EVENT macro sets everything up for you once you specify the arguments. We can create this header for our tracepoint and name it as thttpd_tp_provider.h /* * thttpd_tp_provider.h */ #undef TRACEPOINT_PROVIDER #define TRACEPOINT_PROVIDER thttpd #undef TRACEPOINT_INCLUDE_FILE #define TRACEPOINT_INCLUDE_FILE ./thttpd_tp_provider.h #ifdef __cplusplus #extern "C"{ #endif /*__cplusplus */ #if !defined(_THTTPD_PROVIDER_H) || defined(TRACEPOINT_HEADER_ MULTI_READ) #define _THTTPD_PROVIDER_H #include <lttng/tracepoint.h> TRACEPOINT_EVENT( thttpd, /* tracepoint provider name */ count, /* tracepoint name */ TP_ARGS(int, var), TP_FIELDS( ctf_integer(int, count, var)) ) #endif /* _THTTPD_PROVIDER_H */
Developers
We also need to create a C file in which TRACEPOINT_CREATE_PROBES is defined. This will get the trace probes ready.
The next step is to add the tracepoint to the target function. Insert the following lines in thttpd.c above the main(): #define TRACEPOINT_DEFINE #include "thttpd_tp_provider.h"
Insert the tracepoint functions inside the handle_ newconnect() body. I choose to put it in such a way as to keep track of the http_conn_count while I trace. handle_newconnect(struct timeval *tvP, int listen_fd) { . . . } c->hc->initialized = 0; ++httpd_conn_count; /* tracepoint with a payload as the connection count */ tracepoint(thttpd, count, httpd_conn_count); } /* Get the connection. */ switch (httpd_get_conn(hs, listen_fd, c->hc)) { . . . }
Building it all
Once this is done, add the thttpd_tp.c file to the SRC variable in Makefile.in, and add lttng-ust library and libdl to the linking process while building the source.
#include <lttng/tracepoint-event.h>
export LDFLAGS="-ldl -llttng-ust" ./configure make
#ifdef __cplusplus }
Now you have completed the instrumentation phase of the application. Whenever this instrumented thttpd starts, it will www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 29
Developers
Let's Try
register itself to lttng-sessiond so that traces can be seamlessly written to the tracebuffer. To make thttpd run, we will need a config file (which thttpd does not provide by default). Here is config from the official thttpd Fedora package: # Save this as thttpd.conf dir=/var/www/thttpd chroot user=thttpd # default = nobody logfile=/var/log/thttpd.log pidfile=/var/run/thttpd.pid
time shows how much I waited between the requests and how many total requests I made while tracing. It’s now time to finally end this tracing session. $ lttng destroy
You can also record kernel as well as userspace traces at the same time for a more comprehensive view of the complete system with thttpd. Just enable the kernel and userspace events before starting a trace: $ lttng enable-event -a -k $ lttng enable-event -a -u
I have prepared a version of thttpd for you that contains the above instrumentation as well as the thttpd.conf. You will need the conf file to start thttpd successfully in the next section. Get it from http://step.polymtl.ca/~suchakra/osfy/ thttpd-instrumented.tar.gz
You can also add more information to the events or the trace channels by using contexts. For example, if you wish to add a Perf ‘cache misses’ counter value to all events recorded in the trace, you can use add-context before starting a trace:
Start tracing
$ lttng add context -k -t perf:cache-misses
So now you are all set! Let's start our usual tracing routine. It's similar to kernel tracing.
$ lttng create osfy-thttpd $ lttng enable-event -a -u # enable all userspace events $ lttng start $ sudo ./thttpd -C ./thttpd.conf # start instrumented thttpd
Now you can start loading your server-maybe by just opening a browser, pointing to http://localhost and simulating a load on the server by Apache Bench. I just tried connections from my browser for now. $ lttng stop $ lttng view Trace directory: /home/suchakra/lttng-traces/osfythttpd-20140120-172551 [17:26:24.474009892] (+?.?????????) isengard.localdomain thttpd:count: { cpu_id = 2 }, { count = 1 } [17:26:24.474044119] (+0.000034227) isengard.localdomain thttpd:count: { cpu_id = 2 }, { count = 2 } [17:26:38.936110649] (+14.462066530) isengard.localdomain thttpd:count: { cpu_id = 3 }, { count = 3 } [17:26:38.936246752] (+0.000136103) isengard.localdomain thttpd:count: { cpu_id = 3 }, { count = 4 } [17
You can observe that the five events were recorded and the connection count (our payload) is increasing. The delta 30 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
There are many other cool things that you can do, such as filtering the traces, etc. Just browse through the man pages for lttng and lttng-ust to get more ideas.
Trace viewing and analysis
As I mentioned the last time, we can use various tools other than the command line based babeltrace to help us view and analyse Common Trace Format (CTF) traces. There are a couple of graphical tools available, but I will only cover the most comprehensive one-TMF. In order to maintain the continuity of our thttpd experiment, let's trace it again while enabling the userspace events (-a -u options, as mentioned above) in addition to kernel events. Run the trace for some time while making some HTTP requests and generate the traces. I have already generated some traces if you need those. Get them from http://step.polymtl.ca/~suchakra/osfy/ osfy-thttpd-20140127-194024.tar.gz. We will need it later.
Setting up TMF
There are two ways to use TMF. One is the standalone Rich Client Platform (RCP) version. You can grab the latest Trace Viewer RCP from http://secretaire.dorsal.polymtl. ca/~alexmont/tracing-rcp/ . Otherwise, if you are a regular Eclipse user and prefer to install TMF as an Eclipse plugin, download the latest version of the Eclipse IDE for C/C++ developers, which already includes Linux Tools and the LTTng plugins. On other versions, you can add the plugin using the ‘Help→Install New Software...' option. TMF is under the‘Linux Tools' section of the main Eclipse repository. Now you are all set and ready to roll! I will be using the Eclipse plugin to explain how to use TMF. The RCP version is no different as it is the plugin; it’s just without the whole Eclipse framework.
Let's Try
Developers
Loading your first CTF trace
Fire up Eclipse and switch the perspective to ‘LTTng Kernel’. By default, you will see some views. The important ones for now are Control Flow, Resource, Statistics Histogram and the Project Explorer. You can always add views using ‘Window →Show View→Other'. Let's load up the combined kernel and thttpd trace first. Right click on Project Explorer→New→Tracing Project. Give it a new project name (such as OSFYTraces). Once it's created, go to ‘Traces' under OSFYTraces tree→right click→‘Batch Import...' Check the ‘Common Trace Format' and in the next window, click on‘Add Directory' and browse to your trace directory. You can use the traces from osfythttpd-20140127-194024.tar.gz which you just downloaded or your own traces (created by default in /home/username/lttngtraces). Now select the desired traces the wizard has found for you. Under Generic CTF Trace, select ‘64-bit’ (that’s our UST trace) and under LTTng Kernel Trace, select ‘kernel’. Before importing them, you can rename them by clicking on their names. I renamed the ‘64-bit' trace to ‘ust’. So two traces will appear under ‘Traces’ in the project explorer. Double click on the kernel trace and wait for it to load. You will observe the histogram and control flow view being populated. The kernel events will start showing up too. At this point, you have successfully loaded the kernel trace and are ready for analysis. So let's first get familiar with the interface now. We will go through a small example to get familiar with the usage. On your right, you will see multiple ‘views’. In Figure 1, you can see the top section shows ‘Control Flow’, ‘Resources' and ‘Statistics’ views in the tabs. The second section shows the event views. As you open a trace named ‘kernel’, it will show all the kernel events recorded. There will be lots of events listed in it. Click on ‘<srch>’ under the ‘Event Type’ section and type sys_execve. Under ‘Content’, type ‘thttpd’. This will take you to an event that is an execv syscall and contains thttpd as the string in the trace content. Have a look at Figure 2(a). You can also observe that in the Control Flow view, the corresponding process is highlighted and the graph on the right now points to the exact time of the recorded event. You can move around and see other events on the graph by just clicking on events. A mouse-over gives some more information. You can zoom using the mouse wheel or more
Figure 1: TMF ‘Tracing' perspective
Figure 2(a): The sys_execve event in the kernel trace
Figure 2(b): Resources view showing the event on CPU3
Figure 3: Trace experiment showing combined kernel and UST trace
fine grained timing on events. You can also move to the next events in the same selected process using the right and left arrow keys. Colours are the next important thing and you can click on the small ‘Legend’ icon to understand what they mean. Blue is a SYSCALL, green shows that process was in USERMODE, yellow is WAIT_BLOCKED and so on.
www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 31
Developers
Let's Try
Figure 4: LTTngTop
The interface is quite intuitive, and the event and the control flow views are synchronised. Next, click on the‘Resources’ tab and you will see all the system resources and their consumption during the trace. See Figure 2(b). Of course, it's a lot better this way rather than looking at cpu_id each time in the babeltrace output. You can also have a look at the ‘Statistics' and ‘Histogram’ tab, which gives you a more comprehensive view of the system's functioning so that you can observe trends statistically too. Now that you are familiar with the interface, do a small activity by which you try to see what happens in the system when the userspace tracepoint was hit and recorded the count data from handle_newconnect() in thttpd. You can create a trace experiment for this. Go to Project explorer→Right click Experiments→New (name it ‘Combined')→Select kernel and ust traces. Now double click on ‘Combined' and there you go. You have combined UST and kernel traces now. Interesting! Now you can know exactly how the system behaved while the userspace tracepoint was hit. Under the <srch> in Type, write ‘thttpd:count' and your first UST tracepoint that was hit shall be displayed. Above and below that, the system activity in kernel trace will be shown too. See Figure 3. There are other CTF trace viewers out there too. Another graphical one is the Linux Trace Tookit Viewer (LTTV), which you can install by using the following command: $ sudo yum install lttv
Being a precursor to TMF, it was one of the original graphical trace viewers and inspired a lot of techniques and methods that were used in TMF. LTTV is quite fast but may not be as versatile and comprehensive as TMF.
Looking ahead
LTTng 2.4 ‘Époque Opaque’ is around the corner (RC5 is available at the time of writing) and will have some new and awesome features: 1. Live trace viewing: Yes, you heard that right. You can
32 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
now view and analyse your traces while they are being created. You can view the live streaming data on any remote machine too. There is another tool, LTTngTop (it's an ncurses-based top like viewer), for live as well as already recorded traces which you can use with this feature. See Figure 4 and check it out at http://git.lttng. org/?p=lttngtop.git. Live trace reading will soon come to Eclipse TMF also (maybe not in the next release). This is a feature that sysadmins would really love! 2. Snapshots: Soon you will also be able to take a ‘snapshot’ of the trace buffers at a given time and observe the traced data. It's a pretty cool feature for scenarios in which you may want to trigger a snapshot record at some coredump, for example. Snapshot trace data can also be used with flight-recorder mode (the trace data snapshot gets overwritten in the buffer as in a flight recorder). Long term system monitoring is also a good use-case for snapshots. The fancy control flow view is fine, but you may wonder what the actual path a process takes through the system during execution is. Can you show that? Indeed, it may soon be a reality. As for the question we discussed earlier about APT taking up your valuable time while installing packages, Critical Flow View answers that. Refer to this awesome post at http://multivax.blogspot.ca/2013/12/system-levelprofiling-of-apt.html. I would also recommend that you check out Workload Kit (https://github.com/giraldeau/workload-kit). It is a way to quickly generate repeatable workloads for tracing on your machines. It contains lttng-simple, which is a command line tool to quickly start with LTTng on your system and do some experimentation. This concludes the series on tracing using the LTTng tools. In case you have any questions, do contact me. Happy tracing!
References [1] [2] [3] [4] [5]
http://lttng.org/files/doc/man-pages/man3/lttng-ust.3.html http://secretaire.dorsal.polymtl.ca/~alexmont/tracing-rcp/ http://git.lttng.org/?p=lttngtop.git http://multivax.blogspot.ca/2013/12/system-level-profiling-of-apt.html https://github.com/giraldeau/workload-kit
Acknowledgements Thanks to Geneviève Bastien and François Rajotte for reviewing this article and to all the LTTng developers for their contributions. The TMF dev team at Ericsson and Polytechnique Montréal deserve special kudos!
By: Suchakrapani Sharma The author is a PhD student at École Polytechnique de Montréal. He is currently doing research on dynamic tracing tools. He has varied interests, from performance analysis tools to Embedded Linux and UX/graphics design. He can be contacted at suchakra@fedoraproject.org
Exploring Software
Anil Seth
Guest Column
Erlang Webmachine Our previous article in this series, ‘Exploring Software–Webservice using Mochiweb’, dealt with building a simple Web application. In this article, let us explore Erlang Webmachine.
I
n a Web application, the browser sends a request, and the server calls a function and returns a response. Each request is independent. This maps very well to the functional programming paradigm; hence, we continue our experiments with Erlang. Webmachine is a REST toolkit in Erlang on top of Mochiweb. As an illustration, let’s start with the demo application included with Webmachine and add a form to it. The form will allow us to add a key/value pair or get all the key/value pairs that have some value.
Getting started
application:start(webmachine_demo).
Now, the compilation and execution of start.sh should go through properly. Browse http://localhost:8000/demo and you should get a welcome message.
Adding functionality
The mapping between the URL paths and the modules is specified in file priv/dispatch.conf. Let us suppose the additional functionality is to be accessed from the URL path /key. Then the priv/dispatch.conf will become:
Let us use the packages included in the Fedora 20 repositories. Make a copy of the demo in /usr/share/doc/erlangwebmachine/demo/. As the demo depends on an earlier version of Webmachine, some extra steps may be needed. In the demo directory, do the following:
%%-*- mode: erlang -*{["demo", '*'], webmachine_demo_resource, []}. {["key", '*'], webmachine_key_resource, []}. {["fs", '*'], webmachine_demo_fs_resource, [{root, "/tmp/ fs"}]}.
$ rm rebar.config $ rebar compile Note: install additional modules in case of dependency issues $ ./start.sh
The code needed for this functionality will be in src/ webmachine_key_resource.erl:
The application failed to start with messages, which include phrases like ‘not_started,ssl’. To overcome the errors, the start function in src/webmachine_demo.erl was modified as follows: start() -> ensure_started(inets), ensure_started(crypto), ensure_started(syntax_tools), ensure_started(compiler), ensure_started(xmerl), ensure_started(asn1), ensure_started(public_key), ensure_started(ssl), ensure_started(mochiweb), application:set_env(webmachine, webmachine_logger_module, webmachine_logger), ensure_started(webmachine), 34 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
-module(webmachine_key_resource). -export([init/1, to_html/2]). -include_lib("webmachine/include/webmachine.hrl"). init([]) -> Context = undefined, {ok, Context }. to_html(ReqData, Context) -> % if the key is not null, store the key/value pair in mnesia table case wrq:get_qs_value("key",ReqData) of Key when Key==undefined, Key=="" -> ok; Key -> db:insert_key(Key, wrq:get_qs_ value("value",ReqData)) end, % get all the key/value pairs which match the value in search_for {Result,SendList} = db:match_value(wrq:get_qs_ value("search_for",ReqData)), % return the result in webapp template
Guest Column Exploring Software
case Result of atomic -> {ok, Body} = webapp_dtl:render([{the_list, SendList}]); _ -> {ok, Body} = webapp_dtl:render([{the_list, []}]) end, % webmachine expects a tuple {Body, ReqData, Context}.
The resource module needs at least two functions by default—init and to_html. The init function is used to specify the context needed for this resource. Webmachine passes it, as is, to various functions. The default name of the function for the GET request is to_html. In case the key field is empty or not defined, the function does nothing; otherwise, it inserts the key/value pair in a table. It then queries the table for all records that have the desired value and displays the result in a template. The templates/webapp.dtl template is similar to the one explained in the previous article: <html> <body> <form method="GET"> <p>Key: <input type="text" name="key"> Value: <input type="text" name="value"></p> <p> Search for Value" <input type="text" name="search_ for"></p> <input type="submit"> </form> {% for table,key,value in the_list %} <p> {{ key }} Value {{ value }} </p> {% endfor %} </body> </html>
For completeness, the code in src/db.erl for storing and querying data from mnesia is as follows: -module(db). -export([init/0,insert_key/2,read_data/1,match_value/1]).
THE COMPLETE MAGAZINE ON OPEN SOURCE
-record(store,{key,value}). init() -> mnesia:create_table(store, [{attributes,record_info(fields, store)}]). insert_key(K,V) -> F=fun() -> mnesia:write(#store{key=K,value=V}) end, mnesia:transaction(F). match_value(Val) -> Pattern = #store{_ = '_', value=Val}, F = fun() -> mnesia:match_object(Pattern) end, mnesia:transaction(F).
Finally, mnesia needs to be started. Add the following lines at the beginning of the start function in src/webmachine_demo.erl: application:set_env(mnesia,dir,”db”), mnesia:create_schema([node()]), ensure_started(mnesia), db:init(),
Compile and run start.sh. Now browse http:// localhost:8000/key and explore the form. Getting used to Erlang is not difficult. Functional programming is fun.
References [1] https://github.com/basho/webmachine/wiki [2] http://www.erlang.org/doc/apps/mnesia/Mnesia_chap2.html [3] http://en.wikiversity.org/wiki/Web_Development_with_ Webmachine_for_Erlang
By: Anil Seth The author has earned the right to do what interests him. You can find him online at http://sethanil.com, http://sethanil. blogspot.com, and reach him via email at anil@sethanil.com
Your favourite magazine on Open Source is now on the Web, too.
LinuxForU.com Follow us on Twitter@LinuxForYou
www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 35
Developers
Let's Try
Using Xposed Framework to Tweak Your Android The Xposed Framework is for modules that can change the behaviour of the system and the apps. With Xposed, you do not have to flash a ROM on your phone (a risky business) as you can modify its behaviour by using Xposed modules, which can change the behaviour of your apps. With Xposed, the ultimate level of customisation is possible on your phone.
A
ndroid is all about customisation. You can push the limits of your phone and, of course, your creativity, once you root your device. After rooting, there comes a new phase in you and your phone’s life, as you install uber-cool apps like Greenify, Titanium Backup, change the boot animations, and much more. You can even change your whole user experience by flashing custom mods and ROMs, but you lose the stability and reliability of your pre-installed vanilla Android. Wouldn’t it be awesome if you could have the exotic features of custom mods with the stability of stock ROMs? The answer is simple - Xposed Framework, authored
by two recognised XDA developers rovo89 and Tungstwenty. It allows users to change the behaviour of the system and apps without changing the APK via root access. The Xposed Framework has modules, each targeting a particular need. So, let’s dive in. Note that this only works with root access on Android 4.0.3 or later
Warning
Before you dive in, wear a life jacket! Since it requires root access, be careful about what you are doing because, “With great power, comes great responsibility.” Also, Xposed Framework is likely to work best on stock ROMs with little customisations, as some modules may conflict with the custom ROMs. Though it works perfectly on most devices, neither the author nor OSFY will be held responsible if you damage/brick your device. Proceed at your own risk and do take a back-up. Words like Notification bar and or Tapping and Clicking are used interchangeably. I tested this on my Micromax Canvas 2 with the Jelly Bean 4.1.1 stock ROM, and it worked almost fine :)
Installation
Before installing, do a full back-up as it’s better to have a backup than to be sorry. Installing Xposed Framework is simple. Just download the Xposed installer from the Xposed site, http://repo.xposed.info/module/de.robv. android.xposed.installer. After downloading the APK to your device, just side load it. After installing the framework, open the app and you will see something similar to Figure 1. We haven’t yet installed the framework. To do so, go to Framework and then tap the ‘Install/Update’ button. You may experience some glitches. Don’t worry. Wait for a few minutes and after that, the app will request for root access via your SuperSU/SuperUser app, like in Figure 2. To complete the process, perform a reboot so that you can install modules. You won’t see anything great until you install the modules.
Installing a module
Modules, as discussed earlier, provide extra functionality 38 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
Let's Try
Figure 1: Xposed installer ‘Welcome’ screen
Figure 2: Super-user screen
to your device. Xposed offers a wide range of modules that can be downloaded under the Download section of the app, where you will find loads of them with a snippet of information about each module. To install a module, just tap on it, then click on the Download button and you will be prompted to install it. So, let’s install a module. I selected Gravity Box, because it’s my favourite. There are two versions of Gravity Box—one for JellyBean [JB] and another for Kitkat [KK]; so select accordingly. Then click on the Download button. After the download finishes, you will be prompted to install it. If not prompted, you can invoke the installer explicitly by tapping the Install button, which will appear next to the Download button after successful downloading. After installation, you have to activate the module, by going to the Modules section and checking it. Please note, the changes will only take place after rebooting. The list of modules is very vast, but here are my favourites in no particular order, which we will later use to customise our Android experience: GravityBox Tinted Status Bar [BETA] XHaloFloating Window App Settings MinMinGuard To maintain the modules, just go to the Modules section, and if you want, uncheck/check a particular module. If an update to the Framework or a module is available, you will be able to see it under the Download section. Now let’s move on to customisation.
GravityBox
Installing GravityBox is just the start; the real fun lies in configuring it for better use. After installation, the GravityBox icon will appear in the app drawer. If you
Developers
open the app, you will find tons of customisation options, ranging from Status Bar tweaks to miscellaneous others. If the app asks for root access, you already know what to do. Under the Status Bar tweaks you can change the icon colour and the colour of the Status Bar too. You can also change the battery indicator to the one KitKat has, if you want to dress up your device with minute details. If you want an advanced power menu, you can go about getting one under Power Tweaks. My favourite tweak of GravityBox is the Expanded Desktop mode, which gives you extra screen space to run apps by hiding the notification bar. It can be enabled under the Display tweaks. Once you enable it, you can find the option to expand the desktop under your power menu, like in Figure 3. Also, the Transparency Management option gives you the power to make the Status Bar and Navigation Bar mimic the transparent Status Bar of KitKat. There are too many options to discuss, so go ahead and explore and experiment.
Tinted Status Bar
This module gives you a consistent and seamless look throughout the apps on your system. It changes the Status Bar colour with the present app open, much like the Chameleon feature of Unity. So, open up the app, and if it asks for root access, give it the privilege. If you see a list of apps installed on it, you can enable/disable individual apps by tapping on the app and toggling the On/Off button. Now, if you want an app that has a distinct colour like VLC (which has a dominant orange colour), you will see Status Bar turn orange.
XHaloFloatingWindow
This module brings the famous Halo Popup floating window feature from Paranoid Android. It can be used as with the Floating Notifications app to get a closer Halo experience; however, we will keep it simple. First download and install the module, then open up the app and it will ask for root access. Now, activate the module with a reboot. To test the app, open the XHaloFloating Window app from the drawer, go to the Testing Area, and try and launch any of the tests. I chose to launch Xposed Installer in Halo. Now, let’s configure opening the notifications in Halo mode. Open the app and go to SystemUI Mods, and check the Long Press Notifications Option and Long Press Recent Apps. Now, if you want to open a notification from an app in Halo mode, you will have to long press on notification. If you don’t like to long press every time you want to open the notification, you can check the Single Click option as well. It will work for most apps but not with some apps like Play Store and Terminal Emulator; even if you try to open them in Halo mode, they will open in default mode. The Long Press Recent Apps option does the same. This module is extremely useful when you are browsing and you receive a notification from your www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 39
Developers
Let's Try
Figure 3: Expanded Desktop option in Power Menu
Figure 4: Tinted Status Bar options for Chrome
friend from services like WhatsApp. You can just open WhatsApp in Halo Mode, and reply to your friend without leaving your previous work. Note: XHaloFloatingWindow may conflict with OmniROM’s multi-Window, but it was working fine with Xposed XmultiWindow module (which is a port of the split view feature of OmniROM, available through Xposed), which we will discuss later in this article. Also while testing this app, the Long Press Recent Apps option was not working properly.
XmultiWindow
This module ports OmniROM’s split view to other ROMs. As per information available, it works on MIUI and stock ROMs, and it worked fine with my stock ROM too. Again, download and activate the module and reboot the device. While you have instructions to follow, I found them confusing, so this is how I went about things. Open the app and tap on Open SideBar. After tapping on the option, go to the home screen and wait for the split view to appear; if it doesn’t appear implicitly, invoke it by swiping the left edge of the screen towards the centre and you will notice a left side launcher like Ubuntu's Unity launcher. If it doesn’t appear, keep trying with different gestures on the left edge of the screen. Now to open any app in split view, click on that app from the left-half of the split menu and select the workspace in which you want to place the apps. After selecting two apps each in 40 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
Figure 5: Chrome with a tinted Status Bar
different workspaces, your screen will look something like this.(mention fig no…is it Fig 8?) To hide the left bar, just click on the notification of XmultiWindow from the Status Bar.
App settings
This module allows you to tweak settings for an individual app. Here’s the list of settings that you can change for an app. DPI and reported screen size Font scale Locale Full screen mode, plus immersive mode on KitKat Hiding the title bar For complete check the app on Xposed Repo. Now, let’s try this on an app, which in my case is Adblock Plus. Install, activate the module and reboot the device. Open the app and you will see a list of apps installed on your system. Then, click on the app for which you want to change settings, which in my case is Adblock Plus. Toggle the settings ON, select your filters and after that, save this. If you want the original settings, just toggle settings to OFF. The result is shown in Figure 9.
MinMinGuard
Today, ads have become a necessary evil. So while you should not block ads from honest and hard working developers, sometimes they mess up the user experience. Before using the app, read its disclaimer, which can be
Let's Try
Figure 6: Xposed Installer opened in Halo mode
Figure 7: Long Press on Notification reveals Halo Mode
Figure 8: Two apps opened in split view
found in the Xposed Installer. It will ask for root access to prevent ads once you click on the About section. While Adblock Plus blocks most of the ads, it still leaves the empty area in the app, but MinMinGuard promises to remove that void. Open the app from the drawer and select the app for which you want to block ads. You can also select different parameters for individual apps, by clicking on Edit (the pencil icon). So through Xposed Installer we enjoyed the Halo feature of Paranoid Android and split view of OmniROM. Also, users can install KitKat Toast Notifications and CyanogenMod’s high pattern lockscreens. So, we now can
Developers
Figure 9: AdBlock Plus with app settings filters
enjoy the best of all worlds with the stability of the stock ROMs, thanks to Xposed. References Many thanks to the XDA developers for creating such a great forum for Android • http://repo.xposed.info/module/de.robv.android.xposed.installer • http://forum.xda-developers.com/showthread.php?t=2327541 • http://forum.xda-developers.com/showthread.php?t=1574401
By: Jatin Dhankhar The author is a computer enthusiast who loves science and cartoons. He can be reached at dhankhar.jatin@gmail.com
OSFY Magazine Attractions During 2014-15 Month
Theme
Featured List
buyers guide
March 2014
Network monitoring
Security
-------------------
April 2014
Android Special
Anti Virus
Wifi Hotspot devices
May 2014
Backup and Data Storage
Certification
Externel Storage
June 2014
Open Source on Windows
Mobile Apps
UTMs fo SME
July 2014
Firewall and Network security
Web hosting Solutions Providers
MFD Printers for SMEs
August 2014
Kernel Development
Big Data Solution Providers
SSD for servers
September 2014
Open Source for Start-ups
Cloud
Android devices
October 2014
Mobile App Development
Training on Programming Languages
Projectors
November 2014
Cloud special
Virtualisation Solutions Provider
Network Switches and Routers
December 2014
Web Development
A list of leading Ecommerce sites
AV Conferencing
January 2015
Programming Languages
IT Consultancy
Laser Printers for SMEs
February 2015
Top 10 of Everything on Open Source
Storage Solution Providers
Wireless routers
www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 41
Developers
How To
Create Cool Android Apps with AppInventor 2 Most wannabe app inventors are daunted by the coding aspect of Android app development. Read on to discover how even a novice with no knowledge of coding can create an app and get it running in a short time by using AppInventor2.
B
uilding Android apps is a real cool thing to do. So how would you react if I told you that you can make an Android app with zero knowledge about programming languages? This is exactly what AppInventor allows us to do—create cool Android apps with absolutely no coding. AppInventor is a project from 'the Massachusetts Institute of Technology (MIT) and is similar to the Scratch Project from the same renowned institution.
Set-up
AppInventor is a browser-based tool; so to create an app, you do not need to download any software. The system requirements are: Browser 1. Mozilla Firefox 3.6 or higher 2. Apple Safari 5.0 or higher 3. Google Chrome 4.0 or higher Phone or tablet (or the use of the on-screen emulator) 42 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
Android 2.3 (Gingerbread) or higher At the time of writing this article, there is no support for Internet Explorer. You will also need a Google account to create your apps. To test your app, there are two options available: 1. If you are using an Android device and you have a wireless Internet connection, you can start building apps without downloading any software on your computer. You will also need to install the App Inventor Companion app for your device. 2. If you do not have an Android device, you'll need to install software on your computer so that you can use the on-screen Android emulator. This is available only for Windows and Mac at this point of time. I will be dealing with the emulator in my article, which will be based on the methods I have tested on Firefox 27.0.1 on the Windows 7 platform. As I have already mentioned, to create the app you
How To
Figure 1: Home screen
Figure 3: App UI
Figure 2: New project
Figure 4: Logic
Developers
don't have to download any tool, but if you are planning to test your app on an emulator, then you will have to download aiStarter, which you can do from the following link: http://appinv.us/aisetup_windows.
Creating the app
You can start by typing the following link in your browser http://ai2.appinventor.mit.edu The page will ask you to log in with your Google username and password. After that, you will see a screen similar to the one shown in Figure 1. Click on the New Project button and you will be asked for the project’s name. Give a name to your app. I have used myFirstApp. Your project page now appears, and looks like what’s shown in Figure 2. You can now design your app here - you can select its appearance, the UI, etc. I will demonstrate a simple app, which will have a text label that displays: “Who are you?” Below the label, there will be a text box and a button. On entering a name in the text box and on clicking the button, the text in the label will change to, “Nice to meet you <name>”. All the GUI elements are available on the left side pane. Drag and drop the elements you require to the app screen. I have also added a background image to the screen. You, too, can do so by uploading any image on your computer. My app UI looks similar to Figure 3. Once you are happy with the look of your app, it’s time to
Figure 5: aiStarter
add functionality to it. For that, on the top right of the page, you will find two buttons called ‘designer’ and ‘blocks’. Till now, we were in the designer mode; now, let's shift to the blocks mode. You will get a blank screen similar to the page you got in the designer mode. But here, instead of the left pane having UI elements, it will have blocks for programming. The bottom part of the left side pane will have the UI elements you inserted during the designer phase. Click on button1 and you can see some of the logic that is associated with it. Select the other blocks from the respective element as shown in Figure 4. You are free to implement any logic you wish, and if you browse through the options you will find that there are many types of logic that can be implemented.
Testing
Once you are done with the programming part, it’s time to test the code. So start aiStarter, which you had earlier installed on your computer. Now go back to the browser and select the emulator from the Connect menu as in Figure 6. www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 43
Developers
How To
Figure 6: Starting the emulator
Figure 8: Building the apk
Figure 7: App running on the emulator
Now all you have to do is to sit back and wait for the emulator to start and load your program. This can take some time, and it is important that you do not interfere while the emulator is loading your app.
Building the apk
Once you are happy that the app is working as you had expected, it’s time to create the apk file for distribution.
Go to the Build menu and you will find two options as shown in Figure 8. Select the option to download the apk to your computer, and your download should start instantly. Once the apk file is downloaded, you can transfer it to any Android phone and install it. There are many more features to be explored in AppInventor2. I am sure the basic knowledge provided in this article is more than enough to get readers started on building new apps. References [1] http://appinventor.mit.edu/explore/get-started
By: Vineeth Kartha The author has a great passion for open source technologies, computer programming and electronics. And when not coding, he loves to do glass paintings. He can be reached at vineeth. kartha@gmail.com or at http://www.thebeautifullmind.com
Read more stories on Components in
www.electronicsb2b.com SECURITY STORIES
TOP
2015 is expected to double by • CCTV camera market devices • The latest in biometric to a bright future turers can look forward fac nu ma ra me Ca TV • CC active tool Turning a CCTV into a pro ms ste Sy s tic aly An eo • Vid s ing with new technologie • Security cameras evolv meras • The latest in dome ca curity cameras and vandal-resistant se of pro erath we in t es lat • The
ELECTRONICS
INDUSTRY IS AT A
Log on to www.electronicsb2b.com and be in touch with the Electronics B2B Fraternity 24x7
44 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
CODE Sandya Mannarswamy
SPORT
In this month’s column, we continue our discussion on information retrieval.
I
n last month’s column, we discussed algorithms for constructing an inverted index, which is the basic data structure used in all information retrieval systems. We discussed two algorithms—the Blocked Sort Based Indexing (BSBI) method and the Single Pass In-Memory (SPMI) method for index construction. Both these algorithms break up the document collection into blocks, which are processed one at a time, since it is typically not possible to hold the entire document collection in the main memory for processing, to build the index. This imposes considerable complexity unlike the normal sort/search algorithms we come across while programming, in which the complete data set can be held in the main memory. It also imposes different performance challenges. In our day-to-day programming, we typically use algorithms which operate on data in the main memory. So we are mostly concerned with the performance impact of the CPU and memory on our code. However, in the case of index construction algorithms like BSBI or SPMI, we are concerned with a third factor—the secondary storage where we store intermediate results and read data for further processing. We need to keep the disk access speeds and disk bandwidth as potential factors when designing these algorithms. So far, we have been discussing index construction algorithms that work on a single machine, and the only hardware constraint we have considered so far is the amount of available main memory in the computer system in which the document collection is being processed. However, consider the case of constructing an inverted index for the document collection which comprises the ‘World Wide Web’. This task cannot be done on a single computer system and, hence, needs to be carried out on a very large cluster of machines. Therefore, a distributed method for ‘inverted index’ creation is needed, by which the index construction can be spanned across multiple nodes of the cluster, thereby utilising the CPU and physical memory available on each of these nodes. A well-known distributed computational model is the ‘map
reduce’ paradigm, and this has been adapted to the task of distributed index creation. I am sure that our readers are familiar with the basic idea of Map-Reduce, where a task is split into the ‘map’ phase and the ‘reduce’ phase. During the map phase, the mapper task is run on multiple nodes on the cluster, with the master node of the cluster assigning the task to each mapper node. After the map phase is completed, the reducer phase is run, on the nodes of the cluster. In the case of distributed index creation, the document collection is first split into ‘blocks’ by the master node, which assigns these split blocks to mapper nodes. During the mapping phase, the split block is parsed by the mapper node and, as in the case of the single node index creation algorithm, a list of <term id, doc id> is constructed for each split block at each mapper node. Note that the split blocks are not assigned statically to mapper nodes. It is expected that mapper nodes can fail or become unresponsive during the course of computation. Hence, the master node assigns one split block at a time to a mapper node. Only after successfully processing the current split block, the mapper node is assigned the next block for processing. In case the mapper node becomes unresponsive after a time-out period has elapsed, the master node declares the mapper node to have failed and removes that node from the map-reduce computation. The split block which was being processed by the failed node is reassigned to an ‘alive’ node. As mentioned before, each mapper node produces a list of <term id, doc id> pairs at the end of the map phase. This is written into intermediate local files on each mapper node. These files are typically known as segment files. During the ‘reduce’ phase, we would like to process the <term id, doc id> lists produced during the ‘map’ phase and construct the pos-list, which gives the final <term id, a list of doc IDs where the term appears> in the entire document collection. This requires that all lists corresponding to the same term ID be processed at a single node so that inter-node communication is
www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 45
CodeSport
Guest Column
minimised. This is achieved by having the results of the mapper phase partitioned on term IDs. For example, the term IDs can be partitioned into three partitions, namely: Partition 1 -- containing those terms whose starting letter is between ‘a-f’, Partition 2 -- containing those terms whose starting letter is between ‘g-p’, and Partition 3 -- containing those terms whose starting letter is between ‘q-z’. The intermediate results file at each mapper node is split into three segment files corresponding to each of these partitions. The master node assigns each partition to one reducer node, which processes all the segment files corresponding to that partition. This enables the reducer node to generate the final pos-list corresponding to the term IDs in that partition by merging the individual <term id, doc id> lists created at the end of the mapper phase. Figure 1 shows a typical example of distributed index construction. Note that in the above description, we considered that each mapper node generates a partial list of <term id, doc id> corresponding to the split blocks it parses. However, we did not really answer the question of how the term ID is maintained unique for a given term across all mapper nodes. In other words, if a term t1 is encountered, we need to associate an ID with it, and this ID should be the same across all mapper nodes. Otherwise this will cause an issue in merging the <term id, doc id> lists from different mapper nodes during the reduce phase. I will leave this as a question for our readers to come up with the answer. So far, we have assumed that our document collection is fairly static and the building of an index is mostly an infrequent event. Under such an assumption, if there are modifications to the document collection, then the index can be rebuilt from scratch. But if we consider the ‘World Wide Web’ as our document collection, it is constantly changing. Hence rebuilding from scratch does not serve the purpose. Instead what we need is a way of rebuilding the index incrementally. One of the ways of achieving an incremental index construction is to have a main index and an auxiliary index. The former is the index built from the initial document collection. An auxiliary index is constructed only from those documents that have been modified since the last time of index building. When a query is received, the query terms are looked up against both the main as well as the auxiliary index, and the results are combined and returned to the user. Periodically, the auxiliary index is merged to the main index. Now let us consider how to handle the case of documents getting deleted from the collection. We need to maintain a record of deleted document IDs in a list. Before the results are retrieved back to the user, they are filtered against the deleted documents list and only those documents that are currently in the collection are returned as valid results to the user. As discussed earlier, the ‘inverted index’ is the major data structure for retrieval of documents based on the user query and, 46 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
splits
assign
master
assign
positings
parser
a-f g-p q-z
inverter
a-f
parser
a-f g-p q-z
inverter
g-p
parser
a-f g-p q-z
inverter
q-z
map phase
segment files
reduce phase
Distributed Index Creation
hence, it needs to be very efficient. We would typically prefer that the entire ‘inverted index’ for a document collection session should fit in the main memory of the machine. But given the ever growing volume of the documents collected, we often encounter scenarios where the footprint of the inverted index cannot fit into the main memory. This results in slow look-ups on the inverted index, which in turn slows down the user queries. One way of mitigating this problem is to compress the inverted index and keep the compressed form in the main memory. We will go into more details about how an inverted index can be compressed and the issues related to that in the next column.
My ‘must-read book’ for this month
This month’s book suggestion comes from one of our readers— Shilpa, and her recommendation is very appropriate to this month’s column. She recommends an excellent article on information retrieval, titled, ‘Modern Information Retrieval: A Brief Overview’ by Amit Singhal, available at singhal.info/ ieee2001.pdf. Note that Amit Singhal is a pioneering researcher in information retrieval and heads the ‘search ranking’ team at Google. Thank you, Shilpa, for sharing this link. If you have a favorite programming book/article that you think is a must-read for every programmer, please do send me a note with the book’s name, and a short write-up on why you think it is useful so I can mention it in this column. It would help many readers who want to improve their software skills. If you have any favorite programming questions/software topics that you would like to discuss on this forum, please send them to me, along with your solutions and feedback, at sandyasm_AT_yahoo_DOT_com. Till we meet again next month, happy programming!
By: Sandya Mannarswamy The author is an expert in systems software and is currently working with Hewlett Packard India Ltd. Her interests include compilers, multi-core and storage systems. If you are preparing for systems software interviews, you may find it useful to visit Sandya's LinkedIn group ‘Computer Science Interview Training India’ at http://www.linkedin.com/groups?home=HYPERLINK "http://www. linkedin.com/groups?home=&gid=2339182"&HYPERLINK "http:// www.linkedin.com/groups?home=&gid=2339182"gid=2339182
Let's Try
Developers
Programming Made Easy with MVC
This article showcases the MVC (Model View Controller) architecture by applying it to Moodle, a popular learning management system used by many institutions across the world to solve a practical problem.
A
design pattern is a template used for writing flexible and efficient code. You can think of it as a programming model for implementing solutions to problems, irrespective of their complexity. There are several design patterns such as Singleton, Prototype, Adapter, Proxy, Command, etc. The one that’s the focus of this article is MVC (Model View Controller). MVC divides the design into three parts – the data (model), the user interface (view) and the logic (controller), commonly referred to as ‘business logic’. The user has access to only one component out of the three, i.e., the view. The input that the user gives to the view is handled by the controller. The controller acts as the
middleman between the view and the model. It processes the input, and in this process, it may either use the data stored in the model or store data in the model. Thus, each component is dependent on both the other components directly or indirectly. In this article, we are going to look at the implementation of MVC design using Moodle, a popular learning management system. The article demonstrates how MVC can be used to create a plug-in for Moodle (Modular Object Oriented Dynamic Learning Environment), an open source learning management system used widely across many educational institutions and various other domains to encourage the learning www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 47
Developers
Let's Try
Stored data
Input
Navigation Home
MODEL
Data to be stored
CONTROLLER
Output
VIEW
My home
Navigation List All Users
Home My home
Site pages
Site pages
My profile
My profile
My courses
My courses
John Jane Mark Mary
Figure 1: Model View Controller
Figure 2: Interface to display usernames of all registered users
process. In schools and universities, it can be used by the faculty members to post study material, interact with students, prepare tests, etc. Students may use it to collaborate with each other to work on projects, upload assignments, take tests, etc. The server-side code for Moodle is written using PHP.
{ public function get_users() { global $DB; //used to access the data manipulation APIs $queryString = “SELECT * FROM table_users”;
The problem
Let’s assume that Moodle is hosted on an Apache server. Create a plug-in for Moodle to allow the current user to view all the users registered on the site. The users' information is stored in a MySQL database on the server.
The solution
Design: On the click of a button, the names of all the users registered on the site should be displayed on the screen. Using the MVC pattern, we can divide the design into three components: 1. Forms to display the button and the result. 2. Class/es that provide/s functions to store and retrieve the data to be used for processing the input and producing the output. 3. A controller to maintain a link between the forms and the classes. The controller will decide which function to call and what data to send or retrieve to/ from the class/es. The model is independent of the view, i.e., it is unaware of the current form being displayed to the user. The model interacts only with the controller, although it is, in a way, associated with the view as well. Please note, since Moodle provides its own APIs to connect to the database and perform database operations, we need not explicitly write the code to do so. Code: The user should be provided with an interface to view all the users. This can be achieved with the help of a form that consists of a button with the text ‘List All Users’. When the user clicks on the button, the controller will retrieve all the users’ details from the model, which will retrieve the details from the database on the server. The result will be given back to the view to make appropriate changes on the form. Hence, the model class will contain methods as follows (the entire code has not been specified): <?php require_once(‘’); //files required to use the Moodle API class Model 48 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
//table_users contains the details of all the users $result = $DB->get_records_sql($queryString); return $result; } //other functions }
The following is the code for the controller: <?php //display the form require_once(‘’); //files required to use the Moodle API require_once(‘users_form.class.php’); $usersForm = new Users_Form(); //display the standard headings on the page, such as the page title, heading etc. $usersForm->display_headings(); //check if button has been clicked. It will return null if button has not been clicked if($usersForm->get_data() == null) $usersForm->display(); else { //retrieve users $modelObject = new Model; $users = $modelObject->get_users(); $userForm->display_users($users); } ?>
The following is the code for the view, with a list and a button: <?php //include the files required to use the Moodle API require_once(‘’); //create a Moodle form
Let's Try class Users_Form extends moodleform { public function definition() { $form = $this->_form; //add a submit button with text as “List All Users” $mform->addElement(‘submit’, ‘block’, ”List All Users”); } public function display_headings() { $PAGE->set_title(“Users”); $PAGE->set_heading(“Users”); echo $OUTPUT->header(); echo $OUTPUT->heading(“List of users”); } public function display_users($users) { foreach($users as $record) { echo “<BR/>”.$record->username;
Developers
} } ?>
When ‘List All Users’ is clicked, the usernames of all those who have registered with your site will be displayed. So, as shown in this article, it would be safe to say that MVC is popular due to its modularity, readability, maintainability, code reuse and more. An alternative easier solution is to straightaway start coding without wasting time and effort in the designing phase, but the result would be a huge file with redundant and complicated code, which would make the solution not only inefficient but also unreadable and difficult to maintain. This article is an attempt to showcase how MVC simplifies our lives! By: Gayatri Venugopal The author is a research associate at Symbiosis Institute of Computer Studies and Research, Symbiosis International University, India
www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 49
Admin
Overview
The Apache Spark Big Data Analytics Tool: Fast and Interactive Apache Spark is an open source data analytics cluster computing framework that is extremely fast. It is versatile and can be used in tandem with other applications like Hadoop. Spark became an Apache Top Level Project in February 2014.
W
e have already witnessed the power of the Hadoop framework in Big Data analytics. It has proven its enormous capability to solve the most critical dataintensive challenges. While the Hadoop framework is perfect for the batch and stored kind of Big Data job processing, on its own it proves inadequate when it comes to real time and interactive Big Data analytics. In this article, we are going to explore the power of Apache Spark, which has been recently developed by researchers from the open source community. It works on in-memory data concepts that make it a 100 times faster than the Hadoop MapReduce framework. It works very effectively for querying very large data sets and also provides sub-second latency of processed data sets.
What is interactive Big Data analytics?
When users need to perform interactive ad-hoc queries based on machine learning, graph processing algorithms and fast processing in real time—all involving massive volumes of data—it is known as interactive Big Data analytics. After the advent of the Hadoop MapReduce framework, this is a very widespread area of research. Nowadays, more research is focused on highly interactive and fast Big Data processing.
Existing iterative, interactive and streaming tools
Here are some iterative, interactive and streaming tools of Big Data. Dremel: A Google product launched in 2010, it works on a novel approach. It offers a highly interactive, real-time and ad-hoc query interface, which is not possible with MapReduce. ClouderaImpala: This is an SQL query engine that gets executed in Apache Hadoop, and is a leading enterprise product with scalable parallel database technology and the strength of Hadoop. It allows users to directly raise queries stored in HDFS (Hadoop distributed file system) and Apache HBase (no data transfer is needed).
The Apache Spark approach
The finest approach to Apache Spark is in-memory computing, 50 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
which means data gets stored or cached in the distributed main memory instead of the disk. In-memory computing: Apache Spark introduces a new data primitive called RDDS (resilient distributed datasets), with the help of which data is stored across the cluster's memory. When data is in-memory, there is no need for the replication of data sets. This approach automatically provides fault tolerance capabilities. This RDDS provides a read and write capability that is 40 times faster than HDFS or any other distributed file system. Hadoop interoperability: Apache Spark is also fully interoperable with Hadoop and is, therefore, being adopted by many research projects. Read and write can be performed easily by any existing storage system that is supported by Hadoop like HDFS, HBase, S3 (simple storage system) and even with the input/output APIs of Hadoop. Therefore, Apache Spark can be used very effectively for non-interactive applications as well. Apart from this, Spark can also be integrated with Mlib (a machine learning tool), Spark streaming, Shark and Graphx.
Advantages of Apache Spark
The following are the key advantages of Apache Spark. Fastest data processing: Initially, the main purpose of deploying Spark was to enhance efficiency in the current MapReduce applications. Actually, MapReduce is a general framework and is not specifically implemented in core Hadoop. Spark also enables MapReduce, as it can use memory optimally (even in recovering from failure cases). Some features work faster in Spark's MapReduce compared to Hadoop's MapReduce, even without making efficient use of caches in iterations. The iterative algorithm: By using the cache() function, Spark provides users and applications the facility to provide cached datasets in explicit form. It means that all the applications can take data from the RAM rather than the disk. This dramatically increases the performance of the iterative algorithm, which reaches the same dataset again and again.
Overview Content recommendations and ad targeting are the results of leveraging Spark’s efficient iterative execution, which has been done by two of the world’s leading companies. There is a good comparison between machine learning algorithms and general algorithms regarding speed. Machine learning algorithms (e.g., based on Spark logistic regression) run 100x more rapidly than previously implemented Hadoop-based algorithms, while other algorithms (collaborative filtering or other alternative multipliers) run 15x faster. Real time streaming: Spark offers the advantage of single semantics and full recovery of stateful operators. It also has the unique facility of providing you the same Spark APIs to process streams, including reusing the regular application code of Spark. It has an API for working with streams with low latency data analysis systems, and it can easily be extended further to process and analyse live data streams. Quick design making: Reducing latency and improving quality with efficiency are the advantages of Spark. Many companies use Big Data for recommendation systems, ad targeting or predictive analytics. Effectiveness increases by reducing decision latency. This leads to dramatic improvements in the company’s ROI (return on investment). Spark deployment is ideal for ad targeting and improved video delivery over the Web.
Applications of Apache Spark
Apache Spark is currently used by many research projects at Berkeley related to machine learning, and it is also being studied at some Internet companies. Interactive queries on data streams: Quantified (a startup) used Spark for the exploration of time series data. It was used to create a user friendly interactive interface. Quantified specialises in predictive analysis on time series data. The process contains three steps: to upload new data from external sources (e.g., Facebook or Twitter streams) at fixed periods, executing an entity extraction algorithm (for extracting the data), and in the end, it builds an in-memory table of each mentioned entity. With the help of Web applications, users can raise queries in a user friendly manner. Spam detection on Twitter: This is a research project at Berkeley. Apache Spark was used to investigate spam links in Twitter posts. A regression classifier for investigation purposes was developed and it was placed on top of Spark. With the help of Spark, the research team could develop an accurate and extremely fast classifier for spam detection. Hive on Spark: Spark offers full support to the HiveQL language. It can be run over Hive data warehouses as well. It enhances the capability of Hive by facilitating the loading of tables in-memory for much faster access. Apart from SQL support, it also provides machine learning functions like clustering and classification. Spark streaming: Spark streaming is a sub-project of
Admin
Spark. It extends the functionality of online processing by providing the MapReduce and filter functionality of Spark.
Setting up Spark on Amazon EC2
To set up a Spark cluster on Amazon EC2, you need to follow the simple steps listed below. Pre-requisites: In order to access any service of the Amazon cloud, you first have to sign up with Amazon and then navigate to its EC2 service. After that you need to click on the ‘Create key pair’ tab (in the key pair section). You will be given the option of creating and downloading the key pair. Downloading Spark: You can download Spark on your local machine by running the following command: $ wget http://spark-project.org/files/spark- 0.7.2-prebuilthadoop1.tgz $ tar xvfz spark-0.7.2-prebuilt-hadoop1.tgz
The above command will create one EC2 directory, which contains the cluster set up script: $ spark-0.7.2/ec2/spark-ec2 -k <keypair-name> -i <key-file> -s <num-slaves> launch <cluster-name>
Here <keypair-name> is the name of the EC2 key pair and <key-file> is the private key. You can give the number of the slave that you want to launch in the <num-slaves> options, e.g., 1, 2, 3 or 4, etc. You can give any suitable name to your cluster in the <cluster-name> option. Launching a Spark cluster: Now, just log in to the master instance with the following command: $ ./spark-ec2 -k key -i key.pem login <cluster-name>
For specific configurations, there is the /root/spark/conf/ spark-env.sh file on each machine, which lets you edit that file. Terminating a cluster: If you want to terminate the cluster, run the following command: $./spark-ec2 destroy <cluster-name>.
References [1] http://docs.sigmoidanalytics.com/index.php/Running_Shark_on_EC2 [2] https://spark.incubator.apache.org/docs/latest/ec2-scripts.html
By: Rishabh Sharma The author is a solutions delivery analyst with an MNC, involved in research projects in cloud computing and Big Data. He has in-depth knowledge of distributed systems and cloud computing research issues in the industry. He has authored three text books -‘Advanced Computing Technology' for Gujarat Technical University, ‘Software Quality Engineering’ and ‘Mobile Computing’ for Uttar Pradesh Technical University, apart from many research papers in international journals and IEEE. Reach him via email at er.rishabh.sharma@gmail.com.
www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 51
Admin
How To
Set Up on
Perl
Windows 7
Most modern Linux distros are shipped with Perl. However, it needs to be installed on Windows. Perl is a high level programming language, and was written by Larry Wall and others. Because of its process, file and text manipulating facilities, it is popular with programmers. Here’s a guide to setting up Perl on Windows 7.
P
erl (Practical Extraction and Reporting Language) was developed by Larry Wall and has its roots in UNIX. Its inbuilt regular expressions engine, good execution speed, CPAN (Comprehensive Perl Archive Network) and, of course, the amazing Perl community, make it an ideal general-purpose programming language. If you have Linux on your system, you are very likely to have some version of Perl, as well as an excellent tool chain such as gcc, make, etc. Windows users, however, are not so lucky. Perl has to be installed separately, and till a few years ago Activestate Perl was the only option available. Another issue was that a lot of applications that depended on Perl would install (mostly) older versions of Perl, and if you did not have admin rights to the Windows Server/workstation, there was just no easy way to install your own version of Perl. Even if you were very careful, you could very well end up messing up the pre-installed Perl. That is exactly where Strawberry Portable Perl comes in.
What's Strawberry Perl?
It is a Perl environment for MS Windows containing all you need to run and develop Perl applications. It is designed to be as close as possible to the Perl environment on UNIX systems. It includes Perl binaries, a compiler (gcc) + related tools, all the external libraries (crypto, graphics, xml, etc), a lot of really great modules pre-installed, cpanm - a nice utility that makes module installation easier, all the bundled 54 | April 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
database clients, and a lot more. In fact, the home page of Strawberry Perl has a statement from Larry Wall himself: “When I am on Windows, I use Strawberry Perl." So let’s begin. Here's what I have installed on my system: C:\Users\pmu>perl –version This is Perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x64-multi-thread (with 1 registered patch, see perl -V for more detail) Copyright 1987-2012, Larry Wall Binary build 1603 [296746] provided by ActiveState http:// www.ActiveState.com Built Mar 13 2013 13:31:10 Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.
I installed this before I found Strawberry Perl and I let it be because, thanks to Strawberry Portable Perl, multiple versions of Perl can peacefully co-exist. I had encountered a similar situation on one of our SAN Management Servers. ActiveState Perl was pre-installed by another application which happened to use it for some heavy text manipulating
How To work. This server did not have access to an outside network. Some of the Perl scripts that I had written required a few modules, but due to the restricted access, I could not install them. Even if I did get access, I didn't want to fiddle with the pre-installed version of Perl.
Where do we get it?
Go to www.strawberryperl.com and under the section More downloads, click on Other releases: ZIP, Portable, older versions. Download the ‘Portable Zip’ editions of Perl. I downloaded 32- and 64-bit portable versions for Perl 5.16.3 and 5.18.2.1 as well as a 32-bit version of 5.10.1. Once you have completed downloading them, unzip them to separate folders. This is what it looks like, in my case: C:\>dir | find /I "perl" 02/23/2014 06:23 PM 02/23/2014 02:12 AM 02/19/2014 12:13 AM 02/19/2014 12:16 AM 02/19/2014 12:12 AM 02/18/2014 11:46 PM
<DIR> <DIR> <DIR> <DIR> <DIR> <DIR>
my32bitperl516 my32bitperl518 my64bitperl516 my64bitperl518 myperl510 Perl64
This is what each folder contains: C:\my32bitperl516 Folder For 32 Bit Perl Version 5.16.3.1 C:\my32bitperl518 Folder For 32 Bit Perl Version 5.18.2.1 C:\my64bitperl516 Folder For 64 Bit Perl Version 5.16.3.1 C:\my64bitperl518 Folder For 64 Bit Perl Version 5.18.2.1 C:\myperl510 Folder For 32 Bit Perl Version 5.10.1 C:\Perl64 Folder For 64 bit ActiveState Perl Version 5.16.3.1
Admin
C:\my32bitperl518>
Go through the README.Portable.txt file. It’s got a lot of useful information. There are a few environment variables that you can add to make a Portable Perl load up automatically. Next, run the portableshell.bat file as shown and check the Perl version: C:\my32bitperl518>portableshell.bat Welcome to Strawberry Perl Portable Edition! * URL - http://www.strawberryperl.com/ * see README.portable.TXT for more info ---------------------------------------------Perl executable: C:\my32bitperl518\perl\bin\perl.exe Perl version : 5.18.2 / MSWin32-x86-multi-thread-64int C:\my32bitperl518> C:\my32bitperl518>perl --version This is perl 5, version 18, subversion 2 (v5.18.2) built for MSWin32-x86-multi-thread-64int Copyright 1987-2013, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. C:\my32bitperl518>
You can give any name you wish to the folders when you unzip them. Just ensure that there are no spaces. Let's cd to the my32bitperl518 folder and see what it contains:
Note how easily I can switch to this Perl Version. It also installed gcc and make. Here's the output:
C:\my32bitperl518>dir Volume in drive C is Windows7_OS Volume Serial Number is 52DF-20FF Directory of C:\my32bitperl518 02/01/2014 09:00 PM <DIR> . 02/01/2014 09:00 PM <DIR> .. 05/04/2011 09:21 AM <DIR> c 01/07/2014 07:19 PM <DIR> cpan 02/02/2014 12:17 AM <DIR> data 01/07/2014 07:19 PM 9,575 DISTRIBUTIONS.txt 01/07/2014 07:19 PM <DIR> licenses 01/07/2014 04:50 PM <DIR> perl 12/03/2013 11:47 AM 2,661 portable.perl 11/15/2013 11:16 AM 915 portableshell.bat 01/07/2014 07:39 PM 1,618 README.portable.txt 01/07/2014 07:19 PM <DIR> win32 4 File(s) 14,769 bytes 8 Dir(s) 138,036,543,488 bytes free
-C:\my32bitperl518>gcc --version gcc (release with patches / build 20130526 by strawberryperl. com) 4.7.3 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. C:\my32bitperl518>make --version GNU Make 3.82 Built for i686-w64-mingw32 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/ licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. C:\my32bitperl518> www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 55
Admin
How To
Now let’s try installing a module. Note: Ensure that you are in the relevant Perl directory while installing modules. In the example below, you will cd to the directory where the 64-bit Perl version 5.16 is installed, execute the portable. bat file and install the Net::SSH2 module. Net::SSH2 is a great module that you can use to write Perl scripts to log in to Linux/UNIX servers (or any device based on these operating systems), run commands and capture the outputs. C:\>cd C:\my64bitperl516 C:\my64bitperl516>portableshell.bat --------------------------------------------- Welcome to Strawberry Perl Portable Edition! * URL - http://www.strawberryperl.com/ * see README.portable.TXT for more info ---------------------------------------------Perl executable: C:\my64bitperl516\perl\bin\perl.exe Perl version : 5.16.3 / MSWin32-x64-multi-thread C:\my64bitperl516>perl --version | find /I "version" This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x64-multi-thread C:\my64bitperl516>cpanm Net::SSH2 --> Working on Net::SSH2 Fetching http://www.cpan.org/authors/id/R/RK/RKITOVER/NetSSH2-0.53.tar.gz ... OK Configuring Net-SSH2-0.53 ... OK Building and testing Net-SSH2-0.53 ... OK Successfully installed Net-SSH2-0.53 (upgraded from 0.48) 1 distribution installed
Cd to the my32bitperl518 directory, run portableshell.bat and you will have the 32-bit Perl version 5.18 running! C:\Users\pmu>cd C:\my32bitperl518 C:\my32bitperl518>portableshell.bat --------------------------------------------- Welcome to Strawberry Perl Portable Edition! * URL - http://www.strawberryperl.com/ * see README.portable.TXT for more info ---------------------------------------------Perl executable: C:\my32bitperl518\perl\bin\perl.exe Perl version : 5.18.2 / MSWin32-x86-multi-thread-64int C:\my32bitperl518>perl --version | find /I "version" This is perl 5, version 18, subversion 2 (v5.18.2) built for MSWin32-x86-multi-thread-64int C:\my32bitperl518>cpanm Net::SSH2
56 | April 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
--> Working on Net::SSH2 Fetching http://www.cpan.org/authors/id/R/RK/RKITOVER/NetSSH2-0.53.tar.gz ... OK Configuring Net-SSH2-0.53 ... OK Building and testing Net-SSH2-0.53 ... OK Successfully installed Net-SSH2-0.53 (upgraded from 0.48) 1 distribution installed
Note that it's installed the module again. It’s because we were in the directory in which the 32-bit Perl version 5.18 is installed, that it went ahead and installed the module. The advantage is that we can selectively install modules for different versions of portable Perl! Note that in both the cases, it upgraded a pre-installed module of Net::SSH2. This is another advantage of Strawberry Perl. A lot of modules come pre-installed. Check the outputs below. The first output shows that the module Net::SSH2 is not installed for the Activestate Perl. C:\Users\pmu>perl --version | findstr /I "version active" This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x64-multi-threadBinary build 1603 [296746] provided by ActiveState http://www.ActiveState.com C:\Users\pmu>perldoc perllocal | find /I "Net::SSH2" C:\Users\pmu>
The same is true for Perl version 5.10: C:\Users\pmu>C:\myperl510\portableshell.bat --------------------------------------------- Welcome to Strawberry Perl Portable Edition! * URL - http://www.strawberryperl.com/ * see README.portable.TXT for more info ---------------------------------------------Perl executable: C:\myperl510\perl\bin\perl.exe Perl version : 5.10.1 Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\pmu>perldoc perllocal | find /I "Net::SSH2" C:\Users\pmu>
Similarly, let’s install another module, Config::Tiny. This is another handy module that allows you to have a nice config file, from which your scripts can pick up parameters, such as a username, a password, a command that you would want to run, or the location of a file: C:\my32bitperl518>cpanm Config::Tiny --> Working on Config::Tiny Fetching http://www.cpan.org/authors/id/R/RS/RSAVAGE/ConfigTiny-2.20.tgz ... OK Configuring Config-Tiny-2.20 ... OK
How To Building and testing Config-Tiny-2.20 ... OK Successfully installed Config-Tiny-2.20 1 distribution installed
We then move in to the directory that has the 64-bit Perl version 5.16 installed, run the portableshell.bat command and install the same module: C:\my64bitperl516>cpanm Config::Tiny --> Working on Config::Tiny Fetching http://www.cpan.org/authors/id/R/RS/RSAVAGE/ConfigTiny-2.20.tgz ... OK Configuring Config-Tiny-2.20 ... OK Building and testing Config-Tiny-2.20 ... OK Successfully installed Config-Tiny-2.20 1 distribution installed
And in the 64-bit Perl version 5.18 directory as well, don't forget to run portableshell.bat: C:\my64bitperl518>cpanm Config::Tiny --> Working on Config::Tiny Fetching http://www.cpan.org/authors/id/R/RS/RSAVAGE/ConfigTiny-2.20.tgz ... OK Configuring Config-Tiny-2.20 ... OK Building and testing Config-Tiny-2.20 ... OK Successfully installed Config-Tiny-2.20 1 distribution installed
Now, let’s write a script and run it against each Perl version. Note: When you run scripts, you don't need to change to the specific directory where the desired Perl Version is installed. Just run the portableshell.bat from the desired direrctory. If I run C:\my32bitperl516\portableshell.bat, I get to use the 32 bit Perl Version 5.16, and after I am done and want to usePerl Version 5.18 64 bit, I just run C:\ my64bitperl518\portableshell.bat. You just need to hit exit a few times to get back to the earlier version of Perl. You just need to hit Exit a few times to get back to the earlier version of Perl. Let's write a small script that uses the Smartmatch feature. Nothing fancy, but let’s create two arrays, each with names of different Linux flavours, and then use the Smartmatch operator - ~~ - to compare them. It's on the way to being deprecated and has moved to ‘experimental’ in Perl Version 5.18. #!/usr/bin/perl #script name pl1.pl use warnings; use strict; my @firstarray = qw (debian redhat ubuntu centos mint stella elementaryos);
Admin
my @secondarray = qw (debian redhat ubuntu centos mint stella elementaryos); print "The arrays have the same elements!!\n" if @firstarray ~~ @secondarray;
When it’s run using Perl version 5.16 (whether 32- or 64bit will not matter here), you will get the following output: C:\Users\pmu>perl --version | find /I "version" This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x86-multi-thread C:\Users\pmu>perl pl1.pl The arrays have the same elements!!
And with Perl version 5.18, you’ll get the following output: C:\Users\pmu>perl --version | find /I "version" This is perl 5, version 18, subversion 2 (v5.18.2) built for MSWin32-x64-multi-thread C:\Users\pmu>perl pl1.pl Smartmatch is experimental at pl1.pl line 8. The arrays have the same elements!!
Note the line in the output that says ‘Smartmatch is experimental at pl1.pl line 8’. As mentioned before, Smartmatch has been moved to ‘experimental’ with Perl version 5.18, and that's why we get the message when the script is run with Perl version 5.18. If you were to run a script with ‘given-when’ statements, you'd get something similar. This way, you can run the same script against different Perl versions and see how it works. You can also copy the required folder to a USB drive, paste it into another computer, run the portableshell.bat command, and you've got Perl running in there too! Contrary to what you might have heard from fellow techies or read on the Internet, Perl is very much alive and is still being actively used. A number of organisations, ranging from financial giants, media companies and many others, still use Perl for a lot of critical tasks. It's truly disheartening to see that such a powerful language is sometimes mistakenly referred to as ‘write only’, ‘ugly’, etc. It's not a shortcoming of a language if people write unreadable/unmaintainable code in it. One can write well written/formatted code in any language, including Perl. This is one language that is very versatile and is bound to meet your needs. Yes, there is a steep learning curve with the advanced topics, but once you start getting the hang of it, you'll use Perl a lot more than you’d imagine. By: Pritesh Manohar Ugrankar The author is an open source enthusiast who loves Perl and Linux. You can reach him at pritesh.ugrankar@gmail.com
www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 57
Admin
Overview
Will Private Clouds Enhance Your Business? A cloud computing platform that operates behind the corporate firewall and within control of the organisation's IT department may be termed a private cloud. In this article, the author makes a case for private clouds and their impact on the future of cloud computing.
T
ypical IT environments consist of compute, storage and network resources duplicated across many business units in the same organisation. Often, resources are under-utilised and wasted due to overprovisioning, or application performance suffers due to the under-provisioning of resources. Cloud computing includes a spectrum of many deployment models. Some thought leaders call the private cloud a marketing term for a proprietary computing architecture to work with the existing data centre resources for better utilisation and agility, while others have realised the importance of the private or internal cloud. The private cloud offers several benefits such as automation, self-service, agility, efficiency, security, better resource utilisation, and faster time to market. A combination of the public and private or virtual private cloud models can be used to address different requirements. So let’s look at why the private cloud is really a cloud, and how the future scenario in the cloud space will depend on the increasing adoption of the private cloud. Highly reliable and fault tolerant infrastructure is the solid base of a private cloud. Its deployment captures the essential characteristics of public and partner-hosted clouds. Private clouds allow organisations to maintain total control over their infrastructure, applications and data. They deliver many benefits of the public cloud such as agility, faster time to market, automation, elasticity, higher levels of overall application availability, reliability, self-service, scalability within a limited range and pooling of shared infrastructure. So if public cloud service providers can deliver services efficiently and realise all the benefits mentioned
58 | April 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
earlier, why can’t organisations themselves achieve the same results, with existing expertise, investment in resources and the availability of private cloud products that can help them build a cloud environment behind the firewall, and with complete control? The private cloud provides cloud infrastructure in-house, ensures the organisation has control of resources, besides ensuring more security, privacy and compliance to regulatory requirements. It also needs capital investment and expertise to build and maintain a private cloud infrastructure.
Benefits of a private cloud
Let’s first look at the standard definition of cloud computing provided by NIST (National Institute of
Admin
Overview
IT Apps
Dev
Test
Prod
Apps
ENVs
Dev
Test
Prod
Marketing
ENVs
Finance Marketing
HR
HR
Apps
Apps
Dev 99%Availability
Dev
Test
Prod
ENVs
Finance
Dev
Test
Prod
ENVs
IT
Figure 1: The traditional IT environment
Standards and Technology), and verify if the private cloud measures up on the five essential characteristics listed by it. On-demand self-service: A consumer can provision computing capabilities such as compute resources, the network and storage as needed, without human interaction in the private cloud environment. Broad network access: Resources are accessible over the organisational network, behind a firewall, and accessible through standard mechanisms that promote use by heterogeneous thin or thick client platforms such as mobile phones, tablets, laptops and workstations. Resource pooling: In private clouds, computing resources are pooled to serve the multiple business units of the same organisation. Rapid elasticity: Resource capabilities can be elastically provisioned and de-provisioned, in some cases automatically, to scale up and scale down based on the demand. To the consumer, the capabilities available for provisioning often appear to be unlimited and can be appropriated in any quantity at any time. Though, in the case of private clouds, capabilities available for provisioning may not appear to be unlimited, considering the huge investment required, which might be beyond a single organisation’s budget. Measured service: Compute, storage and network resource usage can be monitored extensively, controlled and reported, providing transparency for both the organisation and its various business units. Private cloud platform vendors with virtualisation, grid and infrastructure solutions backgrounds have focused on adding features like multi-tenancy, self-service and chargeback. We see these capabilities enabling organisations to go well beyond consolidation and virtualisation projects to set up their own clouds. “The growth of the private cloud is being driven by pressure to deliver IT faster and cheaper, the quick penetration of virtualisation and virtualisation management, and the growth of cloud computing offerings," said Tom Bittman, VP and analyst at Gartner. Server and infrastructure virtualisation are important basics for the private cloud. Virtualisation
Test
Prod 99%Availability, Site Failover option, Scalable
99%Availability
Private Cloud = Virtualisation + Self Service + Automation + Chargeback + Agility Compute
Storage
Network
Figure 2: The private cloud environment
Private Cloud
Organisation Boundary Figure 3: The private cloud
makes it easier to dynamically and granularly pool, share and reallocate infrastructure resources such as servers, desktops, storage, networking, middleware, etc. Hence, virtualisation is the major entry point for the private cloud. However, the trap that executives often fall into is when they believe virtualisation is a cloud environment. By itself, it does not constitute a private cloud. The private cloud is a blend of automation, virtualisation and distributed computing that provides on-demand computing capacity to an organisation’s internal users or customers. In a cloud environment, security is the single most fundamental consideration. Dynamic provisioning, confidentiality, governance, risk management and compliance are the key driving factors for the private cloud. Private clouds are slowly moving from a technology-centric to a user-centric service delivery. Most private cloud initiatives have so far been technologycentric, focused on enabling automation, virtualisation and service oriented architecture (SOA), but now the focus is on standardisation, automation and to make organisations financially aware. Application and data that are migrated to a private cloud would deliver flexible computing similar to any other cloud service provider, but behind a firewall and www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 59
Admin
Overview Self Service Portal
Virtualized Datacenter
Service Management Layer
security
Chargeback
Governance
• • • • • •
Workflow Magt
Infrastructure Management Layer
Virtualized Capacity Planning CapEx Long Provisioning Time Fixed Cost Cost Sharing Center
Virtualization Layer Compute
Storage
Network
Figure 4: The building blocks of the private cloud
without the security concerns that come with sending data outside an organisation’s boundary. This scenario appeals to organisations that desire more control over their infrastructure.
The building blocks of private clouds
The private cloud has come a long way, having gained significant traction in the market. Public cloud vendors who once criticised the private cloud as a ‘false cloud’ or as an oxymoron are now providing features for interoperability with private cloud platforms. The decision to build your own cloud is a strategic one, which requires stakeholders to think about the many inhouse resources required to sustain such infrastructure. It is the need of the hour for IT organisations to enable selfTable 1: Open source private cloud product vendors
PrivateCloud • • • • • • •
Virtualized and multi-tenant .Self Service Portal Automation Short Provisioning Time OpEx Pay per Use Chargeback Model Profit Sharing Center
Figure 5: Virtualised environments vs private clouds
service, and become on-demand providers of infrastructure, platforms and applications for their internal business units. Speed and agility, not cost reduction, drive private cloud implementations. Various cloud service providers offer the building blocks for a private cloud infrastructure–virtualisation (hypervisors such as ESXi, Xen, etc), self-service, metering or chargeback and automated workflow management.
OpenStack
Eucalyptus
CloudStack
Introduction
OpenStack offers open source software to build public and private clouds; started by Rackspace (Cloud Files platform) and NASA (Nebula) in 2010.
Eucalyptus is a short form of the Elastic Computing Architecture for Linking Your Programs to Useful Systems. It is an open source as well as a commercial private IaaS service provider.
CloudStack is open source cloud computing software for creating, managing and deploying Infrastructure as a Service (IaaS) clouds in service provider environments (the public cloud) or enterprise environments (the private cloud).
Components
Nova (compute), Swift (object storage), Glance (image service), Keystone (identity management), Horizon (GUI interface)
Cloud Controller (CLC): Manages the virtualisation resources and APIs; provides Web interface Walrus (S3 storage); Cluster Controller (CC): Controls execution of VMs and their networking; Storage Controller (SC): Provides block-level storage to VMs (EBS); Node Controller (NC): Controls VMs via hypervisors
Management server; Hypervisor nodes; Storage nodes; Layers: Zones, pods, clusters, hosts, primary storage, secondary storage
Hypervisor support
Xen, KVM, UML, LXC, VMware
Xen, KVM, VMware
Xen, KVM, VMware, Citrix XenServer
API availability
Yes
Yes
Yes
Self-service user portal
Yes
Yes (available with subscription to support)
Yes
60 | April 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
Overview Hence, virtualisation is the major entry point for the private cloud. However, the trap that executives often fall into is when they believe virtualisation is a cloud environment. By itself, it does not constitute a private cloud. Zynga, a provider of social game services, was founded in July 2007. It moved to the public cloud to accommodate the rapid scale demanded through the vertical growth phase of the company. In this process, it gained a better understanding of workloads in the public cloud environment and opted to build its own internal cloud to complement its public cloud footprint. The reason behind this move was a desire to recoup some of the capital expenditure made in the earlier stages of setting up the company. Also, as the business had grown, it became feasible from a financial perspective to own some of the equipment and enjoy the associated benefits of the higher depreciation write-offs that come with it. At the same time the reduced dependence on the public cloud improved the company’s operating margins. Zynga’s private cloud project went from concept to production in less than six months. Zynga, along with Rightscale, a cloud management product, can now fully provision more than 1,000 physical servers in 24 hours. This is an iconic private cloud case study. Private cloud adoption also resulted in greater control and flexibility over the storage and Web tiers, provisioning times got slashed, while shorter development cycles led to faster time to market, improved application performance and ease of management.
Private clouds and public clouds - a comparison
A comparison of the two can be made from various perspectives, which may differ based on the application type and security requirements. Governance: In the private cloud, there is better control over data (and data security); while in the public cloud, cloud service providers are responsible for many aspects related to securing infrastructure and data. Speed and agility: Both public and private clouds have the ability to balance and provision resources with very little turnaround time. Risk management: Private clouds are behind the organisation’s firewall and, hence, have better risk control compared to public clouds. Compliance: Private clouds mitigate the security and privacy issues related to regulated workloads running outside the firewall by giving IT departments efficient and complete control over resources. Culture: Private clouds are better aligned to the command-and-control cultures and expectations of enterprise IT organisations. Familiar environments are easy to manage. Cloud economics: Private clouds leverage existing infrastructure investments, and this is far more costeffective for long-running workloads. It turns out those ‘pennies an hour’ that you pay to public cloud service
Admin
providers add up remarkably fast, because the price you pay includes all of their costs, in addition to some healthy profit margins—though for very compute-intensive Hadoop style applications, public clouds can offer a cost advantage. CapEx: Public clouds have better resource utilisation rates; with private clouds, the organisation still has to build and maintain resources for computing, storage and networks to meet spikes in demand across various business units. There are costs associated with maintenance of resources, planning for redundancy to avoid data loss and disasters, and additional experts to handle all operations on the premises. Adequate resources: Public clouds keep infrastructure costs low for new projects while for private clouds, organisations need to obtain resources to meet requirements for unplanned projects that may crop up. Elasticity: Public clouds offer greater elasticity and provide seemingly unlimited resources for use, while this is not the case in private clouds. Economies of scale: Public clouds have greater economies of scale compared to private clouds. The private cloud often evolves into the hybrid model that enables organisations to retain ownership of applications and data. It is the commencement of an organisation’s cloud journey and not the final destination. Now, let’s take one step forward by revisiting the history of Amazon’s public cloud. How did Amazon start its operations and begin offering its public cloud services? Well, it all started with the purpose of gaining flexibility and agility in the traditional environment. This is the same reason IT organisations are building private clouds today. An interesting scenario occurred in 2012, when a major public cloud provider announced its partnership with a private cloud vendor. This was an alliance between one of the biggest cloud service providers and one of the biggest private cloud service providers—in enterprise and open source versions. Today, most organisations want to blend a variety of internal and external compute and storage resources to create an integrated hybrid cloud that allows workloads to be dynamically re-targeted to optimise for security, governance, compliance, price, performance and various service level characteristics. References [1] Peter Mell, Timothy Grance, ‘The NIST Definition of Cloud Computing’ http://csrc.nist.gov/publications/nistpubs/800-145/SP800-145.pdf [2] Phil Wainewright, ‘Private cloud discredited, part 2’ http://www.zdnet. com/blog/saas/private-cloud-discredited-part-2/1289 [3] Gartner, ‘Private Cloud Computing: An Essential Overview’ [4] David Cahill, Zynga Cloud Case Study: The journey to a real Private Cloud http://wikibon.org/wiki/v/Zynga_Cloud_Case_Study:_The_ journey_to_a_real_private_cloud
By Mitesh Soni The author is a technical lead at iGATE Global Solutions Limited. He is in the Cloud practice and loves to write about new technologies. Blog: http://clean-clouds.com; https://abcdofcloud. wordpress.com
www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 61
Admin
Overview
Some Must-Have Android Apps for Sysadmins Here are a number of Android apps that can actively assist a systems administrator.
A
systems administrator has the job of setting up, running and maintaining the computer systems or the servers of an organisation for reliable service. This is a responsible and taxing task, and any tool that makes it easier is most welcome. In this article, the author discusses an array of apps that offer the sysadmin a number of benefits.
ConnectBot
ConnectBot is a powerful open source Secure Shell (SSH) client. It is a very handy tool for working on Linux/UNIX systems. Use it to connect to a computer via SSH and remotely control it. Once connected, you can enter commands as if you were sitting in front of the system, if access permissions have been set up earlier. It can manage simultaneous SSH sessions and create secure tunnels.
Features
Supports logging in to any arbitrary server on the local network or the Internet with a user name and password. Supports connections based on a public/private key pair instead of the user name/password for increased security. Allows frequently accessed hosts to be saved in a menu for quick re-connection.
Application information
Name: ConnectBot Publisher: Kenny Root and Jeffrey Sharkey Rating: 4.7 out of 5 Recommended by over 12,000 users on Google Plus. 62 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
Fing
Fing is a customisable network discovery tool that finds out which devices are connected to a Wi-Fi network. A simple and intuitive interface helps evaluate security levels, detect intruders and resolve network issues. It also offers several networking utilities such as Ping, DNS Lookup and trace-out. All these can be used for troubleshooting and analysing connection issues.
Features
Discovers all the devices connected to your Wi-Fi network. Displays the MAC address, device manufacturer and IP address. Has automatic DNS and reverse look-up. Service Scan allows you to scan hundreds of TCP ports in a few seconds. Supports identification based on the IP address, for bridged networks. Displays NetBIOS names and properties.
Application information
Name: Fing Publisher: Overlook Rating: 4.8 out of 5 Recommended by over 17,000 users on Google Plus.
Wyse PocketCloud
Wyse PocketCloud for Android allows quick and easy access to any end user machine from anywhere on the road using an
Overview Android device. For remote users needing secure access to their computers, this application is a simple and effective way of accessing the resources of their computer anywhere, from the palm of their hand.
Admin
Figure 2: AndFTP
Features
It has secure access to your content without syncing or paying for extra cloud storage. It opens remote files with any of your Android apps, Figure 1: ConnectBot e.g., QuickOffice, DocumentsToGo, etc. Simple file management. Can connect up to 10 computers (for premium users). Can transfer media (music, photos and files) between mobile devices and computers.
Application information
Name: PocketCloud Remote RDP/VNC Publisher: Wyse Technology Inc Rating: 4.5 out of 5 Recommended by over 13,000 users on Google Plus.
AndFTP
AndFTP is a FTP, FTPS, SCP and SFTP client for Android. It can manage several FTP configurations. It comes with both a device and an FTP file browser. It is very useful for those who have an FTP server and for Web designers, Web developers, bloggers, IT professionals, etc. It provides features for download, synchronisation and sharing with resume support. SCP and folder synchronisation are available for the professional version only.
Features
Manages FTP servers: It allows you to manage multiple FTP servers. Simply set up your FTP server credentials and manage them. Device file browsing: It allows you to browse files on your FTP server and select one or more for download. FTP file browsing: It allows you to browse files on your phone and SD card. Can synchronise files with the server (resume enabled). It has active/passive FTP mode support. It has support for custom FTP and SCP commands.
Application information Name: AndFTP
Figure 3: Wi-Fi Analyzer
Publisher: LYSESOFT Rating: 4.5 out of 5 Recommended by over 7000 users on Google Plus.
Wi-Fi Analyzer
Wi-Fi Analyzer is used to optimise wireless Internet connections. It provides a relatively easy way to analyse the strength of different wireless channels so that you can choose which router you want to connect to. In short, it turns your Android device into a Wi-Fi analyser.
Features
Can optimise and troubleshoot any wireless network. Can use all the 14 channels (available by default). Can analyse Wi-Fi signals and test them. Has a built-in audio signal strength meter with an audible alert. Can view Wi-Fi channels in five different ways such as channel graphs, time graphs, channel ratings, AP lists and signal meters.
Application information
Name: Wi-Fi Analyzer Publisher: Farproc Rating: 4.6 out of 5 Recommended by 75,000 users on Google Plus.
Hacker’s Keyboard
Hacker’s Keyboard is an application developed by Klaus Weidner. It provides a 5-row desktop-like keyboard for www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 63
Admin
Overview users to access their desktops from anywhere in the world.
Features
Figure 4: Hacker’s Keyboard
Enables users to effortlessly access computers behind firewalls and proxy servers. Intuitive touch and control gestures (including multi-touch support). Full keyboard functionality (including special keys such as Ctrl, Alt and Tab keys). Transfer of files in both directions is possible. Multi-monitor support. Sound and video transmission in real-time.
Application information
Name: TeamViewer for Remote Control Publisher: TeamViewer Rating: 4.6 out of 5 Recommended by 120,000 users on Google Plus.
QPython
Figure 5: TeamViewer
Android devices. It is based on the AOSP Gingerbread soft keyboard. This app is useful for applications such as ConnectBot, which require special keys (Ctrl, Alt and Shift).
Features
Provides keys such as Ctrl, Alt, Tab and Caps, much like a normal keyboard. Very useful for applications such as Figure 6: QPython ConnectBot. Supports up to 30 languages. Separate num-pad.
Application information
Name: Hacker’s Keyboard Publisher: Klaus Weidner Rating: 4.6 out of 5 Recommended by 15,000 users on Google Plus.
TeamViewer
TeamViewer provides fast and easy remote access to Windows, Mac and Linux systems. Using this app you can control remote computers, as well as transfer files to and from them. It allows 64 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
QPython is a Python script engine that runs on Android devices. It lets you run Python scripts and projects on your Android phone. It has the Python interpreter, console, editor and the SL4A library for Android. It offers a development kit that lets you easily develop Python projects and scripts for Android devices.
Features
Can run Python applications including scripts and projects. Can execute Python files and code from QR Code. QEdit lets you create/edit Python scripts manually. Supports native UI programming, which can let you run and program games. Supports FTP server, which lets you easily transfer Python projects to the mobile from a PC.
Application information
Name: QPython Publisher: Pipal Mobile Lab Rating: 4.5 out of 5 Recommended by over 1000 users on Google Plus. References [1] http://www.appszoom.com/android_applications/tools/connectbotsshagent_bblpp.html [2] https://play.google.com/store/apps/details?id=com.overlook.android. fing&hl=en [3] https://pocketcloudsupport.wyse.com [4] https://www.androidtapp.com/andftp [5] https://www.pocket-lint.com [6] https://www.appbrain.com/app/hackers-keyboard [7] https://download.cnet.com [8] https://www.androidpit.com
By: Allamsetty Anup The author is a FOSS enthusiast and is also an active open source contributor to Mozilla. He blogs at https://anup07.wordpress.com. You can contact him at allamsetty.anup@gmail.com
Let's Try
Admin
gPXE: A Troubleshooting Note for Sysadmins
This article is primarily aimed at Linux sysadmins, as they often have to do mass installations over the network. VMware ESXi administrators who use gPXE to deploy ESXi over networks will also find the contents relevant.
P
reboot eXecution Environment (PXE) provides you the ability to boot computers using the network interface. gPXE is an open source PXE implementation and network boot loader. It replaces proprietary PXE ROMs and has many functionalities, such as retrieving data through protocols like HTTP, iSCSI, etc. Some of the latest operating systems and hypervisors like VMware ESXi 5.x need gPXE as a pre-requisite for deploying via the network. If you already have a legacy PXE implementation, you can migrate to gPXE by placing the gPXE executable on your TFTP server. The PXE-enabled machines download gPXE via TFTP and instantly become gPXE-enabled.
Getting all set to boot from gPXE
Setting up gPXE
There are a few workarounds to this problem, which are discussed below. Modifying the PXE-chainloadable gPXE image: This workaround is to recreate the gPXE image with a custom script, which is nothing but a sleep before the NIC queries for the DHCP IP again after the gPXE chain load. The detailed
Read the white paper posted in the Dell Tech Center to set up gPXE for network deployment of operating systems. Though it talks about setting up gPXE specifically for VMware ESXi 5, it is also useful for setting up the gPXE environment and thus meeting the pre-requisites for deploying various other operating systems over the network.
While booting servers to PXE and then gPXE, some NICs may fail with an error, as shown in Figure 1. You might wonder why you need to again request for a DHCP IP, since it has already got one at the beginning? The reason is that when the chain loaded gPXE starts up (the PXEenabled NICs download gPXE via TFTP), it issues a fresh DHCP request because it does not see the previous DHCP IP issued for the legacy PXE. The DHCP connection time-out is due to a timing issue with respect to the NIC firmware when the chain load of gPXE occurs.
Workarounds
www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 65
Admin
Let's Try
Figure 1: gPXE connection timed out failure
Figure 2: gPXE shell howto
steps are as below: a. Download the latest gPXE source (1.0.1) tar ball. b. Uncompress the source as shown below: ~# tar xvfz gpxe-1.0.1.tar.gz #Assuming gpxe1.0.1.tar.gz is the downloaded filename. ~# cd gpxe-1.0.1/
c. Change ‘#undef TIME_CMD' to ‘#define TIME_ CMD' in src/config/general.h d. Create a custom script (say sleep.gpxe) in the src directory with the following content: #!gpxe echo “Greetings... Running through the custom script...” sleep 10 # For some NICs, a sleep of 5 seconds may be good enough. We tested it on couple of Broadcom NICs which required a 10 sec. delay to get an IP echo “Fetching DHCP IP for the network adapter” ifopen net0 dhcp net0 autoboot
e. Recompile the source to create a custom gPXE image with the script included as follows: ~# make clean ~# make bin/undionly.kpxe EMBEDDED_ IMAGE=sleep.gpxe
Copy the undionly.kpxe created under bin to the TFTP server. Using the gPXE shell: This workaround is to pass the commands via the gPXE shell to fetch the DHCP IP and boot into the gPXE menu. Press CTRL-B when the screen prompts you right after the connection timeout. That brings
66 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
Figure 3: gPXE continues to boot with workaround
you the gPXE> shell shown in Figure 2. Using the gPXE shell prompt—the second option: This workaround is again based on the gPXE shell. If there is no menu.cfg created in your Web server, you may need to manually enter the OS details via the shell as shown below: gPXE>dhcp net0 gPXE>kernel -n mboot.c32 http://< WebserverIP >/ mboot.c32 gPXE>imgargs mboot.c32 -c http://< WebserverIP >/ boot.cfg gPXE>boot mboot.c32
Note that the above commands are specific to VMware ESXi 5.x. It may be slightly different for Linux.
Test your gPXE set-up
If you have chosen the first workaround, you may see the result shown in Figure 3. This article addresses the specific timeout issue that we encounter while using gPXE. This is useful for systems administrators who plan to deploy various operating systems over the network using gPXE/iPXE. By: Krishnaprasad K and Shivaprasad Katta The authors are software engineers at Dell Inc in Bengaluru.
How To
Admin
Set Up an Open Virtual Switch
Open Virtual Switch or Open vSwitch supports flows, VLANs, trunking and port aggregation just like other major league switches. Now, discover how to set up an Open vSwitch on an Ubuntu 12.04 system.
O
pen Virtual Switch (OVS) is an open source Layer 2 virtual switch, which offers many Layer 2 features and even supports some Layer 3 protocols. It is one of the key components behind many public and private cloud offerings. As with any switch, OVS also has two paths—a fast data path and a decision-making control path. Control path: This is in user space and creates a table with decisions. Data path: This is in the kernel space; packets flow through this path based on decisions made by the control path.
Working
Whenever a packet arrives, the data path checks for the existing flows, and if there are no matching flows, the packet will be sent to the user space controller along with a flow key to generate the flow. The flow key describes a packet in general terms.
Sample flow key
in_port(1), eth(src=e0:19:2f:10:0a:ba, dst=00:21:f3:f1:89:a1), eth_type(0x0800), ipv4(src=10.168.122.3 dst=10.168.122.4, proto=17, tos=0, frag=no), tcp(src=31639, dst=8080)
Now, based on the flow key, the controller will either neglect or generate a new flow to the kernel space. This flow will remain in the kernel space for the next 5 seconds, and if there is no matching flow within that time span, it will expire.
Figure description
As represented by the ------ line, the first packet will go through the controller and all subsequent packets will go through the data path. www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 67
Admin
How To bridge1 Data Path vif1.0
vif2.0
VM2
VM1
VM1
Controller
10.168.122.3
VM2
10.168.122.4
Hypervisor Figure 1: Packet flow
Features
Listed below are some of the features of OVS: QOS Port mirroring NIC bonding VLAN GRE support
Installing OVS
Figure 2: Block diagram ping 10.168.122.4 -c 10 --- 10.168.122.4 ping statistics --10 packets transmitted, 10 received, 0% packet loss, time 8998ms rtt min/avg/max/mdev = 0.140/0.243/0.615/0.130 ms
The corresponding data path flows are given below: ovs-dpctl dump-flows bridge1
To install on Ubuntu 12.04, give the following command: apt-get install openvswitch-switch
After installing OVS, check the kernel module by using the following command: lsmod|grep openvswitch
To view the version number, use the code below: ovs-vsctl -V ovs-vsctl (Open vSwitch) 1.4.0+build0 Compiled Feb 18 2013 13:13:22
in_port(2),eth(src=52:9a:13:f4:90:c8,dst=ae:0a:5e:8a:cc:2b) ,eth_type(0x0800),ipv4(src=10.168.122.4,dst=10.168.122.3,pr oto=1,tos=0,ttl=64,frag=no),icmp(type=0,code=0), packets:9, bytes:882, used:0.690s, actions:1 in_port(1),eth(src=ae:0a:5e:8a:cc:2b,dst=52:9a:13:f4:90:c8) ,eth_type(0x0800),ipv4(src=10.168.122.3,dst=10.168.122.4,pr oto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0), packets:9, bytes:882, used:0.690s, actions:2
The above result is almost self-explanatory, where in_port can be seen from: ovs-dpctl show
Create the first bridge with the following command: ovs-vsctl add-br bridge1
Add the virtual interface for virtual machines to the bridge: ovs-vsctl add-port bridge1 vif1.0 ovs-vsctl add-port bridge1 vif2.0
...where vif1.0 is the virtual interface of vm1 with IP 10.168.122.3, and vif2.0 is the virtual interface of vm2 with IP 10.168.122.4 You can check the connectivity as follows: 68 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
system@bridge1: lookups: hit:42 missed:26 lost:0 flows: 0 port 0: bridge1 (internal) port 1: vif1.0 port 2: vif2.0
Using VLAN for traffic isolation
Traffic between virtual machines can be isolated using VLAN. Openstack Neutron uses this feature of OVS to offer traffic isolation between different tenants by extending it over GRE tunnels.
How To
Admin
port 2: vif2.0 ovs-vsctl set port vif2.0 tag=2
This isolates vm2 traffic from other vms with a VLAN tag of 2.
A few known issues with Open Virtual Switch
OVS is engineered to offer many more features compared to native Linux bridges, but these come with a small performance penalty. Since for every new connection, OVS needs flow (which is handled by user space), this can result in heavy CPU utilisation during heavy network traffic. While the kernel waits for the flow from user space, there may be new connections with no existing flows, which will also be queued in user space. If the user space buffer is full, it will drop new packets. This can be seen by the following code:
…where, Hit refers to packets matched with existing kernel flows; Missed refers to there being no existing flows—so the packet is sent to user space for flow generation; Lost occurs when there is not enough of a free buffer in user space and, hence, the packet gets dropped. OVS 1.11 addresses this issue by introducing kernel wildcarding or mega flows. With this, only a single flow is required for multiple TCP/UDP ports and protocols, which is good enough to handle multiple connections, matching source and destination. Even though this minimises the context switch and improves performance, it doesn’t completely solve high CPU usage—to address this issue, OVS 2.0 comes with multithreaded user space and many other improvements. Acknowledgment
ovs-dpctl show
I would like to thank Rushikesh Jadhav for his help and appreciation.
system@bridge1: lookups: hit:207571933 missed:226782808 lost:26742 flows: 0 port 0: bridge1 (internal) port 1: vif1.0
The author works as an IaaS cloud administrator at the ESDS fully managed data center. He has more than three years of experience in open source virtualisation and Linux servers. His main areas of interest are server virtualisation, cloud security, server security, Linux, OpenStack and other open source technologies.
By: Ananthakrishnan V R
None
OSFY?
You can mail us at osfyedit@efyindia.com. You can send this form to ‘The Editor’, OSFY, D-87/1, Okhla Industrial Area, Phase-1, New Delhi-20. Phone No. 011-26810601/02/03, Fax: 011-26817563
www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 69
Admin Case Study
Dish TV Reaps Rewards with TechnoInfotech’s Open Source Solution India’s first direct to home (DTH) entertainment service provider, Dish TV, needed a scalable solution to keep pace with the colossal volume of its e-mails. The company took the open source route and went for bulk mailing services by TechnoInfotech to weed out its communication bottlenecks.
The open source team at Dish TV
D
ish TV, a division of Zee Network, has revolutionised and enhanced television viewing in the country. With an enviable number of subscribers, the DTH entertainment service provider has managed to lead the pack and keep its robust revenue stream growing. In the process, the company had to deal with a number of constraints that hampered smooth functioning. It was then that it sought refuge in open source and those early hurdles are now history.
Leveraging the magic of FOSS
In a short span of time, the IT team at Dish TV realised the need to handle its bulk mailing activities in order to streamline its business growth strategies. “It started in early 2000—as the number of subscribers rose, it got difficult to tackle the mailing activities associated with business promotion. It was then that 70 | April 2014 | OPEN SOURCE For You | www.LinuxForU.com
TechnoInfotech offered us an open source solution to help manage our business promotion mailing requirements, which involved handling 5-6 million mails per month. By creating a customised solution to suit our unique needs, we benefited in the long-term. Initially, we were thinking of a hosted solution. However, deploying this open source solution was a one-time cost and the overall management of the set-up is outsourced to the vendor. We have saved a lot considering the annual cost of a hosted solution. We are now able to use the system for additional load without any extra cost. Today, our requirements have scaled up to almost four times the initial volume. We are also using Kennel, an open source application used for SMS pushing and also used as an antispam gateway, from Barricade,” says Manprit Singh, DGM, IT Infrastructure, Dish TV.
Case Study Admin
“For any organisation to grow and succeed, it is very important to cut down on the initial investments. We were able to do that with the help of open source technology. Besides, the service offered by TechnoInfotech is robust, efficient and comes with a low-maintenance cost. In a nutshell, the open source product brought smiles to the faces of those on the IT team and inspired great confidence among all users.”
terms of the number of users, number of CPUs, etc, which is otherwise enforced by proprietary solutions. The overall hardware requirements also come down in Linux solutions, which helps save even on capital investments,” opines Singh. Currently, the company is using open source solutions only for Manprit Singh, DGM, its business promotion IT Infrastructure at Dish TV mailing activities but it is evaluating other areas in which it can deploy the right OSS tool.
The solution
Interactions with the community
So what were the tools that TechnoInfotech used to achieve the scalability to handle a mammoth and continuously growing volume of e-mails? “The system we have deployed is a customised implementation of PHPList integrated with a 20 SMTP server pool. The total physical servers used are two. For creating a pool of 20 servers, we have used KVM virtualisation. The set-up makes use a 20 MBPS Internet circuit from our common pool. Our bulk mailing services deliver the best from the high volume SMTP gateway to ensure faster email delivery. In the process, our solution makes email marketing simpler, more effective and hassle-free for organisations. It enables them to fulfil their communication needs and eventually give their businesses a boost,” says Sanjay Gurav, a director at TechnoInfotech. Manprit Singh adds, “For any organisation to grow and succeed, it is very important to cut down on the initial investments. We were able to do that with the help of open source technology. Besides, the service offered by TechnoInfotech is robust, efficient and comes with a lowmaintenance cost. In a nutshell, the open source product brought smiles to the faces of those on the IT team and inspired great confidence among all users.” And did Dish TV migrate from any other platform to open source? “No, we always considered open source, even before deploying any solution across our organisation,” shares Singh.
Why open source over proprietary solutions?
At a time when organisations were still wary of adopting open source, why did Dish TV choose to adopt the source model (over proprietary solutions)? “The overall cost benefit by deploying an open source system is much higher when compared to any proprietary solution. Scalability and stability of OSS is now proven in the industry, worldwide. Plus, we get the flexibility of fine tuning the system to meet our requirements. Open source systems do not limit you in
The community plays a key role in enhancing the benefits of FOSS at the user level. So does Dish TV interact with the open source community? “So far, we have not come across a situation in which we had to directly connect with community for support as we have a very close association with our vendor. Working with a solution provider like TechnoInfotech, which has a team that is completely focused on delivering true open source platforms with managed services, has given us the confidence to deploy OSS without using extensive in-house resources. However, we definitely look forward to connecting with the community to explore newer areas of deployment in the future,” explains Singh.
The road ahead
Looking ahead, Dish TV plans to identify the right open source solution that can pep up its business strategies. It is also looking forward to deploying an invoicing system with the current bulk mailing solution. Talking about how the organisation tackles the issue of support, Singh says that Dish TV has outsourced this to its vendor, TechnoInfotech. Singh has a piece of advice to those firms contemplating the deployment of open source software. “With open source software, organisations can benefit in the long term. It is the job of the IT team to look out for alternatives that can save the organisation time and money. Open source software gives you the right to choose a better alternative,” says Singh. The case study of Dish TV is a classic example of how open source is weaving its way into businesses across the nation. In the days to come, the resistance to open source software is sure to fade away.
By Priyanka Sarkar The author is a member of the editorial team. She loves to weave in and out the little nuances of life and scribble her thoughts and experiences in her personal blog.
www.LinuxForU.com | OPEN SOURCE For You | april 2014 | 71
Open Gurus
Let's Try
Have Fun with the Script Command The command line is one of the salient features of GNU Linux and UNIX. GNU/Linux provides many useful command line utilities and ‘script’ is one of them. It is available by default on most GNU/Linux distributions. So explore its possibilities and try out some script recipes that should be fun.
T
he ‘script’ command makes a typescript of everything printed on a terminal, including error messages, linefeeds and backspaces. Once it is started, it works in the background. As you continue to work normally, the ‘script’ session dumps everything from the terminal to the log file. It is useful when you want to show someone how to perform a particular task from the command line. Script stores typescript in plain text format. For certain interactive commands, for instance, vi/vim, it creates garbage characters in typescript. It works best with the commands that do not manipulate the screen. Upon start-up the script command forks off a new interactive shell—if the SHELL environment variable is set then that shell is used, otherwise the default shell is bash (for GNU/Linux). The script session ends when the forked-off shell exits (either by pressing Ctrl+D or typing the exit command).
Command line syntax
Shown below is the command line syntax for the script command. 72 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
script [-a] [-c command] [-e] [-f] [-q] [-t[=file]] [-V] [-h] [file]
To start a script interactive session, type the following: $ script [file]
The file name is optional. If the file name is provided, it stores all dialogues in the ‘file’; otherwise, dialogues are stored in the ‘typescript’ file. Let us look at how to use the command with the help of a simple example. $ script # Start script session. Script started, file is typescript # Welcome message. $ hostname minty $ uname Linux
Let's Try $ lsb_release -i Distributor ID: LinuxMint $ exit # End script session. exit Script done, file is typescript # Goodbye message.
Now, let us look at the contents of the ‘typescript’ file. $ cat typescript Script started on Monday 17 February 2014 09:51:34 PM IST $ hostname minty $ uname Linux $ lsb_release -i Distributor ID: LinuxMint $ exit exit Script done on Monday 17 February 2014 09:51:51 PM IST
Yes, indeed, it stores everything from the terminal.
Command line options
Script provides many command line options to control its default behaviour. Let us see how this is done, one by one, with examples. By default, the script command shows welcome and goodbye messages upon start-up and exit, respectively. We can suppress these messages by using the ‘-q’ or ‘—quiet’ option. $ script -q $ hostname minty $ uname Linux $ exit exit
# Observe there is no welcome message.
# Also no goodbye message.
We can order the script command to store terminal typescript into ‘file’ instead of the default ‘typescript’ file. But here’s a catch; what if ‘file’ already exists and has useful data. By default, script will overwrite ‘file's’ content. Naturally, we don't want this behaviour, so let’s override this default behaviour by using the ‘-a’ or ‘—append’ option. Instead of overwriting, the append option appends the output to the file and retains its prior contents. The example below explains how the append option works. Let’s suppose we have a file ‘imp.log’ with the following contents: $ cat imp.log This file contains very important data.
Open Gurus
Let us use the ‘imp.log’ file to store the terminal typescript with the append option. $ script -a imp.log Script started, file is imp.log $ hostname minty $ uname Linux $ exit exit Script done, file is imp.log
Now observe the contents of the ‘imp.log’ file. $ cat imp.log This file contains very important data. Script started on Monday 17 February 2014 10:39:58 PM IST $ hostname minty $ uname Linux $ exit exit Script done on Monday 17 February 2014 10:40:07 PM IST
Let’s congratulate ourselves! We didn't lose any important data. Instead of providing an interactive shell, we can instruct Script to execute commands. The ‘-c’ or ‘—command’ option will do this job. As we are not executing the commands interactively, the log file will contain only the output of the commands and not the commands themselves. The example below will give you a better idea about the ‘—command’ option: $ script -qc "hostname; uname" minty Linux
Let us look closely at the contents of the ‘typesript’ file. $ cat typescript # Observe that file contains output of the "hostname" and "uname" command respectively. Script started on Monday 17 February 2014 10:52:21 PM IST minty Linux
The script command ends its session by quitting the child shell gracefully. That is why it returns a zero exit code. We can use the ‘-e’ or ‘—return’ option to fetch the exit code of the child process. It is useful for error handling. The example below returns the correct exit code upon failure: www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 73
Open Gurus
Let's Try
$ script -q -e $ ls invalid_file # Provide non-existing file name. ls: cannot access invalid_file: No such file or directory $ exit exit $ echo $? # Check exit status. 2
exit
The ‘-t’ or ‘—timing’ option dumps timing data to the standard error stream. This timing data contains two spaceseparated fields. The first field indicates how much time has elapsed since the previous output, and the second field indicates how many characters were printed this time. Sounds confusing? For now, just remember that it stores some timing information. Later on, in the script recipes section we will look at how this information is useful to play back terminal sessions. When we invoke the script command with the‘-f’ or ‘— flush’ options, it flushes the output after each write operation. In the script recipes section, we will see how to leverage this behaviour to broadcast terminal sessions.
Recipe 2. Speed up the replay display: The‘scriptreply’ command provides the ‘-d’ or ‘—divisor’ option, which is used to speed up the replay display by the number of times specified.
Script recipes
We are now familiar with the script command and we have also looked at a few examples. Let us now discuss a few recipes related to this command. Recipe 1. Record and play back terminal sessions: We can record the order and timing of the command into a plain text file. Later on, we can revisit it by replaying it. Timing information ensures that the output happens at the same speed as it originally appeared when the script was recorded. Trust me, you will be amazed at what you see. To start the terminal recording, execute the following command: $ script -q -a output.log -t 2> timing.log # Redirect "stderr" to store timing data in file. $ hostname minty $ uname Linux $ lsb_release -i Distributor ID: LinuxMint $ exit
74 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
Now replay the recording by using the ‘scriptreplay’ command. Both the ‘—typescript’ and ‘—timing’ options are self-explanatory. $ scriptreplay --typescript output.log --timing timing.log
$ scriptreplay --typescript output.log --timing timing.log --divisor 4
The above command will speed up the replay display by four times. Recipe 3. Broadcast the terminal session using script and named pipes: We can achieve good tele-cooperation by taking the following simple steps. 1. Open two separate terminals (it would be better if you use terminals instead of tabs). 2. In the first terminal, create a named pipe and invoke the Script command with the ‘-f’ or ‘—flush’ options: $ mkfifo broadcast.fifo $ script -f broadcast.fifo
3. Switch to the second terminal and perform the ‘cat’ operation on the named pipe: $ cat broadcast.fifo
4. Switch back to the first terminal and type a few commands. You will observe that anything typed on the first terminal will be broadcast to the second terminal. To stop broadcasting, quit the script session. By Narendra Kangralkar The author is a FOSS enthusiast and loves exploring anything related to open source. He can be reached at narendrakangralkar@gmail.com.
Open Biz For U & Me
CIGNEX Datamatics’ Open Business Model is Designed to Succeed There is a school of thought that questions the sustainability of a successful open source business model. But FOSS has proved to be the cash-spewing machine for CIGNEX Datamatics, a global leader in open source enterprise solutions, as almost 100 per cent of its revenue comes from developing and supporting open source solutions in portals, content and Big Data analytics.
The open source team at CIGNEX Datamatics
T
he spirit of open source is indeed heady as hundreds of enterprises are not only expanding their businesses but also augmenting their massive revenue bases with the help of FOSS. Abiding by its punch line ‘Making Open Source Work’, CIGNEX Datamatics (a subsidiary of Datamatics Global Services Ltd) continues to be bullish about its business prospects in the open source domain. For the last few years, the company has been growing steadily at a compound annual growth rate (CAGR) of over 50 per cent due to the increasing adoption of open source solutions and services among enterprises.
Since its inception in 2000, the company has developed solutions for enterprises using industry-standard open source technology products. Being a systems integrator for leading open source products has helped the company to build the right solutions for its clients’ systems in order to enhance profitability. Based in Santa Clara, USA, CIGNEX Datamatics boasts of 22 offices in nine countries, including India, with Ahmedabad as its India headquarters. Munwar Shariff, co-founder and chief technology officer at CIGNEX Datamatics, helps us understand the company’s ‘open’ journey to success. Not many know that
www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 75
For U & Me
Open Biz
“Our motivation for taking up open source as a business model stems from the business reality that there are Munwar Shariff, co-founder and chief technology more than officer at CIGNEX Datamatics 200,000 open source software options for an organisation to choose from, but only the right partner can help it minimise the risk and reduce adoption time, while ensuring performance, scalability, high availability, quality and security; so that’s where we fit in.” he has co-authored five technical books—Plone Live, Implementing Alfresco, Alfresco 3 WCM, Alfresco 3 ECM and Alfresco 4 ECM Implementation. “With over 13 years of experience and 400+ open source solutions, we have gained a vast experience in enabling enterprise clients to address their technology challenges and business needs through our tailor-made open source solutions (OSS). Our solutions enable them to make smart architecture-related decisions through a feasibility study, accelerate time-to-market through proven open source based product frameworks; and enable coexistence with proprietary solutions by the integration of applications and more. We also reduce the enterprise’s risk in dealing with open source software through our open source adoption model (OSAM), best practices, project governance, and knowledge transfer,” explains Shariff.
The profitability mantra
It’s not often that companies figure out how to use open source to reinforce their businesses but CIGNEX Datamatics was quick to realise its potential. The benchmark for a successful open source enterprise solutions player lies in how efficiently it
76 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
is able to leverage its partnerships with leading open source technology platforms, believes Shariff. “We have forged strategic partnerships with commercial open source technology leaders for portals (Liferay Platinum partner), content management (Global Alfresco Platinum Partner), Big Data (MongoDB Advanced Partner, Cloudera Hadoop Partner) and e-commerce (Magento Silver Partner). In Liferay, we have implemented over 200 enterprise solutions across all verticals, are a certified Liferay training partner, authored seven books and contributed over 4000 posts in various blogs, forums, wikis, etc. Likewise, we have authored five books on Alfresco and delivered over 80 implementations across various industries, worldwide,” says Shariff.
The courage to go open
Unless you firmly believe in the potential of FOSS, you will think twice about adopting open source as a viable business model. So what motivated CIGNEX Datamatics to go open? “Demand for open source has gained considerable momentum among enterprises in recent years, not only due to its cost benefits but also the greater freedom of choice it offers, complete visibility into all aspects of an application, and consistent improvements in the user experience. Our motivation for taking up open source as a business model stems from the business reality that there are more than 200,000 open source software options for an organisation to choose from, but only the right partner can help it minimise the risk and reduce adoption time, while ensuring performance, scalability, high availability, quality and security; so that’s where we fit in,” says Shariff.
The business case for open source
The company’s clients include leading names among Fortune 500 enterprises as well as government agencies. So are most of CIGNEX Datamatics’ customers adopting open source solutions along with proprietary applications or are they replacing them completely? And how does it work—does CIGNEX approach a firm and convince it to try open source solutions or is it the other way round? “It’s really a mixed bag. We have adequate cases where we really had to evangelise the benefits of open source solutions. But many times, clients were already aware of its benefits and approached us directly as we have a sizeable number of implementations and reference case studies in developing customised solutions using Liferay, Alfresco, Drupal, Magento, and more. In most cases, we see a co-existence between proprietary solutions and our open source solutions because of the immense interoperability between the two,” explains Shariff.
Open Biz For U & Me “As an organisation, we are highly sensitive to the needs of the open source community and go out of our way to give back to it. For instance, CIGNEX Datamatics has been actively contributing to the Liferay community with over 4000 posts in various forums, blogs and wikis, and members of our team have been invited to numerous Liferay events as keynote speakers.” According to Shariff, the company’s robust partnerships with leading open source technology platforms play a key role in bringing new business. The company has documented cases where CIOs approached it after consulting analyst reports such as ‘Gartner Magic Quadrant for Horizontal Portals, 2013’, in which Liferay is rated as a ‘Leader’; or ‘Forrester Wave for Enterprise Content Management, 2013’, in which Alfresco is reported as a ‘strong performer’. “We are able to get repeat business from our clients as our solutions and services overcome specific business challenges. For example, CIGNEX Datamatics helped a leading Mexicobased hotel group, Groupo Posadas, achieve its business and technology goals with an innovative, integrated hospitality portal solution (Liferay + Alfresco) reducing the TCO by 40 per cent. In another key example, we developed a Big Data solution to improve productivity for a leading European manufacturing company by enabling a 10 times better search performance, at a cost that was 20 times lower compared to proprietary solutions.” The company had helped a mobile carrier to manage the life cycle of serving videos on mobile devices at a rapid speed (5 million/hour) with huge data volumes. This was not possible earlier due to high costs and low scalability. Now it is possible with big data
Community involvement
Shariff firmly believes that any business built around the open source framework has to eventually fall back on the global open source community for support. “As an organisation, we are highly sensitive to the needs of the open source community and go out of our way to give back to it. For instance, CIGNEX Datamatics has been actively contributing to the Liferay community with
over 4000 posts in various forums, blogs and wikis, and members of our team have been invited to numerous Liferay events as keynote speakers. Like I mentioned earlier, our team members have authored seven books on Liferay expertise, and regularly conduct training sessions and workshops in various countries, including India, as we are a certified training partner for Liferay. We have been awarded the ‘Liferay Community Excellence Award’ in 2011, 2012 and 2013 as a result of our contribution to the Liferay community,” says Shariff. The company has also developed frameworks such as the Open Contract Manager—a contract lifecycle management system that is available for free download.
The vision
The company’s immediate plan is to maximise its market presence in the portals and Big Data solutions business. “We want to continue with our innovation through new solutions built on open source frameworks, including mobile portals built on Liferay, RAPIDO (a content management publishing framework), Open Contract Manager, a mobile media site using Drupal and MongoDB, etc. Our vision is to be amongst the largest open source companies and to become a US$ 100 million company by 2015, with the stated aim to improve enterprise productivity through the adoption of open source solutions,” quips Shariff. According to Shariff, open source solutions have come of age in the enterprise space and have been experiencing robust growth in the past few years. Gartner predicts that by 2016, almost 99 per cent of the Global 2000 firms will be using some form of open source software. And what is Shariff’s advice to nascent entrepreneurs who are hesitant to adopt the open source business model? “We advise budding entrepreneurs to believe in the open source movement, as this is the only future worth talking about. CIGNEX Datamatics embodies this hallowed principle not only in our corporate vision, ‘Making Open Source Work’ for enterprises but also, intrinsically, within our own organisation. A lot of our internal applications such as the Intranet, Extranet, document repositories, helpdesk ticketing generation for admin, HR, IT and support teams are based on open source,” says Shariff, as he signs off. CIGNEX Datamatics intends to stay at the top by widening its customer base and selling more open source solutions. So will other companies follow suit?
By Priyanka Sarkar The author is a member of the editorial team. She loves to weave in and out the little nuances of life and scribble her thoughts and experiences in her personal blog.
www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 77
For U & Me
Insight
What Does Open Source Offer the Differently Abled? There is no reason why the differently abled cannot use computers as well as others. Free and open source accessibility tools are the means by which the physically and otherwise challenged can enjoy a complete, wholesome and enriching IT experience. This article looks at a few of these tools.
L
ife has become so much simpler thanks to information technology. But are the day-to-day activities that you carry out in cyberspace, like checking your mail, surfing the Web, making an online payment, etc, accessible to every single human being on earth, including persons with disabilities (PWD) and the elderly? Surely they have some special requirements. Let’s look at the various free and open source tools that will make access to computers for people with special needs smoother and act as an eye-opener to the concept of accessible computing. Developers can make an impact on the lives of people with special needs by their open source contributions. Persons with disabilities (PWD) are the largest invisible minority of the world. According to United Nations statistics,
78 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
15 per cent of the world population (1 billion) is disabled. With the rapid improvements in medicine, the average life span is constantly increasing. The United Nations has declared that in countries where the average life span is more than 70, the elderly spend, on an average, eight years with some sort of disability. These statistics reveal the necessity of making cyberspace accessibility mandatory. IT can bring great benefits into the lives of this group. ‘Break barriers, open doors: For an inclusive society and development for all’ was the theme at the United Nations during International Day for persons with disabilities, 2013. Breaking barriers and opening doors is equally important in cyberspace—as much as in the physical world. While some proprietary accessibility software tools for people with special needs do exist, they are expensive. So
Insight For U & Me Accessibility Requirements
Visually Challenged
Auditory Challenged
Cognitive Challenged
Emacspeak
Mobility Challenged
Text to Speech
Speech toText
Specialized Fonts
Eye Ball Tracking
Audible Alerts
Visual Alerts
Reminding Tools
Specialized Virtual Keyboards
Magnifiers
Captions for Videos
ORCA
NVDA
WebAnywhere
Screen Readers
TalkBack
Figure 2: Screen readers Tactile Interfaces
Figure 1: Accessibility requirements
the adaptability and affordability of Free and Open Source Software (FOSS) can make a life-changing impact on people with special needs.
Accessibility requirements
Disabilities can be classified as visual, auditory, etc. The accessibility tools for each type of disability are of a specialised type. The specific requirements for each type of disability are illustrated in Figure 1. A complete list of all the available accessibility tools is beyond the scope of this article. Hence the tools mentioned in this article are representative in nature, for each category, and the list is by no means exhaustive. The tools have been chosen based on my own personal experiences and discussions with users with special needs.
For the visually challenged
In the case of visual impairments, text-to-speech conversion tools play a major role. As the visually challenged cannot view the contents on the screen either partially or completely, they require tools to convert text into speech. Audible alerts are audio indications for some of the actions either performed by the system or the user, like connecting to a network, receiving a mail, etc. Most current operating systems include audible alert features, which are located in Accessibility options.
Screen readers
Screen readers are tools that present an audio version of the screen’s contents to the visually challenged. Here is a list of free and open source screen readers (not in any specific order): NVDA stands for Non Visual Desktop Access. This free and open source screen reader is becoming very popular in the visually challenged community. Configuring this screen reader is not difficult. The
recent version of NVDA 2013.3 can be downloaded from http://www.nvaccess.org/download/. NVDA has the power to support Braille displays as well. Another major feature of NVDA is the ability to run it from USB drives, which gives it portability. One of its limitations is that it only supports Windows. Being a FOSS tool, if you wish to contribute to NVDA by enhancing its functionalities or translating it to another language, visit http://community.nvda-project.org/. ORCA: In the Linux environment, one of the most widely used screen readers is ORCA. If you are using Linux distributions like Ubuntu or Fedora, you need not install ORCA as it comes as a part of GNOME 2.16, or later versions. In case you are on an older version or distribution that doesn’t have ORCA by default, it can be downloaded from https://wiki.gnome.org/Projects/Orca/ DownloadInstall. The speech synthesiser behind ORCA is eSpeak. Constant efforts are being made to enhance eSpeak to produce a more human voice rather than the metallic sounding robotic voice. ORCA provides support for Braille through BrlTTY and liblouis. Emacspeak: The screen readers simply read the text that appears on the screen. Emacspeak raises the bar one level higher by making an attempt to provide sensible eyes-free access. The brain behind the development of Emacspeak is T V Raman, who himself has been visually challenged since childhood. He is presently leading the accessibility development for Google Chrome and Android. Emacspeak doesn’t simply read content but provides it in a more meaningful manner. With the growing number of features available on Web pages, Emacspeak is a powerful tool for the visually challenged to harness the full power of the Internet. Emacspeak can be downloaded from http://emacspeak.sourceforge.net/. WebAnyWhere: The screen readers listed above need some sort of installation. If you want a screen reader that doesn’t require any installation at all, then WebAnyWhere would be the right choice. It can be activated by simply surfing to http://webanywhere.
www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 79
For U & Me
Insight Virtual Magnifying Glass MagMe
ORCA
Screen Magnifiers Figure 4: Screenshot of the OSFY’s website www.opensourceforu.com with the open dyslexic Chrome extension enabled Figure 3: Screen magnifiers
cs.washington.edu/wa.php. As soon as this Web page gets rendered, your screen reader is ready. You can type any URL and start accessing it in an audio format. WebAnyWhere has been developed by the WebInSight group of the University of Washington. The other accessibility projects by the same group can be viewed at http://webinsight.cs.washington.edu/projects/. TalkBack: As the use of smartphones increases tremendously, the need for screen readers for them is inevitable. TalkBack is Android’s accessibility software for the visually challenged. It becomes active when the user turns on Accessibility. In versions 3.2 and earlier, to turn it on, go to Settings and click on accessibility. Then select check box, and click on TalkBack Check box. In versions 4.1 and later, enable the TalkBack switch.
Screen magnifiers
In the case of low-vision users and the elderly, who can’t see the text or images of a smaller size, screen magnifiers can help them carry out their tasks in a smoother and more efficient manner. ORCA: In the case of the Linux environment, ORCA performs screen magnification in addition to screenreading. Virtual Magnifying Glass: This is a cross-platform, free and open source magnifier. Virtual Magnifying Glass is an efficient magnifying tool. It can be downloaded from http://magnifier.sourceforge.net/. It supports multiple monitors. MagMe: The screen magnifier that can run from a USB drive is MagMe. It is free and open source and targeted for the Windows OS. MagMe is developed by the Computer Aid Adaptive Software 4BVI Project and is designed to work in parallel with NVDA. It can be downloaded from http://sourceforge.net/projects/magme/. In addition to these screen readers and screen magnifiers, there is an array of hardware support like Braille displays, etc, for the visually challenged. 80 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
For the hearing impaired
The accessibility features required for those with hearing problems are completely different from the requirements of the visually challenged. The former need tools like speech-to-text converters, sub-titles for audio clips and other visual alerts. To convert speech into text, there are various speech recognition engines. One such powerful engine is CMU Sphinx, developed by Carnegie Mellon University. The features included in this tool kit are speech-to-text, audio transcriptions etc. CMU Sphinx can be downloaded from http://sourceforge.net/projects/cmusphinx/. An assistive tool that would be very useful for auditory challenged people is Hangout Captions. Those with hearing difficulties can use this tool to convert speech into text in real time during Google Hangout sessions. For further information on this tool, visit https://hangout-captions.appspot.com/. There are various specialised gadgets for auditory challenged people. Interested users can go to http://www. deafgadgets.com/ to keep themselves updated with recent happenings in this domain.
For the cognitively challenged
There are some specific efforts to make computers accessible to people with cognitive challenges. Let us focus on an important and widely prevalent challenge— dyslexia. Wikipedia defines dyslexia or the developmental learning disorder as difficulty with learning to read fluently and with accurate comprehension despite normal intelligence. Dyslexic people would find it difficult to read the text appearing on the screen. There are specialised fonts that make reading simpler for them. One such open source effort is at http://opendyslexic.org/ which provides a free and open source typeface. By simply installing the font or browser extension, you would get this feature in your system. If you are already using Linux distros like Fedora, Arch Linux, etc, this package is available in their default software repositories. A screenshot of the Open Source For You home page
Insight For U & Me is shown in Figure 4 with the open dyslexic Chrome extension enabled. It can be observed that the characters have a stronger base, which makes reading easier for users with dyslexia.
For the mobility challenged
For people who have difficulty handling the keyboard and mouse, there are some specialised tools. Users who cannot handle the mouse can control their mouse pointer by head movements, which are captured via the Web camera. Enable Viacam is an open source, free software that doesn’t need any additional hardware. Enable Viacam can be downloaded from http://eviacam.sourceforge.net/index.php. There are versions available for Windows and Linux distributions. For people with severe motor disabilities, there is an extension called Hawking Toolbar, which is named after the famous physically challenged scientist, Stephen Hawking. The Hawking Toolbar enables those with severe motor disabilities to access the Internet. The extension presents the links in the Web page to users in a sequential manner, and users can choose their special devices. An extensive list of open source accessibility tools can be found at: http://www.oatsoft.org/Software/listing/Repository
Web Content Accessibility Guidelines (WCAG 2.0)
sonargnulinux.com/?page_id=47. It can be installed on either 32-bit or 64-bit machines. Accessible computing has, in fact, really come a long way. There is still scope for a lot more to be done. Tools specific to our country require a big push in terms of regional language requirements, etc. Open source developers can play a great role in making an impact in the day-to-day life of people with special needs. Imagine the satisfaction a developer gets in providing a real-life solution to the needy. References [1] http://www.un.org/disabilities/default.asp?id=1607 [2] http://sonargnulinux.com/ [3] http://www.oatsoft.org/Software/listing/Repository [4] http://www.w3.org/TR/WCAG20/
By: Dr K S Kuppusamy The author, himself mobility challenged and moving on a wheel chair, is an assistant professor of Computer Science at the School of Engineering and Technology, Pondicherry Central University. With 10+ years of experience in academia and industry, his research interests include Web information retrieval, mobile computing and accessible computing. Winner of the ‘Best Teacher Award’ in 2010, 2011 and 2013, he can be reached at kskuppu@gmail.com.
Though the assistive tools render the contents in an accessible format, the basic content itself should be in a particular standard for enhanced accessibility. The World Wide Web Consortium (W3C) has recommended a standard for Web developers and designers so that their content can be accessible to everyone. The most recent standard is WCAG 2.0-http://www.w3.org/TR/WCAG20/. A website can adhere to the rules of WCAG 2.0 at different levels. Based on these levels, ratings like A, AA, etc, are ascribed to the site. In India, the Ministry of Social Justice and Empowerment, Department of Disability Affairs, gives the ‘Best Accessible Website’ award to websites adhering to WCAG 2.0 rules.
Sonar: An accessible OS
To make the computer completely accessible, the role of the OS is critical. There is a special Linux distribution focused largely on accessibility called Sonar. Sonar Linux is targeted at disabled users and provides important accessibility tools under one roof. Sonar Linux is developed by Jonathan Nadeau, who is himself visually challenged. The major features of Sonar include the following: It includes a screen magnifier and screen reader (ORCA by default). For those whose motor skills are impaired, it provides a special keyboard for easier access. For dyslexic people, it has a special font that makes the reading of text simpler. Sonar Linux 13.10 can be downloaded from http:// www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 81
For U & Me
Career
Will a Career in Mobile Game Development be a Good Option? The mobile gaming industry in India seems poised to grow at an unprecedented pace this year. Will this prove to be a huge job market for those who are interested in games development?
T
he expanding smartphone user base in India has fuelled the growth of the mobile games as well as applications markets—both of which are expected to be major revenue generators in the days to come. According to various studies, the number of smartphone users in India is expected to grow to 67 million this year and 382 million by 2016. In the process, the mobile gaming market will touch Rs 27 billion by 2016. So this is probably the best time to get into the games development groove and let the geek in you out of the closet. Let’s find out if a career in this arena can fetch rich dividends.
Mobile versus PC/console games development
According to a survey conducted by the Game Developers Conference held in San Francisco this year, smartphones and tablets are what most developers are working on, with 55 per cent of respondents currently creating games for these platforms. So the next logical question would be-what differentiates mobile games development from the traditional PC or console games development? Rohit Bhosle, who works as a games programmer at the Walt Disney Company has quite a few games to his credit. “It is a cyclic phase. Initially, it was difficult to make games 82 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
for the PC, as the hardware was very limited. Now, that is not the case for PCs but for mobile gaming, developers are again constrained by huge limitations in hardware. Though, eventually, even that will change,” he says. Swagata Acharrya, who works as an Android developer at Simpragma, a company that develops mobile and tablet solutions for its clients, feels one of the main differences will be the form factor and the limitations that the mobile hardware imposes. “For instance, I cannot have a game that takes up too much of memory, because at the end of the day, my device’s memory is limited. Also, the app has to take into consideration the times when the user is doing something else. What I mean is, we should not do something in the background that takes up a lot of resources. Mobile games also have to factor in fat fingers. Not all screens are the same, not all fingers are of equal thickness, nor do all devices have the same memory. It is even more complicated working with Android, as there are literally unlimited form factors. So the mobile UI has to be optimised for mobile use. The UX can be a luxury in PC or console games, but for mobiles, it is an absolute must. Building a game is one thing, while building games for mobiles obviously comes with certain restrictions,” explains Swagata.
Career For U & Me The Indian market scenario
The Indian mobile games market is growing consistently and the demand for mobile games developers increased by at least 20 per cent last year, believes Najeem Illyas, senior technology architect at a reputed MNC. “So far, what I have observed is that the smartphone industry is booming and, hence, the demand for Android games has increased a lot compared to the Java games of the previous era. Android and iOS got operating system upgrades, which in turn improved the performance of games. Companies like Samsung, HTC, LG, etc, have upgraded their mobile hardware to improve the battery’s performance and the processing speed. Due to all of this, the demand for game development has increased dramatically,” quips Illyas. The Indian market is a bit tricky. Any mobile game that needs to be paid for will face resistance in the Indian market. “If you look at the numbers, the market is huge. The smartphone tech-savvy people (or the younger generation) spend a lot of time with their devices. One thing that I have seen is that there is a certain group that keeps exploring games. They download, play for some time, and if they like it, they use it regularly; else, it is uninstalled immediately. There is one more group that constitutes the majority, which downloads and plays a game, and if they do not like it, they do not open it again. The app remains on their devices till they need to make space to accommodate something else,” says Swagata.
Monetisation–a critical issue
There are some industry experts who feel the mobile gaming industry is at a very nascent stage in India. Pradeep I S N, who set up the production and research division of the CGManifest Group, feels that in India, people are more interested in free games than in purchasing games via the mobile. “Monetisation is a critical issue for any game entering the Indian market. With free games, we can’t go beyond a limit in the market. If we consider the existing opportunities for mobile games developers in India, the majority of them are not into creative product development. Many local and global companies appoint people in India for portability tasks, pixel art-based tasks and a few other bulk jobs but there is very little hiring of developers for core games development. The logic part of most of the games is developed abroad, sent to India for certain post-development, release phase work before the actual release,” says Pradeep.
Why HTML5 skills are in demand
HTML5 is the buzzword when it comes to mobile games development. Most skilled developers are unprepared to adjust to the limited games development opportunities in India, so they are now looking to build their own
identities/brands and monetise their games on their own. Since HTML5 provides developers the facility to host and market their games without depending on any particular platform-based app store, people are now slowly turning towards this platform due to its enormous power and the features it supports for Web-based games. “Also, the smart-gadget revolution has led to customers adopting browser-based games on a large scale now a days; so developers are looking for an alternative solution and HTML5 is perfect for such games. First of all, it is open source and gives a lot of freedom to developers to convert their ideas into virtual-reality at a cheaper or at no cost. The second reason is that the size of the development team required for games created for small gadgets is much smaller. Also, the cost of development is much lower than what it is for console-based games. The support of technologies like SVG and WebGL for HTML5 also plays a key role in developing innovative and powerful games for the Web and mobile,” explains Pradeep. Industry pundits definitely expect a bright future for HTML5 in India due to the immense developer resources available in the country.
The other skill sets
According to Rohit Bhosle, a mobile games developer should have the three Ps while developing games—passion, patience and perseverance. “If you have these three Ps, you can probably succeed in this domain. Moreover, you need to explore a lot of games if you wish to develop a high-end game. Games development offers those looking for employment many roles, like the core programmer - the core around which the game comes into existence; and the designer - the one who visualises how the game unfolds from start to finish, and how it feels. The other roles are in management. The producer ensures things are done according to fixed milestones and that inter-dependency needs are always addressed. Another role is that of a product manager who looks after the economic aspects, the overall experience, takes business decisions, oversees marketing, etc. The core development team can make the game, but a management team is required for timely deliveries and to ensure the game gets better exposure,” he says. Swagata feels that the developers should know enough about the game engines available to build upon so that they do not waste time reinventing the wheel. “For example, while doing something that involves physics, I would look for a good physics library that has some APIs, which I can directly use. If I went about writing my own physics library, it can be fun, but the game development process would take that much longer, with someone else probably implementing my idea much faster. So keeping an eye on the trends in games development is another required skill,” shares Swagata. www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 83
For U & Me
Career
Android versus iOS
Is Android a better platform to develop games on or is iOS more lucrative? Industry leaders feel that Android and iOS offer different benefits. Android is an open source platform and has an excellent API available for app development. iOS also has similar features. “Both mobile OS providers are maintaining marketplaces where people can easily add their apps and market them to millions of end users. Both providers have brought out excellent IDEs for app development. When it comes to user experience, iOS is rated a bit higher than Android. In the mobile domain, Android is more popular than iOS, but in the tablet industry, iOS is the dominant player,” shares Illyas. Pradeep feels that at the end of the day, both are similar. Because today’s developer community is looking for multiplatform development instead of developing a game entirely on a single framework. “Such games are called hybrid games. This hybrid model of games development uses HTML5 technology to the maximum level, and there are options to make use of the native frameworks to convert such games to any kind of platform instantly, via some process. In fact, of late, nearly 80 per cent of the developers are now getting converted, or rather, companies are shifting major manpower into HTML5-based technologies from native platforms. Though the Android and iOS platforms play a significant role in the market, HTML5 can fulfill many requirements. The native frameworks can take care of post-development work after the key logic is developed using HTML5. So this is the time for developing hybrid environments, not only for games, but even for mobile apps or the Web. Companies like TCS have already started implementing such methodologies,” says Pradeep.
‘Small is big’ in games development
Is there room for solo developers and small teams to make great games? “If the game has the ingredients to attract users, there is definitely a possibility. For a corporation, getting users is easier because it can spend a lot on promoting its games, by giving freebies, etc, whereas an indie developer cannot afford that. So in most of the cases, indie games result in few downloads when compared to games made by corporate houses. So there is always a possibility that individuals or small teams can create great games. Whether people get to know about them, or whether they can persuade people to install and play the game is a different story,” opines Swagata. Indian developers should have a long-term vision and the patience to design, develop and then market an idea rather than just try to work on outsourced projects from clients/companies. “We have great, proactive programming strength in India, better than anywhere else in the world. People should combine entertainment industry skills and programming skills to develop revolutionary and 84 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
Things to be kept in mind while developing a mobile game 1. Not all devices are the same. Think about device compatibility. Don’t do something overwhelmingly stupid that forces the user to uninstall your masterpiece. 2. Resources are very important. Do not drain the resources of the device on which the user has allowed your game to reside. You do that once, and there is no way you can get your game installed on the same device again. 3. The game should not prevent users from doing their routine work. For example, when the user is in between a level, and wants to make a call, that should be possible—without the call getting cut or the player having to go back to start the game from the base level. If that happens a couple of times, the game will get uninstalled. 4. There are millions of apps and a lot of other games, so do your best to get your user’s attention at the first shot. 5. Think about your user base and design the game accordingly. For instance, if it is a game for nursery school kids, the visuals have to suit them. Similarly, the theme has to be different for teens, adults, office goers, etc. 6. Don’t irritate users. Pop-ups every minute or so to ask for feedback, asking users to buy something, asking them to share, etc, will turn off users. The best thing is to think of yourself playing the game developed by some other person. What would you not like? There is a strong possibility that your users too will not like the same thing. 7. A challenge is very important. A game developer has to consider this factor. A game with an adequate level of challenge that allows friends to compete with each other can become a hit.
fresh games. Investments and forecasts should be based on ground-level realities, and not just on the company’s turnover or on market-based analysis. There needs to be support for developing such great games in terms of a creative environment, sustainable business strategies with low/medium costs of production using HTML5 kind of technologies and strong marketing skills. Of course, government support for the industry would be great, if possible. Even without all these, a powerful game can be developed by Indian programmers but a lot of self-discipline, financial freedom, a great amount of market analysis and experience are needed,” says Pradeep. According to Pradeep, any kind of failure could land the developer in trouble, preventing one from concentrating on any level of creative development. So, entrepreneurs should study the ground realities well before taking any adventurous steps in games development on their own; but if the proper precautions are taken—yes, great games can be developed by solo developers from India. Even small and brain-teasing games are widely
Career For U & Me accepted in the mobile games industry, so individual developers or small groups have a huge space in this industry. The logic behind the game and the way it is presented are the major criteria for acceptance by the user community, feels Illyas. “The huge action games are made by big teams. Learning mobile games technology will be an added advantage to the candidates seeking jobs in the mobile games industry. Companies are always looking for new and challenging apps, so the job opportunities are very good and talented developers can contribute individually,” shares Illyas.
Market your game to succeed
At a time when there are innumerable companies that are publishing games, what gives one that extra edge over others? Industry leaders believe good marketing is very helpful. “Rather, I will go on to say that in the current scenario, marketing is a must, but it’s not important whether the budget is small or big. What is required is smart marketing and smart promotion, as most games nowadays are digital; so by using
the Internet and social media as platforms for marketing, one can get good end results,” says Rohit. Marketing has a very vital role to play. There are so many apps in an app store that people will generally not bother about any till they get to know that it is great, feels Illyas. “Getting the initial number of users and satisfying them again and again, so that they share their experience with their friends, is very vital. There has to be a plan (and budget) set aside for aggressive marketing. After all, we need people to know about the app, and to do that, we need to let them know that the app exists. And for that, marketing is the most appropriate way,” says Illyas. So are you ‘game’ to make your mark in the mobile games development segment?
By Priyanka Sarkar The author is a member of the editorial team. She loves to weave in and out the little nuances of life and scribble her thoughts and experiences in her personal blog.
THE COMPLETE MAGAZINE ON OPEN SOURCE
www.electronicsforu.com
www.eb.efyindia.com
www.linuxforu.com
www.ffymag.com
www.efyindia.com
www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 85
For U & Me
Let’s Try
Exploring Polynomial Manipulations in Maxima Maxima is a computer algebra system based on Macsyma and written in Lisp. This 16th article in the series, ‘A Mathematical Journey Through Open Source’, demonstrates polynomial manipulations using Maxima.
P
olynomials have fascinated mathematicians for ages because of the wide variety of their applications, ranging from basic algebra and puzzles to the various sciences. We are going to look at some of the polynomial manipulation functions provided by Maxima, and use some of them for a couple of real world applications.
Fundamental polynomial operations
Let’s start with a demonstration of the fundamental polynomial operations, like addition, subtraction, multiplication and division. In all these, whenever needed, 86 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
we’ll use expand() to expand the polynomials, and string() to display the polynomials in a flattened notation. $ maxima -q (%i1) p1: x^2 - y^2 + y$ (%i2) p2: -x^2 - y^2 + x$ (%i3) p3: (x + y)^2$ (%i4) string(p1 + p2); (%o4) (%i5) string(p1 + p2 + p3);
-2*y^2+y+x
Let’s Try For U & Me (%o5)
(y+x)^2-2*y^2+y+x
(%i6) string(expand(p1 + p2 + p3)); (%o6)
-y^2+2*x*y+y+x^2+x
(%i7) string(expand(p3 - p1)); (%o7)
2*y^2+2*x*y-y
Polynomial fractions
Calculating the greatest common divisor (GCD) is one of the very useful operations to simplify the fractions of polynomials. Other common requirements are extracting the numerator, the denominator, and the highest power. Here is the function demonstrating all of these:
(%i8) string(expand(p1 * p2)); (%o8)
y^4-y^3-x*y^2-x^2*y+x*y-x^4+x^3
(%o9)
$ maxima -q (%i1) gcd(x^3 + 3*x^2 + 3*x + 1, x^2 + 3*x + 2);
(%i9) string(p1 / p2); (-y^2+y+x^2)/(-y^2-x^2+x)
(%o10)
(%o1)
x + 1
(%i2) string(ezgcd(x^3 + 3*x^2 + 3*x + 1, x^2 + 3*x + 2));
(%i10) string(divide(p1, p2)); [1,y+2*x^2-x]
(%o2)
[x+1,x^2+2*x+1,x+2]
(%i11) string(divide(x^2 - y^2, x + y));
(%i3) string(denom((x + 1)^-3 * (1 - x)^2));
(%o11)
(%o3)
[x-y,0]
(x+1)^3
(%i4) string(num((x + 1)^-3 * (1 - x)^2));
(%i12) quit();
(%o4)
(1-x)^2
Note that the / operator just places the polynomials as fractions, rather then dividing them. The function divide() actually divides the first polynomial by the second one, yielding a list with the quotient and the remainder of the division. If the division needs to be in relation to a particular variable, that can be passed as the third argument to divide. Check out the variation below, to understand what this means:
(%i5) hipow(expand((x + 1)^3 + (1 - x)^3), x);
$ maxima -q
$ maxima -q
(%o5)
2
(%i6) quit();
Note that the ezgcd() function lists out the remainder polynomials, along with the GCD. Polynomial fractions can be differentiated using the powerful ratdiff():
(%i1) string(divide(x^2 - y^2 + y, x + y, x));
(%i1) string(ratdiff((x + 1)^-1 * (1 - x)^2, x));
(%o1)
(%o1)
[x-y,y]
(x^2+2*x-3)/(x^2+2*x+1)
(%i2) string(divide(x^2 - y^2 + y, x + y, y));
(%i2) string(ratdiff(1 / (x + 1), x));
(%o2)
(%o2)
[-y+x+1,-x]
(%i3) quit();
-1/(x^2+2*x+1)
(%i3) string(ratdiff((x^2 - 1) / (x + 1), x));
Coefficients of a polynomial
(%o3)
1
(%i4) quit();
Extracting the coefficients of a polynomial is another basic and common requirement for polynomial manipulations. Maxima provides two slightly different mechanisms. The first one just finds the coefficient of a given variable or its power, using coeff(). The second one segregates a polynomial into the coefficient of a given variable or its power, and the remaining terms, using bothcoef().
And ratsubst() is a powerful expression substitution function, with intelligence. It can dig into the expression to simplify complicated expressions, including trigonometric ones. Check out the %i5, for one of its powerful applications. ratsubst(<new>, <old>, <expr>) replaces the <old> expression by the <new> expression in the complete expression <expr>:
$ maxima -q
$ maxima -q
(%i1) string(bothcoef(expand(x^2 - y^2 + (x + y)^2), x^2));
(%i1) string(ratsubst(u, x^2, x^3 + 3*x^2 + 3*x + 1));
(%o1)
(%o1)
2,2*x*y]
(u+3)*x+3*u+1
(%i2) string(bothcoef(expand(x^2 - y^2 + (x + y)^2), x));
(%i2) string(ratsubst(u, x^2, (x+1)^3));
(%o2)
(%o2)
[2*y,2*x^2]
(u+3)*x+3*u+1
(%i3) string(bothcoef(expand(x^2 - y^2 + (x + y)^2), y^2));
(%i3) string(ratsubst(u, x^2, (x+1)^4));
(%o3)
(%o3)
[0,2*x*y+2*x^2]
(4*u+4)*x+u^2+6*u+1
(%i4) string(bothcoef(expand(x^2 - y^2 + (x + y)^2), y));
(%i4) string(ratsubst(u, x - 1, x^4 - 2*x^2 + 1));
(%o4)
(%o4)
[2*x,2*x^2]
u^4+4*u^3+4*u^2
(%i5) string(coeff(expand((x + 2 * y)^50), x^20));
(%i5) string(ratsubst(sin(x)^2, 1 - cos(x)^2, cos(x)^4 - 2*cos(x)^2
(%o5)
+ 1));
50604606318512743383040*y^30
(%i6) string(coeff(expand((a + b + c + d)^4), a^3));
(%o5)
(%o6)
(%i5) quit();
(%i7) quit();
4*d+4*c+4*b
-
sin(x)^4
Continued on page no 89...
www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 87
For U & Me
Open Strategy
Nokia’s Android Strategy is to go Google-less Finally, Nokia has got on to the Android bandwagon. The Finnish handset maker has launched not one, but three Android smartphones. Interestingly, this move from the company is supposed to benefit Microsoft more than Android. Prasid Banerjee from Open Source For You spoke to Pranav Shroff, product marketing manager, Nokia, about the firm’s Android strategy. exactly like the Windows Phone platform, which once again screams of intervention by Microsoft.
Here’s what developers will get
Pranav Shroff, product marketing manager, Nokia
S
o, the first Android smartphone from Nokia is now officially out, but we wish we could say that the Finnish company is pulling out all the stops. But then, with Microsoft acquiring Nokia, this isn’t a very big surprise. Nokia’s first Android device is essentially a Google-less version of Android. The company is running it on its own Nokia X platform, which is based on the Android Open Source Project (AOSP), version 4.1.2. While it is based on AOSP, Nokia X isn’t in itself an open source platform. Nokia has replaced things like Google Maps, Google Play and Google Drive with its own Here Maps, Nokia Store and Microsoft OneDrive. In addition, the user interface in this device looks almost 88 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
On the apps front, Nokia claims that the new platform can run about 75 per cent of the apps that run on Android. The company has come up with quite a few tools and the services SDK in order to attract developers to the Nokia X platform. According to Pranav Shroff, product marketing manager, Nokia, it takes about eight hours to port an app to the platform. The company has also introduced the App Compatibility Analyzer in order to aid developers. Shroff says, “This tool lets you put your app’s .apk file into the system, which then analyses whether your app is compatible with the platform. If not, it tells you whether modifications are required. The tool points down to the exact line of code(s) that needs to be modified in order to make the app run on the platform.” The tool is available on Nokia’s developers’ site (http:// developer.nokia.com/nokia-x/platform-overview). According to the website, your app will need porting if it includes in-app payments, Google services for push notifications or maps. Besides, in order to help developers promote their apps, Nokia is offering the DVLUP programme, which is a rewards program for developers. Using this, developers can create app promotion campaigns against the experience points they have earned while developing the apps. The campaigns available range from promotion in the Nokia store to social media, retail newsletters and in-app advertising. The promotions are available both globally and locally. In addition to the DVLUP programme, Nokia is also offering some free tools to developers, which will aid them in app development for the platform.
The real strategy
The company is going to launch its other two Android devices, X+ and XL, within a couple of months, completing its current portfolio in the Android segment. The Finnish smartphone maker, that used to lead the Indian market in sales at one time, has also confirmed
Open Strategy For U & Me that the Windows-based Lumia still remains its flagship device, and the Nokia X platform will remain between its Lumia and Asha devices, with the Asha devices being priced even lower than the X series smartphones. The newly launched device has 512 MB of RAM with a 1 GHz dual-core processor and 4 GB of internal storage, which can be taken up to 32 GB using a micro-SD card. In addition, it has a 1,500 mAh battery along with a 3 mega pixel fixed-focus camera. With a price tag of Rs 8,599, some might say that the Nokia X is a bit overpriced for the features that it offers. In fact, the company’s cheaper Lumia 520, though running on Windows, offers a better camera. This just reinforces the belief that Nokia is using this platform as a launch pad for its Lumia devices. Experts all over the world have reiterated over and over again that the X, X+ and XL are examples of Microsoft leveraging its own services using Google’s Android. The platform also grants users the option to run apps from third party app stores. In addition, Shroff mentioned during the product demonstration that users can side load
“Nokia has replaced things like Google Maps, Google Play and Google Drive with its own Here Maps, Nokia Store and Microsoft OneDrive. In addition, the user interface in this device looks almost exactly like the Windows Phone platform.” apk files for various apps onto this device. That said, there is no guarantee for the compatibility of side loaded apps and, hence, you have to ensure that they can run on the device. So, that’s the story of Nokia’s new Android initiative. The one-time leader of the mobile phones market has added yet another ecosystem for users to experience. For developers, the Nokia X provides a new ecosystem to monetise, but whether the platform will be successful enough remains to be seen.
Continued from page no 87... Variable eliminations and equation solving
Very often, we come across ‘N’ sets of equations in ‘M’ sets of unknowns, where M >= N. If M = N, then it’s most likely that a unique solution exists. However, if M > N, then there may be many possible solutions, but with some constraints. In such a case, it would be helpful to deduce some simpler set of expressions. This can be achieved using eliminate() of Maxima. Let’s have two polynomial expressions in the three variables x, y and z to demonstrate this:
1) Yn+1 = r * Yn * (1 – Yn) 2) Yn = r * Yn+1 * (1 – Yn+1)
So, representing Yn+1 with yn1 and Yn by yn, we may use solve() to solve for yn and yn1 in terms of r. But, if we want to get a feel of the equation which pops up, in terms of yn, we would have to use eliminate() to eliminate yn1. $ maxima -q (%i1) p1: yn1 = r * yn * (1 - yn)$
$ maxima -q
(%i2) p2: yn = r * yn1 * (1 – yn1)$
(%i1) p1: x^2 + 2*x*y + z^2$
(%i3) string(eliminate([p1, p2], [yn1]));
(%i2) p2: x + y + z$
(%o3)
(%i3) string(eliminate([p1, p2], [x]));
(%i4) string(solve([p1, p2], [yn, yn1])); /* Just to show the
(%o3)
solution */
[2*z^2-y^2]
[yn*(r^3*yn^3-2*r^3*yn^2+(r^3+r^2)*yn-r^2+1)]
(%i4) string(eliminate([p1, p2], [y]));
(%o4) [[yn = (r-1)/r,yn1 = (r-1)/r],[yn = -(sqrt(r^2-2*r-3)-r-1)/
(%o4)
(2*r),yn1 = (sqrt(r-3)*sqrt(r+1)+r+1)/(2*r)],[yn = (sqrt(r^2-2*r-
[-z^2+2*x*z+x^2]
(%i5) string(eliminate([p1, p2], [z]));
3)+r+1)/(2*r),yn1 = -(sqrt(r-3)*sqrt(r+1)-r-1)/(2*r)],[yn = 0,yn1
(%o5)
= 0]]
[y^2+4*x*y+2*x^2]
(%i6) quit();
Note that in all the above polynomial expressions, the expressions are assumed to be equated to zero. A beautiful application of the above is solving recurrence relations. Let’s assume that we have a non-linear equation given by Yn+1 = r * Yn * (1 – Yn). And, we want to solve it for a scenario where as ‘n’ tends to infinity, the value of ‘Y’ oscillates between two distinct values. This means that Yn+2 = Yn. Hence, we would have two expressions with three unknowns to solve, namely:
(%i5) quit();
By: Anil Kumar Pugalia The author is an open source hardware and software hobbyist, with a passion for mathematics. A gold medallist from NIT Warangal and IISc Bengaluru, mathematics and knowledgesharing are two of his many passions. Apart from that, he shares his experiments with Linux and embedded systems through his weekend workshops. Learn more about him and his experiments at http://sysplay.in. Reach him at email@sarika-pugs.com.
www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 89
For U & Me
Recruitment Trends
“Open source has enabled us to add the desired value to our products” Open source software has touched many lives (read, companies). Products and technologies based on open source are known to be successful, which is why a company like Unisys Corporation is banking on it for the bandwidth it gives firms to experiment and innovate. Unisys does a major part of its development work in India, as it finds the open source talent pool here one of the best in the world. Diksha P Gupta from Open Source For You spoke to Jim Thompson, CTO, TCIS, Unisys and L N V Samy, VP, Engineering, GTC, Unisys, about the firm’s operations in India. Excerpts: Unisys India is responsible for a fair amount of such work. It is extremely important for us to be here—to be in touch and in sync with all of this. We have got a fairly aggressive product development schedule. Our product, which caters a lot to the hybrid cloud space, is being developed in India.
Q
It is a known fact that India has a lot of talented engineers. Apart from the talent that you get here, are there any other attractions India has? We have been in Bengaluru for ten years now. We came to India for the same reasons that most companies do. One of the major reasons for so much of our development work being concentrated within the country is the talent that is available to us. In India, there is a higher graduation rate among software engineers as well as among engineers from various other branches. So there is no dearth of skills in the labour pool. And being a global company, we invest on a global basis. So, India is a natural place for us to come and do business. With respect to the workforce, we enjoy good retention rates. We get very talented people and they are doing good work. So it’s a win-win for all of us.
Jim Thompson, CTO, TCIS, Unisys
Q
Tell us more about Unisys’ establishment in India?
We have a large investment in the engineering facility in Bengaluru. Looking at the Indian market from a global perspective, what we are trying to do is address the changing landscape on the data side and introduce a hybrid cloud environment. We all know about the public clouds like the Amazons and the Rackspaces of the world, but enterprises are now trying to get into a hybrid-cloud kind of scenario. So, a lot of our technology is related to enabling that and ensuring our clients make the best use of what they want to keep within their enterprises, even while being able to take things to the public environment like Amazon Web Services, Google and other such options.
90 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
Q
Could you throw some light on the kind of development work that is happening in the Indian facility?
Q
Do you do development work around open source technology in India?
We do a wide variety of development work. We take care of a set of our core business products, which are responsible for a big chunk of our revenue. We are also doing new development work here in Bengaluru. We discovered that the best thing we could do would be one full lifecycle of a project here, in India. So a lot of work is being done here on our hybrid cloud offering. A lot of our security work around our products is also being done here. A couple of big projects in terms of our forward-looking investments are being handled here, along with a lot of test activities linked to our projects.
Absolutely. I think what any serious development organisation does today is a mix of applied research using
Recruitment Trends
For U & Me
open technologies and organic R&D that it does by itself. So we absolutely are involved in the Linux space. SUSE is one of our partners, and we do a fair amount of work with it.
Q
Are you also involved in the OpenStack project?
Q
Do you think India’s open source talent pool is adequate?
We do not spend a lot of time with OpenStack right now. It is something that we are evaluating, to see that if it is an appropriate technology for us to embrace. But right now, we are not doing anything much with OpenStack.
Of course, we do have very good open source professionals in India. We work with open source technologies and use a number of open source products as part of our solutions and technology offerings to our customers. In terms of getting enough open source technology professionals, I think India is an extremely good place for that. I think it is one of the reasons India team works on such programs, as availability of talent is one of the key considerations in deciding what the company wants to do in a particular facility.
Q
Was the talent availability scenario the same when you launched the facility in India seven to eight years ago or has it changed over a period of time? It has definitely changed a lot. We started with our clearpath mainframe technology as our focus area, which is internal Unisys technology. So over a period of time, I think we have definitely moved very much on to open source technologies. The talent availability now has improved a lot with the increasing awareness about open source.
Q
What kind of open source technologies do you work on in the Indian facility?
We use open source technologies related to the user interface for our product. We use open source in our secure private cloud offering. We do a fair amount of organic development around all those things. Generally speaking, there is a lot that we can find in the open source space and translate into things that are appropriate not only for commercial computing but business critical or mission critical business computing. We make our own modifications and enhancements on the available technologies to meet specific business needs. That’s why we want to hire folks who are familiar with open source technologies.
Q
Are your clients in India ready to accept solutions built around open source technologies? How easy or difficult is it for you to convince them that even if your offerings are based on open source technology, they are secure? In general, the market has started accepting open source technologies. You can see that with the success of companies like SUSE, Red Hat and others. In our segment of the business, where we deal with business critical computing, there is a certain degree of healthy
L N V Samy, VP, Engineering, GTC, Unisys
scepticism about adopting any new technology, whether open source or proprietary. The technologies are rigorously tested and go through an adoption cycle. But I think, in recent years, I have not seen a push back against open source technologies. The market place is adopting rather than rejecting them. The market sees open source as an economically viable means to get freedom of choice, without compromising on scalability and security. So we try to bring them the best possible solution, which gives them flexibility and security along with being open source. In India, it is a bit different. We currently do not have many clients here who use our open source technologies because these are very recent—developed only in the last few years when we invested heavily in open source technologies. I find no reason why India should not sooner or later get more comfortable with this global phenomenon.
Q
Can you explain how open source tools and technologies add value to your development processes?
Open source technology helps us immensely because we do not need to invest on technologies that are already available. Courtesy the freely available open source technology, we have the freedom to add value in the areas we have specialised knowledge in, including security, performance, etc. And we aim to bring open source technologies to mission-critical systems and add value. We work on open source sofware and convert it into a solution for our customers. So open source solutions contribute in a big way www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 91
For U & Me
Recruitment Trends
“We do have very good open source professionals in India. We work with open source technologies and use a number of open source products as part of our solutions and technology offerings to our customers. In terms of getting enough open source technology professionals, I think India is an extremely good place for that. I think it is one of the reasons India team works on such programs, as availability of talent is one of the key considerations in deciding what the company wants to do in a particular facility.” to reducing our overall development costs, not only for us, but for our customers too. And at the same time, it offers them the ability to handle mission-critical systems and applications, with the value addition coming from Unisys.
Q
Is this value addition not possible with proprietary technologies?
It is possible, but the amount of investments you have to make to build something from scratch, as against taking something that is close to what you need and adapting it, are pretty high. The skillsets that you need to operate in the proprietary space are unique and not something that you can typically find among university students. You need to train resources to work on those technologies. But that also requires investment and time. Open source technologies have a clear advantage in such situations as they give you a clear headstart from the development perspective, and the development process gets more efficient automatically.
Q
Do you reach out to open source communities if you get bogged down by any technologically complicated situation?
We certainly use the resources available in the open source space. But I can honestly say that I cannot recall a situation where our guys have been at a loss for a solution when faced with a problem. We have been in the business for many years now, and I can confidently say that we can find a solution to any issue, within the campus, on the basis of our experience and expertise. But that doesn’t take away from the fact that we are constantly looking at developments in the market place and in the community to continue innovating with new technologies.
Q
How many engineers do you have in the Indian facility?
Q
What are the skills you look for when you recruit engineering talent at Unisys?
Q
How important are certifications for a company like Unisys?
In the Indian engineering and technology group, we have about 400 people. On the technology solutions side, we have got close to 800-900 people. The technology group basically focuses on engineering products, while the solutions group uses the technologies from Unisys and others to develop solutions, which we apply to the different verticals.
We basically look for engineering graduates, post graduates and doctorates who have got a good knowledge of systems, the ability to work on systems’ engineering and product engineering activities, etc. We look for people with a good research and development mindset, who can deep dive into technologies, who can think at a systems level and who can follow product engineering concepts.
Certifications always add value to the profile of a candidate. We do look at that aspect when we hire and candidates do get in if they have the relevant certification.
92 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
Interview For U & Me
“Open source IP PBX solutions are constantly being upgraded by the developer community” In a freewheeling chat with Open Source For You, Devasia Kurian, managing director, astTECS, talks in detail about open source IP PBX solutions.
Q
It is often said that the commercial support costs for open source solutions are very high compared to the implementation costs. How good is the community support for an open source IP PBX? This is a misconception and there is no rationale behind it. Support costs are actually high among the vendors offering proprietary technology, since this is directly related to the increased manpower involved and overheads attached. In the case of open source, project support typically comes through community forums within a quick turnaround time and, also, the staffing costs of typical Asterisk companies are far less than the proprietary vendors. In terms of features and functionality, some of the proprietary products have far less features compared to the open source products, which come with powerful inbuilt features like video-conferencing, voicemail-to-email, phoneless desktops with smartphone clients, Skype integration, WebRTC support, etc. These additional features do require additional support, which leads to the false impression that open source products require more support.
Q
competition, resulting in higher service levels and lower costs for upgradation and continued support.
Q
Is the hardware associated with an open source IP PBX solution easily available in the Indian market?
The open source IP PBX hardware scenario is really encouraging. Today, not only can third-party hardware be imported, but there are also a lot of Indian manufacturers offering open source hardware like interface cards for PRI, FXS, FXO, GSM, etc. The ecosystem is well set to welcome the impending boom.
Q
Will hosted telephony services compete against open source IP PBX solutions?
Open source IP PBX solutions can also work as hosted solutions. Hosted solutions are just another mode of service delivery to the end customer and therefore do not have any major impact on the overall market opportunities.
Q
Apart from the low cost of implementation, what are the other benefits of having an open source IP PBX solution? The significant benefits of open source IP PBX
In a proprietary system, we often face Devasia Kurian, managing director, astTECS solutions are common to many open source products. They have some compelling advantages. issues when upgrading the system First, they are rich in features. The basic versions of open based on the growth of the business. How well do open source IP PBX solutions come with advanced features like source IP PBX solutions address such problems? Open source IP PBX is constantly being upgraded by the developer community, which involves lower development costs. Open source systems are free from vendor lock-in and this opens up tremendous possibilities to do a costeffective upgradation. In case of proprietary technology, upgrades and spares are available only from the vendors the solution was purchased from, and they insist that even the phones be purchased from them. This leads to a market that is a quasi monopoly, leading to increased dependence on a vendor and high prices. Open source solutions revolve around multiple hardware and software vendors. The ease of switching from one vendor to another ensures fair
video-conferencing, CRM-integration, WebRTC support, etc. Second, they are easy to upgrade. Communication technology is developing at an unprecedented fast pace. Protocol upgradations for SIP, WebRTC, etc; communication changes like TAPI, Skype, etc; or integration with Microsoft and Lotus suites are becoming everyday needs. The community is very fast in developing these interfaces and the upgradation is mostly free or with nominal charges. Third, there is no vendor lock-in. Enterprises may want to upgrade and expand their PBX systems to include new capabilities. The open nature of the product allows them to purchase these extensions from multiple vendors and implement them. www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 93
A List Of
Antivirus Solutions Providers AVG India | Mumbai AVG AntiVirus PRO for Android not only keeps your phone and private data safe from viruses and malware, but also assists in recovering a lost or stolen mobile device, and even ensures optimal performance. It is easy to use and works on all versions of Android, v1.6 onwards. AVG Linux Server Edition helps protect the critical emails and invaluable data that enable your business to grow. It helps ensure virus-free inboxes and Linux servers, as well as helps secure communications with AVG Anti-Virus and Anti-Spyware, AVG File Server Protection and AVG Anti-Spam.
LEADING
Avast India | Pune avast! is an antivirus suite, which integrates the avast! antivirus kernel, and is designed to be used on UNIX-like operating systems. The suite consists of a command-line scanner, a resident scanner running as a daemon, and a client for accessing the resident scanner. The avast! engine for Linux features outstanding unpacking support too. It can scan inside almost the same number of archives as under Windows, with the exception of MAPI, CAB, ACE, CHM, 7ZIP and NTFS streams. The latest version of the avast! antivirus kernel features outstanding detection abilities, together with high performance. You can expect 100 per cent detection of in-the-wild viruses (viruses already spreading between users) and excellent detection of Trojans with minimum false positives.
Bitdefender Bitdefender Antivirus Scanner for Linux and FreeBSD systems is in great demand in the market, thanks to the rising popularity of the Linux platform. It safeguards both UNIX-based and Windows-based disk partitions by scanning for viruses and spyware. Its easy-to-use graphical user interface complements a powerful command line interface that fully supports OS scripting tools. Bitdefender Antivirus Free ensures Android devices stay clean by automatically scanning any application immediately after its installation. This also helps users stay informed and protected whenever they try a new application.
Comodo Security Solutions Pvt Ltd | Chennai Comodo Antivirus for Linux (CAVL) offers the same great virus protection as it offers for Windows software with the added bonus of a fully configurable anti-spam system. Featuring on-access and on-demand virus scanners, CAVL also uses cloud-based behaviour analysis of unknown files to provide unrivalled protection against zero-day malware. The powerful AV engine is complemented by a highly configurable mail gateway to filter spam and block email-borne threats. Its mail filter is compatible with Postfix, qmail, Sendmail and Exim MTAs.
Doctor Web | Moscow, Russia Doctor Web is one of the few anti-virus vendors in the world to have its own technologies to detect and cure malware. Its anti-virus protection system allows the information systems of its customers to be protected 94 | April 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
from any threats, even those as yet unknown. The Dr.Web Gateway security suite for UNIX appliances is a Dr.Web icap-server that protects HTTP and FTP traffic. It works as a client communicating with the Dr.Web daemon. The daemon receives data from HTTP-traffic for scanning. The software can be configured to scan both HTTP and FTP traffic.
eScan | Mumbai eScan for the Linux desktop facilitates organising schedules to check a specific directory or local hard disk. It also provides options to scanning on an hourly, daily, weekly, monthly or one-time basis. It has separate settings for scheduled scanning. To ensure security from malware targeting Android devices, eScan has specially designed a security solution—eScan mobile and tablet security for Android. The technology used in eScan mobile and tablet security for Android protects devices against evolving security threats, thus ensuring uninterrupted usage.
ESET India | Navi Mumbai
F-Secure India | Hyderabad F-Secure Mobile Security (for Android) safeguards you against viruses, spyware, hacker attacks and identity theft when you are online. It also keeps you safe from harmful websites and malicious applications, and allows you to moderate your children’s online activities. An anti-theft feature helps you locate, lock or erase the contents of a missing mobile device. This is a complete security suite for your Android device, with award-winning technology to protect you against all online threats.
F-PROT | Iceland Version 6 of the F-PROT Antivirus for Linux is a new, significantly enhanced version that incorporates version 4 of the F-PROT scanning engine, which has been updated considerably compared to the previous version. The F-PROT Antivirus for Linux now also supports both 32-bit and 64-bit versions of Linux x86. Due to major changes, the use of many F-PROT subsystems has been changed, in addition to the normal upgrades. The F-PROT Antivirus for Linux workstations utilises the renowned F-PROT antivirus scanning engine for primary scans; in addition, it has a system of internal heuristics devised to search for unknown viruses.
LEADING
The ESET NOD32 antivirus for Linux offers complete protection against cross-platform and emerging threats. Built on the award-winning ThreatSense scanning engine, the solution delivers real-time protection without slowdowns, shielding Linux-based systems from all types of malicious code, including those engineered for Windows and Mac OS. The key benefits include proactive protection, cross-platform security, a low system footprint, advanced antivirus protection, etc. ESET NOD32 Antivirus 4 Business Edition for Linux desktops comes with the possibility to create a pre-configured RPM installer package, compatible with software distribution tools.
Kaspersky Labs | Navi Mumbai Kaspersky Endpoint Security for Linux provides corporate networks running UNIX-based operating systems on their endpoint machines with centralised protection from all types of malware and potentially dangerous programs. Kaspersky Lab’s innovative new antivirus engine uses cutting-edge component architecture to increase performance and stability, providing reliable protection that’s easy to control and manage. Kaspersky Anti-Virus for Linux File Server provides superior protection with Samba server integration and other features that can protect workstations and file servers in even the most complex heterogeneous networks. It is also certified as VMware-ready and supports current versions of FreeBSD for integrated, future-proof protection. www.OpenSourceForU.com | OPEN SOURCE For You | April 2014 | 95
McAfee Software India | Bengaluru McAfee VirusScan Enterprise for Linux delivers always-on, real-time antivirus protection for Linux environments. With the McAfee ePolicy Orchestrator (ePO) platform, you can efficiently deploy and manage your Linux clients on your network, giving you better security visibility across the entire infrastructure. It allows control policy configuration, deployment and reporting for all your endpoints from ePO’s single, Web-based console.
Symantec Corporation India | New Delhi Symantec’s Norton Antivirus for Android lets you easily control the security for your devices in one convenient place on the Web. It sets off a scream-like alarm, so you can quickly find your missing mobile device. It blocks fraudulent (phishing) websites to protect your sensitive personal information when you use mobile networks and Wi-Fi connections. It saves contacts from your Android mobile device, so that you can easily restore them if they are lost or deleted and share them across devices. It locks a lost or stolen phone or tablet to prevent strangers from using it and viewing anything that’s stored on it.
Quick Heal | Pune Quick Heal AntiVirus for Linux offers Linux networks complete system vulnerability coverage against complex strains of malware and unauthorised devices. With this suite deployed for a network, users have instant visibility into their overall security status. Its automatic virus updates add to its overall online and real-time protection. Quick Heal Total Security for Android offers advanced protection against malware, as well as features such as blocking unwanted SMSs and calls. What makes this suite complete is that it backs up data on the cloud, traces stolen or lost mobile devices, and has parental controls for monitoring Internet activity on the device.
LEADING
SafeNet India | Noida SafeNet’s eSafe Appliance is the industry’s first Linux-based content security and antivirus gateway product. The eSafe Appliance is preloaded with a hardened OS and provides a platform to operate the award-winning eSafe Gateway or eSafe Mail content security software. eSafe Gateway is a powerful content inspection gateway that includes anti-spyware and antivirus scanners, provides full content security protection for any connection established between the internal LAN and the Internet, scans and cleans data passing through SMTP, FTP and HTTP connections, and operates with any firewall or router.
Sophos India | New Delhi More than 100 million users in 150 countries rely on Sophos’ complete security solutions as protection against complex threats and data loss. Simple to deploy, manage and use, Sophos’ award-winning encryption, endpoint security, as well as Web, email, mobile and network security solutions are backed by Sophos Labs—a global network of threat intelligence centres. Sophos Anti-Virus for Linux software detects and cleans up viruses, Trojans, worms and spyware, as well as adware and other potentially unwanted applications. Sophos Anti-Virus provides virus definitions and software updates regularly when you are connected to the Internet.
Trend Micro India | New Delhi Trend Micro ServerProtect for Linux 3.0 offers comprehensive real-time protection for enterprise Web servers and file servers, preventing them from spreading viruses, spyware and other Web threats to internal or external endpoints. Managed through an intuitive portable Web-based console, ServerProtect provides centralised virus/malware scanning, pattern updates, event reporting and configuration. Proof of the solution’s stability and reliability is the certification from all major Linux vendors as well as independent third parties such as Virus Bulletin. ServerProtect for Linux is a key component in the comprehensive threat prevention offered by Trend Micro Enterprise Protection Strategy.
96 | April 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
Let’s Try For U & Me
A Peek into Scilab
Scilab is free and open source software for numerical computation, which originated from Inria in France. It is used in various sectors like space, aeronautics, automotive, energy, defence, finance and transport. Learn more about it here.
D
ata analysis, in the broadest sense, requires the appropriate tools, because the possibilities offered by a spreadsheet are limited. Open source software includes a number of very interesting packages that can cover a wide range of applications. Some examples, in alphabetical order, are: GNU Octave, Python, R, Sage and Scilab. Each one of these has features of great interest. Selecting one package over another often depends on personal preferences or the need for particular aspects of Calculus. In this article, let’s explore the various characteristics of Scilab via three practical examples.
Overview
Scilab (http://www.scilab.org) is open source software for numerical computation (Figures 1 and 2) with a syntax similar to MathWorks’ Matlab. The software can be used for a wide range of applications: plotting data (2D and 3D) and for exporting to various different formats (like png, jpg, pdf, svg, etc), optimisation, statistics, signal processing,
interaction with other languages (like Python, Java, C, C++, etc), GUI building, etc. There are several additional modules available. There is also a package called Xcos (Figure 3) for modelling and simulation of systems, similar to MathWorks’ Simulink. Under the CeCILL open source licence, Scilab is available free for GNU Linux, MacOS and Windows. The sources are available too. The last stable version is 5.4.1, while 5.5.0 is in beta. Scilab was created in 1990 by teams from the Institut National de Recherche en Informatique et en Automatique (Inria) and the École Nationale des Ponts et Chaussées (ENPC). Since 2012, Scilab has been developed and maintained by Scilab Enterprises. I have chosen three practical examples to explain some of the software’s Calculus and plotting capabilities— hierarchical cluster analysis, principal component analysis and the pasta design. For the first two examples, I will consider the data analysis on the quantitative determination of 17 chemical elements in 38 wines and, for the third, the study of parametric surfaces for the production of pasta. All www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 97
For U & Me
Let’s Try
Figure 1: Main window with file browser, console, variable browser and command history Figure 3: Xcos (from the demos)
Figure 4: Dendrogram
the screenshots are under Linux Mint 16 Xfce. Xcos and the relationship between Scilab and other languages will perhaps be explored in another article in the future.
variables) are calculated and then plotted in a tree-shaped distance map called a dendrogram. In principal component analysis (PCA), linear combinations of the variables are calculated. This transformation does not change the relationships between the objects. In this new space, the axes are orthogonal (completely uncorrelated) to one another and ordered by their importance, according to the variance that they explain. For this reason, it’s possible to look for relationships among the objects in a few-dimensions plot.
Data analysis, in a nutshell
How to go about it
Figure 2: SciNotes editor
Let’s consider a table from the book ‘Introduzione alla Chemiometria’ by Todeschini (see References), in which the rows represent the wines (38 objects, numbered from 1 to 38) and the columns are the chemical elements (17 variables, numbered from 1 to 17). In particular, the chemical elements are: Cd, Mo, Mn, Ni, Cu, Al, Ba, Cr, Sr, Pb, B, Mg, Si, Na, Ca, P and K. I can represent these wines on a 17-dimensional plot; each wine is a single point in this space. In Hierarchical Cluster Analysis (HCA), the distances between objects (or 98 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
For the hierarchical cluster analysis (the IPT3 module must be installed), it’s first necessary to read the data table via readxls. Then, a data scaling is carried out: center is for the column centering (each column has a mean = 0) and wcenter is for the column standardisation (each column has a mean = 0 and standard deviation = 1). pdist calculates the distance between the objects. The available methods to calculate the distance are listed below: • che (chebyshev);
Let’s Try For U & Me
Figure 5: Screeplot
Figure 7: Loadings (variables) in a 2D plot
Figure 6: Scores (objects) in a 2D plot
Figure 8: Scores (objects) in a 3D plot
• • • • • • • • •
• • • •
cit (city block, Manhattan); cor (correlation); cos (cosine); euc (Euclidean); ham (hamming); jac (Jaccard); mah (Mahalanobis); min (Minkowski); seu (standardized Euclidean). From pdist, linkage generates the data representing the hierarchical clustering. The available linking methods are: • ave (average); • cen (centroid); • com (complete);
med (median); sin (single); war (ward); wei (weighted). Last, H = dendrogram(Z,n) plots the dendrogram with only the top ‘n’ nodes. By default, n = 30 because, if the nodes are more than 30, the dendrogram may look a bit crowded. To display all the nodes, it’s necessary to set n = 0 (Figure 4). clear; sheets=readxls(uigetfile(‘*.xls’)); data=sheets(1).value; dataS=wcenter(data,’r’);
www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 99
For U & Me
Let’s Try
Figure 9: Loadings (variables) in a 3D plot Y=pdist(dataS,’euclidean’); Z=linkage(Y,’ward’); H=dendrogram(Z,0);
Figure 10: Pasta design, from top to bottom: corkscrews, lilies, little ears
xtitle(‘Dendrogram (wcenter, euclidean, ward)’); s2=comprinc(:,2);
For principal component analysis, princomp is used, whose parameters are (according to the help file): • facpr, principal factors (eigenvectors of the correlation matrix); • comprinc, principal components; • lambda, eigenvalues of the correlation matrix; • tsquare, Hotelling’s statistic for each data point. Then, some calculations are carried out to build a table (Figure 1) in which the first column represents an index, the second is the variance explained by each component, the third is the percentage of variance explained by each component and the fourth is the cumulative sum. Last, I can plot the percentage of variance, scores (comprinc, the objects) and loadings (facpr, the variables) using plot (Figures 5, 6 and 7) or param3d1 (Figures 8 and 9).
s3=comprinc(:,3);
clear;
It is possible to think about pasta as a parametric surface. It’s really very easy to plot. First, it’s necessary to define the two parameters (u and v) and then the three functions (x, y and z). The pasta types under consideration here are: the simplified version of cavatappi (corkscrews); gigli (lilies), the simplified version based on the Dini’s surface (from Ulisse Dini, 1845-1918); orecchiette (little ears), the simplified version based on the book ‘Pasta by Design’ by George L. Legendre (see References). You can refer to this book for many other examples and more complex equations. I can plot the surface using plot3d1. It’s also necessary to set some other graphics parameters, like the colour map and the viewpoint (rotation angles). Last, I can compare each plot
sheets=readxls(uigetfile(‘*.xls’)); data=sheets(1).value; dataS=wcenter(data,’r’); [facpr,comprinc,lambda,tsquare]=princomp(dataS); n=length(lambda); percentage=zeros(n,1); runtot=zeros(n,1); for i=1:n percentage(i)=lambda(i)/sum(lambda)*100; end runtot=cumsum(percentage); s1=comprinc(:,1);
100 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
sl=(1:1:length(s1)); l1=facpr(:,1); l2=facpr(:,2); l3=facpr(:,3); ll=(1:1:length(l1)); printf(‘
N |
VAR |
PCT |
SUM\n’..
+’-----+-----------+-----------+----------\n’); for i=1:n printf(msprintf(‘%4.0f’,i)+’ |’.. +msprintf(‘%10.4f’,lambda(i))+’ |’.. +msprintf(‘%10.2f’,percentage(i))+’ |’.. +msprintf(‘%10.2f’,runtot(i))+’\n’); end
Pasta design
Let’s Try For U & Me with real pasta (Figure 10).
‘z={z function}’]); [xf,yf,zf]=eval3dp(scp,u,v);
// corkscrew
xset(‘colormap’,{color map name}colormap(128));
x=cos(u).*(cos(v)+3)
plot3d1(xf,yf,zf,flag=[1,2,0]);
y=sin(u).*(cos(v)+3)
a=gca();
z=sin(v)+u
a.children.hiddencolor=0;
// lily
a.rotation_angles=[{angle1 angle2}];
a=1 b=0.15 x=a*cos(u).*sin(v) y=a*sin(u).*sin(v) z=a*(cos(v)+log(tan(v/2)))+b*u // little ear
Scilab has many features and it’s not possible to explore them all with only three examples. In my opinion, Scilab provides excellent computing power, very good plotting capabilities and the syntax is easy to learn. I hope that this article will stimulate the reader’s curiosity about Scilab.
x=(v*0.66667).*cos(u*0.04189)+0.3*cos(u*0.41888) y=10*sin(u*0.04189) z=0.1*cos(u*1.04720)+(5*(0.5+0.5*cos(u*0.08378))^4).*(cos(v*0.104 72)^2)+1.5*(0.5+0.5*(cos(u*0.08378))^5).*sin(v*0.10472)^10
References [1] Legendre, ‘Pasta by Design’, Thames & Hudson, London, 2011. [2] Todeschini, ‘Introduzione alla Chemiometria’ (Introduction to Chemometrics), EdiSES, Naples, 1998. [3] Webb, ‘Spaghetti Functions’, New Scientist, London, 2011, 2834, 48-51.
clear; u=linspace(-2*%pi,2*%pi,60); v=linspace(-%pi,%pi,24); deff(‘[x,y,z]=scp(u,v)’,[‘x={x function}’;.. ‘y={y function}’;..
By Stefano Rizzi The author works in the analytical chemistry and textile chemistry domains. He has been a Linux user since 1998.
www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 101
Buyers’ Guide
Choose the Best Portable
Wi-Fi Hotspot Device
If you are constantly on the move, staying connected becomes critical. A good, portable Wi-Fi hotspot device, which can provide quick Internet access to many devices at a time, makes your job simpler.
T
he growing consumer appetite for data is driving the need for more connectivity across all realms. Wireless Wi-Fi hotspot devices are increasingly providing Internet access while we are on the go. According to research conducted by Wireless Broadband Alliance, the number of Wi-Fi hotspots is set to reach 5.8 million by 2015, a 350 per cent increase from the 1.3 million sold in 2011. 102 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
Before we delve deeper into this market, it is important to understand what exactly a Wi-Fi hotspot device is. A portable Wi-Fi Hotspot device acts as an Internet source, which lets many devices connect to it through Wi-Fi, sharing a single Internet connection. For the uninitiated, there are various types of Wi-Fi hotspot devices.
Buyers’ Guide SIM-based hotspot devices: For such devices, you need to get a separate SIM card from an Internet service provider and insert into the Wi-Fi router. Then you will need to connect the router to your computer with a USB cable and configure it to use the SIM card in order to make a connection with the service provider. You may then disconnect it from your computer and use it as a Wi-Fi router. The pocket Wi-Fi router acts as a modem as well as Wi-Fi hotspot. USB data card/modem-based Wi-Fi hotspot devices: In such cases, a USB-based data card is used and it needs to be connected to the Web. The USB data card is attached to the pocket Wi-Fi router to make an Internet connection. It is important to understand that these types of Wi-Fi hotspot devices do not have an in-built modem. They rely on the USB data card to connect to the Internet service provider. USB dongles/data cards with the Wi-Fi hotspot option: There are a number of dongles available in the market that come with the built-in Wi-Fi hotspot option. So, you don’t need to buy a separate device to share your Internet connection, which can prove to be cost-effective.
Evaluating a hotspot device
We reached out to various industry players to figure out what qualified as a good hotspot device. Jason Xu, director at TPLink India, shares, “A good hotspot should do several things. First, it should be compatible with local ISPs to give end users as much choice as possible to select their carrier. Second, it should be compact (without sacrificing battery life) for maximum portability. And finally, end users should be able
to connect several users or devices to the hotspot, without impacting upload and download speeds too significantly. The number of devices that can be connected simultaneously should be such that members of a small team can all use the hotspot at the same time.” According to Anand Narang, marketing director, Consumer Devices Business group at Huawei India, from a user’s perspective, all a person wants is a hotspot device that can simply provide reliable Internet connectivity anywhere and anytime, to multiple devices. “A good hotspot device must have the features that ensure ‘simple, reliable, anywhere, any time’ Internet access. The user must be clear about this factor before buying a hotspot device. For example, typical young users just want to enable the data card in their laptops to share the Internet connection with their tablets and smartphones. They do not want to use their smartphones as the hotspot, because the speed is not so good and the battery will burn out. So the best hotspot for such users is the Wi-Fi data card, which can not only work as the common data card but also as a Wi-Fi hotspot,” opines Narang. Reliable data coverage, speed and portability are the key factors to look for while buying a hotspot device, believes Anoop Jarial, VP, Product Marketing at D-Link (India) Ltd. “One needs to confirm the speed supported on WAN as well as on wireless, along with other factors like the number of users it supports, security features, power required by the device, etc. In addition to this, the price and the design of the product are also key deciding factors,” says Jarial.
Some of the Wi-Fi hotspot devices avaialble in the market TP-LINK M5350 Equipped with a built-in 3G modem, one can instantly establish a Wi-Fi hotspot simply by inserting a 3G SIM card at the back of the device. With a 21.6 MBps download speed and 5.76 MBps upload speed, the M5350 is able to provide 3G wireless sharing to up to 10 users simultaneously. Its pocket-sized design and powerful 2000 mAh internal battery make it an ideal travel companion, allowing users to work or play for hours on end. With a compact case and innovative cobblestone design that features an embedded OLED display, the M5350 provides a much more intuitive view of the device’s working status, such as signal strength, network type (2G/3G), Wi-Fi status, messages received, Internet connection status, battery meter, connection mode and traffic statistics. The M5350 is equipped with a micro SD card slot that supports cards with a capacity of up to 32 GB, allowing users to insert a micro SD card and plug the device into a PC to use it as an external USB memory stick.
Price: ` 5,499
www.OpenSourceForU.com | OPEN SOURCE For You | april 2014 | 103
Buyers’ Guide
Huawei E355
Price: ` 2,990
Huawei E355 is the world’s first data card with Wi-Fi for five users. It is a multi-mode wireless terminal for SOHOs (Small Office Home Office) and business professionals. It is a HSPA+ device with a 21 MBps DL and 5.76 MBps UL speed. Huawei E355 can connect with PCs and laptops or any USB adaptor and activate the Wi-Fi. It also comes with Type3i technology that provides up to 20 per cent higher upload and download speeds compared to non-Type3i devices, so that your browsing experience is good.
D-Link DWR-730 D-Link DWR-730 is a business card-sized, portable HSPA+ 21.6 MBps router that allows users to connect notebooks, tablets and smartphones to the Internet any time via a 3G connection. This connection can also be shared with up to eight users wirelessly. D-Link DWR-730 is an unlocked router and is compatible with a wide range of mobile service networks, making it ideal for people who are constantly on the go. D-Link DWR-730 also supports microSD cards up to 32 GB. Shares Anoop Jarial, “It is a mobile router with six hours of battery support. The 3G speed of the device is 21.6 MBps and the wireless speed is 150 MBps.”
Price: ` 3,990
MTS M Blaze Ultra
Price: ` 1,499
MTS powers a superlative Internet experience with 9.8 MBps downloads and 3.6 MBps uploads. Powered by the EVDO Rev.B Phase 2 network, the MTS is one of the very few operators globally to have deployed this platform. Similar devices from other operators only provide a speed of 6.2 MBps. It connects up to five devices. MTS provides coverage in more than 500 cities in nine circles across India (Delhi, Rajasthan, Gujarat, Kerala, Karnataka, Tamil Nadu, UP West, Kolkata and West Bengal). Sandeep Yadav, head, Voice and Data Business Lines, MTS India, shares, “M Blaze Ultra Wi-Fi provides greater value for money, both in terms of the device price as well as monthly charges compared to other similar products available in the market. Customers can take home an MBlaze Ultra Wi-Fi dongle by paying just Rs 1499. There is a wide range of monthly plans available for customers to choose from.”
Edimax BR-6478AC The Edimax BR-6478AC router supports the next generation IEEE 802.11ac wireless standard, which means higher data rates in the 5 GHz band. With a 300 MBps speed in the 2.4 GHz band and 867 MBps in the 5 GHz band, the BR-6478AC is ideal for HD video streaming and large file transfers. The router is also backward compatible with 802.11a/b/g/n to ensure seamless integration with legacy Wi-Fi devices. The BR6478AC router features four Gigabit LAN ports and one Gigabit WAN port, offering data rates of up to a staggering 1000 MBps for users with the need for maximum network performance. With Gigabit Ethernet connectivity, the BR-6478AC can provide users a fast and smooth media streaming or network gaming experience. Sanjay Joshi, head, Technical and Projects (India) at Edimax Technology Co Ltd, opines, “Reliability of the device and the network are the most important criteria. Different users have different hotspot requirements that cannot be fulfilled with similar devices, so when it comes to coverage and capacity, different types of hotspot devices such as routers/APs or range extenders are recommended.” 104 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
Price: ` 13,000 (The router comes bundled with another router EW-7428HCn and in totality, the price is `13,000)
Buyers’ Guide
Lava W520
Price: ` 1,989
The device comes with wireless cloud storage, a USB flash disk, mobile HDD and USB card reader. It creates a Wi-Fi hotspot from the 3G dongles or Ethernet connection and provides support for up to 32 users to access the Internet at the same time. It also supplies power to electronic products via USD as a power bank. The device automatically recognises ADSL/DHCO and WAN/LAN without any preset profile. Shares S N Rai, co-founder and director, Lava International Limited, “A good hotspot device should have a high bandwidth. A good portable Wi-Fi hotspot device should support speed up to 150 MBps. The USPs of Lava W520 are its sleek and slim design, the fact that it is highly pocket friendly and supports up to 32 users, and its massive 5200 mAh battery that can be used as a power bank. Apart from this, it supports cloud sharing of content stored on a Flash USB drive, mobile HDD or USB card reader.”
Make your choice
There are a plethora of hotspot devices available in the market for you to choose from. Buying a good one requires some thought. You need to look for a device that caters to your requirements. So, it is important to ask yourself some basic questions before you go looking for that perfect hotspot device.
106 | april 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
By Priyanka Sarkar The author is a member of the editorial team. She loves to weave in and out the little nuances of life and scribble her thoughts and experiences in her personal blog.
TIPS
&
TRICKS
Using apt-get with a proxy server
Linux users often want to install new software and updates or upgrade their systems through the apt-get command but they are unable to do anything because of a connection error that occurs even if the Internet connection is working well. This happens particularly when you use the Internet from behind a proxy server. Here is a tip to overcome this issue—add details about the proxy server to apt.conf. Open the file /etc/apt/apt.conf in a text editor and add the lines as shown below: Acquire::http::proxy “http://username:password@ YourproxyAddress:portname/”; Acquire::ftp::proxy “ftp://username:password@ YourproxyAddress:portname/”; Acquire::https::proxy “https://username:password@ YourproxyAddress:portname/”;
Here, the username and password are provided by your network administrator. If your network proxy setup does not require a password, then keep it blank. For example: Acquire::http::proxy “http://linux:1234@webproxy. ac.in:8080/”;
—Ankit Agrawal, ankitbioinfo@gmail.com
Adding Indic fonts
After installing openSUSE on my laptop, I just wanted to update my FB status. When I opened my profile, I found only the blocks and bricks. Yes, this was due to the missing Indian fonts. But don’t panic. All you need to do is to run the following command to install the fonts: sudo zypper in indic-fonts
After successful installation of the new fonts, just restart your browser to enjoy them. —Karthikeyan, innovatorforindia@gmail.com 108 | April 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
Find the length of a string
Here is a simple way to get to know the length of a given string. The method can have different applications, depending on your requirements. To get the length, open your terminal and run the following command: a=”Hi There” echo ${#a}
The output of the above command will be… 8
You can also apply this method in a script to get the length: #!/bin/bash # for i in `ls -1` do echo Length of Filename $i :- ${#i} done
The output will include details of all the files in the folder as shown below: Length Length Length Length Length Length Length
of of of of of of of
Filename Filename Filename Filename Filename Filename Filename
Screenshot-9.png :- 16 Screenshot-EC.png :- 17 Sheet1.png :- 10 New-Doc.doc :- 11 New--ment.pdf :- 13 Unsaved :- 7 Document :- 8
—Sanjay Rokade, Sanjay.Rokade@gmail.com
Check the IP address of a live machine in your local network
If you have multiple Linux machines in your local network, you can run a scan using nmap on the network to check the IP address of a live system. nmap -sV -p 22 192.168.1.1-255
The above command will display all the machines that are live and responding to port 22, with an IP address within the range 192.168.1.1 - 255 —Kaushik Debnath, caesar431@gmail.com
Check your disk space usage
In Linux, you can view summaries of your disk space usage from the command line. Follow the steps shown below. Step 1: Open the terminal, and enter the following command: du -sb path
…where, -s specifies the summaries -b specifies the print sizes in bytes path specifies the path of your folder or the location of your directory. Example: #du -sb /home/yourdirectory
You can also find the disk usage in GB, MB and KB. Here are the commands for viewing the output in different units. For disk usage in KB: du -sk /path
For disk usage in MB: du -sm /path
For disk usage in GB: du -sh /path
If you use ‘-c’ options, it returns the grand total of all the arguments after they have all been processed. This can be used to find out the disk usage of the directory. —Mahabaleshwara Adiga, adigamca@gmail.com
Printing the gcc predefined macros to stdout
Here is a tip that will let you know the list of gcc-used macros and their values. The commands to use are shown below: touch foo.h gcc -dM -E foo.h
Executing the above commands will list all the macros used. The option: -dM will generate the list of all #defines used by the pre-processor during execution, which also includes predefined macros.
-E will stop the compiler after the pre-processing stage. It will not enter the compiling stage. The output will be in the preprocessed form and will be sent to stdout. —Yogindar Das Y, yogindar@yahoo.com
Capture all your activities
The tip shared here will help developers as well as general-purpose Linux users. It will allow you to save a remote syslog automatically to the local disk without doing a scp or cp, save all your terminal activities automatically to the local disk, recall a forgotten command and trace back what commands you run on your system to debug a specific problem. So let’s look at all that needs to be done. First, create a directory named termOutput in your home directory and then create a file called termOutput/sessionId with the initial value 0. Now create a directory named bin in your home directory and create an executable script under bin called captureScreen with the following code in it: #!/bin/bash currSessId=`cat ~/termOutput/sessionId` currSessId=$((currSessId+1)) echo “Session Id is..” $currSessId echo $currSessId > ~/termOutput/sessionId script -a ~/termOutput/$currSessId.out
Any terminal application that you use (like GNOME terminal) must have a setting for a profile. At the GNOME terminal, go to Edit --> Profile preferences --> Title and Command --> Command. Check the option Run a custom command instead of my shell and put the complete path of the above script. Now, the next time you open a terminal, you will see something like what’s shown below: Session Id is.. 537 Script started, file is ~/termOutput/537.out xyz@xyz:~$
Whenever you want to find something, you can always go back to these saved files to search for what you want. —Madhusudana Y N, madhusudanayn@gmail.com
Share Your Linux Recipes! The joy of using Linux is in finding ways to get around problems—take them head on, defeat them! We invite you 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 general tweaking. Submit them at www.linuxforu.com. The sender of each published tip will get a T-shirt.
www.OpenSourceForU.com | OPEN SOURCE For You | April 2014 | 109
OSFY DVD
DVD OF THE MONTH Explore and have fun with the latest version of Kali Linux and Linux Mint Debian Edition in this issue.
Kali Linux 1.0.6
This is a complete re-build of BackTrack Linux, armed with a collection of security and forensic tools. It features more than 300 penetration testing tools and has support for different wireless devices. This multi-language, pentesting distro features timely security updates and supports the ARM architecture.
Linux Mint Debian Edition
This is a semi-rolling distribution based on Debian Testing. It’s available in both 32- and 64-bit versions as a live DVD with MATE or Cinnamon. Our bundled DVD has the ISO image of the 64-bit live Cinnamon edition. The purpose of LMDE is to look identical to the main edition and to provide the same functionality, while using Debian as a base.
110 | April 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
R N I No. DELENG/2012/49440, Mailed on 27/28th of Advance month Published on 27th of Advance month
Delhi Postal Regd. No. DL(S)-01/3443/2013-15
There is a place for Postgres in every datacenter. WE CAN HELP YOU FIND IT. Postgres delivers. Enterprise class Performance, Security, Success. For 80% less. EnterpriseDB - The Postgres Database Company
Sales-india@enterprisedb.com EnterpriseDB Software India Pvt Ltd Unit #3, Godrej Castlemaine Pune - 411 01 India T +91 20 30589500/01