Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Admin
28
41
45
51
55
Developers
59
62
67
72
74
77
80
82
FOR U & ME
85
88
OpenGurus
91
96
31
38
REGULAR FEATURES
08
New Products
10
FOSSBytes
23 Editorial Calendar
104 Tips & Tricks
Contents
Editor
Rahul chopRa
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
Building a Multi-host,
Multi-Container Orchestration and
Distributed System using Docker
Columns
CaseStudy
17
CodeSport
22
20
48
DVD of
ThE MoNTh
Try out the latest
powerful Fedora.
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
24
SiNGaPORe
publicitas Singapore pte ltd
ph: +65-6836 2272
E-mail: publicitas@efy.in
TaiwaN
J.k. Media, ph: 886-2-87726780 ext. 10
E-mail: jkmedia@efy.in
uNiTeD STaTeS
E & tech Media
ph: +1 860 536 6677
E-mail: veroniquelamarque@gmail.com
beNGaluRu
ph: (080) 25260394, 25260023
E-mail: efyblr@efy.in
100
SUBSCRIPTION RATES
Fedora 24 Workstation
Live (64-bit)
Fedora 24 Server
Fedora 24 LXDE Live
106
Year
Five
three
one
Newstand Price
(`)
7200
4320
1440
You Pay
(`)
4320
3030
1150
Overseas
uS$ 120
new products
Ambranes
power bank
with torchlight
Affordable Bluetooth
headphones from
Portronics
` 999
Price:
` 1,999
non-stop music on a single charge.
The Portronics MuffsXT headphones
are available via online portals.
Address: Portronics, 4E/14, Azad
Bhavan, Jhandewalan, New Delhi
110055; Ph: 09555245245; Website:
www.Portronics.com
Tablet with
fingerprint
sensor from iBall
Price:
` 7,999
The tablet has the Android 5.1
Lollipop OS with a powerful
4300mAh battery. On the
connectivity front, the device
offers a Wi-Fi hotspot, dual-SIM with
3G, Bluetooth 4.0, the USB OTG
function, GPS and A-GPS, along with
FM radio with FM recording.
The iBall Slide Bio-Mate is
available at retail stores.
Address: iBall, U-202, Third Floor,
Pillar No-33, Near Radhu Palace, Laxmi
Nagar Metro, New Delhi 110092;
Ph: 011-26388180
Price:
The prices, features and specifications are based on information provided to us, or as available on various
websites and portals. OSFY cannot vouch for their accuracy.
Price:
` 17,499 for
driver-less variant
The WD My Cloud
EX2 drives are
available in three
variants 4TB, 6TB and 8TB, and are
available via selected retail stores.
Address: Western Digital Ltd, 401,
Eros Corporate Tower, Nehru Place,
New Delhi 110019; Ph: 91-1166542000;
Email: Wdindia@wdc.com;
Website: www.wdc.com
Compiled by: Aashima Sharma
FOSSBYTES
PHD Chamber of Commerce
and Industry organises
national conference on cyber
security along with DeitY
PHD Chamber of Commerce and Industry recently partnered with the Department
of Electronics and Information Technology (DeitY) to host a national conference
on cyber security.
The conference,
called Cyberix
2016 Securing
Digital India,
was held at the
PHD House in
New Delhi, and
was aimed at
understanding the
changing facets
of cyber threats
and its impact on
vital installations and businesses.
The conference was inaugurated by the guest of honour, Brig. M.U. Nair,
DACIDS, DIARA, Indian Army. During the event, there was a special address by
R.K. Sudhanshu, joint secretary cyber laws and e-security, DeitY, government
of India. The president of the PHD Chamber of Commerce and Industry, Gopal
Jiwarajka, said in his welcome address that India has over 460 million Internet
users and with such high numbers, there has been a corresponding rise in cyber
crime over the past few years. He said that although the Internet increases
communication, it can also increase the incidence of cyber threats, which is
evident by the fact that India ranks fifth in online payment hacking.
Cyber security has never been more important for governments and businesses
across the globe than it is today. Its scope ranges from detecting and anticipating
cyber attacks on key defence installations to preventing corporate hacking
attacks. Jiwarajka also said that there is a huge demand for security solutions and
services to protect the confidential data of the government and the military, apart
from public data, the banking financial service and insurance (BFSI) sector, data
and data of hospitals.
Jiwarajka also expressed concern about the cyber security talent gap and the
lack of awareness about available dedicated solutions. He attributed these factors
as the biggest challenges being faced by the industry.
In his special address, Sudhanshu said that DeitY is contemplating
amendments to the existing Indian cyber laws to align them with the prevailing
realities of modern times as well as bringing about new encryption and privacy
policies to cater to the evolving cyberspace. He also mentioned that there is a need
for basic education regarding cyber security at all levels of the present education
system in the country.
The conference was conducted along with associate partners including CMAI,
TEMA and CIO Klub. The EFY Group, the parent company of Open Source For
You, was among its media partners.
10 | August 2016 | OPEN sOuRCE FOR YOu | www.OpensourceForu.com
Compiled by:
Jagmeet Singh
Tata Consultancy
Services hosts Open
Source Convention
2016 in Mumbai
Tata Consultancy Services
(TCS) recently hosted the
Open Source Convention
2016 in Mumbai
an annual event that
highlights TCS thought
leadership in the world of
open source and offers a
hands-on experience on
open source technologies.
The day-long Open
Source Convention
2016 witnessed eminent
speakers from all across
India sharing their thoughts
and experiences. The event
was conducted with the
theme of Interoperability
to let its customers
enable enterprise-level
interoperability using open
source solutions.
Relevant and with
enough pointers to
influence roadmaps and
future decisions, said
the CTO of a leading
Indian financial solutions
company, about the
convention. Another CTO
stated that the convention
provided practical
insights to open source
technology adoption.
The event was well
attended by customers
including CIOs and CTOs
of top companies in the
country. It brought about
fruitful opportunities for
the attendees to interact
directly with thought
leaders, and know
more about the latest
developments in the open
source arena.
FOSSBYTES
Raspberry Pi-powered AI solution defeats US Air Force pilot
in combat simulation
While the original aim of launching the Raspberry Pi was to just let enthusiasts
test their DIY projects, now, leveraging some software tweaks, it can beat even
humans at their
own game. Nick
Ernest, a doctoral
graduate from
the University
of Cincinnati,
has designed
an artificial
intelligence (AI)
solution for the
single-board
computer to prove
its capabilities.
Called
ALPHA, the
AI solution defeated retired US Air Force Colonel Gene Lee during combat
simulation. Lee described the new development as the most aggressive,
responsive, dynamic and credible AI solution, to date.
Flying against opponents on a flight simulator was not a new task for Lee as
he has been beating computer programs since the early 1980s. However, ALPHA
made the pilot tired, drained and mentally exhausted due to its exceptional
results. I was surprised at how aware and reactive it was. It seemed to be aware
of my intentions and reacted instantly to my changes in flight and my missile
deployment. It knew how to defeat the shot I was taking, Lee said.
Ernest aims to enhance the AI program in the future by extending its
capabilities and reducing mistakes. The goal is to continue developing ALPHA,
to push and extend its capabilities, and perform additional testing against other
trained pilots. Fidelity also needs to be increased, which will come in the form of
even more realistic aerodynamic and sensor models, Ernest explained.
ALPHA could become the ultimate solution for air combat simulation. It
could even emerge as a benchmark for other AI programs, and perform tasks
based on the commands of a manned wingman in actual flight, using the power
of Raspberry Pi.
NEC Corporation and NEC Technologies India (NTI) have announced the
launch of their OSS
Technology Centre in
the country. The aim of
the new organisation is
to offer technical support
related to the use of open
source software.
Having begun operations
on July 1, the new OSS
Technology Centre will
have around 50 people
based in NTI. The staff
FOSSBYTES
at the Centre comprises engineers who are well versed in open source solutions
architecture as well as essential software development and support capabilities.
NEC and NTI will leverage the newly established OSS Technology Centre to
provide rapid support to users carrying out the construction of OSS-based systems
on a global scale, said Nobuhiko Kishinoue, general manager, cloud platform
division, NEC Corporation.
The Technology Centre will carry out development of new network functions
related to Software-Defined Networking (SDN) and Network Functions
Virtualisation (NFV). It will also help in developing application platform
functions like Platform-as-a-Service (PaaS). Besides, the organisation will
contribute to making source code openly available.
We will be able to utilise the large experienced and English-speaking
engineering resource pool in India for the new centre. We plan to hire both fresh
university graduates and experienced corporate engineers. The OSS Technology
Centre initiative is an umbrella organisation for all OSS related activities between
NTI and NEC to be brought together under one task force, said Anil Gupta, MD
and CEO, NTI.
NEC Corporation estimates that business for open source software will
increase in the future. Therefore, the new centre could soon become fruitful for
the Japanese company.
Google has formally revealed the official name of the next Android version. It
wont be the highly anticipated Nutella, but Android Nougat.
Android Nougat emerged as a result of Googles crowdsourcing attempt at its
annual I/O conference last
month. The new version
will succeed last years
Android 6.0 Marshmallow
and come with features
such as multi-window
support and direct reply.
Additionally, it will
provide improvements
in the existing offerings
like Doze and Data Saver
mode.
For developers,
Google has already
started releasing N
Developer Preview
builds with some
unique peculiarities. While the first preview version came preloaded with a new
JIT compiler to enhance the overall performance of the software and apps, the
second build brought with it new 3D rendering API Vulkan. Notifications also got
revamped with several noticeable enhancements.
Google hasnt revealed the release date of its new Android version. However,
the final SDK for Android N was released in early June, this year, to let developers
test their apps on the upcoming operating system ahead of its formal rollout.
Android Nougat might not be a game changer for the mobile world. But with
the new release, Google is aiming to get bigger.
FOSSBYTES
The new Android version is likely to take virtual reality (VR) to a whole new
level through the Daydream integration. Similarly, it will offer new experiences to
enable real apps without their installation on the hardware using the concept of
Android Instant Apps.
Factory images of Android Nougat are expected to go live for Nexus devices
very soon. Meanwhile, you can get the new experience on your Google device by
downloading the latest Android Developer Preview.
Adobe has announced its new open standard to enable cloud-based digital
signatures across mobiles and the Web. Through a Cloud Signature Consortium,
the new standard will allow users to sign documents digitally from anywhere
around the world.
To widen the Cloud Signature Consortium and to expand the open standard
in a short span of time, Adobe has partnered with some industry leaders. The
consortium is targeting to
provide the secure form
of electronic signing to
more than seven billion
mobile devices.
With more than six
billion digital and
electronic signature
transactions processed
each year through
Adobe Sign and Adobe
Document Cloud, we are
focused on moving the signature industry forward, said Bryan Lamkin, executive
vice president and general manager of digital media, Adobe. The open standard
will benefit processes where signer identification is critical. It provides a secure
solution to authorise documents when applying for a marriage or business licence
as well as gives some social security benefits.
Research firm IDC considers that the new development in the world of digital
security will enable best practices for the industry. An open standard focused
on cloud-based digital signatures will not only help companies save time and
resources but ultimately move an entire industry forward with best practices that
benefit all, said Melissa Webster, vice president of content and digital media
technologies, IDC.
In addition to Adobe, the Cloud Signature Consortium includes members such
as trust service providers, academics and security-focused organisations.
The consortium will initially focus on the European Union and then build a
global network of industry contributions. Specifications of the new standard are
likely to be released by the end of 2016 to kick-start the all-new experience.
NIIT has launched a new course in Web app development under its DigiNxt series.
The new course is developed through the MEAN stack, which includes a group of
open source technologies including MongoDB, Express.js, AngularJS and Node.js.
The 14-week course will enable students to develop, test and release Web apps,
FOSSBYTES
embracing interfaces,
the Web server layer,
middleware and the
back-end, supported by
a product engineering
culture. Participants of the
programme will spend at least 70 per cent of their time on project work. For this,
NIIT has designed two different projects Online Ticket Booking and Online
Cab Booking.
With the launch of MEAN stack we aim to create full-stack developers for
start-ups and product engineering organisations, said Prakash Menon, president
of the global skills and careers group, NIIT.
On successful completion of the course, 100 per cent of the students will
supposedly be offered placement assistance. Companies like LinkedIn, Netflix
and Uber are already using the MEAN stack and will require relevant talent.
We at NIIT, with over 35 years of experience and a keen understanding of
the changing skills requirements of the industry, are committed to offering a series
of industry-aligned training programmes in digital transformation. To cater to this
need, we recently launched Java Enterprise Apps with Dev Ops, which has received
an overwhelming response from the industry and, in continuation to this, we now
introduce the MEAN stack programme, Menon added.
Admissions for the new MEAN stack course began at NIIT centres on June
24, this year.
In addition to the new Web app development programme, NIIT offers various
digital skills development courses like Java enterprise engineering with DevOps,
Big Data and data sciences, cyber security, database systems, the Internet of
Things (IoT), artificial intelligence, machine learning and virtual reality. These
courses are targeted at graduates and graduating students in science, technology,
engineering and mathematics.
As part of its
ongoing efforts to
support the open
source community,
Microsoft has
released .NET Core
1.0. The new .NET
runtime platform has
been opened to the
community and is
available as a crossplatform offering
across Linux and
Mac OS X, in addition to the companys proprietary Windows operating system.
Microsoft announced the first release of .NET Core back in 2014, but the
platform took more than a year to take shape. The Redmond giant has also
revealed ASP.NET Core 1.0 as an open source, modular version of the original
ASP.NET framework.
Additionally, Microsoft has expanded its existing partnership with Red Hat
to debut its .NET Core on Red Hat Enterprise Linux and OpenShift. Today,
were pleased to announce that .NET Core is now not only available on Red Hat
FOSSBYTES
Enterprise Linux and OpenShift via certified containers, but is supported by Red
Hat and extended via the integrated hybrid support partnership between Microsoft
and Red Hat, the Red Hat team members wrote in a statement.
The new development is aimed to help enterprises build new solutions
on .NET and test them directly on computing platforms other than Windows.
This might be considered as a backdrop for Microsofts own operating system.
However, the software giant is targeting to please more developers through the
new announcement.
Microsoft claims that about 18,000 developers from over 1,300 companies
have already contributed to the initial development of .NET Core. This is
just the beginning, but certainly quite a huge one to make the new platform
successful in the market.
Microsoft could use developer contributions in expanding its existing product
offerings. Also, the extensive community support would bring .NET in line with
Java and other developer platforms.
Developers can leverage solutions like Portable Class Libraries (PCL) to take
advantage of .NET Core 1.0 and enhance their existing apps. Likewise, there are
Xamarin tools to enable app development for multiple platforms using the new
open source model.
Microsoft isnt alone in the race to develop new open source technologies.
Facebook and Google are working with the community. While Facebook has
framework React to support developers, Google is making things easier for the AI
world through TensorFlow.
The verdict on how successful .NET Core is has not come out. Nonetheless,
it already has brought Microsoft closer to Red Hat and the ever-growing open
source community.
Months after its much anticipated arrival, Microsoft has finally released a new
version of Skype for Linux client. However, the app isnt as advanced as the one
for Windows or Mac systems, and is backed by the open WebRTC project.
The new Skype for Linux is an alpha version. This explicitly confirms the
presence of some bugs and an inferior user experience over its counterparts on
other platforms such as Windows, Mac and Android, among others.
As you may have guessed by the name, Skype for Linux Alpha is not a
fully functioning Skype client as of yet. Were sharing it with you now as we
want to get it in your hands as soon as possible, so we can continue to develop
the new version together. Once youve downloaded the app, youll notice that
FOSSBYTES
its very different from the Skype for Linux client you use
today, the Skype team wrote in a blog post.
Some basic features that made Skype a popular VoIP
client in the market are missing from the Skype for Linux
Alpha version. These include the highly popular videocalling support and 32-bit Linux compatibility. However,
Microsoft is claiming that the new app will sport a fast
and responsive Skype UI along with some new emoticons
and options to share files, photos and videos. Video calling
support is also likely to be added in the coming weeks.
Unlike some dated Skype versions for the Linux platform,
the new app is backed by an all new calling architecture. This
new technology enhancement allows you to directly call your
friends and family who are using the latest Skype apps on
their Windows, Mac, iOS and Android devices but restricts
the calling functionality for older versions based on the open
source platform.
While Microsoft is all praises for the new features, the
Linux community has criticised the delay in the release of
a full-fledged Skype version for the open source operating
CODE
SPORT
Sandya Mannarswamy
The agent then asks you for the order details. He then
apologises to you for putting you on hold while he looks
up the backend database. Once he has the details, he
either mentions that, The item has already been shipped
and you can expect to receive it on date XX-YY-ZZ, or
he tells you that the delivery has been delayed and gives
you the reason for the delay, etc. Now, if you analyse the
many thousands of such conversations that take place
every day, you can find that they follow a typical pattern.
From that, the crucial next question that springs to mind
is, Can these queries be answered by an automated
agent instead of a human agent?
Well, the answer is yes, and NLP comes to our rescue
in automating these communication services. While at
first glance it seems quite difficult to replace the humanto-human communication with human-to-virtual agent
communication, it is indeed possible. In many cases,
virtual agents provide initial communication support for
simple queries. However, human agents can take over in
case the conversation becomes complex and deviates a lot
from the normal script.
There are two key components to a solution to
virtualise the communication between human customer
and virtual agent. First, the human customers part of
the conversation needs to be analysed and then the
appropriate response and follow-up question, if any,
needs to be generated in natural language format and fed
to the virtual agent. So both natural language processing
and natural language generation need to be done.
The key challenge is to ensure that the conversational
experience does not deteriorate by automating
the process and the human customer does not feel
dissatisfied (of course, the ideal experience would be
when the human customer cannot detect whether he is
talking to a virtual agent or a human agent).
Let us analyse the problem in a little more detail,
focusing first on the natural language processing part.
Let us assume that we are given a database of thousands
of chats that have happened between human agents and
CodeSport
Guest Column
Exploring Software
Anil Seth
Guest Column
A bitcoin blockchain
Extending blockchains
Strong community
support is vital
A lot of organisations
are currently using Odoo for their business processes as
it is cheaper and has a strong community support. We
liked its implementation for HR, and since we are small
at this point, it will be relatively easy for us to transition
ultimately to Odoo for other business processes too,
Agarwal said.
Deploying open source technologies is not always a
breeze, though. Agarwal mentioned that certain finishing
touches are sometimes missing in open source solutions.
If the software does not have well-managed community
support, it is often problematic to use and hence not
recommended, he added.
However, Jugnoo addresses this challenge by using
solutions that are backed by fairly strong communities.
Chinmay Agarwal, co-founder and CTO of Jugnoo, at the Jugnoo server room
theMe
March 2016
April 2016
May 2016
Web Development
June 2016
July 2016
August 2016
Network Monitoring
September 2016
October 2016
Cloud Special
November 2016
December 2016
Machine Learning
January 2017
Virtualisation (containers)
February 2017
Top 10 of Everything
Rahul Kumar,
country head of WinMagic
Admin
Insight
Hybrid Cloud
Community
Cloud
History
Private
Cloud
Public Cloud
incidentally has its own cloud offerings under the HPE Helion
banner. The Helion portfolio has a variety of cloud related
products, which includes HPs own flavour of OpenStack
called HP Helion OpenStack. Now, Eucalyptus is a part of
the HPE portfolio and is called HPE Helion Eucalyptus.
It provides an open solution for building a hybrid cloud,
leveraging the benefits of other HP Helion products.
Eucalyptus architecture
Insight
Data Center
User
Interface
and API
Management
Console
AWS-Compatible
APIs
Cloud
Cloud Controller
CLC
Scalable Object
Storage
SOS
Applications
Auto scaling
Cloudwatch
Elastic load
balancing
Compute
Storage
Network
Cluster for
High
Availability
Admin
Cluster Controller
CC
Storage Controller
SC
Identity and
Access
Management
Virtualization
Nodes
Node Controller
NC
VM
Node Controller
NC
VM
VM
VM
Node Controller
NC
VM
Physical Infrastructure
VM
Eucalyptus components
Other tools
There are many other tools that can be used to interact with
Eucalyptus and AWS, and they are listed below.
s3curl: This is a tool for interaction between Eucalyptus
Walrus and AWS S3.
Cloudberry S3 Explorer: This Windows tool is for
managing files between Walrus and S3.
s3fs: This is a FUSE file system, which can be used to
mount a bucket from S3 or Walrus as a local file system.
Vagrant AWS Plugin: This tool provides config files
to manage AWS instances and also manage VMs on
the local system.
You can refer to https://github.com/eucalyptus/eucalyptus/
wiki/AWS-tools for more information.
www.OpensourceForu.com | OPEN sOuRCE FOR YOu | august 2016 | 29
Admin
Insight
Architecture
Installation
Administration
Security
Popularity
IaaS offering
Medium
Public + private (hybrid)
support@efy.in
Do you have a query,
suggestion or a complaint?
You can e-mail it to
support@efy.in
and we will take care
of the rest.
www.electronicsforu.com
www.eb.efyindia.com
www.opensourceforu.com
www.efy.in
Overview
Admin
Admin
Overview
Nagios
Zabbix
Cacti
Admin
Overview
OpenNMS
Icinga
Admin
Overview
(b) Icinga Web: This is also known as the new Web and
has a Web 2.0 inspired front-end to offer drag and
drop customised dashboards. It communicates to the
core, database and other third party add-ons.
4. Icinga Data Out Database: This acts as a storage point for
historical data monitoring for add-ons.
5. Icinga Reporting: This is a reporting module based on
the open source Jasper Reports. The reporting module
provides template based reports with varied access levels,
and automated report generation and distribution.
6. Icinga Mobile: This is a user interface for smartphones
and tablets. It is available for iOS, Android, BlackBerry,
etc, and is based on JavaScript and Sencha Touch.
Important plugins of Icinga are:
1. Performance monitoring: PNP4Nagios,
NagiosGrapher and InGraph
2. Configuration interfaces and tools: Nconf, Nagios QL
and LConf
3. Business process monitoring: Business process add-ons
4. Network visualisation: NagVis and Nagmap
5. Windows monitoring: NSClient++ and Cygwin
6. SNMP trap monitoring: SNMPTT and NagTrap
Op5 Monitor
Munin
Overview
Admin
Figure 1: Nagios
NetXMS
IT infrastructure.
Designed for maximum performance and scalability.
Distributed network monitoring and automated network
discovery.
Business impact analysis tools; quick deployment with
minimal efforts.
Easy and simple integration with a wide range of
products.
Flexible and easy to use.
References
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
https://www.nagios.org/
http://www.zabbix.com/
http://www.cacti.net/
http://www.opennms.org/
https://www.icinga.org
https://www.op5.com
http://munin-monitoring.org/
https://opmantek.com/network-management-system-nmis/
https://www.netxms.org
Admin
Overview
Overview
2. Eliminates faulty scripts with customised built-in alerts.
3. Monitors multiple vendor infrastructure through one Web
interface.
4. Accesses applications on the private, public as well as
hybrid cloud.
5. Modifies built-in templates for extensive customisation.
Nagios Process
Monitoring Logic
Check Logic
Embedded Perl
Interpreter
Plugins
Nagios
Perl Plugins
Monitored Entities
Pros
Cons
Admin
OpenNMS
Pros
Free licensing!
Good support and documentation through wikis and
mailing lists.
Admin
Overview
Map Map 1
View Map
Map Designer
Settings
Get HTML
Comments
Router 1
Switch 2
Router 2
Root
Cons
Paessler
Pros
Low price.
Flexible monitoring for apps, networks and more.
Includes many useful features at no extra cost, e.g.,
Netflow, high-availability, remote probes.
Flexible alerting, comprehensive reporting.
Cons
SolarWinds
Pros
Excellent UI design.
Customisable, automated network mapping.
Great community support from Thwack.
Mobile access.
Native VMware support.
Cons
References
[1] http://www.monitance.com/en/product-news/what-isserver-monitoring-and-why-is-it-important/
[2] http://www.solarwinds.com/server-application-monitor
[3] http://www.solarwinds.com/solutions/remote-servermonitoring
[4] http://www.embedded.com/electrical-engineercommunity/general/4429112/Remote-control-of-devicesusing-an-Android-platform
[5] http://mashable.com/2015/11/17/network-servertools/#ONbS_YrIIgqZ
[6] http://www.monitis.com/blog/2011/02/22/11-top-servermanagement-monitoring-software
[7] https://haydenjames.io/20-top-server-monitoringapplication-performance-monitoring-apm-solutions/
Lets Try
Admin
Lets have a look at the premier, free, open source, network intrusion and
detection system called Snort. It is an amazing tool that lives up to its billing. This
tutorial walks you through the basics of Snort.
apt-get
apt-get
apt-get
apt-get
apt-get
install
install
install
install
install
apache2
mysql-server
php5
php5-mysql
php5-gd
Admin
Lets Try
Variable
Description
HOME_NET
ORACLE_PORTS
RULE_PATH
Please note here that to get Snort ready to run, one needs
to change the default configuration settings to match your
42 | august 2016 | OPEN sOuRCE FOR YOu | www.OpensourceForu.com
Example
Rule action
alert
Protocol
ICMP
Source IP address
any
Source port
any
Direction operator
->
Destination IP address
any
Destination port
any
Rule options
Lets Try
Admin
You can see from the above command that there is no need
to specify the verbose mode or d /-e switches. This is because,
in binary mode, the entire packet is logged, not just parts of it.
Admin
Lets Try
Another important
concept that we need to
understand in Snort is
output configurations. Snort
provides a variety of options
to display the output and
the detected information.
Please note that many
Snort administrators use
third-party applications to
monitor and investigate the
information generated by
Snort. To do this, Snort must
output the data in a particular
format. One can enable
multiple output plugins and
these allow a variety of tools
to be employed by Snort administrators. Let us have a quick
look at some of these output configurations.
a. Alert syslog: UNIX based systems use the syslog facility
to consolidate the generated messages. Snort-generated
information can be presented to syslog in a number of
ways. In this output configuration, the format looks like
the following:
Output alert_syslog: <facility> <Priority>
Lets Try
Admin
Deep learning
Admin
Lets Try
$ python
>>> import tensorflow as myTensorFlow
>>> MyMessage = myTensorFlow.constant(Hello To All)
>>> mysession = myTensorFlow.Session()
>>> print(sess.run(MyMessage))
Hello To All
>>> x = myTensorFlow.constant(9)
46 | august 2016 | OPEN sOuRCE FOR YOu | www.OpensourceForu.com
>>> y = myTensorFlow.constant(2)
>>> print(mysession.run(x + y))
11
>>>
Lets Try
******S* Seq: 0x43EE1111 Ack: 0x0 Win: **** TcpLen: 20
[Xref => http://doc.url.net/2016936]
TensorBoard
EVENTS
AUDIO
GRAPHS
HISTOGRAMS
accuracy
accuracy
Split on underscores
IMAGES
Admin
0.900
0.700
Horizontal Axix
STEP
0.500
RELATIVE
0.300
WALL
0.100
0.000 200.0 400.0 600.0 800.0 1.000k
Runs
Write a regex to filter runs
test
dropout_keep_probability
train
TOGGLE ALL RUNS
dropout_keep_probability
ACCESS ELECTRONICS
B2B INDUSTRY WITH A
www.electronicsb2b.com
Log on to www.electronicsb2b.com and be in touch with the Electronics B2B Fraternity 24x7
www.OpensourceForu.com | OPEN sOuRCE FOR YOu | august 2016 | 47
Admin
How To
Building a Multi-Host,
Multi-Container Orchestration and
Distributed System using Docker
This article is about the next generation Docker clustering and distributed
system, which comes with various interesting built-in features like orchestration,
self-healing, self-organising, resilience and security.
How To
Images
Containers
manages
Client
docker CLI
Network
manages
Rest APIs
Server
Docker
Daemon
Admin
Data
Volumes
manages
Client
Docker Engine
Orchestration Components
Docker Engine
Swarm Mode
Manager
container
Swarm Mode
Worker
TLS
Certificate
Authority
Volumes
Load
Balancing
Service
Discovery
Plugins
Distributed
store
runc
runc
Networking
Container
Runtime
runc
Manager
Orchestration
Scheduling
Resource Awareness
Constraints
Strategies
Cluster Management
State Store
Topology Management
Node Management
Worker
Worker
Manager
Worker
Worker
Manager
Worker
Worker
Worker
Rolling updates
Promoting a node to the manager group
To test drive the Docker Mode, I used a four-node cluster
in the Google Cloud Engine all running the latest stable
Ubuntu 16.04 system as shown in Figure 4.
Zone
In use IP
External IP
Connect
swarm-agent3
asia-east1-b
default
10.140.0.2
130.211.249.130
SSH
swarm-agent1
asia-east1-c
default
10.140.0.3
130.211.251.130
SSH
swarm-agent2
asia-east1-c
default
10.140.0.4
130.199.169.202
SSH
swarm-agent1
asia-east1-b
default
10.140.0.5
104.199.164.86
SSH
Network
In use by
Security
Mutual TLS
Acceptance Policy
Certification Rotation
Admin
How To
Now you can see that there are five different containers
running across the cluster, as shown in Figure 13.
The command in Figure 13 declares a desired state
on your swarm of five busybox containers, reachable as
a single, internally load balanced service of any node in
your swarm.
Rolling updates
References
[1] https://blog.docker.com/2016/06/docker-1-12-built-inorchestration
[2] http://www.collabnix.com
[3] https://github.com/docker
How To
Admin
Admin
How To
Internal
groups
Internal
network
Admin
External
access requirements
DNS servers
Port
Alias
Group
TCP, UDP
53
GmailServices
External IP Alias
Group
Mail services
mail.companymail.com
Internet
services
8085
Any
DNS servers
Gmail servers
www.companymail.com
Gmail servers
FTP services
ftp.customersite.
com
GmailServices
Gmail servers
8080
www.website.
com
IMAPS 993
SMTPS 465
POP3S 993
Submission 587
GmailServers IP alias group containing IP addresses for
the following servers:
smtp.gmail.com
imap.gmail.com
c. Group of internal systems required to access Gmail using
the mail client.
Think about how to group various internal/external IP
addresses and services to create the minimum number of
access rules. Create IP and ports alias lists from Firewall
Alias menus.
b.
Figure 2: GmailServices
How To
Admin
Admin
How To
1. Back up the firewall before making any changes this
will enable a rollback of settings if something goes wrong
after the change.
2. Make changes in the documentation such as the ACL table
first to ensure the documentation is up to date, always.
3. Make changes to firewall settings, ensuring comments for
created rules. Implement only documented rules.
4. Test the change to ensure it is giving only the desired
access.
5. Back up the firewall after the change is complete.
Following these steps will ensure correct and up-to-date
documentation of implemented firewall rules, which will definitely
help future firewall troubleshooting, reconfiguration and migration.
References
[1] TCP Handshake: https://en.wikipedia.org/wiki/
Transmission_Control_Protocol
[2] pfSense firewall rule basics: https://doc.pfsense.org/
index.php/Firewall_Rule_Basics
[3] Example of pfSense basic firewall rule: https://doc.
pfsense.org/index.php/Example_basic_configuration
[4] Note about FQDNs: https://doc.pfsense.org/index.php/
Using_FQDNs_in_Aliases
[5] Forum link for allowing Gmail: https://forum.pfsense.org/
index.php?topic=101809.0
[6] URL Alias: https://forum.pfsense.org/index.
php?topic=66499.0
How To
Admin
Admin
How To
OK; ac <- 1; !recovery
WARNING
WARNING ; ac < mca - 1
ac++
WARNING
ac <- 1
ac < mca - 1
Soft WARNING
WARNING
ac==mca - 1
ac++ ; !problem
Hard WARNING
How To
Server Metrics
Desktop Metrics
Specify which services youd like to monitor for the Windows machine.
Ping
Monitors the machine with an ICMP ping, Useful for watching network latency and general uptime
CPU
Monitors the CPU (processor usage) on the machine.
Warning Load: 85
% Critical Usage: 95
% Critical Usage: 95
Specify which services youd like to monitor for the Windows server.
Ping
Monitor the server with an ICMP ping. Useful for watching network latency and
CPU
Monitors the CPU (processor usage) on the server
80
Memory Usage
Monitors the memory usage on the machine.
Warning Usage: 85
Admin
90
Memory Usage
Monitors thememory usage on the server.
Uptime
80
90
Disk Usage
Warning Usage: 80
% Critical Usage: 90
Drive :
Warning Usage: 80
% Critical Usage: 90
Disk Usage
Monitors disk usage on the server.
Drive:
Back
C:
80
95
Drive:
80
95
Drive:
80
95
Drive:
80
95
Drive:
80
95
Next
Add Row
Delete Row
Performance Counter
Display Name
Warning
Value
Critical
Value
90
\\Server\\Errors System
20
Logon Errors
Admin
How To
Key Services
60ms
0.75s
30%
40ms
0.5s
20%
20ms
0.25s
10%
12:00
15:00
18:00
21:00
12. Feb
03:00
06:00
09:00
Status
Duration
localhost
Up
www.google.com
Up
www.nagios.com
Up
N/A
www.yahoo.com
Up
Attempt
1/5
Page 1
Last Check
Status Information
of 1 15 Per Page
Go
References
[1] Shival Dubey, Anant Wadhwa, Subodh Kumar, Vineet Virmani
and Vaibhav Hans:Agent-Less Hardware Monitoring Tool
for Cluster Management, International Journal of Advanced
Research in Computer Science and Software Engineering,
Vol.3, No. 9, September 2013.
[2] RuanEllis: HOWTO: Set up NAGIOS for an HPC cluster.
December 2014. Available from: https://github.com/alcessoftware/symphony/wiki/HOWTO:-Setup-NAGIOS-for-anHPC-cluster
[3] Nagios report:Nagios XI Installing The Windows Agent:
NSClient++ Available from: https://assets.nagios.com/
downloads/nagiosxi/docs/Installing-The-Windows-AgentNSClient++-for-Nagios-XI.pdf
[4] Ravi Saive: How to Add a Windows Host to a Nagios
Monitoring Server November 2013. Available from: http://
www.tecmint.com/how-to-add-windows-host-to-nagiosmonitoring-server/
[5] Magesh Maruuthamuthu: How to add a Remote Windows
Host on a Nagios Server to Monitor, February 2015.
Available from: http://www.2daygeek.com/add-remotewindows-host-on-nagios-server-to-monitor/#
How To Developers
This article is a short tutorial on how to create a simple TaskAPI with SQLite, which
communicates over JSON and REST. We will use the Django Web and REST frameworks.
mkdir Taskproject
cd Taskproject
virtualenv env
source env/bin/activate
Developers How To
The installed apps are listed in the INSTALLED_APPS
constant in setting.py.
INSTALLED_APPS = (
rest_framework,
Task,
)
Creating models
Lets go back to the Task app in the folder Task and create the
models we need in the file /Task/models.py. In order to define
a Task model, we need to derive from the Model class. Lets
use User class of the standard authentication as a foreign key
in the owner attribute.
We define an owner, task name, description of the task, a
status and an attribute which stores the last time a model got
updated.
from django.db import models
from django.contrib.auth.models import User
class TaskModel(models.Model):
user = models.OneToOneField(User)
task_name = models.CharField(max_length=100)
task_description = models.TextField(max_length=200)
status = models.BooleanField(default=False)
date = models.DateTimeField(auto_now_add=True)
Creating serialisers
How To Developers
router = routers.SimpleRouter()
router.register(rtask,views.TaskView,base_name=task)
urlpatterns = [
url(r^,include(router.urls)),
url(r^register, views. RegistrationView.as_view(),
name=register),
url(r^admin/, include(admin.site.urls)),
url(r^api-auth/, include(rest_framework.
urls,namespace=rest_framework)),
]
class TaskView(viewsets.ModelViewSet):
Only Authenticate User perform CRUD Operations on
Respective Task
permission_classes = (permissions.IsAuthenticated,)
model = TaskModel
serializer_class = TaskSerializer
def get_queryset(self):
Return tasks belonging to the current user
queryset = self.model.objects.all()
# filter to tasks owned by user making request
queryset = queryset.filter(user=self.request.user)
return queryset
def perform_create(self, serializer):
Associate current user as task owner
return serializer.save(user=self.request.user)
model = User
serializer_class = RegistrationSerializer
permission_classes = (permissions.AllowAny,)
from
from
from
from
er
Developers How To
My Library Application in
App Inventor 2
Heres another tutorial in our ongoing series to help you hone your skills for making
useful Android apps with App Inventor.
GUI requirements
How To Developers
Horizontal arrangements: These
are special components, which keep
all child components aligned within
themselves, horizontally.
Notifier: This is used to display some
instructions or gives you control over
your existing components. You will be
able to see its functionality in more detail
as we will be implementing it in our app.
List picker: The list picker
component is one of the basic
components from the App Inventor
repository. Using this you can pick a
definite item from a list of items and
once selected, it will be treated as your
choice for further actions.
Tiny DB: As you already know,
this is the application-specific database
that the Android system provides. This
is where all your user credentials like
Viewer
Display hidden components in Viewer
Author:
View Books
Delete
Add
Notifier1
TinyDB1
Component name
Label
Button
Horizontal arrangement
Notifier
Tiny DB
List picker
Book List
Search list...
Book Title
Add
Author:
Delete
Java Intro:James
Enter Author
View Books
Java Advanced:Hary
Android Programming:Andy
Validates if title/author
entered, then adds to list
Purpose
To display a label
To trigger events
To arrange the child components
To display on-screen information
To store data persistently
Enable picking an item from the list
Components
Screen1
Label2
Label4
Horizontal Arrangement1
Label1
txtBookTitle
Label3
txtBookAuthor
Horizontal Arrangement2
btnAdd
btnDelete
btnView
btnClearList
ListPicker1
Notifier1
TinyDB1
Rename
Delete
Media
Location
Palette-->User Interface-->Label
Palette-->User Interface-->Button
Palette-->Layout-->Horizontal Arrangement
Palette-->User Interface-->Notifier
Palette-->Storage-->Tiny DB
Palette-->User Interface-->List Picker
Developers How To
now ready. Figure 2 shows how
the application will look after the
installation.
9. Figure 3 gives the hierarchy of the
components that we have dragged to
the designer.
If you are confused seeing the
designer and the components viewers,
let me explain these a bit more. Here is
the hierarchy that we have placed for our
application.
1. At the top, we have the title for
our application. Its always a good
practice to name your application
and show it on the screen as well. We
have put a label for that and have set
its text property to the name of the
application.
2. Next, we have a horizontal
arrangement, which has two labels
and their corresponding text boxes.
Properties
btnAdd
BackgroundColor
Default
Enabled
FontBold
FontItalic
FontSize
14.0
FontTypeface
default
Image
None...
Shape
default
ShowFeedback
Text
Add
How To Developers
the procedure isExistingBook. The
find out if it exists or not. If it exists, it
procedure (see above) checks to see if
returns true, else false.
the book exists in the list and, based
Adding a book: When the button
on that, returns true or false. If false
Add is clicked, it invokes the procedure
(book not found), it displays an error
isDataEntered.
If a false is returned from
the procedure (i.e., data was
not entered in text fields), it
displays an error message.
If true is returned, then we
invoke the procedure called
isExistingBook. The procedure
checks to see if data already
exists in our list. If it does, an
error message is displayed;
otherwise a join of title and
author, in the format of Title:
Author, is stored in the list. It also
Figure 6: Block Editor Image 2
stores this latest data into our
database using our TAG variable.
Viewing books in ListPicker:
When the View button is pressed,
we invoke the ListPicker.Open
to show data. This will cause the
BeforePicking block of ListPicker
to be triggered. Once triggered, we
set its elements to listBooks, which
contains our book collection data.
Next, the picker will open, showing
the data.
Data in the picker (Figure
9) is displayed in the format
BookTitle:BookAuthor. When a
selection is made, AfterPicking will
Figure 7: Block Editor Image 3
be invoked. At this time, we take
data for the current select, split it
at the colon (:) and assign it to a
temporary variable (varTemp) as a
list. The list will have two items,
with the first item as the BookTitle
and the second item as BookAuthor.
The next blocks take the first item
(BookTitle) and set it into the text
field (txtBookTitle), and then take
Figure 8: Block Editor Image 4
the second item (BookAuthor)
and set it into the text field
(txtBookAuthor).
Deleting books: To delete a
book, you can select an existing
book from the picker (see Figure
10). You can also manually
enter the title/author into the text
fields and then click the Delete
Figure 9: Block Editor Image 5
button. Once clicked, we invoke
Developers How To
Debugging the application
References
[1] http://www.django-rest-framework.org/#tutorial
[2] https://docs.djangoproject.com/en/1.9/
[3] Source code related to this article is available at:
http://opensourceforu.com/article_source_code/
aug16/djangoandrestapi.zip
How To Developers
PhoneGap: Simplifying
Mobile App Development
Developing mobile apps is fun, but developing apps for different mobile operating systems,
individually, is a chore! An easy way out is to use PhoneGap, which is a software development
platform that can create mobile apps for all mobile platforms in one go. The best thing about
PhoneGap is that developers can work with it using existing Web developer skills.
Installation
Developers How To
Configuration
Files
Information
or content
(built using
web
technologies)
Icons
App
Figure 1: PhoneGaps structure
Environment set-up
<widget>
<name>
An example is:
<?xml version=1.0 encoding=UTF-8 ?>
<widget xmlns = http://www.w3.org/ns/widgets
xmlns:gap = http://phonegap.com/ns/1.0
id
= com.phonegap.helloworld
versionCode = 20
version
= 0.0.1 >
<name>PhoneGap Hello Wold</name>
<description>
Hello World Example
</description>
</widget>
An example is:
<platform name=ios />
<platform name=android />
<patform name=winphone />
How To Developers
Name
assets
bin
gen
libs
res
src
.classath
.project
AndroidManifest
build.properties
build
default.properties
local.properties
Developers How To
Table 1
API
Battery status
Camera
Console
Contacts
Device
Device Motion
(Accelerometer)
Device Orientation
(Compass)
Dialogs
File Transfer
Geolocation
Globalization
Media
Splashscreen
Vibration
StatusBar
Usage
Monitors the status of the devices
battery
Captures a photo using the devices
camera
Adds additional capability to console.
log()
Works with the devices contact database
Gathers device-specific information
Taps into the devices motion sensor
Obtains the direction that the device is
pointing
Visual device notifications
Hooks into a native file system through
JavaScript
Makes your application location aware
Enables representation of objects specific to a locale
Records and plays back audio files
Shows and hides the applications
splash screen
An API to vibrate the device
An API for showing, hiding and configuring the status bars background
How To Developers
Once you run the command, you will see the screen
shown in Figure 3.
This will create a complete workspace for your PhoneGap
Android app, as shown in Figure 4.
<!DOCTYPE HTML>
<html>
<head>
<meta name="viewport" content="width=320; userscalable=no" />
<meta http-equiv="Content-type" content="text/html;
charset=utf-8">
<title>PhoneGap</title>
<script type="text/javascript" charset="utf-8"
src="phonegap.js"></script>
<script type="text/javascript"
charset="utf-8">
var sayHello = function() {
var name =
document.
getElementById("Name").value;
navigator.notification.alert("Hello
:" + name);
}
</script>
</head>
<body onload="init();" id="ibody" >
<div id="txt">
<input type="text" name="Name" id="Name" />
</div>
<div id ="btnhello">
<a href="#" class="btn" onclick="sayHello();">Go</a>
</div>
</div>
</body>
</html>
References
[1] http://code.tutsplus.com/tutorials/creating-an-androidhello-world-application-with-phonegapmobile-2532
[2] http://coenraets.org/blog/phonegap-tutorial/
[3] http://phonegap.com/blog/tag/tutorial/
[4] http://phonegap.com/getstarted/
[5] http://www.phonegap.co.in/phonegap-tutorial/
[6] http://code.tutsplus.com/tutorials/phonegap-fromscratch-introductionmobile-9171
OpenSourceForU.com
Follow us on Twitter@LinuxForYou
Developers How To
How To Developers
initialise a project with npm, we can run npm init inside our
sample project directory. It creates a package.json file with the
options that you have selected.
Another way of doing this is by creating a sample project
directory get_started and adding properties like the name
and scripts to the package.json file. Then add Flow to the
project (Figure 2).
Figure 3 shows how to create a file index.js.
// @flow at the beginning of the file tells Flow to check
this file. If this line is neglected, then Flow will not type
check this file.
To run Flow
No errors indicates that the file index.js has been type checked
and run error-free.To study the functioning of this static type
checker, lets make an error, type check it and see if Flow
detects it or not (see Figure 4).
So, now the index.js looks like whats shown in Figure 5.
Note the type change we have made here. Now, on
compilation, the result looks like what can be seen in Figure 6.
We see that Flow detects the type error.
By: H. Chaithanya Krishnan
The author is an open source enthusiast. She is an active
contributor to the world of open source. She can be reached at
chaitanya7991@gmail.com
Developers How To
How do Arrays
Decay into Pointers?
This article is for C programming newbies and enthusiasts. It deals with
how arrays are passed as parameters to a function decays into pointers.
20for(i=0;i<size;i++)
21
{
22printf(Thevalue@address:%p:
%d\n,&numbers[i],numbers[i]);
23
}
24 }
Code 2
How To Developers
The two declarations of the function display shown in
Code 1 and Code 2 look different from the programmers
perspective, but from the compilers viewpoint, both are one
and the same. The standard specifies that a parameter in the
function declaration, which is of array of type(T) shall be
decayed to pointer to type(T).
Note 1: An array name in the declaration of a function
parameter is treated by the compiler as a pointer to the first
element of the array.
void display(int numbers[], int size);
void display(int numbers[5], int size);
Example 2
3#defineCOL2
4
5 int main()
6 {
7intarray[ROW][COL];
8
populate(array);
9
10
//Some code here
11 }
12
13voidpopulate(int(*array)[COL])
14 {
15
//Some code here
16 }
Developers How To
1 #include <stdio.h>
2
3 int main()
4 {
5//Definethearray
6
int a[5] = {10, 20, 30, 40, 50};
7
8
int x = *a;
9
10
...
11
12
return 0;
13 }
Statement
10
Code 6
From Code 6, in the expression shown in Line 8, the name
of the array a is decayed into the pointer to the first element
of the array by the compiler. As a result, dereferencing the
pointer yields the value stored at the first location of an array,
which is nothing but 10 in the example shown in Code 6.
Let us consider one more example to show how the
subscript in the array is always the offset from the pointer.
100
20
104
30
40
108
112
Assumptions:
1. The base address of the array(a) is 100 and
sizeof(int) = 4 bytes.
Interpretation of a[2] in pointer notation and how the new
address is computed is shown below:
An array name (a) is decayed into the
pointer to the first element of the array.
The subscript 2 is treated as the offset
from the pointer, which is added to the
base address of the array.
a[2]=>*(a+2)
1 #include <stdio.h>
2
3 int main()
4 {
5//Definethearray
6
int a[5] = {10, 20, 30, 40, 50};
7
8
int x = a[2];
9
10//a[2]<=>*(a+2)
11
12
return 0;
13 }
Code 7
From Code 7, Line 8, the compiler internally treats the
name of the array a as the pointer to the first element of the
array; the subscript value 2 is added to the pointer as a offset
to get the new address. The equivalent of a[2] is nothing but
*(a + 2). The pictorial representation of Code 7 is shown in
Table 1. So, here, once again, the name of the array decays
into the pointer to the first element of the array and then the
subscript will be added.
The compiler automatically scales a subscript to the size
of the object pointed at. For instance, if sizeof(int) is 4 bytes
long, then the subscript 2 in a[2] is actually 2 * 4 bytes long
from the base address of the array. The compiler takes care
of scaling, before adding the subscript to the base address of
76 | august 2016 | OPEN sOuRCE FOR YOu | www.OpensourceForu.com
50
116
=>*(100+2*4)
=> *(108)
=> 30
20
104
30
108
40
112
x = a[2]
50
116
The Fundamentals of
RDMA Programming
Computers in a network can exchange data in the main memory with the
involvement of the processor, cache or OS by using a technology called remote
direct memory access (RDMA). This frees up resources, improving the throughput
and performance while facilitating faster data transfer.
InfiniBand (IB)
Components of InfiniBand
Installing RDMA
ah_attr.dlid
= dlid;
ah_attr.sl
= sl;
ah_attr.src_path_bits = 0;
ah_attr.port_num
= port;
ah = ibv_create_ah(pd, &ah_attr);
if (!ah) {
fprintf(stderr, Error, ibv_create_ah()
failed\n);
return -1;
}
android:text=@{model.text}
Expression chaining
Lambda expressions
References
[1] https://developer.android.com/topic/libraries/databinding/index.html
[2]. https://github.com/google/android-ui-toolkit-demos/tree/
master/DataBinding/DataBoundRecyclerView
[3] https://www.youtube.com/watch?v=DAmMN7m3wLU
[4] https://github.com/samvidmistry/data-binding-demo Link to demo used in article
Developers Insight
Insight Developers
Native or Hybrid App
Web App
Password
Communication
Channel
User Name
Communication
Channel
UI Layer
Login
Native Layer
Sign In
appEZ
Developers Insight
MMI (native): This is the corresponding native layer at the
respective platform container that receives the required
parameters from the Web layer and executes native
services as per the need.
MMI callback notification: Each MMI API requires
callback at the Web layer to get notified about success/
failure from native container layer (Android/iOS/WP).
appEZ supports the Android (API level 10 onwards),
iOS6 - iOS9 and Windows Phone 8/8.1 mobile platforms for
mobile application development. It has some advantages over
competing frameworks. These include:
Unique offering of flexible architecture for true mobile
hybrid application development
Flawless amalgamation of native and hybrid technologies
as per applications needs
Covers all the layers of mobile hybrid application
development
Modular architecture makes it possible to use only the
required components as per business requirements, as
against using the complete library set-up
Ready-to-use services for accessing the most commonly
used features of the native container
Expressive and easy-to-use JS syntaxes
Based on open source libraries which makes the design/
development extensible
UIC UI Layer
MMI (JavaScript)
SmartWeb
References
[1] Enterprise Mobility Breakthrough, < http://www.amazon.
com/Enterprise-Mobility-Breakthrough-Beginners-Guide/
dp/1482844087, https://books.google.com/books/
about/Enterprise_Mobility_Breakthrough.html?id=_
sY5rgEACAAJ&hl=en >
[2] appEZ,< http://appez.github.io/ >
OpenSourceForU.com
Follow us on Twitter@LinuxForYou
Using OLabs
Figure 1: Home page of the OLabs
Objective To determine the focal length of a concave mirror, by obtaining image of distant object.
Theory
Current status
The system has been available on the OLabs website for the
past few years. There are over 150 labs covering physics,
chemistry, biology, mathematics and English. Twelve
English labs are currently open to students of different
classes, depending on the concepts that they want to
practice. The number of other labs is given below (as per the
CBSE curriculum).
Class/
subject
Physics
Chemistry
Biology
Math
IX
11
13
13
10
12
XI
16
10
13
XII
16
15
Acknowledgements
This setting ensures that the prompt contains a colourcoded user name, machine name, date, time and current
directory. Most importantly, you get an entire line to type your
command. If you want to tinker with the prompt even further,
visit the IBM Developer Works Linux library page for Prompt
Magic. (I had mentioned this trick in a previous article. I am
repeating it here for those who might have missed it.)
Using command history: The commands that you type are
stored in a hidden file named .bash_history. You can browse
the history using the up and down arrow keys at the prompt.
You can also search this history using the keyboard shortcut
Ctrl+R. You can increase the length of the command history
by changing the following variables in the .bashrc file. They
limit the number of lines of typed commands that can be
stored in memory and in the .bash_history file.
HISTSIZE=1000
HISTFILESIZE=2000
Using keyboard shortcuts: GNOME Terminal is a multitab window. You can press Ctrl+Shift+T and start a terminal
in a new tab in the same window. If you feel you need to refer
to the man pages of the current command, do not cancel what
you are typing. Just start a new tab and browse the man pages
from there. Another useful shortcut is Ctrl+U, which cancels
or deletes everything in the current line and lets you begin
afresh. To copy text from a terminal window, the short cut is
Ctrl+Shift+C, and the short cut to paste text is Ctrl+Shift+V.
Ctrl+C is for killing the current command and should not
be used to copy text in the terminal.
Switching to a TTY terminal: The Linux desktop
managers are known to be very stable. However, on those
rare occasions when the desktop hangs, you can hold down
Ctrl+Alt and press any of the function keys to switch to a TTY
terminal. These terminals are created by the OS before loading
the GUI (desktop manager). From one of these terminals, you
can log in to your account and do your troubleshooting. One of
the following commands can restart the desktop manager.
sudo service gdm restart # for Gnome 2
sudo service mdm restart # for Mate
www.OpensourceForu.com | OPEN sOuRCE FOR YOu | August 2016 | 89
${GEDIT_CURRENT_DOCUMENT_NAME%.*}.htm
References
[1] http://www.linuxcommand.org/learning_the_shell.
phpLearning the shell
[2] http://tldp.org/HOWTO/Bash-Prompt-HOWTO/index.html
BASH Programming - Introduction HOW-TO
[3] http://www.ibm.com/developerworks/linux/library/l-tipprompt/ Tip: Prompt magic
By: V. Subhash
The author is a writer, programmer and FOSS
fan (www.vsubhash.com).
www.electronicsb2b.com
COMPONENTS STORIES
TOP
nverters
The latest in power co
ent distributors
Indias leading compon
ry
onics components indust
Growth of Indian electr
components for LEDs
The latest launches of
ics
components for electron
The latest launches of
ELECTRONICS
INDUSTRY IS AT A
Log on to www.electronicsb2b.com and be in touch with the Electronics B2B Fraternity 24x7
90 | August 2016 | OPEN sOuRCE FOR YOu | www.OpensourceForu.com
Endpoints
00(0)
ACK
10(2)
NON
01(1)
RST
11(3)
Ver(2)
CoAP Requests/Responses
Type(2)
Tkl(4)
Message
ID (16)
Token (0-8)
Tk1 byte
CoAP Messaging
Option if (any)
UDP,DTLS
IPv4,IPv6
6LowPAN
Ethernnet/WiFi
WPAN(802.15.4)
Physical Channel
Req/Resp code(8)
Uri-Path Leds,
Uri-Path red,
Uri-Query q=state
Uri-Query on.
Request methods
Response codes
Created
2.02
Deleted
2.04
Changed
2.05
Content
4.04
4.05
You can also run cf-helloworld-client-1.0.4.jar and cfplugtest-client-1.0.4.jar for testing the respective servers.
GET
Observe, GET
subpath for red, green,blue
PUT, GET
PUT, POST, GET
DELETE
localhost:1880/#
filter nodes
info
Flow 1
debug
http request
tcp request
discover
msg.payload
switch
change
GET Temperature
coap request
range
csv
html
json
xml
rbe
coap request
coap request
johnny5
social
e-mail
twitter
e-mail
storage
tail
file
Android apps
ESP8266 libraries
Stay tuned to http://coap.technology/impls.html for
frequent updates.
CoAP Client
CoAP Client
: 5683
californium.eclipse.org
GET
CON
NON
SEND
Observe
/test
(12) CONTENT-FORMAT: 0
coap://californium.eclipse.org:5683/test
e.g. AB12
e.g. AB12;CD34
(05) IF-NONE-MATCH:
(12) CONTENT-FORMAT: e.g. 0
(17) ACCEPT:
e.g. 0;40
(23): BLOCK2:
none
(27): BLOCK1:
none
30
RESPONSE PAYLOAD
Type: 0 (CON)
Code: 1 (GET)
MID: 23982
Token: 5954da1f208a6529
no payload given
hostname:3000/resources/abcd
References
[1] https://tools.ietf.org/rfc7252 [RFC7252]
[2] CoAP: The Web of Things Protocol, Zach Shellby, ARM IoT
Tutorial.
[3] Hands-on with CoAP, Matthias Kovatsch and Julien
Vermillard, EclipseCon France 2014
[4] github.com/eclipse/californium.git
OpenGurus How To
Profanity is a text based instant messaging application which uses Command line
Interface (CLI), which beats many GUI (Graphical User Interface) applications of a similar
nature. By virtue of having a CLI, Profanity is faster than any GUI, since it involves less
effort as theres no fumbling between mouse and keyboard. The biggest advantage of
Profanity is that the user can generate various scripts to multi-task.
Installation
How To OpenGurus
all the dependencies, configure all the necessary settings and
successfully install Profanity in your system.
Getting started
/connect user@gmail.com
Once you supply the valid password for that account, you
will see a message stating that you have successfully logged
into your account. On the upper right corner, you will find
your status is indicated as Online and below that, you will
find the list of your Online Contacts and Offline Contacts.
If you get a Login Failed message, please note that, by
default, Google will turn off access for the less secure apps
to your Google account. You can enable it by visiting https://
www.google.com/settings/security/lesssecureapps
Once youve turned on your access, Profanity will work
just fine.
After you have successfully connected to your account,
it is time to chat with other users. To send a message to other
users, issue the following command in the terminal:
OpenGurus How To
I am quite pessimistic about IoT. The question is: what will the
computing platforms look like for the majority of IoT solutions?
It will be interesting to see whether hundreds of millions or
tens of billions of 50-cent and one-dollar devices such as
microcontrollers or traditional data systems will dominate the IoT
market, or a large number of 10-dollar devices like Raspberry Pi
will lead the race. Also, it is important to look at the connectivity
support for IoT devices. It is hard to say whether the devices will
come with Bluetooth, Wi-Fi and local networking with hubs and
bridges, or cellular connectivity through a module, or even some
new standards like LoRa and SigFox.
We are already making the best hardware to contribute
towards the growth of embedded systems in the future.
www.OpenSourceForU.com | OPEN SOURCE FOR YOU | AUgUSt 2016 | 103
TIPS
&
TRICKS
Tracking an IP address
A small script that will help you find out the IP address
is given below:
#!/bin/bash
clear
echo -e \n\n
a=`sudo netstat -tnpa | grep ESTABLISHED.*sshd | grep -Po
\d+\.\d+\.\d+\d+\.\d+ | sort | uniq -c > /tmp/ip`
echo -e \t\t\tNumber_of_times_ssh \tIP Address
awk {printf \t\t\t\t$11111$2} /tmp/ip
echo -e \n
Like pacct, you can also dump the contents of the utmp
and wtmp files. Both these files provide login records for the
host. This information may be critical, especially if applications
rely on the proper output of these files to function.
Being able to analyse the records gives you the power to
examine your systems in and out. Furthermore, it may help
you diagnose problems with logins, for example, via VNC or
SSH, non-console and console login attempts, and more.
You can dump the logs using the dump-utmp utility. There
is no dump-wtmp utility; the former works for both.
You can also use the following command:
dump-utmp /var/log/wtmp
Sathyanarayanan S, sathyanarayanan_s@yahoo.com
OSFYOSFY
DVD DVD