Beruflich Dokumente
Kultur Dokumente
SUBSCRIBER COPY
NOT FOR RE-SALE
Sale and purchase
of this copy is illegal.
Developers
49 JavaScript: The New Parts
60
MS Office Add-ins
Build a Personal Safety
Ceph: A Storage
Application in App and Backup
Inventor 2
33
64 A Guide to Material Design,
Solution for
a Modern Software Design Every Need
Language
OpenGurus
67 The Z File System: It’s
Honest and Different
69 SimpleCV: Making Vision
Computing Easy and
Effective
For U & Me
73 A Beginner’s Guide to Linux
75
80
GNU Linux Mint 17.3: The
Friendly Distro
Cool FFmpeg Tricks
37 Manage File
Storage to
Give the Best
42 Bare Metal System
Backup and
Recovery Using
83 Getting Familiar with GRUB Customer Service Open Source Tools
87 How to Run Android Without
Google
92 An Overview of Open Source
REGULAR FEATURES
Databases 07 You Said It... 10 FOSSBytes 104 Tips & Tricks
95 Five Cool Custom Android 08 New Products 55 Editorial Calendar
ROMs You Can Have Fun With
MiSSing iSSuES
E-mail: support@efy.in
back iSSuES
Kits ‘n’ Spares
new delhi 110020
ph: (011) 26371661, 26371662
E-mail: info@kitsnspares.com
nEwSStand diStribution
ph: 011-40596600
E-mail: efycirc@efy.in
advErtiSEMEntS
mumbai
ph: (022) 24950047, 24928520
E-mail: efymum@efy.in
PuNe
ph: 08800295610/ 09870682995
E-mail: efypune@efy.in
GuJaRaT
ph: (079) 61344948
E-mail: efyahd@efy.in
chiNa
power pioneer group inc.
ph: (86 755) 83729797, (86) 13923802595
E-mail: powerpioneer@efy.in
JaPaN
tandem inc., ph: 81-3-3541-4166
E-mail: tandem@efy.in
SiNGaPORe
publicitas Singapore pte ltd
ph: +65-6836 2272
“Our goal is to give “A CIO should E-mail: publicitas@efy.in
effective technology
J.k. Media, ph: 886-2-87726780 ext. 10
on his agenda” E-mail: jkmedia@efy.in
News 3.0 unported license a month after the date of publication. refer to
http://creativecommons.org/licenses/by-nc/3.0/ for a copy of the
106
kindly add ` 50/- for outside delhi cheques.
Visualising Data Using please send payments only in favour of EFY Enterprises Pvt Ltd.
non-receipt of copies may be reported to support@efy.in—do mention
googleVis your subscription number.
ED: First of all, a big thank you for your words of Writing for opensourceforu.com
appreciation. Through the years, we have constantly worked I have over 11 years of experience as a Web developer. My
at improving the content, layout and design of the magazine hobby is to write articles on Web development using WordPress,
in order to make your reading experience more enjoyable. Joomla, Drupal and other such themes. I would like to contribute
It really makes us feel great knowing how our readers have such articles to opensourceforu.com. I hope the content in these
benefited by reading OSFY. And as our readers have always would be beneficial to your specific audience. Let me know if
done, we urge you to continue sharing your views with us, as this is an option.
this motivates us and helps us to deliver even better.
—Reegan, reegan786@gmail.com
Missing subscription copy ED: It’s great to hear of your interest in writing for us! Before
I did not receive the February issue of Open Source For You doing so, you can send us the detailed Table of Contents (ToC)
magazine. Kindly let me know how to get it. at osfyedit@efy.in for the topic you want to write on. Our team
will review it, and once they give you the thumbs-up, you can go
—Sanjeevkumar Badrinath, sanjeevkumarrao@gmail.com ahead with the article.
Share Your
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@efy.in
Linux
The announcement was made by Linus Debeka and Oracle.
Torvalds on the Linux kernel mailing list. The announcement is a bit
Overall, everything is quite small and the
kernel 4.5
surprising as Microsoft offers its own
diffstat appears slightly bigger for an xfs IDE called Visual Studio. Besides,
fix, as that fix comprises three clean-up Microsoft plays an active role in the
refactoring patches preceding it. Eclipse ecosystem through its Azure
There is also an access type toolkit for Eclipse, along with Java
pattern affixed to the sound layer SDK for Azure which Eclipse users
which generates a lot of noise; can utilise for building their cloud
however, it’s pretty simple in the applications.
end. There are other random small
fixes all over. The kernel comprises a
shortlog, which is appended for people who would like to skim the details.
One can also get a great summary regarding all that is in the new version on
the ‘Kernel Newbies’ page.
agencies. We will also enable the brightest minds inside and outside of government
to review and improve our code, and work together to ensure that the code is secure, Microsoft releases
reliable and effective in furthering our national objectives.” source code for SONiC
The administration has launched the policy with the aim of fulfilling its Microsoft has released the
commitment to adopt a government-focused open source software policy, which source code for Software for
was originally proposed in its Second Open Government National Action Plan. Open Networking in the Cloud
The new law sets out open sharing guidelines for any new custom software that has (SONiC). This is used for
been built for the US government websites and systems. These could be developed running network devices like
internally or via contracted third-party vendors, apart from cyber security software. switches, and has been built
in collaboration with leading
networking industry vendors
Arista, Broadcom, Dell and
Mellanox.
This will help in building
switches that are rich in
functionality. And with SONiC,
the hardware’s functionality
and applications can reduce the
dependence on a proprietary
firmware through a traditional
networking vendor.
SONiC is based on
Microsoft’s Linux-based Azure
Cloud Switch (ACS) operating
The new policy states that prior to agencies officially commissioning a new system. ACS is also the brain
custom software development project, they must carry out a thorough ‘alternatives behind switches in Microsoft’s
analysis’ to determine whether there is a pre-existing software solution at another Azure Cloud. The code is
agency whose source code can be shared for any important task at hand. Agencies capable of running on various
will also need to find out and consider any off-the-shelf software solutions which types of hardware from different
may be available, before commissioning a custom project. equipment manufacturers and
Even though the new guidelines are not applicable for software programs which utilises a common C API – the
were contracted via third parties before the Source Code Policy got published, it Switch Abstraction Interface
strongly motivates agencies to take steps in making those applications available for (SAI) for programming the
shared inter-agency use as well. specialist chips in the networking
gear. This implies that ACS
Linux Foundation and edX bring the Free Open Source Cloud can be used for controlling and
Infrastructure Course managing network devices. It
The new Massive Open Online Course (MOOC) will permit individuals worldwide can also implement the features
to embark on lucrative careers by building and managing cloud technologies. The needed, irrespective of who has
Linux Foundation made an announcement that will enable mass innovation via open manufactured the hardware.
source. It announced its latest MOOC, which is open for registration. According to Azure’s CTO,
The MOOC is an introduction to cloud infrastructure technologies and is Mark Russinovich, “SONiC is a
conducted via edX, the non-profit online learning platform launched in 2012 by collection of software networking
Harvard University and Massachusetts Institute of Technology (MIT). The course components required to build
is free and will commence from network devices like switches.”
June 2016. The course is the SONiC can be downloaded
second edX MOOC being offered from Microsoft’s Azure GitHub
via the Linux Foundation. The repository under a mix of open
Foundation’s first course, an source licences, which include
‘Intro to Linux’, has attracted the GNU GPL and the Apache
over 500,000 students worldwide licence.
and continues to grow.
AIX is going to be open sourced by summer this year under an open source
licence. The announcement has come at a time when Google DeepMind has gained
attention for the Go games, which are being played by its AI program AlphaGo with
a key Go player, Lee Se-dol. AlphaGo has won three straight games of the five-game
match in Seoul, losing one to Se-dol.
With AIX, Microsoft is focusing on projects which involve general intelligence.
Microsoft feels it “…is more similar to the nuanced and complex way humans learn
and make decisions.”
According to Allison Linn, a senior writer at Microsoft, AI researchers are
developing tools which involve recognising words, for example. However,
researchers are not being able to combine these skills effortlessly as humans do.
Microsoft had acquired Mojang, the developer of Minecraft, in 2014. Linn
also stated that the AIX platform, which was developed by Microsoft’s lab in
Cambridge, UK, comprises a ‘mod’ for the Java version and code, which assists
artificial intelligence agents to sense and act within the Minecraft environment.
Both these components are capable of running on Windows, Linux or Mac OS, and
researchers can use any programming language to program their agents.
T
he annual PostgreSQL PGDay event was held on cost savings, with no compromise in performance or
February 26, 2016, at Courtyard functionality, was well received. Speakers
by Marriott in Bengaluru. from Inmobi, a company that has an
The event was a grand success with enterprise-scale usage of PostgreSQL,
over 150 attendees representing 50+ talked about performance tips to get the
companies. This number was more best out of this database, when used on
than double the last year’s number of a large scale. The talk around Postgres-
participants. What was also interesting XL, which is a distributed multi-master
to note was that almost 80 per cent of hybrid OLTP/OLAP offering, was also
the attendees were from outside the city. well received.
Robert Haas, well-known The event concluded with the DBA
PostgreSQL contributor, made the track, in which useful insights were given
keynote address, talking about the past, present into how to detect and avoid data corruption, apart
and future of this open source database. There were talks from inputs about DBA maintenance activities.
on Vacuum, foreign data wrappers, logical replication, etc, With an impressive sponsors list comprising
in the developer track. 2ndQuadrant, EnterpriseDB, GE Predix, Ashnik,
The speakers gave some great insights into customer Tashee Linux Services and OpenSCG, the event was
use cases involving PostgreSQL. The presentation by a grand success. The enthusiastic response augurs
speakers from the National Informatics Centre got the well for the increased adoption of PostgreSQL in the
most applause, thanks to its wholehearted endorsement years to come.
of PostgreSQL in a myriad projects, ranging from
police-FIR systems and education certificates to online Reported By:
appointments at government hospitals. The government’s Ashish Mehra, Nikhil Sontakke and Pavan Deolasee.
policy of supporting open source and the tremendous All three were a part of the organising team for the event
YOU SAID IT
CRIS BOOKS MORE, HAPPIER
PASSENGERS WITH INFRASTRUCTURE
POWERED BY RED HAT
CHALLENGE
• Support nearly 2 million passengers a day on over 2,500 trains nationwide.
• Developed the CRIS Journey Planner (JP), an application for passengers based on open JavaTM EE 6
Centre for Railway
Information Systems (CRIS) standards, which caters to 25,000 concurrent users and provides a high-performing, user-friendly,
and highly available interface.
www.cris.org.in
• Collaborated closely with Red Hat Consulting during the planning, execution, and implementation
of the projects.
GOVERNMENT INDUSTRY
BENEFITS
CUSTOMER SINCE • Gained an operational, state-of-the-art journey planning system in the most cost-effective
• Avoided vendor lock-in and achieved interoperability by integrating Red Hat Enterprise Linux
into the existing infrastructure.
SOFTWARE AND
SERVICES • Increased customer satisfaction by developing and launching a reliable, streamlined train journey
Red Hat Enterprise Linux planning system.
Red Hat JBoss® Enterprise
Application Platform
Red Hat Consulting “ We look to Red Hat for technology
leadership through updates and
HARDWARE support that help us to improve
10 servers of Intel Xeon New Delhi, India our application tuning so that we
6-core processor can give our customers the best
possible experience.“
SUNEETI GOEL
CHIEF PROJECT ENGINEER,
HEADQUARTERS PASSENGER RESERVATION SYSTEM GROUP, CRIS
facebook.com/redhatinc
@redhatnews
linkedin.com/company/red-hat Learn more about Red Hat customer successes: redhat.com/customersuccess
redhat.com Copyright © 2014 Red Hat, Inc., Red Hat, Red Hat Enterprise Linux, the Shadowman logo, and JBoss are trademarks of Red Hat, Inc.,
#12022727_v3_0414 registered in the U.S. and other countries. Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
CODE
SPORT
In this month’s column, we discuss the topic of automatic relation extraction from
Sandya Mannarswamy
I
n last month’s column, I had described certain siblings. Write an algorithm to determine whether
techniques for information extraction from the tree T contains A and B at the same level. What
unstructured texts using natural language is the execution time complexity of your code?
processing. In this month’s column, we take a break 5. You are given an array of size N. Each element of
from this and discuss a few interview questions in the array can take only one of the three values (0, 1
general computer science and data science. or -1). You are told to find the longest contiguous
1. Given an arbitrary integer N, how many unique sequence of 1s in the array. Write a C function to
binary trees can be created containing N nodes? find the start and end of the contiguous sequence
Can you come up with an algorithm which can of 1s in the array. Now you are told that you can
programmatically list all possible binary trees flip K contiguous sequence of (-1) to 1 where K is
consisting of N nodes? a dynamically provided input to the function. In
2. You are given two unsorted lists of integers. You that case, how would you determine the longest
are asked to create a sorted list consisting of all contiguous sequences of 1s in the array after
the elements in the two lists. Can you write an flipping K elements which were -1 to 1? What is the
algorithm for this? What is the running time of time and space complexity of your function?
your code, in the worst case? 6. Given an array of N integers, you are asked to find
3. You are given a list of N nodes in a tree, with each out whether the given array is an arithmetic series
node represented by an integer. For each node, you (a sequence of numbers where there is a constant
are also given the details of its parent node. You difference between any two consecutive numbers
are not given the edges of the tree explicitly, but of the series). What is the complexity of your
you are told that it is a binary tree. You are asked function? Now, you are given a modified problem
to write code to perform an in-order traversal of where your task is to convert a given array into an
the tree using this information. How would you arithmetic sequence by dropping off those array
solve this problem: (a) If you are told that you can elements which prevent it from being an arithmetic
perform pre-processing on the information and can sequence. How would you solve this problem?
use any amount of additional storage; (b) You are What is the time complexity of your function?
told that you can use only a constant amount of 7. Given an arbitrarily long character string, you are
additional storage. asked to find out the most frequently occurring
4. You are given an arbitrary tree T (not necessarily character as well as the least frequently occurring
binary), with each tree node containing a pair of character. Write a C function to solve this problem,
integers (X and Y). Each tree node can have an given a character string of size N. Now you are told
arbitrary number of children nodes, at each level that instead of being a fixed size character string,
of the tree. You are given two numbers, A and B, you are given a stream of characters which come
and are told to find out if the nodes N1 and N2 dynamically as input. At any point in time, you
containing the integers A and B are located at the should be able to print the most frequent and least
same level of the tree. Note that N1 and N2 can frequent characters in the stream (note that if two or
be two separate nodes or be the same node. It is more characters have the same highest frequency,
only required that N1 and N2 should be located you can choose to print any of them as the most
at the same level of the tree, and they need not be frequent characters). What is the time and space
Anil Seth
Visualising Data Using googleVis
Viewing statistics in motion charts can be great fun. This article
describes how googleVis software can be used to view motion
charts. The author gives the reader an interesting example of data
picked up from the Bombay Stock Exchange and how it can be
viewed as a motion chart.
V
iewing statistics can be an exciting experience. If a sample session in ‘An Introduction to R’ which is included
you are surprised, look at one of the motion chart in the R distribution. You can access the built-in help
presentations by Hans Rosling, at his TED talk https:// including the introduction as follows:
www.youtube.com/watch?v=RUwS1uAdUcI. The software
behind the presentation of motion charts was acquired by > help.start()
Google and integrated into the Google Charts API. starting httpd help server ... done
Normally, I would have experimented with the Python
API. However, I came across the R package ‘googleVis’ This will bring up HTML documentation. You can
on GitHub and decided to experiment with that instead. It navigate to ‘Appendix A: A sample session’ in ‘An
provides a motivation to experiment with R. Introduction to R’.
R is a statistical tool, which assumes considerable
significance in the context of making sense of Big Data. Exploring googleVis
Now, let’s get back to understanding and exploring the
Installing googleVis googleVis package.
You need to install R and then the googleVis package under ‘Fruits’ is a data frame included in the distribution
R. For example, on Fedora, use the following commands: of the googleVis package. The command data() will list
all the data frames available. However, we are currently
$ sudo dnf install R interested in the googleVis package only. So, find out the
$ sudo R data frames available in googleVis, load Fruits and print its
>install.packages(“googleVis”) contents as follows:
You can learn more about googleVis in the R SmallCap and IT indices, the properly organised data will
interpreter, with the following: look like what follows:
help(googleVis) which will give a brief description of the
package and guide you to further information about it Date Index Open High Low Close Hi-Lo
demo(googleVis) which will guide you through 2016-02-29 Sensex 23238.5 23343.22 22494.61 23002 848.61
examples of charts included in the package, including 2016-02-29 Midcap 9584.31 9651.77 9389.35 9575.1 262.42
gvisBubbleChart and gvisMotionChart 2016-02-29 Smallcap 9567.63 9594.03 9399.43 9548.33 194.6
vignettes(googleVis) which will give you an introduction 2016-02-29 IT 10488.4 10507.62 10044.59 10229.49 463.03
to the package
Save this sheet in CSV format as BSE-indices.csv. This
Experimenting with stock market indices file can be easily imported as a data set in R, though the date
The next step is to use your own data. An easy and interesting field needs to be explicitly identified.
resource is to download historical indices data from the BSE
(Bombay Stock Exchange) site. You can save the data as CSV > D=read.csv(“BSE-indices.csv”, header=TRUE,colClasses=c
files. The daily data will look something like what follows: (Date=”Date”))
> M <- gvisMotionChart(D,idvar=”Index”,timevar=”Date”,
Date Open High Low Close sizevar=”Hi.Lo”)
1-January-2016 26101.5 26197.27 26008.2 26160.9 > plot(M)
4-January-2016 26116.52 26116.52 25596.57 25623.35
5-January-2016 25744.7 25766.76 25513.75 25580.34 Notice that the ‘Hi-Lo’ becomes ‘Hi.Lo’ in R. This value
is used as the default value for the size of the bubble in the
You can merge and organise the data from the various above chart. The chart will open in a browser window and
CSV files in a spreadsheet so that it is suitable for importing needs Flash Player. Figure 1 shows the initial image.
in R. The YMD date format is very convenient as there is The Open column is used as the x-axis and the next
no ambiguity. You may want to add a column that shows the column, High, is used as the y-axis. However, the columns
difference between the high and low values as an indicator of used for the x and y axes can be changed in the chart. The
volatility. Suppose you want to look at the Sensex, MidCap, colours for various indices can also be changed. If you
MotionChartID272865...
MotionChartID2722865...
127.0.0.1:15264/custom/googleVis/MotionChartID2728658d2e73.html
127.0.0.1:15264/custom/googleVis/MotionChartID2728658d2e73.html
10,000
Bank, 1/1/16 1000
Size
20,000 Select Deselect all
20,000 Hi.Lo
Bank
Health
1000
IT
Select Midcap
Bank Sensex
15,000 15,000
Health Smallcap
IT
Trails
Midcap IT, 1/1/16
Sensex
Smallcap
10,000 10,000
Close
Trails
High
Data: D • Chart ID: MotionChartID2728658d2e73 • googleVis-0.5.10 Data: D • Chart ID: MotionChartID2728658d2e73 • googleVis-0.5.10
R version 3.2.3 (2015-12-10) • Google Terms of Use • Documentation and Data Policy R version 3.2.3 (2015-12-10) • Google Terms of Use • Documentation and Data Policy
Figure 1: Initial display of a chart Figure 2: A chart showing some trails as the bubbles move in time
click on the Play option, the values and bubble sizes will
MotionChartID272865... change with time.
127.0.0.1:15264/custom/googleVis/MotionChartID2728658d2e73.html Change the x-axis column to Date, the y-axis column
to Closing and colours to Unique. Select Bank, IT and
12,500 Color
Sensex indices for showing the trails. You can see the
Lin
9,000
Jan 2016 Feb 2016
discussed above help you make sense of it all.
Time
2/29/16
By: Dr Anil Seth
Data: D • Chart ID: MotionChartID2728658d2e73 • googleVis-0.5.10
R version 3.2.3 (2015-12-10) • Google Terms of Use • Documentation and Data Policy The author has earned the right to do what interests him. You can
find him online at http://sethanil.com and http://sethanil.blogspot.
com, or you can reach him via email at anil@sethanil.com.
Figure 3: After zooming in, a chart showing some trails of the movement of bubbles
For the first time, it will display the above error. Ignore this
as sufficient data is not available for display.
Similarly, add the second interface, i.e., eth1, as follows:
T
here are occasions when it is useful to know your [root@sun ~]# vnstat -u -i eth1
bandwidth usage pattern. This not only helps Error: Unable to read database “/var/lib/vnstat/eth1”.
administrators to detect the root cause of traffic related Info: -> A new database has been created.
issues, such as a network overload, but also helps them to
keep a tab on traffic flow to and from the Internet, and the Method for updating the database
charges levied by the ISP for the bandwidth used. The database can be updated by either using cron or service.
This is an important task which requires dedicated and Cron: To use cron, just remove the comment from /etc/
effective software. vnStat is just the tool for that. It is a cron.d/vnstat, after which the entry should be as shown below:
lightweight (command line) network traffic monitor, which
provides several output options like summaries on an hourly, #vi /etc/cron.d/vnstat
daily, monthly, weekly or ‘top 10 days’ basis. It can monitor MAILTO=root
selected interfaces, stores network traffic logs in a database */5 * * * * vnstat /usr/sbin/vnstat.cron
for further analysis and can be used without root permission.
:wq save and quit
Prerequisites for installation Service: The second method uses vnStatd a program that
I have chosen a system with Centos version 6.7 (equivalent to collects all the information and is run as the daemon. You can
RHEL 6.7) with minimal installation, which acts as a gateway start it with executing below command:
through which eth0 is connected to the Internet and eth1 is
connected to the local network. First, install all the required [root@sun ~]# /etc/init.d/vnstat start
packages and dependencies for vnStat and the PHP Web
frontend using the Yum utility. Enable service at boot time
[root@sun ~]# yum install wget epel-release php httpd [root@sun ~]# chkconfig --level 345 vnstat on
php-gd
To start traffic monitoring for selected interfaces, start
Installation vnstat service.
To install vnStat, execute the command given below in a
terminal: [root@sun ~]# cd /usr/local/src
[root@sun ~]# yum install vnstat Download the latest vnStat PHP frontend
Make sure that the correct local time zone is set in php.ini.
Edit php.ini and set date.timezone =”Asia/Kolkata” References
[1] http://humdi.net/vnstat/
[root@sun src]#vi /etc/php.ini [2] http://linuxaria.com/recensioni/monitot-your-bandwidth-
date.timezone =”Asia/Kolkata” on-linux-with-vnstat>
[3] http://www.sqweek.com/sqweek/index.php
[4] http://www.thegeekstuff.com/2011/11/vnstat-network-
Now enable web service at boot
traffic-monitor/
M
ost of you are probably active users of various maintain two backup copies of data. In other words, I have the
services like Gmail, Flickr, Google Photos, Apple actual data in local storage, as well as a backup of the data on two
iPhotos and Instagram, or at least, must be aware different portable HDDs (hard disk drives). Due to this approach,
of them. Many of you might also be users of digital storage I need to use a well-defined and simple backup process.
options like Dropbox. While these services do give you the
flexibility of easy availability of data anywhere in the world A survey of personal backup solutions
(assuming you have the bandwidth to access the data), you Over the years, I have used many methods to maintain backup
need to maintain a local copy (on your laptop or desktop) copies of data. The first method obviously was to maintain a
of all your data, much as vendors may try to convince you copy of each file. Then I started storing compressed versions
that all the data is safe with them. In case the local copy gets of the data and using a timestamp for each backup. Just as
corrupted, one can always depend on cloud storage. enterprises have had to address the Big Data explosion, I too
While data stored in the cloud is mostly safe, there have been have not been immune to the problem of large volumes of
cases where the cloud service provider has accidentally deleted data. Due to data volumes and the frequency of changes, the
user data. Additionally, data can be lost in case there is a data timestamp method of maintaining backups is not practical.
breach and the cloud provider’s service gets compromised or Additionally, each zip archive ends up with one copy of the
passwords get stolen. Considering these possibilities, some of us file and when a particular copy is needed, it is difficult to
are not comfortable in relying entirely on cloud services. figure out the most relevant copy.
Personally, I make limited use of cloud-based storage I also tried using version-control software like SVN.
services and mostly depend on keeping data in local storage. The problem with version control is that it’s sub-optimal
Having made the decision of ‘going local’ I need to take steps to for binary data. In other words, version control is best
ensure that the data is properly backed up, so that I will have a suited for text files, where versions are stored using the
copy of the data, in case the primary storage fails. For important ‘difference’ method. In the case of binary files, most such
things like photographs, email and financial documents, I solutions simply copy the binary file into the repository, as
finding a ‘difference’ between two binary files is not simple command line. I can almost hear you grumble: “Ew! The
and straightforward. Ideally, version control software, when command line. How can you even recommend a command
used, should be hosted on a separate server, which is not an line application in these days of GUI systems?” But, in my
option at home. Additionally, maintaining the repository on an experience, this command line interface provides me the
external HDD was next to impossible. maximum flexibility.
Then I started searching for personal backup software that On my local machine, I always have a JVM instance
would allow me to maintain backups of data and that, too, on available either as a JDK or a JRE, along with a properly
external media like a portable HDD. I tried multiple solutions, configured PATH variable and a JAVAHOME variable. To
two of them being Microsoft SyncToy and Cobian Backup. make the task of backing up easier, I have created batch files
While I liked each of these tools (with a preference for Cobian that contain the backup command (using Sync). The batch files
Backup), I found that the GUI interface, and the way these tools are then stored on the portable device. Thus, whenever I wish to
stored the backup commands, created a problem that needed take a backup, I simply connect the portable device and execute
additional effort each time I wished to use the tools for backup. the backup script. As the source directory does not change
While using these tools, I faced a problem with the backup (being local storage) and the destination directory is specified
commands due to the way Windows uses external media. using a relative path, the batch scripts do not need to be edited –
Whenever external media is connected to a computer, there is irrespective of what drive letter is assigned to it. When launched,
no guarantee that it will be assigned the same drive letter as the script executes in a dedicated command prompt and I can
the one assigned the last time the media was connected. For continue with other activities. I only need to monitor the progress
example, if the connected media is assigned the drive letter once in a while. Once the backup is complete, I go through the
H: today, there is no guarantee that it will be assigned the log file to check for errors and my backup work is done.
same drive letter tomorrow. If you have other media already By using a Windows batch file, my backup activity is
connected, the portable HDD will get assigned the next reduced to a double click or an ‘Enter’ key-press, which is all
available drive letter. As the backup commands configured that’s needed to launch the script. The scripts have made the
in these tools refer to an absolute path that includes the drive task so simple that even after maintaining two backup copies
letter, the command does not work if the drive letter is different. of my personal photographs, email and other documents, the
If the external HDD is assigned a different drive letter, you will only trouble I face is that of maintaining a regular schedule to
have no choice but to edit the backup command to point it to keep the backup copies suitably fresh.
the present drive letter. Now imagine the effort needed if such
changes have to be applied to multiple backup commands, each Using Sync
time you wish to take a backup. To use Sync, the command format is as follows:
While searching for more tools, I came across a simple
backup tool, namely, Sync (alternately named Syncdir). java -jar Sync.jar <switches> [“Source”] [“Target”]
Figure 1: Taking backups for the first time Figure 2: Updating the backup. New files added
@echo off
Figure 3: Updating the backup. A file has been updated set SYNC_HOME=./Sync.jar
rem deleting existing log file
[“Target”] is modified and, by default, the file name, size, del log\%1.log
last-modified time and a CRC-32 checksum of the file are java -jar Sync.jar --log:log/%1.log --force %2 %3
used to match files. If [“Source”] is a directory, the source echo Backup for %1 done.
and target directories are matched recursively. Matched
target files are time-synced and renamed if necessary; Batch script: backup-doc.bat
unmatched source files are copied to the target directory Given below is the script that takes a backup of the ‘doc’
and unmatched target files and/or directories are deleted. directory and uses the generic script for this purpose.
If [“Source”] is a file, source and target files are matched,
while ignoring the file name. If the files match, the target file @echo off
is time-synced and renamed if necessary; if the target does set NAME=doc
not exist, the source file is copied to the target. call sync-generic.bat %NAME% D:\%NAME% .\%NAME%
pause
A few switches
Some of the switches that can be used with Sync are: While there are many personal backup solutions, my
-s, --simulate Simulate only; do not modify target tool of choice is Sync – a Java based command-line tool.
Though it does not have a fancy GUI, it helps me maintain
--ignorewarn- Ignore warnings; do not pause backups with little effort. To make the task of backing up
ings easier, I use Windows batch files, which only require me to
-l, --log:<”x”> Create log file x; if x is not specified, double-click (or press an Enter key) the script, to kick off
sync.yyyyMMdd-HHmmss.log is used the backup process.
S
amba is an open source network file system. It allows A Microsoft RPC call, the name service switch (NSS),
access to shared resources across the different OSs and pluggable authentication modules (PAM) allow this
such as UNIX, Linux, IBM System 390, OpenVMS, daemon to achieve this. This allows Windows NT domain
etc. It is an open source implementation of Microsoft’s users to access a UNIX machine as UNIX users. The
SMB (Server Message Block)/CIFS (Common Internet File winbind service controls the behaviour of the winbindd
System) protocol. daemon. It doesn’t require the smb service to be started.
It is a client side service, which is used to connect to
The main components of Samba Windows users.
Samba is made of three daemons (smbd, nmbd and Samba also contains several important files.
winbindd). There are two services (smb and winbind) that smb.conf: This basic configuration file can be edited
control the behaviour of daemons. directly with a text editor or via a utility program like
smbd: The server message block daemon provides SWAT or Webmin.
sharing and printing services over the network. It also smbpasswd: This contains the names of users to which
controls resource locking, user authentication and data smbd will refer when it is time to enforce user-level
sharing through the SMB protocol. The Samba server access control.
listens for SMB traffic on the default TCP ports, 139 smbusers: This provides the names of Samba’s
and 445. administrators and of users with specialised Samba access.
The smb service controls the behaviour of the smbd
daemon. Samba’s features
nmbd: This provides NetBIOS names over the network. The primary features of Samba are shown in Figure 2.
It allows the browsing protocols to make up the Windows The other features are:
Network Neighborhood view. The Samba server listens Establishes shares on UNIX that are accessible to
for NMB traffic on the default UDP port 137. The smb Windows users
service also controls the behaviour of the nmbd daemon. Shares printers
winbindd: This resolves user and group information Creates a naming scheme so one can use user-friendly
on a server running Windows NT 2000 or Windows names rather than IP addresses
Server 2003. It renders Windows user/group information Makes UNIX a Windows Internet Naming Service
in a format that is understandable by UNIX platforms. (WINS) server
groupaddsmbgrp
● Provides NetBIOS names over the network To add a user into a group, use the command
nmbd ● Controlled by smb service
given below:
[GLOBAL] [GLOBAL]
security = share ...
security = ADS
User-level security: This is the default setting for Samba. realm = test.COM
It is used by Samba, even if the security = user directive is password server = kerberos.test.com
not listed in the smb.conf file. Once the server accepts the
user name/password, the user can then access multiple shares Server security mode: This is used when Samba is not
without entering the password for each instance. capable of acting as a domain member server. In smb.conf,
In smb.conf, the security = user directive that sets user- this mode is achieved by using the following directives:
level security is:
[GLOBAL]
[GLOBAL] ...
security = user encrypt passwords = Yes
security = server
There are different implementations of user level security password server = “pwd”
(see Figure 3).
Domain security mode: In this mode, the Samba
server has a domain security trust account, which ensures
all authentication requests are handled by domain References
controllers. [1] https://www.samba.org/samba/
[2] https://docs.fedoraproject.org/en-US/Fedora/12/html/
It can be achieved by using the following directives in
Deployment_Guide/ch-samba.html#samba-rgs-overview
smb.conf: [3] http://www.fredshack.com/docs/samba.html
[4] https://access.redhat.com/documentation/en-US/Red_Hat_
[GLOBAL] Enterprise_Linux/5/html/Deployment_Guide/ch-samba.html
[5] https://help.ubuntu.com/lts/serverguide/samba-fileserver.html
...
[6] http://www.linuxtopia.org/online_books/network_
security = domain administration_guides/samba_reference_guide/index.html
workgroup = MARKETING
S
torage is a key requirement these days and has to be entity. With distributed storage, Ceph allows the distribution
thoroughly planned, keeping in mind performance, of the load, which delivers the best possible performance
future enhancements, scalability and availability, from low cost devices. All this contributes to low cost
as all these factors directly impact the functioning of the hardware, high data efficiency, broader storage use cases and
system. With the recent advances in cloud computing, the greater performance. These are some of the major benefits of
need for storage has been broadly classified into three Ceph, because of which it has been widely adopted recently
major types—object store, block store and file system by enterprises and cloud service providers. Major storage
store. Ceph is an open source, reliable and easy-to-manage, vendors like SanDisk and other enterprises like Red Hat have
next-generation distributed object store based storage contributed significantly to Ceph’s development. So let us
platform that provides different interfaces for the storage take a closer look at it.
of unstructured data from applications.
Ceph, being an object store, provides an interface for Architecture and design
all three types of data storage, i.e., object store, block store Ceph is a scalable storage cluster based on RADOS (reliable,
and file based store, hence giving a unified storage platform. autonomic distributed object store), which is a self-healing
Ceph is the best example of software-defined storage (SDS). and self-managing distributed object storage system. It has
Analogous to the principles of cloud computing, Ceph scales two types of nodes, Ceph Monitor and Ceph OSD. A Ceph
out using commodity hardware, considering the challenges Monitor node maintains the state of the cluster map to check
of scaling up. This helps us define different hardware for for node availability, and provides the cluster map to the
different workloads, and manage multiple nodes as a single cluster clients. A Ceph OSD Daemon is an intelligent peer,
WWW.EFYMAG.COM
WWW.EFYMAG.COM
36 | APRIL 2016 | OPEN SOURCE FOR YOU | www.OpenSourceForU.com
Insight Admin
“There’s never enough of storage, no matter how big a disk you have,” seems to be the refrain of
all computer users. There are, of course, various solutions to tide over this problem, especially
now, with the arrival of cloud computing. This article takes the reader through the steps required
to create a file storage system and its management. It could well set you up as a STaaS (Storage
as a Service) provider in cloud computing.
W
e can’t deny the fact that the traditional model large organisations and even small businesses to centralise
of data management and hosting has changed, not only their storage but also everything they came across
and users now want their data/resources to be in the IT world. Due to the rapid increase in structured and
centralised. This is possible because of the innovation of non-structured data, there is the need for good management
virtualisation technology. It has become much easier for of storage, without a waste of resources.
If we talk about Storage as a Service (STaaS) in cloud not even take 1MB of your disk space but in its property, it
computing and if you are a cloud service provider, then will show 10GB as that is the allocated space. So let’s start
a lot of your resources get wasted once fixed storage the procedure.
space is allotted to a client. Most of this space is rendered A sparse file can be created by either using the truncate
useless since the client doesn’t use some of it and you are or the dd utility in Linux (other tools are also available).
not allowed to use it either. To solve this or to minimise
problems like this, it is preferable to use file data storage $truncate --size=1GB test.img
as a shared storage solution rather then object storage or a
storage attached network (SAN). The above command will create a 1GB sparse image test.img.
In this article, I will try to lead you through the To get the same result with dd, use the following command:
procedure of using and managing a file storage solution and
also qemu-img virtualisation. I will even try to take you $dd if=/dev/zero of=test.img bs=1024 count=0
through some new techniques of disk virtualisation, which seek=$[1024*1000]
can be really useful at some point for your cloud server. I
have used simple techniques, which can be easily understood Here, bs is block size and the size is provided by seek.
and are not very striking but will really help you at different You can also use the following code for simplicity:
levels of storage system development.
All the tools used are generally available on most $dd if=/dev/zero of=test.img bs=1 count=0 seek=1G
Linux systems; if not, these can be easily downloaded
via your default online repository. The tested system for If you want to allocate the whole disk space at once
these commands is RHEL 7.0, but they will work on other (which is not a good solution in our case), you can use
Linux systems in the same way, with a little modification. fallocate, as follows:
$losetup -a | tail -1 You will find that there is no change in the mounted space,
since the loop device has not detected the increased size.
After creating the loop device, it’s time to format it. You To make the loop device detect this, it will first have to be
can use any file system, but I recommend using the ext2 file checked by e2fsck, using the following command:
system (the reason will be explained later).
To format, use mkfs utils: $e2fsck -f test.img
$mkfs.ext2 /dev/loop0 After that, since the file system is only made on a 1GB
partition, it has to be resized. However, we don’t want data
If you are working on big data management, then the xfs to be lost or deleted and can’t handle the break in service
file system is preferred, because it works well on handling large by unmounting it for even a few seconds. So we need to do
files and supports larger inode data. Now you can mount it to online resizing by using the command given below:
use as your virtual storage, which can be shared, as follows:
$resize2fs test.img
$mount /dev/loop0 /mnt/
We have specially used the ext2 file system, since
To share it across the network using a service like nfs, online resizing and file checking only works perfectly for
open /etc/exports and use the following command: this file system with resize2fs utility. This will make our
file partition ready for use. However, all these changes
/mnt/ *(rw,rsync,no_root_squash) have not yet been detected by the loop device; so the same
operations have to be done on it.
Close it and restart the nfs service by using the command
given below: $losetup -a |grep mnt
$losetup -c /dev/loop0
$service nfsd restart
Once you put the data inside the device, you can
check its original occupied size by using the qemu-
img utility, as follows:
$du -h test.img
…or:
$rsync -avz test.img test_backup.img You can even use rsnapshot for incremental backup.
Snapshots of the storage data: Snapshot is a facility
This will create a test_backup.img file with the same data available in different Linux distros to save your storage
blocks. So every time you run this command, new changes made at particular stages. It can be a useful feature for STaaS
since the last backup will get saved in test_backup.img. providers, because it will help your storage to revert back to
any previous state. Snapshot is different from backup because
Warning: it doesn’t take up your storage space until changes are made
in the storage. To save space, it just copies the files that have
If you create the backup image of your file system
been deleted. For our file storage, we will be using the qemu-
through rsync, the backup file will not be a sparse file; so
it will allocate all of the space at once. img utility for a snapshot. So first create a new snapshot of
your storage, as shown below:
Although this looks simple, it is not a very efficient solution
since once data starts overwriting in some blocks in the original $qemu-img snapshot -c backup_snapshot test.img
-c is used for creating a new snapshot. To revert back to a # cryptsetup close my_encp.raw
particular state, use the following command:
$qemu-img snapshot -a 5 test.img Note: You can do the same disk scaling and
other operations on disk, but now you need to make
…where 5 is the snapshot ID. To see all the available changes to /dev/mapper/my_encp.raw rather then /dev/loop0.
snapshots, use the command given below:
Using a file storage virtual machine: A great benefit of
$qemu-img -l test.img file storage is its use as a base storage for virtual machines.
Once you decide to use a file storage for an OS run on a
To delete a snapshot, use the command shown below: virtual machine, other operations like scaling and encryption
can also be applied to it. To create a virtual machine instance
$qemu-img snapshot -d 2 /images/sles11sp1.qcow2 from our already created storage, let’s use the qemu-kvm
utility, as shown below:
Securing your virtual storage: The other advantage of
using file storage is that it’s easy to ship like a container. But with $qemu-kvm -name “my_os” -m 1024 -smp 2 -drive file=test.
shipping comes the responsibility of securing your storage. So a img,if=virtio,\
good solution for securing your virtual data storage is to protect index=0,media=disk,format=raw -drive file=ubuntu-14.04.
it by using encryption, for which you will need a password every iso,index=1,media=cdrom
time to mount it. For encrypting your storage, let’s use dm-crypt.
We will try encryption on fresh file storage, as follows: This will start a new virtual machine with the minimal
option selected. Here, -m defines the amount of RAM
$truncate encrypted.raw --size=2GB allocated and -smp refers to the number of cores. You can read
about more available options in the qemu-kvm man page or
Next, set up a LUKS header, as follows: by using qemu-kvm –help. To start an already created virtual
machine, use the following command:
$cryptsetup luksFormat encrypted.raw
$qemu-kvm -name “my_os” -m 1024 -smp 2 -drive\ file=/images/
sles11/hda,if=virtio,index=0,media=disk,format=raw
Warning:
Don’t try this with an already formatted partition because File storage can be a good solution for your enterprise
it will delete all the previous data inside the partition. environment or personal use, but what matters is how you make
it useful at a different level of your cloud solution. Storage
This will prompt you to enter a fresh password. To gain management in the case of file storage doesn’t end here since
access to the device, use the command given below: there is a lot more you can do with it. It can be a powerful as
well as flexible solution for storage management, but requires
$cryptsetup open encrypted.raw my_encp.raw thorough knowledge to get the job done.
B
ackup and recovery of heterogeneous data files Configurability with scope for extension using plugins
is one of the key aspects of personal as well as Command line as well as GUI panels for usability
corporate computing. In our routine tasks, we create Transaction fault tolerance to avoid data loss
and update a number of Being volume oriented
files in our systems. But to support compression,
the major problem occurs splitting and merging
when the operating system for multiple devices and
crashes or any media stalls. platforms
This issue generates huge Malware scanning
complications and, many Universal view and
a time, our work stops. updates
Often, we have to create the Cross platform
files using backup, recovery Support for multiple
and disaster management data formats
tools and techniques. Support for multiple
A number of tools are databases
available in the open source Generation of reports,
as well as the proprietary alerts and logs
domain, which provide
secured backup, fast Free and proprietary
recovery and fault tolerance. software backup
The key challenge in tools
disaster management arises A number of software
when the operating system crashes and when we are not able tools are being used in personal as well as commercial
to load the OS to execute the recovery tool. In such scenarios, domains for backup of files and documents. Table 1 shows
we can work with bare metal backup and recovery tools so Linux based free software with command line interfaces.
that there is no need to even load the operating system. Using
these tools, the backup, recovery and disaster management Program/Tool Base language
can be achieved at the BIOS level itself. AMANDA C and Perl
Areca Backup Java
Features of effective backup and duplicity Python
fault-tolerant tools rdiff-backup Python
Some of the major features generally required for personal as Attic Python
well as corporate computing are: Bacula C++
Bare metal recovery and fault tolerance Back In Time Python
Non-redundant or de-duplicated backup DAR C++
Security and privacy using multi-level encryption luckyBackup C++
Dynamic compression and archiving Mondo Rescue C and UNIX Shell
Dynamic repository management obnam Python
Automatic/scheduled backups Syncthing Go
Cloud based backup and recovery Unison OCaml
Import and export for multiple platforms
Version tracking Table 1
Figure 4: Network based storage in Redo Backup and Recovery Backup to:
Mondo Rescue
CD-R disks CD-RW disks
URL - http://www.
Configuration of disk drives can be done graphically with DVD Disk USB Key/Disk mondorescue.org/
the number of inbuilt tools Tape drive NFS mount
Mondo Rescue
Besides the enormous features for backup, the tool is a reliable and
includes a number of additional and powerful programs, widely used disaster
Hard disk Exit
featured in Table 3. Pleasechoose the backup media to which you want to archive data.
recovery software.
Chromium fsarchiver It is used for the
baobab Chntpw Figure 7: Different options and backing up of GNU/
cryptsetup drivereset features of Mondo Rescue Linux based systems
hdparm lshw-gtk to different types
geany gnome-disk-utility of storage media. Mondo is used by Lockheed-Martin,
gparted Smartctl Siemens, Nortel Networks, IBM, HP, NASA JPL, the US
photorec Rsync Department of Agriculture and many other organisations
scp Grsync worldwide. Mondo supports RAID, LVM 1/2, ext2, ext3,
partclone Ssh ext4, XFS, JFS, ReiserFS, VFAT and other assorted file
partimage Testdisk systems without any issues. It supports software as well
as hardware RAID. This tool is packaged with many
Table 3
distributions and flavours including Fedora, SLES,
FOG project RHEL, openSUSE, Ubuntu, Gentoo Mandriva, Mageia
URL - https://fogproject.org and Debian.
FOG is another very powerful system imaging tool that is
free, open source and based on Linux. FOG can be used with Rear (Relax-and-Recover)
PXE and TFTP without any boot disk or CDs. With it, the URL - http://relax-and-recover.org
system is booted using PXE and automatically a small Linux Relax-and-Recover or Rear is another bare metal
client is downloaded, after which many operations can be disaster recovery tool that is very easy to install and set up
performed on the system. without any maintenance overheads.
The features of FOG include: The features of Rear include:
It is free and open source Modular design, written in Bash
• Easy to extend with custom functionality
• Targeted primarily at sysadmins
Offers the ‘Set up and forget’ style of operation
• Easy to install and set up
• No maintenance issues
Recovers the images based on original distribution using
original tools
Two-step fault tolerance and recovery
Bare metal recovery on different types of hardware
Support for
• Physical-to-virtual (P2V)
Figure 5: The FOG project’s official portal • Virtual-to-physical (V2P)
A storage system for data is one of the things that most computer users need. Solutions
vary from the DIY kind to expensive cloud storage. This article points the reader to
Rockstor, a DIY network attached storage (NAS) system.
C
ommon complaints from prosumers and small Hardware requirements for building a
business owners with respect to storage systems are: storage system
a server or hard disk tends to crash when it matters When it comes to building your Linux based storage system,
most; one often runs out of storage space at the wrong time; there are three approaches you could take:
and the challenges in selecting the best storage solution from 1. Assemble a NAS from components
myriad options. Eventually, many users end up choosing an 2. Build on top of pre-built servers or old hardware, or even
inappropriate storage solution for their needs. a hypervisor
This article guides you on how to select an appropriate 3. Buy a pre-built Linux NAS box from a Linux NAS distro
storage solution. It also describes an easy way to build a provider
complete storage system using inexpensive hardware and Assembling a DIY NAS from components: This
Rockstor, a CentOS based Linux distro. approach is recommended for prosumers who are tinkerers
By the end of this article: at heart and like to experiment, build and break stuff. The
1. Prosumers will learn how to build a storage system advantage of this approach is its low cost, a high degree of
using Rockstor. control and the thrill of building a NAS. The disadvantages
2. Small and medium business users will be able to of this approach are that it’s time consuming and needs some
determine whether a Linux based DIY NAS or a dedicated degree of technical expertise.
NAS server (Rockstor Pro 8) is appropriate for their needs. If you decide to take this approach, the following are
Compression Dont enable compression Compression Inherit from pool wide configuration
0.0 GB 500.0 GB
Selected disks summary 1 x 931.50 GB 931.50 GB
Select disks No. Disk Name Capacity Select all (0.0 GB) Space that is provisioned for other shares, but currently free
1 sdb 232.90 GB
(0.0 GB) Space that is provisioned for other shares and is in use
2 sdc 931.50 GB
Cancel Submit
Cancel Submit
B
efore we get started, a word of caution. instructions written from top to bottom.
Understanding Promises could be as difficult as Another drawback of the callback function is called
making sense of the Christopher Nolan movie Pyramid of Doom. As we go on nesting multiple callbacks,
‘Inception’. This article is an attempt to simplify the it becomes difficult to debug. Some nested callbacks
topic as much as possible. The attempt is to go might result in an exception, and tracing
beyond syntax and show examples on why exceptions is a nightmare.
Promises are indeed needed.
Promises are required if your Promise
application performs operations such Promise is a place holder for a future
as database access, file access or value. This is because we want to
fetching user data from the online store the results of an asynchronous
APIs of Twitter. These operations operation. Promise is an object. The
could take variable amounts of time. syntax below is used to create a
Waiting for these calls to complete Promise.
could stall the application for a few The syntax is:
seconds or freeze the UI. The result
of the operation could even be an new Promise (function)
error, after a long wait and another retry
attempt. Hence, it is better to make these calls Given below is an example of how to create
asynchronous (not wait for the results). a function that returns a Promise. We have converted
an asynchronous fs.readFile() operation into a Promise.
JavaScript callbacks
JavaScript began as a browser language, with the primary task 1. function readFile(filename) {
of handling user events such as a mouse click. The language 2. let p = new Promise(function(resolve, reject) {
has excellent support for event-driven programming. In this 3. fs.readFile(filename, function(err, contents) {
language, functions are first class citizens, which means you 4. if (err) {
can use a function where any other primitive data type fits. For 5. reject(err); // error case
example, a function can be passed as an argument. A function 6. }
can also return a function. A callback is a function that 7. resolve(contents);
will get executed upon an event. It is common for frontend 8. });
developers to write many callback functions on mouse events 9. });
like onClick, onmousedown, etc. The functions (callback) get 10. return p;
called upon mouse events. 11. }
Another important point to note is that JavaScript is
single-threaded. Any operation (function call), which takes Line 2: Creates a new Promise object. The object ‘p’ gets
time, should be asynchronous. a value after reading the file.
Let’s take an example of a callback. Line 3: A Promise takes a function. The function in turn
takes two functions ‘resolve’ and ‘reject’ as parameters. For
1. var fs = require(‘fs’); all successful cases, it executes ‘resolve’. For error scenarios,
2. fs.readFile(‘readme.txt’, printfile); the second parameter function is executed.
3. function printfile(err, filecontents) {
4. console.log(filecontents.toString()); Promise states
5. } Promise has states. Initially, when a Promise is created,
it is in the pending state. This is the initial state. Once the
printfile() is a callback function, which would be called asynchronous operation completes, the Promise moves to the
after a read operation. One drawback of a callback function resolved state. There are two possible states within ‘resolve’.
is that the flow of execution is different from the sequence of These are: ‘fulfilled’ and ‘rejected’. A successful result of a
Line 16: This invoked the function readFile(), which Promises with arrow functions
returns a Promise. In previous articles in this series, we covered another feature
Line 18: After the file contents are read, the Promise of ES6 called arrow functions. They come handy when used
comes to the resolved state. For a successful file read, fullfill() in combination with Promises.
gets executed. For an error scenario like the file not existing, The earlier program, from Lines 8 to 16, can be modified
‘reject’ gets executed. to use anonymous functions, as follows:
One of the advantages of Promise is chaining, which is
done by appending multiple .then() functions. You can also promise.then(function (contents) {
have one error handling function using .catch(). Line 18 can console.log(contents.toString());
be changed to what’s shown below: }, function (err) {
console.log(err.message)
promise.then(fulfill).then(process).then(processFurther); });
This can further be enhanced to:
…or, what follows: promise.then((contents) => {
<html>
GNU Emacs, the reader is
taken on a journey through
HTML mode, indentation in
HTML code and Magit —
the magic interface to Git,
inside Emacs.
T
his article in the GNU Emacs series takes readers on <a href="mailto:user@hostname">shakthi</a>
how to use HTML mode, do indentation, and use the </address>
Magit interface. </body>
</html>
HTML mode
You can use HTML mode to effectively edit HTML and CSS Tags
files using GNU Emacs. To start the mode, use M-x html- You can enter HTML tags using C-c C-t. GNU Emacs will
mode. You will see the string ‘HTML’ in the mode line. prompt you with the available list of tags. A screenshot of the
available tags is shown in Figure 1.
Default template The anchor tag can be inserted using ‘a’. You will then
A default HTML template can be started by opening a receive a message prompt: ‘Attribute:’. You can provide the
test.html file, and using C-c C-t html. It will produce the value as ‘href’. It will then prompt you for a value, and you can
following content: enter a URL, say, http://www.shakthimaan.com. The anchor
tag will be constructed in the buffer as you input values in the
<html> mini-buffer. You will be prompted for more attributes. If you
<head> want to finish, simply hit the Enter key and the anchor tag will
<title> be completed. The final output is shown below:
You will then be prompted with the string ‘Title:’ to input <a href=”http://www.shakthimaan.com”></a>
the title of the HTML page. After you type ‘Hello World’, the
default template is written to the buffer, as follows: You can insert a h2 tag by specifying the same after C-c
C-t. You can also add attributes, as required. Otherwise,
<html> simply hitting the Enter key will complete the tag. The
<head> rendered text is as follows:
<title>Hello World</title>
</head> <h2></h2>
<body>
<h1>Hello World</h1> You can insert images using the alt tag. You can specify
<address> the src attribute and a value for the same. It is also a good
practice to specify the alt attribute for the image tag. An Accents
example is shown below: In HTML mode, you can insert special characters, accents,
symbols and punctuation marks. These characters are mapped to
<img alt=”image” src=”http://shakthimaan.com/images/ShakthiK- Emacs shortcuts. Some of them are listed in the following table:
workshop-A4-poster.png”>
Shortcut Character
Unordered lists can be created using C-c C-t followed by
C-x 8 ‘ a á
ul. It will then prompt you for any attributes that you want
included in the tag. You can hit the Enter key, which will C-x 8 “ e ë
prompt you with the string ‘List item:’ to key in list values. An C-x 8 / E Æ
example of the output is shown below:
C-x 8 3/4 ¾
<ul> C-x 8 C ©
<li>One C-x 8 L £
<li>Two C-x 8 P ¶
<li>Three
C-x 8 u µ
</ul>
C-x 8 R ®
You can neatly align the code by highlighting the above C-x / / ÷
text and indenting the region using C-M-\. The resultant
output is shown below: Indentation
Consider the following paragraph:
<ul> “When we speak of free software, we are referring to
<li>One freedom, not price. Our General Public Licenses are designed
<li>Two to make sure that you have the freedom to distribute copies
<li>Three of free software (and charge for this service if you wish),
</ul> that you receive source code or can get it if you want it, that
you can change the software or use pieces of it in new free
If you wish to comment out text, you can select the region programs; and that you know you can do these things.”
and type M-q. The text is enclosed using ‘<!--’ and ‘-->’. For You can neatly fit the above text into 80 columns and 25
example, the commented address tags in the above example rows inside GNU Emacs using M-q. The result is shown below:
look like what follows:
When we speak of free software, we are referring
<!-- <address> --> to freedom, not
<!-- <a href="mailto:shakthi@achilles">shakthi</a> --> price. Our General Public Licenses are designed to
<!-- </address> --> make sure that you
have the freedom to distribute copies of free software
A number of major modes exist for different programming (and charge for
environments. You are encouraged to try them out and this service if you wish), that you receive source code or
customise them to your needs. can get it
<table>
<tr>
<td>Tamil Nadu</td>
<td>Chennai</td>
</tr>
<tr>
<td>Karnataka</td>
<td>Bengaluru</td>
</tr>
<tr>
<td>Punjab</td>
<td>Chandigarh</td>
</tr>
</table>
Figure 2: Magit
If you have a long line which you would like to split, you
can use the C-M-o shortcut. Consider the quote:
“When you’re running a startup, your competitors decide
how hard you work.” Paul Graham
If you keep the cursor after the comma, and use C-M-o,
the result is shown below:
Magit
Magit is a fantastic interface to Git inside GNU Emacs. There Figure 3: History
Figure 5: Branch
Figure 4: Staged changes
can enter the commit message.
the Magit buffer. A screenshot is provided in Figure 3. You can create and check out branches using the ‘b’
You can make changes to the project sources and stage shortcut. A screenshot of the Magit branch pop-up menu is
them to the index using the ‘s’ shortcut. You can unstage the shown in Figure 5.
changes using the ‘u’ shortcut. After making changes to a All the basic Git commands are supported in Magit -
file, you need to use M-x magit-status to update the Magit diffing, tagging, resetting, stashing, push-pull, merging and
buffer status. rebasing. You can read the Magit manual (http://magit.vc/ ) to
A sample screenshot of the modified files and staged learn more.
changes is shown in Figure 4.
You can hit TAB and Shift-TAB to cycle through the By: Shakthi Kannan
different sections in the Magit buffer. To commit a message, The author is a Free Software enthusiast and blogs at shakthimaan.com.
press ‘c’ followed by ‘c’. It will pop up a buffer where you
You can spruce up Microsoft Office, and add custom commands and new features to Office
programs that help increase your productivity by using add-ins. Further, you can develop your
own custom add-ins to give your documents style and class. In this tutorial, you can learn how to
build a word cloud generator add-in for Microsoft Word.
A
dd-ins have been an important part of the mails, calendars, meeting requests and appointments.
Microsoft Office suite as they allow users and third Office currently has three types of add-ins that
party developers to extend the capabilities and you can build:
functionalities of Office, and with more than 1.2 billion Task pane add-in: This appears at the side of the
users worldwide (https://news.microsoft.com/bythenumbers/ document and allows you to provide contextual and
ms_numbers.pdf), there is quite a large market for apps on this functional features in it.
platform. Content add-ins: These appear in the body of the
Previously, one had to use things like VBA, Com add-ins, document.
VSTO, etc, to write add-ins for Office, but now all that you Outlook add-ins: These appear next to an Outlook item
need is the Open Web Platform. when it’s being viewed or edited. They require Exchange
2013 or Exchange Online to host the user’s mailbox.
A high level overview of the platform
The Office Add-ins platform allows us to build apps using Anatomy of an Office add-in
existing Web standards like HTML 5, CSS, JavaScript and An Office project consists of a mainifest.xml file bundled
RESTful Service that can interact with office documents, with a Web application. The Manifest file can be submitted
$(“#cloud-from-selection”).on(‘click’, function () { Finally, we will call these functions on clicking the button
Office.context.document.getSelectedDataAsync(Office. (with the ID insert-cloud-to-document).We will use some
CoercionType.Text, feature detection to call the appropriate function, as follows:
function (result) {
if (result.status === Office. if (Office.context.requirements.
AsyncResultStatus.Succeeded) { isSetSupported(‘ImageCoercion’, ‘1.1’)) {
if (result.value == “”) { var $canvas = $(‘#word-cloud-placeholder’);
app.showNotification(‘No data var imageData = $canvas[0].toDataURL();
was selected. Please select some data in document’); imageBase64Data = imageBase64Data.replace(/^data:image\/
} else { (png|jpg);base64,/, “”); setBase64Image(imageData);
draw(result.value); } else {
} // get the imageURL from a server side script that saves the
} else { image on a server and return the //URL.
app.showNotification(‘Error:’, var imageHTML = “<img “+”src=’” + imageURL + “’ img/>”;
result.error.message); setHTMLImage(imageHTML)
} }
}
); 11. That’s pretty much it. Now you can hit the Start button
}); in Visual Studio and see the application running, and if
you want to download the complete source code, it is
10. Then, we will need a function to insert the word cloud available on GitHub (https://github.com/shivasaxena/
image into the document. There are two ways of Word-Cloud-Generator). The final add-in looks like
achieving this. We will have to check if the running what’s shown in Figure 2.
version of Word supports the insertion of base64
encoded images, in which case we will directly insert
it in the document, or else we will send the image to a By: Shiva Saxena
server side script, save the image on the server and then The author is a FOSS enthusiast. He is currently working as
a consultant involved in developing Enterprise Application
insert an <img> tag with the URL of the saved image. and Software as a Service (SaaS) products. He has hands on
The functions to do this will be as shown below: development experience with technologies like Android, Apache
Camel, C#.NET, Hadoop, HTML5, Java, OData, Office, PHP and
function setHTMLImage(imageHTML) { React, among others, and loves to explore new and bleeding edge
technologies. He can be reached at shivasaxena@outlook.com
Office.context.document.setSelectedDataAsync(
Astound your friends by building your own Android personal safety app! This tutorial in our on-going
series on App Inventor 2 guides the reader in building such an app. Reading previous articles would be
a great help to those just joining us in this quest to build Android apps.
P
ersonal safety is of prime concern to each one of The purpose of the application
us. Many a time we are in difficult and dangerous As explained earlier, the purpose of this application revolves
situations and need a helping hand to extricate around the need to extricate the mobile device user from a
us from harm’s way. As the proverb says, “Prevention dangerous situation. We hope to build an Android mobile
is better than cure.” So it is better to be prepared with a application which will send the location of the user, along
solution before a potentially harmful situation arises. with some predefined text, to certain people/agencies and
In this article, we are attempting to build a place a call to them to describe the situation. We will enable
personal safety application, which in times of trouble users to set the contact numbers of the people they wish to
can help us. Our goal here is to inform the ones who contact in case of emergencies. You are already aware of all
care for us about where we are and the activities the components that will be used for this application like the
we are involved in. We will be building a mobile texting component, the phone call component, location sensor,
application using which, on pressing a single button, buttons, labels, Tiny DB, etc.
we can send critical information about ourselves to
the people we intend to send it to. GUI requirements
This tutorial series requires some basic as well as Every application requires a graphical user interface or GUI,
a little advanced knowledge about building Android which helps the user to interact with the on-screen components.
applications with App Inventor. So let’s use the How each component responds to user actions is defined in the
knowledge acquired from the past articles in this blocks editor section. As per our current requirements, we hope
series, to build this app. to have a single button which will trigger all the events, and a
the device keyboard to make it Figure 1: Designer screen (Screen1) Figure 2: Designer screen (Screen2)
A
design language or design vocabulary is an overarching design of user interfaces. The most popular examples of
scheme or style that guides the design of a suite of software design languages are:
complementary products or architectural settings. Skeuomorphism
Designers wishing to give their suite of products a unique but Metro Design
consistent look and feel define a design language for it, which Flat Design
can describe choices for design aspects such as materials, colour
schemes, shapes, patterns, textures or layouts. They then follow Skeuomorphism
the scheme when designing each object in the suite. In simple A skeuomorph is a derivative object that retains ornamental
words, software design is a set of guidelines, which provides design cues from structures that are necessary in the original.
or suggests the design aspects in your software for a consistent In simple words, skeuomorphism enforces the UIs to be
look across entire applications. Here’s an example: the themes designed to look like the original object of the real world
for all activities in Android have the same look and feel. and behave in that way too. Many computer programs have
Design languages are only guidelines; they are not rules. These a skeuomorphic graphical user interface that emulates the
guidelines are designed such that users broadly follow them, aesthetics of physical objects.
but one can surely innovate and bend all the rules of a design An example of this trend was the 1998 RealThings
language. People tend to consider them hard and fast rules and package. A more extreme example is found in many music
never do anything outside those guidelines, which is not a good synthesis and audio processing software packages, which
thing in developing engaging user interfaces. These guidelines closely emulate physical musical instruments and audio
were also generated by innovation. equipment. Functional input controls like knobs, buttons,
switches and sliders are often careful duplicates of those
The history of design languages found on the original physical device being emulated. Some
The concept of a design language has existed ever since the software even include graphical elements of the original
Figure 1: An application showing the use of skeuomorphism it easier for those familiar with the original device to use the
digital emulation by making certain affordances stronger. On
Metro the other hand, people opposing this design language say that
Just another WordPress site HOME MY IMAGES SLIDESHOWS JUMBO
it requires resemblance of the original object, so it limits the
Sample Page About Us Contact Us
creativity of a programmer or of UI designers to design or try
Home Some images anything new in their interfaces.
Sample Post 10 New Post
Metro Design
It is a long established fact that a reader will be
distracted by the readable content of a ...
Sample sample post 8 created by Microsoft primarily for user interfaces. A key
Pos...
“On the other hand we denounce with
righteous indignation and dislike men who are
design principle is better focus on the content of applications,
relying more on typography and less on graphics (content
so beguiled and...
It is a long
established fact that
Figure 2: WordPress theme showing the use of Metro Design be found in Encarta 95 and MSN 2.0. The design language
evolved in Windows Media Centre and Zune, and was
USERNAME
formally introduced as ‘Metro’ during the unveiling of
PASSWORD
SUNNY AMSTERDAM
Windows Phone 7. It has since been incorporated into several
TODAY TUE WED
LOG IN
of the company’s other products, including the Xbox 360
26˚/ 34˚ 29˚/ 21˚ 30˚/ 24˚ system software, Xbox One, Windows 8, Windows Phone,
SUN
28
MON
29
TUE
30
WED
31
THU
1
FRI
2
SAT
3
and Outlook.com under the names Microsoft Design language
and Modern UI after Microsoft discontinued the name ‘Metro’
SEARCH 4 5 6 7 8 9 10
11 12 13 14 15 16 17
ITEM 2
ITEM 5
70%
ITEM 6 language, currently used in various graphical user interfaces
(such as websites or Web applications). Flat Design is a style
Figure 3: An illustration of different components in Flat Design of interface design without any stylistic elements that gives
the illusion of three dimensions (such as excessive use of drop
design that serve no user interface function, such as handles, shadows, gradients or textures) and is focused on a minimalist
screws and ventilation holes. Even systems that do not employ use of simple elements, typography and flat colours. Designers
literal images of some physical object frequently contain may prefer Flat Design because it allows interface designs to
skeuomorphic elements, such as slider bars that emulate linear be more streamlined and efficient. It makes it easier to quickly
potentiometers and tabs that behave like tabbed file folders. convey information while still looking visually appealing and
Skeuomorphs need not be visual. The shutter-click sound approachable. It also makes it easier to design an interface
emitted by most camera phones when taking a picture is an that is responsive to changes in browser size across different
auditory skeuomorph; it does not come from a mechanical devices. With minimal design elements, websites are able to
shutter, which camera phones lack, but from a sound file in load faster and resize easily, and still look sharp on high-
the phone’s operating system. Another example is the swiping definition screens. As a design approach, it is often contrasted
hand gesture for turning the ‘pages’ or screens of a tablet. to skeuomorphism and rich design. (Though it should be noted
People who are in favour of this language argue that it makes that Flat Design can and does use skeuomorphs just as much
D
ata is priceless. Small ventures to the fortune 500 back, the checksum is calculated again. If the checksums do
spend crores to maintain backups and ensure data not match, a data error has been detected. ZFS will attempt to
integrity. The loss of even a byte of data can impact automatically correct errors when data redundancy is available.
huge MNCs and could possibly threaten a nation’s security. Pooled storage: Physical storage devices are added to
Ever since the evolution of computers and file systems, a pool, and storage space is allocated from that shared pool.
experiments and research have been going on in an effort to Space is available to all file systems, and can be increased by
find an efficient, trustworthy backup system. adding new storage devices to the pool.
Performance and scalability: It is a 128-bit file system
What is the Zettabyte File System (ZFS)? that’s capable of managing zettabytes (one billion terabytes)
ZFS is an advanced, open source file system and logical of data. Multiple caching mechanisms provide increased
volume manager designed by Sun Microsystems for use in performance. Examples include ARC, an advanced memory
its Solaris operating system, and licensed under the Common based read cache; L2ARC, a second level disk based cache;
Development and Distribution License (CDDL). The name and disk-based synchronous write cache, ZIL.
ZFS is a registered trademark of the Oracle Corporation. In addition to these, ZFS supports multiple RAID levels
(redundant array of independent disks) that further improves
Why should you use ZFS? performance and diminishes redundancy.
The answer to this question lies in the three main design goals,
which have translated into ZFS’most appealing features. Installing ZFS in Ubuntu
Data integrity: Integrity is the keyword that any serious In Ubuntu, ZFS can be installed by running the following code:
user searches for. In ZFS, all data includes a checksum of the
data. When data is written, the checksum is calculated and $ sudo add-apt-repository ppa:zfs-native/stable
written along with it. When that data is later read
C
omputer vision is a domain that’s under active OpenCV have been taken care of in SimpleCV by providing
research, with applications spreading across a direct-to-use functions for performing repeatedly used
spectrum of fields such as robotics, human computer computer vision tasks. SimpleCV is written in Python and
interaction (HCI), etc. Computer vision involves tasks such can be installed in all major operating systems such as Linux,
as image reception, processing, reasoning, video stream Windows and Mac. It is available with the BSD licence.
handling, etc. These tasks involve a lot of mathematical SimpleCV allows developers to handle both images and
processing, which is not easy to implement. To handle videos. The source image/video is acquired directly using
this problem and make the life of the developer simpler, various input sources as listed below:
frameworks like SimpleCV become handy. Web cams
Kinects
SimpleCV FireWire and IP cameras
SimpleCV is an open source framework for performing Mobile phone cameras
computer vision tasks. And like its name suggests, it has made SimpleCV facilitates not only making changes to the
computer vision simple. The complexities associated with images but also allows them to be understood.
Op
ho
SciP
n2
en
CV
.7 After the downloading has been completed, execute the
Y
SimpleCV Dependencies
.exe file and extract to the folder C:\OpenCV2.3\. It can be
Pyth
Eas
Num
extracted to any other folder too, but the environment paths
on S
y_in
PY
Once the installation has been successfully completed, run After the successful installation by executing the above
simplecv from the console. commands, type ‘simplcv’ from the command prompt at the
For Windows operating systems, there are two different installation folder, to open the simplecv shell. Otherwise, you
ways of installing SimpleCV. One method is to download the may click on the SimpleCV icon on the desktop.
Windows Superpack from http://www.simplecv.org/download/
. This super pack includes all the dependencies required for SimpleCV shell
SimpleCV installation. The SimpleCV shell allows us to execute the commands and
However, if your system already has some of the get the results in an interactive manner. Some of the shell
dependencies and you want to keep them as they are, then interaction commands are as listed in Table 1.
individual components can be downloaded separately, as
shown below: Command Description
1. Download and install Python 2.7 using http://www.python. Exit Enables users to exit the SimpleCV shell.
org/ftp/python/2.7.3/python-2.7.3.msi The same thing shall be achieved by press-
ing Ctrl + D.
2. The Python set-up tools for Windows can be downloaded
tutorial Allows users to start the SimpleCV interac-
from http://pypi.python.org/packages/2.7/s/setuptools/
tive tutorial
setuptools-0.6c11.win32-py2.7.exe
clear Performs the cleaning of the SimpleCV shell
3. Installation of the SciPy super pack can be carried
example Provides a collection of examples that we
out using http://sourceforge.net/projects/scipy/files/
can run
scipy/0.9.0rc5/scipy-0.9.0rc5-win32-superpack-
python2.7.exe/download Forums Launches a Web browser for the help forums
4. Installation of the NumPy super pack can be done walkthrough Launches a Web browser with a walk-through
by using http://sourceforge.net/projects/numpy/ Table 1: SimpleCV shell interaction commands
files/NumPy/1.6.2/numpy-1.6.2-win32-superpack-
python2.7.exe/download The SimpleCV console is shown in Figure 2.
5. Installation of Pygame for Windows can be done using SimpleCV incorporates a detailed and elegant help system.
http://pygame.org/ftp/pygame-1.9.1.win32-py2.7.msi The help on any of the components/libraries can be retrieved
6. Installation and configuration of OpenCV can be done by using the Help command. An example of a command and
by using http://sourceforge.net/projects/opencvlibrary/ its output is listed below:
SimpleCV HelloWorld
As stated in the beginning of this article,
the core idea of SimpleCV is to make
machine vision simple. A HelloWorld
example is shown below:
After binarizing the image, the blobs are identified By: Dr K.S. Kuppusamy
by directly applying the function “.findBlobs()”. The
The author is assistant professor of computer science at the
example program loads an image with coins in it. The School of Engineering and Technology, Pondicherry. He has
findBlobs is used to identify the pixels representing the 10+ years of teaching and research experience in academia and
coins leaving the background pixels. The screenshot of industry. His research interests include accessible computing,
the input and output images for the blob detection are as Web information retrieval, mobile computing, etc. He can be
reached at kskuppu@gmail.com
shown in Figure 4.
OpenSourceForU.com
Follow us on Twitter@LinuxForYou
L
inux was designed for the sole purpose of providing kernels have several pros and cons, some of which include:
desktop users with an affordable but functional Pros
operating system in a world where the most commonly Direct and faster approach for hardware to access
used OS comes with a high price tag. programs
Linux was originally created in 1991 by Linus Torvalds, a Simplicity and ease of in-process communication
Finnish student from the University of Helsinki, for his own Quick processing of requests
personal computer, and with zero plans for expansion beyond Cons
one platform. However, Linux grew to become adaptable Lack of security due to processes running solely on
with several computer architectures and now runs on every supervision mode
platform imaginable. Enormous memory and installation footprints
Linux has fascinated developers ever since it was created However, kernel developers did a good job by
and, as a result, its open source code has seen several overcoming the flaws associated with the monolithic kernel
contributions from more than 12,000 programmers. by modelling modules of the kernel, which can be both loaded
The Linux kernel (the main part of the OS located at and unloaded at any time. Modules that are able to support
the core) has been released under the GNU General Public features such as low level virtualisation can also enable you
License (GPL) version 2. to replace your kernel without rebooting the entire system,
although this happens only in rare cases.
Linux kernel architecture
The Linux kernel operates on a monolithic architecture, which Common features of the Linux kernel
basically means that the complete operating system works on Let’s look at some of the common features of the Linux kernel.
the kernel space and on the solo supervisor mode. Monolithic Multi-user support: A Linux system supports several
Linux Mint strives to be an elegant, modern, easy-to-use Linux distro. Based on Ubuntu and
Debian, it tries to overcome the shortcomings of Ubuntu by packing in some proprietary software.
The author takes the reader through the process of installing Linux Mint and gives a first hand
account of how he has configured his own system.
S
ome time ago, an article titled “The free software at have a distro that's easy to install and to configure, and has
work" was published in Byte magazine (see Reference 1). almost all the software I need installed by default, in order to
In this four-page article, the author discusses GNU Linux have a completely functioning system in a short span of time.
and some applications, making some interesting comments In the past, I have mainly used GNOME and, sometimes,
mainly about their use in a research environment (at that KDE. I'm not a big fan of GNOME’s transition to version 3
time, the author was systems administrator in a university’s and KDE’s move to the Akonadi technology, because I like
physics department). The first figure, in the article, shows to have a desktop environment which is reasonably light,
GV (the PDF and PS viewer), LyX and the text editor Jed, fast and easy to back up; so my choice is Xfce. This article is
all under KDE. The second figure shows a table and a graph based on GNU Linux Mint 17.3 Xfce 32 bit ‘Rosa’.
made with StarOffice. Finally, the last figure shows Netscape The article presents some basic customisations of the
and a terminal window opened under the FVWM desktop desktop environment, and information about the installation
environment (I'm not too sure about this though, since the and configuration of a few daily-used applications, with the
article appeared many years ago). So I decided to give Linux help of the terminal window. Please note that the following
a chance, because the author was very optimistic, on the off are only examples because a lot of other ways are possible.
chance that what he’d written was indeed true.
The next step involved choosing a distro — the first Settings and systems managers
was Red Hat 5.0, and then SuSE from the version 5.3 (with Figure 1 shows the Settings manager with a yellow
Applixware Office 5.0) to the version 10.0. For the last few background, for the following options:
years, my preferred distro has been Mint, because I like to The Appearance option, as suggested by the name, is to
configure how the desktop looks. The Style tab controls Settings
Customize your desktop
and menus. The second tab, called Icons, is about how Appearance Desktop Desktop Settings File Manager Notifications
the icons are shown, for example, in the panel, on the Panel Preferred Applications Screensaver Window Manager
Window Manager
think the default font size is too big, I need to use the third
Workspaces
Hardware
tab, called Fonts, to select a smaller size. A more detailed Display Keyboard Mouse and Touchpad Power Manager
Removable Drives and
System
I use the Background option only to change the default Login Window MIME Type Editor Session and Startup Software Manager Software Sources
size and to select the default icons for the visualisation Other
minutes, after which the screen saver activates. Figure 1: Settings manager
The only thing that I did with the Window manager option
was to select a smaller font size for the window’s title.
More information about this can be found at http://docs.
xfce.org/xfce/xfwm4/preferences
The Firewall configuration starts Gufw, if previously
installed. This is a GUI for the Linux default firewall.
Simply, change the Status to ‘On’.
In the Login window, you can choose the theme for it. My
preference was ‘Elegance’, though you can also change its
default background, which is located in /usr/share/mdm/
themes/Elegance/background.jpg with another picture
having the same name.
Usually, it’s not necessary to use the Session and Startup
options. Sometimes, these can be used to uncheck some
applications that will be started automatically when
you log in to the desktop — for example, ‘Blueman’, Figure 2: LibreOffice language settings
‘MintUpdate’, ‘mintUpload’, ‘mintWelcome’, etc.
The installation of a printer is easy. On System devices such as MP3 players or mobile phones via a
> Printers simply click on ‘Add’ and follow the USB cable — see Reference 2).
instructions on the screen. The most important thing is Office group: qpdfview (a fast PDF reader),
that the recommended driver may not be the best. So libreoffice-style-tango (I’m not a big fan of the
some further tests may be needed. default human icons), hyphen-[your-language],
mythes-[your-language], myspell-[your-language] (the
Software manager default language is selected during the installation
In this section, I would like to explain the applications I added process and if ‘English’ is chosen, it may be necessary
after the default installation: to add one or more languages to LibreOffice; an
Accessories group: mc (Midnight Commander), vim-gtk. example is shown in Figure 2).
Graphics group: eog also known as the Eye of GNOME Settings group: gufw (see the previous section).
(because it’s not possible to print a picture from the Other packages: efax, fonts-inconsolata, fonts-sil-
default Ristretto application), Imagemagick (a nice gentium-basic, p7zip-full, ttf-mscorefonts, texlive-
application especially for batch operations) and Inkscape. full. Some information about 7-Zip and efax will be
Internet group: Skype. presented in the next two sections.
Multimedia group: Audacious (but the default Banshee
is also a nice player), k3b (probably the best CD burner 7-Zip
available on Linux), system settings (KDE system settings This software is very useful to zip (with encryption) one or
- by selecting Application appearance > Icons > Mint- more files. In the following example, an encrypted file called
X-Aqua you can have k3b with Xfce icons), mtp-tools, archive.zip containing two text files is created. The syntax
mtpfs, gmtp (gMTP is a player that can communicate with for the terminal is as follows:
Recent
alkanes.pdf 52,5 kB 08/12/2014 I’m used to using only 7-Zip to zip, because the simplest
Home
alkanes.tex 2,2 kB 08/12/2014 way to unzip an archive is to use the default archive manager
Desktop
alkanes.xls 8,2 kB 08/12/2014 and also because, in the case of an encrypted archive, a
tetrachloroethene.pdf 33,7 kB 04/25/2014
Documents
prompt for the password is shown.
tetrachloroethene.tex 771 bytes 04/25/2014
Downloads
Music
tetrachloroethene.xls
xls2tex.sce
6,1 kB 04/25/2014
916 bytes 08/12/2014
Efax
Pictures
The first thing to know is which port your modem is
Videos
available on. In this example, an external USB modem is
Batch considered. From the terminal window, type lsusb and look
Devices
if the modem is recognised. It’s probably recognised on the
ttyACM0 port. Sometimes it may not be so easy and further
Computer
tests may be needed. According to Reference 5, some
Cancel OK privilege changes are required:
Cancel OK Then edit the configuration file with sudo gedit (or gvim)
/etc/efax.rc and change some options as follows:
Figure 3: Two examples of Zenity dialogue boxes
DEV=ttyACM0
7za a -mem=AES256 -pPASSWORD -tzip archive.zip file1.txt file2. FROM=”[your-faxnumber]”
txt NAME=”[your-name]”
PAGE=a4
To unzip, use 7za e archive.zip (the ‘e’ option stands
for ‘extract’), and to clear the terminal history, simply In the following example for the terminal window, a file
use history –cw. called filename.ps is sent to the number 0123456789:
Zenity is free software and a cross-platform program
that allows the execution of GTK+ dialogue boxes in the fax send -v 0123456789 filename.ps
command line and shell scripts (see References 3 and 4), and
in Mint, it’s installed by default. The following bash script can With Zenity, the previous operation can be done with the
be used to zip (with encryption) one file or one directory: following bash script:
#!/bin/bash #!/bin/bash
# File archive with AES encryption # Fax send
# F=$(zenity --file-selection --directory --title=’Select F=$(zenity --file-selection --title=’Select file’)
directory’) N=$(zenity --entry --title=’Fax number’ --text=’Enter the
F=$(zenity --file-selection --title=’Select file’) fax number:’)
P=$(zenity --entry --title=’Password’ --text=’Enter fax send -v $N $F
password:’)
7za a -mem=AES256 -p$P -tzip $F.zip $F I use Efax only to send a fax, so I haven’t tested it to
receive one. More sophisticated faxing solutions are achieved
An example is shown in Figure 3 — one dialogue box is with the Hylafax fax server and with the YajHFC client
about the file selection and the other for entering the encryption (Yet another Java HylaFAX client) as reported on http://
password. The following script is to unzip an archive: www.yajhfc.de, but some testing is required mainly for the
configuration of Hylafax.
#!/bin/bash Another example of Zenity’s usage is password
# File extract generation. In Mint, the APG (automated password
F=$(zenity --file-selection --title=’Select file’) generator) utility is installed by default, and can be
developers’ website for some applications. Presented here are Application Details
three examples. Command java -jar /home/astonfe/jEdit/5.3.1/jedit.jar
Freeplane is an interesting Java based mind mapping Working Directory
software. Download the latest version freeplane_bin-1.3.15.zip
from https://sourceforge.net/projects/freeplane, unpack it in your Figure 4: From top to bottom, the launchers for Freeplane, Scilab and jEdit
home directory and then run it using /home/[your-username]/
freeplane-1.3.15/freeplane.sh. See the top part of Figure 4 But it’s possible to install jEdit 5.3.1 (a development
(Settings > Menu editor > Add launcher). The application icon is trunk). Download jedit5.3.1install.jar from http://www.
/home/[your-username]/freeplane-1.3.15/freeplane.svg. tellurianring.com/projects/jedit-daily and then install it
A Java Development Kit must be installed before from the terminal with java -jar jedit5.3.1install.jar. To run
NetBeans. An easy way is to install openjdk-7-jdk from the it, simply use java -jar /home/[your-username]/jEdit/5.3.1/
Software manager. The last version for Linux netbeans- jedit.jar (see Figure 4, bottom). The icon is /home/[your-
8.1-linux.sh can be downloaded from https://netbeans.org/ username]/jEdit/5.3.1/doc/jedit.png. If you have your
downloads. The installation involves the following two steps own syntax-highlighting file, you can add it in the modes
from the terminal: directory /home/[your-username]/.jedit/modes. In this case,
you must also add a row to the catalogue file, for example:
chmod +x netbeans-8.1-linux.sh
./netbeans-8.1-linux.sh <MODE NAME=”scilab” FILE=”scilab.xml” FILE_NAME_GLOB=”*.sce” />
(setq lpr-command “gtklp” The last two lines are useful to make the cut, copy and
ps-lpr-command “gtklp”) paste commands work as in Windows with Ctrl+X, Ctrl+C
and Ctrl+V (see Reference 7).
This way, the printing process is managed by a GTK Installation and configuration of Linux is not as difficult
GUI in which you can print to a PDF file or to a printer. One as is sometimes reported. It is possible for GNU Linux to
more thing about the colour themes — as an alternative to the be the only system installed on your computer along with a
adoption of a specific colour theme, I prefer to change only wide range of great programs. Almost 20 years have passed
some colours by adding the following code to the dotemacs file: since the article cited in the introduction was published, and
during this time, developers have taken great steps forward.
(custom-set-faces For the future, I hope that LibreOffice will continue to
‘(font-lock-keyword-face ((t (:foreground have its present GUI. I also hope that Xfce will have more
“#0000CD”)))) ;; Medium blue customisation options.
‘(font-lock-type-face ((t (:foreground
“#DC143C”)))) ;; Crimson References
‘(font-lock-constant-face ((t (:foreground [1] Gonzato, Il free software al lavoro (The free software at
“#FF8C00”)))) ;; Dark orange work), Byte (Italian edition), 1998, 8, 96-99.
‘(font-lock-builtin-face ((t (:foreground [2] http://en.wikipedia.org/wiki/Media_Transfer_Protocol, last
“#1E90FF”)))) ;; Dodger blue visited on 26/02/2016.
[3] http://en.wikipedia.org/wiki/Zenity, last visited on
‘(font-lock-function-name-face ((t (:foreground 26/02/2016.
“#800080”)))) ;; Purple [4] http://help.gnome.org/users/zenity/stable, last visited on
‘(font-lock-string-face ((t (:foreground 26/02/2016.
“#808080”)))) ;; Gray [5] http://www.aldovarotto.org/computer/linux/fax.htm, last
visited on 26/02/2016.
‘(font-lock-comment-face ((t (:foreground [6] Arnote, Just the fax Ma’am... and it works in Linux!,
“#3CB371”))))) ;; Medium sea green PCLinuxOS Magazine, 2013, 72, 38-47.
[7] http://superuser.com/questions/10588, last visited on
About Vim, the directory for the colour themes is /usr/share/ 26/02/2016.
vim/vim74/colors and for the syntax-highlighting files is /usr/
share/vim/vim74/syntax. So, if you have some of them, you must By: Stefano Rizzi
copy your files to these directories. If you want to recognise the
The author works in the analytical chemistry and textile chemistry
lstlisting environment as in Vim 7.3, you can use the following areas. He has been a Linux user since 1998.
code in /usr/share/vim/vim74/syntax/tex/lstlisting.vim:
S
ometimes, fans of free software have to jump through would be a risk of a licence violation. Recently, FFmpeg
many hoops to get to the good stuff. FFmpeg is one released its Version 3 with a totally native AAC encoder, but
such example. Like the VLC media player, FFmpeg more work remains. The solution was for users to do their own
can handle almost any audio or video format you throw at it. compilation. The FFmpeg Wiki site has compilation steps for
Yet, most people have not even heard about it. Once you have several distributions. The compilation process does take a while
compiled and installed it, it will prove to be pretty useful. to finish, but it will eventually create the four binary executable
FFmpeg bills itself as a complete solution to record, files. Copy them to your /usr/bin directory. If you don’t want
convert and stream audio and video. The FFmpeg project to disturb the FFmpeg installation that came with your Linux
provides four simple apps - ffprobe, ffmpeg, ffplay and distribution, then you can access the binaries by providing their
ffserver. Many audio/video applications use it internally. If full path from a different directory.
not directly, then via mencoder, FFmpeg is used by lots of While this FFmpeg installation covers most formats,
media players, browser plugins, audio/video editors and other I found that it would not encode to the audio codec of the
multimedia software. This article will focus on the ffmpeg undocumented AMV format. AMV is used by many cheap
binary executable, which can be used to convert audio/video Chinese-made media players. These tiny devices are primarily
files from one format to another. FM and MP3 players with the video option added as a
‘please ignore it’ extra. The video resolution is a luxurious
Compiling FFmpeg 160x120! I bought one of these players without realising all
Because many audio/video codecs are encumbered by software this. Fortunately, there was a Google Code project called
patents, GNU/Linux distributions have had to omit FFmpeg amv-codec-tools that provided support for AMV using an
or bundle a less-capable FFmpeg version of it. Even if it were old version of FFmpeg. If you need to work with this format,
compiled with support for non-free encoders/decoders, there then build a custom FFmpeg binary, specially made for AMV,
Rotate video: Sometimes, the videos that people take Klaatu (of the GNU World Order podcast) once provided a
from a mobile phone have been rotated 90 or 180 degrees. great video-editing tip. First, down-sample (lower the bit rate
You can fix this by specifying a transpose filter, as with the same resolution) the input video and create your video
follows. The transpose value is in multiples of 90. edits. When the video editing project file is finalised, replace
the down-sampled video file with the original, bigger video file.
ffmpeg -i tank.mp4 \ This way, the video editing process and your test renderings are
-vf “transpose=1” \ faster. The final rendering can take hours to finish, but you do
tank-rotated.mp4 not waste much time waiting before that. You can use FFmpeg
to down-sample the video.
Cut a part of a video: To extract a part of a video, you
need to specify the start time using the -ss option, and the FFmpeg automation
duration using the -t option (use the hh:mm:ss format). If If you have Caja Actions or Nautilus Actions Configuration
you don’t want the file to be re-encoded, then ‘copy’ the installed, then you can simply right-click media files to convert
streams, as shown below: them. You will have to first write some BASH scripts that
will automate the FFmpeg conversions. Nautilus Actions
# start from 1 min 12 sec and go for 2 min 50 sec Configuration (GNOME 2/3) is available in most software
ffmpeg -i tank.mp4 \ repositories. My March 2016 article has steps for compiling
-ss 1:12 \ Caja Actions (Mate).
-t 2:50 \
tank-cut-recoded.mp4 References
[1] http://ffmpeg.org/ “FFmpeg.org”
[2] http://trac.ffmpeg.org/wiki/CompilationGuide “FFmpeg
ffmpeg -i tank.mp4 \
compilation guide”
-c:v copy \
-c:a copy \
-ss 1:12 \ By: V. Subhash
-t 2:50 \ The author is a writer, programmer and FOSS fan (www.vsubhash.com).
tank-cut.mp4
W
henever a make it cleaner, safer
computer is and more powerful than the
switched on, the boot previous version, which was known as
loader is the first software program to run on it. Preliminary Universal Programming Architecture
The boot loader is responsible for the loading of the kernel (PUPA for GNU GRUB). PUPA was eventually renamed
software, which in turn loads the operating system. GNU GRUB 2, and the original GRUB was named GRUB
GRUB is a multi-boot boot loader and is one of the most Legacy. The last stable release for GRUB Legacy came
used. Most of the popular operating systems have GNU out in 2005.
GRUB because of its user-friendly design and support for GRUB 2 was widely accepted by the computer science
multiple boots. community. Most of the Linux distributions started using
GRUB 2 and by the end of 2009, multiple major distributions
History of GRUB were installing it by default.
It all started in 1995, when Erich Boleyn was trying to
boot the GNU Hurd with the GNU Mach (earlier known The booting process
as the University of Utah’s Mach 4 microkernel). The Ever thought about what really happens when you switch on
aim of developing GRUB was mainly to offer support for a computer and how the operating system is loaded? Booting
compatibility on different machines and operating systems. can be defined as a series of processes that help to start a
The idea of modifying the FreeBSD boot loader was dropped computer and put it into a state of readiness for any operation
when Boleyn realised that it was easier to develop a boot by the user. Booting is said to be complete when the normal,
loader rather than modify the current one. GRUB had a lot of operative, runtime environment is attained. Booting of a
features added by Boleyn, which makes it stand out from all computer can be explained in several phases.
the existing boot loaders. The BIOS phase: BIOS (Basic Input Output System)
Later, in 1999, GRUB was adopted as an official GNU is a firmware interface. The BIOS software is stored on a
package by Gordon Matzigkeit and Yoshinori K. Okuji. The ROM chip on the motherboard and is the first software run
latest sources were made available through Anonymous CVS by a PC when powered on. It carries out the process called
for the development of GRUB. POST (Power on Self-Test) which checks, identifies and
In later years, GRUB was further developed and more initialises the hardware to find that every device has the
features were added. But it soon became obvious that the right amount of power, and performs a memory test to see
design of GRUB was incompatible with the new features that whether the memory is corrupted. The BIOS cannot load
were planned for it. the kernel directly because it is unable to access enough of
Around 2002, Okuji started rewriting GRUB to the large hard disk space to load the kernel code. Instead,
overall system control. The first process that is executed by Advanced options for Ubuntu
submenu
menuentry/script:custom
Windows Boot UEFI loader
the kernel is the init process. Windows Boot Manager (on /dev/sda2)
menuentry / script: os-prober
menuentry/script:custom
EFI/ubuntu/MokManager.efi
Operating system: The init process’s first job is to check System setup
menuentry / script: uefi-firmware
menuentry/script:custom
Boot Repair _
Recommended repair
(repairs most frequent problems)
Advanced options
To install Grub-customizer in Ubuntu and Mint, launch a rEFind Linux Yes EXT2/4, NTFS GPLv3/BSD License
terminal and type the following commands:
SYSLINUX Linux Yes - GNU GPLv2 or Later
ELECTRONICS
• Exclusive: ELCINA’s first greenfield EMC project soon to get land possession
• India is emerging as an attractive destination for international companies to invest
• Electronics manufacturing industry in Pune needs a boost
• In 5 years, India may rank 2nd in manufacturing competitiveness, worldwide
INDUSTRY IS AT A
• Highlights of state electronics policies
• National Policy on Electronics will Boost R & D in Electronic Manufacturing
• Insecure market threatens solar module makers
Log on to www.electronicsb2b.com and be in touch with the Electronics B2B Fraternity 24x7
I
f you are dependent on Google apps or must also be easy to imagine that each Android
if you need to regularly pull email and smartphone is costing at least one polar bear its icy
social networking status updates, then home. If not, then try to guilt-trip your friends with
this article is not for you. However, if that idea... just for the fun of it.
you would like to benefit from improved Apart from general Google apps settings,
battery life, the satisfaction of causing there are other settings within each Google app
less global warming and maybe some that help to keep tabs on you. For example, the
more peace of mind, well then... read on. Chrome browser will automatically transmit
The Android Open Source Project each Web address that you visit to Google
(AOSP) is indeed open source, as it is servers, of course, for malware and fraud
built on the GNU/Linux kernel and the prevention. Well, I built my own browser. You
code is freely available online. However, can, however, use the Firefox for Android app, as
an Android device has plenty of Google bits it is totally free and open source software (FOSS).
that are closed source and deeply integrated
into the OS. If an Android device maker Change the app status
wants to remove the proprietary Google The app settings screen has several
bits, that firm can no longer be part of the columns - Downloaded, Running,
Android Alliance. (Amazon and Yandex All and Disabled. Many Google apps
have already done this but they added their as well as manufacturer bloatware
own closed source bits.) For an ordinary hide in the All column. Take some time
phone user though, it will be quite a greasy pole. to study or research these apps. If you know
But, let us give it a try anyway. what you are doing, you can stop and disable many of them
permanently. Be sure not to disable important system apps or
Change Google settings anything you might need.
Most people breeze through the initial Google settings
without waiting to read what is shown on the screen. Why? Root to remove unwanted apps
What could go wrong? Essentially, Google says that it will Most device manufacturers install online shopping and social
save your Wi-Fi network password on its servers and prevent networking apps as system apps. They start automatically,
your phone from ever going to sleep again, ever — whether run all the time and waste your battery charge and data
you are using the phone or not! connection. In India, they are less afraid of lawsuits and
Microsoft has made it impossible to turn off data cause data usage whether you are on Wi-Fi or mobile data.
collection in Windows 10, but it does not have to worry Such system apps cannot be disabled. You can get rid of them
about devices (PCs mostly) being connected to mobile only by rooting the device. But since rooting voids warranty,
data. Android devices have a multitude of connectivity remember that it is an option only for the brave.
options. Fear of class action suits has prevented Google from If the device cannot be rooted, then use a task killer or a
performing data collection with mobile data. So, Google startup manager app to disable unwanted apps regularly, on-
provides options to turn these settings off. Well then, turn demand or at startup.
them off. Google has redefined Airplane Mode. It turns the
mobile data (telco) off but Wi-Fi can be turned on. Use alternative apps and app stores
If you believe in man-made climate change, then it Some Google apps may be decidedly rogue, such as Google
Apps Apps
Side-load apps
Single player arcade game GPLv3
BroserQuest 1.0.1
This phone may also receive Help improve location services Role-playing game You will have to enable the
MPL2
and install updates from Google. by letting apps and service scan
By continuing, you agree to the for Wi-Fi networks even when Bushido Blocks
Block-matching game
Unknown sources option in the
1.4
GPLv3
Wi-Fi is off.
Google terms of Service and
Privacy Policy.
settings for side-loading apps.
Candy Memory 1.4
Match-two memory game
Whenever I have to configure a
GPLv2
Learn more
on things like battery life, app Chess 8.4.3
it and all its associated apps.
Chess program and FICS client MIT
Benefit from
PREFERENTIAL MARKET ACCESS POLICY
ELECTRONICS MANUFACTURING
CLUSTER POLICY
MODIFIED SPECIAL INCENTIVE PACKAGE
SCHEME (M-SIPS)
How?
Get Latest Updates, Policy Guidelines,
Analysis, Industry Views
Log on to
www.electronicsb2b.com
Subscribe to Newsletter
An Introduction to Riak S2
Riak S2, also known as Riak CS, provides powerful storage for large volumes of data.
The important features of Riak are high availability, fault tolerance, security, as well as
easy accessibility and installation.
C
loud storage is storage of data in digital form. Its easy access, cost benefits, and robustness in order to utilise the
structure consists of multiple servers that are located data to gain business advantages. RiaK CS is one such solution.
at different locations. This physical structure of We can access the Riak S2 admin interface via HTTP.
storage is governed by the hosting company that provides the RiaK CS is compatible with any client or library that
cloud services. Organisations have to access their data stored implements the S3 API such as s3cmd, s3curl, boto, erlcloud,
in the cloud, through the Internet, independent of where they the AWS Java SDK, the AWS Ruby SDK, and Fog.
are located.
Features of Riak S2
An overview of Riak S2 Riak S2 or Riak CS provides the flexibility to install and
Riak is a NoSQL database which is designed to deliver the configure the entire set-up on premise and, hence, it is secured
maximum amount of data by distributing it across multiple based on an organisation’s defined policy. Figure 3 shows a
users. It is also known as a distributed database because of few important features of Riak CS.
its capability to deliver across distributed networks. It offers
various features such as fault tolerance, high availability, Easy
accessibility Large object
indenpendent support and
scalability and simplicity. It is available in open source, of locations multi-part
upload
Riak CS
Node
Riak CS
Node
Riak CS
Node
Riak CS
Node
Riak CS
Node 2 files into 1 MB chunks e. Nodes automatically take
Riak CS breaks large
References
[1] https://github.com/basho/riak_cs
[2] http://docs.basho.com/riakcs/latest/tutorials/fast-track/
Stanchion — Riak— The [3] http://docs.basho.com/riakcs/latest/
distributed
An application
used to man- database on [4] http://basho.com/products/
age globally
unique entities
top of which
Riak CS is [5] http://basho.com/products/riak-s2/
built
[6] http://searchcloudstorage.techtarget.com/definition/cloud-storage
[7] http://docs.basho.com/riakcs/latest/cookbooks/installing/Installing-Riak-CS/
Log on to www.electronicsb2b.com and be in touch with the Electronics B2B Fraternity 24x7
T
he past few years in the data management industry MySQL
have been revolutionary for open source databases. From the most trending, let’s move to one that has been the
According to reports from DB-Engines, an online most widely used for years now — MySQL. Named after
initiative to collect and present information on its co-founder Michael Widenius’ daughter, My, it
database management systems (DBMS), the is a dominant force in the world of RDBMSs.
three fastest growing databases of 2014 MySQL is a popular choice for Web
were all open source, and the trend applications, especially among PHP
continued through 2015 as well. developers. Even among the strong
In this article, I will try and competition from other RDBMS
provide an overview of some of the databases, including the ones forked
most common open source DBMS from it, MySQL made big gains
software. Obviously, the list is so in early 2016 to top the RDBMS
huge that it would be impossible to popularity chart after a few years.
mention all of them, but I will try MySQL is available in two
and list those with the best features. editions:
I have picked five of the most widely 1. The open source
used and highest ranked databases for MySQL community edition
discussion in this article. 2. The MySQL enterprise edition
So let’s get to work and start talking about While the basic engine remains the same in
them in no particular order of ranking. both editions, the enterprise edition scores on support
and more frequent updates.
MongoDB Wide adoption of MySQL means that it does provide a
MongoDB has topped the charts for two consecutive years variety of features that excite people, though there are strong
(2013-14) and has been the runner-up in 2015. competitors. Given below is the list of a few such features
MongoDB is among the several databases that arrived and the rest is left for readers to explore:
in the mid-2000s under the NoSQL category. It broke the 1. Like most other database systems, MySQL is a relational
traditional method of storing data in tables and rows by DB system.
storing it in JSON like structures with dynamic schemas, 2. Like any other successful database system, MySQL does
which was later termed as BSON by MongoDB. provide scalability, flexibility, high performance and high
The creators of MongoDB say that the name was derived availability.
from the word ‘humongous’ to support large and massive 3. MySQL claims to offer the most powerful transactional
amounts of data. DB software went commercial in 2007 and database engine to provide robust transaction support.
then open source in 2009. 4. Strong data protection with some exceptional security
Written in C++, MongoDB breaks out from traditional features ensures absolute data protection.
RDBMS ideology and hosts a vast set of features. Here is the 5. It has comprehensive support for every application
list of some of them: development need.
1. Stores records in the form of documents, and corresponds And the list goes on and on.
to data types in most programming languages
2. Embedded documents and arrays reduce the need for PostgreSQL
expensive joins Originating from the Ingres project at Berkeley University in
3. Dynamic schema supports fluent polymorphism the 1980s, PostgreSQL underwent a series of improvements,
4. Full index support on all fields initiated by several of its founders to finally be named
5. Replication and high availability across LANs and WANs PostgreSQL in 1996. Its first release came out in January
6. Automatic scaling via auto-sharding and replica sets 1997. Its popularity has increased in the last few years and,
The list of features is huge but I will stop here, so readers according to DB-Engines, it is among the highest ranked
can explore the software for themselves. in recent times. PostgreSQL is an object-oriented RDBMS
I
f you have often heard the terms, stock ROM and custom
ROM and wondered what they meant, this article will explain screen, background services and even adding new software
the terms and their importance in the Android world. applications. Even the kernel is updated with the latest
Before we go further, ROM stands for ‘read-only patches to bring in performance, security and stability. So how
memory’ which refers to the internal storage of the phone or does one customise the default OS? As you already know,
tablet. The stock or the custom ROMs are the OS images that Android is an open source operating system and its source
reside in the ROM of your tablet, phone, etc. code is available for download, which means developers can
Stock ROMs are otherwise known as factory/ modify the code and the kernel in any way they would like to.
manufacturer OS images, which come with your phone
or tablet when you buy it. These ROMs have a few Why custom ROMs?
enhancements added over the default version of the OS The answer is simple - the stock ROM doesn’t give you much
by the device manufacturers. Some of the top smartphone room to customise your phone and tablet, whereas custom
manufacturers usually customise the default version of the OS ROMs are designed to provide flexibility along with more
by adding new features to enhance the user experience. efficient performance, features and stability.
A custom ROM is the customised version of the default Custom ROMs are not only faster but are more efficient
operating system, which is heavily modified with fun tweaks, and use less memory.
feature additions, performance enhancements and also the They have more features and better UIs, when compared
modification of the UI by changing the lock screen, home with the stock ROMs.
SlimROMs
SlimROMs, as the name suggests, is a completely stripped
Figure 1: Cyanogen Mod logo down version of Android. It has many features and offers up
to three variants that can be deployed in your device, based
Based on the Android Open Source Project, on your needs. There are lots of other features, too, which
CyanogenMod is designed to offer better performance are listed below:
and reliability than the Android based ROMs released
by vendors and carriers such as Google, T-Mobile, HTC,
etc. CyanogenMod also offers a variety of features
and enhancements that are not currently found in
stock versions of the Android OS (Source: http://www.
cyanogenmod.org/about).
CyanogenMod supports most Android phones and Figure 3: SlimROMs logo
tablets available in the market. To find out if your device is
supported, follow https://wiki.cyanogenmod.org/w/Devices ‘The Real Dark Slim’ is a theme which makes the UI
If you don’t find your device in the list of supported black, in addition to several other features
devices but you are keen on trying out CyanogenMod, then SlimROMs has completely different ‘recent’ and
you can follow its porting guide on how to port its OS to ‘favourite’ apps windows, and this includes the option to
your phone or tablet at https://wiki.cyanogenmod.org/w/ switch to either side. So it doesn’t matter whether you are
I, Ramesh Chopra, hereby declare that the particulars given above are true to the best of
my knowledge and belief.
Date: 29-2-2016
Ramesh Chopra
Publisher
“Our gOal
is tO give
the wOrld
niche, cOst-
effective
technOlOgy
sOlutiOns”
ESDS, one of the world’s leading data centre
services and cloud solutions providers, has a
US patent for its method of resource allotment
and requirements. In other words, this is
a patent for auto scalability. Piyush
Somani, founder, MD and CEO of
ESDS Software Solutions Pvt Ltd,
talks about his company and the
benefits of having a patent with the
Open Source For You team.
Q Would it be correct to assume that most of the customers customers can do a PoC (proof of concept) of their proprietary
are going to be high-end premium customers rather than systems on open platforms in our data centre.
small players?
A. We have a mix of hosting customers. The business of the Q Where do you see revenue coming from -- customers
majority of our international customers is high-volume with seeking an open source stack or those with a preference for
the per-customer revenue generation being low, whereas in the proprietary stack.
India, we are seeing mostly high-end premium customers A. We are seeing organisations taking the initiative of moving
getting on board and opting for our services. to the open source stack, and the numbers are increasing each
day. Customers are embracing open source technologies for
Q Has any startup grown with you? non-critical loads for sure, while trying out PoC for their
A. Yes, there are many startups critical systems. Currently, the
that are hosted with us and some of We believe that, very revenue would be around 50-50
them have grown 20 times in the but, going forward, the trend is
last three years. Due to our terms of soon, proprietary systems definitely skewing towards open
non-disclosure, I would be unable to will be a thing from source stacks.
identify them publicly. the past and those who
Q You have mentioned that you
Q Do you have any special do not embrace open are seeing growth coming from
programmes for startups? systems will follow suit. the telecom sector, existing
A. Our unique and innovative customers shifting to the cloud
pay-per-consume billing model itself is a special offering and from e-commerce. As I understand, these are the top
for startups. While cloud providers bill the customers for the three sources. Will this trend to continue or do you see any
allocation, eNlight cloud bills the customers for actual usage new sectors emerging?
of resources. This is something similar to the electricity billing A. Telecom players are always the trend setters in this industry.
model that we are accustomed to at our homes. We have also Fortunately, e-commerce companies were mostly startups,
assisted startups to have compute as a utility on a prepaid so they could directly move to the cloud, while the existing
billing model such as mobile SIM cards. This billing model customers who have invested heavily in their infrastructure
helps the clients save more than 30 per cent compared to the are already starting to move their workloads to the cloud,
pay-per-use model. as their infrastructure is approaching the end of its life.
Everyone is moving from the capex to the opex model, and
Q There is a lot of talk about the IoT. What is your personal many organisations have already realised the pain of having
take on this? Do you see a huge amount of business coming an in-house data centre. With the Digital India initiative, the
to cloud companies also because of IoT? government will contribute to the business at large, and with
A. The IoT is the future and it is not very far away. We will see our vertical auto scaling technology, industries in oil and gas, or
another data explosion from the point we are at today. Every aviation, or those that use legacy systems, will be able to take
instrument comes with multiple sensors attached to it today, be advantage of the cloud, thereby contributing to growth.
it a small watch, a pen or a mobile — all the way up to aircrafts
and rockets. Companies are coming up with digital products, Q So what is the biggest challenge for your business?
but where is all this data going to get stored? These companies A. The biggest challenge in the data centre industry is the
are not coming up with their own data centres. With the world huge capital required to build and maintain the data centre.
moving towards a ‘machines controlling machines’ era, the The investments needed to boost this industry in India are
business of the cloud is going to grow multifold in the next still not happening at the rate they should be. There is also the
three to five years and IoT is going to be a clear driver for this. challenge of skilled manpower, since it is a different kind of
IoT feeds into another revenue stream that goes by the name of industry with varied technology and the skills needed are not
Big Data analytics. Finally, the data has to be transformed into readily available in abundance. Besides, the cost of power and
information that is meaningful and can be used. bandwidth is still very high compared to developed nations,
thereby increasing the operating expenses.
Q What does open source mean to ESDS?
A. ESDS is a strong believer in open source technologies. Q. Lastly, what are the top three or five technology trends
We believe that, very soon, proprietary systems will be a that you would want a typical CIO or CTO to keep in mind
thing from the past and those who do not embrace open when it comes to the cloud, or even migrating to it?
systems will follow suit. Our products are completely built A. The hybrid cloud, the Internet of Things, Dockers and
on open source platforms. We also have a very unique way more initiatives around Devops, interoperability and security
of demonstrating a cross-platform concept, under which should be what CIOs or CTOs keep their eyes on.
“A CIO
shOuld
hAve
dIgItIsAtIOn
On hIs
AgendA”
Digital India is seen as a great opportunity by
most organisations, but how it will eventually
shape up is something that we will all have
to wait and watch. However, companies
like Cisco are fully geared up to get on the
bandwagon with their digital strategy and
technology solutions, and are viewing it
as an initiative that will change the entire
technology landscape. In a conversation
with Open Source For You, Sanjay Kaul,
MD, service provider business, Cisco
India and SAARC, shared the company’s
initiatives with respect to the Digital
India movement. Excerpts:
Q How does Cisco plan to participate in the I think something great that happened is that the
Digital India movement? government has now carved out a vision, which is
We are already into it. We have been involved in architecting phenomenal, and we totally believe in it. We are now moving
the strategies for key stakeholders. For us, the journey from planning to execution. We are working on a number
started three years ago, with our concept of the ‘Internet of of fronts. We are working with service providers, states,
Everything’. We are working with service providers, setting municipalities, manufacturing hubs, and we see opportunities
up their connectivity layer, which is the foundation for Digital and projects all over the place. So, digitisation is happening
India. IP is what we have been doing for many decades, and and it is happening at a very fast pace.
I think that is what we are promoting — an end-to-end IP
architecture. This is the first layer towards making Digital Q How do you see the Internet of Things (IoT) space
India happen, because on top of that connectivity layer, which evolving with the Digital India concept? Do you see Cisco as
is end-to-end IP, one can put an evolved service platform. a key player in the IoT revolution?
That is where you can define how to extract value out of the If you look back, the Internet of Everything or IoE was a
connectivity layer. So for us the journey has already begun — slogan coined by John Chaves, who is our chairman. We
we are in the midst of it. always believed that digitisation has to happen, and I think
Log on to www.electronicsb2b.com and be in touch with the Electronics B2B Fraternity 24x7
Filesystem Size Used Avail Use% Mounted on #ifconfig wlan0 hw ether 12:12:12:12:12:12
/dev/sdc1 16G 819M 14G 6% /
tmpfs 1.6G 0 1.6G 0% /lib/init/ Now check the mac address by running the following
rw command:
udev 1.6G 123k 1.6G 1% /dev
tmpfs 1.6G 0 1.6G 0% /dev/shm #ifconfig wlan0 up
/dev/sdb1 3.0T 211M 2.9T 1% /data
You should get the output with the new mac address. If the
The output will show that you have 3TB space network manager stops you from doing this, just stop it before
available for use in your system. applying the above commands by using the following command:
[bash]$ echo “OpenSource for You is awesome GNU/Linux Start your system, open the terminal and run the following
magazine.” | base64 command:
T3BlblNvdXJjZSBmb3IgWW91IGlzIGF3ZXNvbWUgR05
VL0xpbnV4IG1hZ2F6aW5lLgo= #cd /etc/
Now let us decode the same text, as shown below: #find hostname
FreeNAS 9.3
FreeNAS is an operating system that can be installed on virtually
any hardware platform, in order to share data over a network.
FreeNAS is the simplest way to create a centralised and easily
accessible place for your data. Use FreeNAS with ZFS to protect,
store and back up all your data.
Clonezilla 2.4.5
This is free and open source software for disk imaging and cloning.
It helps you in systems deployment, bare metal backup and
recovery.
Rockstor 3.8.12
Build and manage your own Linux and BTRFS powered advanced
NAS and cloud storage with ease. Rockstor is a CentOS based
Linux distribution designed for network attached storage. You can
find the ISO image in the folder other_isos on the root of the DVD.
The bundled ISO image is for 64-bit computers.