October 2019
“If there is hope in the future, there is power in the present.� - Zig Ziglar
“The illiterate of the 21st century will not be those who cannot read and write, but those who cannot learn, unlearn, and relearn.� - Alvin Toffler
Contents October 2019
#MyPathToSuccess
Business Transformation
09
11
#MyPathToSuccess – WorkIntegrated Learning Program for People-Enabling Teams
Business Transformation Part 1: The Journey From Traditional Business To Digital Business
In times of unprecedented disruption and high-velocity change, the path forward is through continuous learning, and having the intellectual curiosity to remain relevant.
Authors: Padma Ravichandran Suha Sureshwar
Never in the history of mankind has the velocity of business been increasing at such a rapid pace. This is largely driven by the rise of digital business models enabled by an exponential growth in technology.
Author: Kerrie Hoffman
Contents October 2019
Be a Follower
Drone Strike
13
15
Stop Being a Leader! Be a Follower
Drones – Disruption Reimagined?
A couple of months ago my husband and I signed up for a few tango lessons at a local studio. Well, one thing for sure, we didn’t become the world’s best dancers.
Oil prices were in for a shock on a mid-September Monday morning, when Saudi Arabia’s two oil production facilities were attacked by multiple drones.
Author:
Author:
Katy Sherman
Rajalakshmi M
Contents October 2019
Machine Learning
AI
18
21
Prowess of Python
Artificial Intelligence: How far has it Reached?
BBC’s ‘Monty Python’, a comedy series, that aired during the late 1960s was a huge hit.
It wasn’t so long ago that humanoid robots were merely a fantasy. Not anymore.
Author:
Author:
Manojkumar Rajendran
Priyanka Pandey
Contents October 2019
Apache Kafka
23
All about Apache Kafka – An Evolved Log Call it big data or the big bang of data – we’re in an era of data explosion. Our daily lives generate an enormous amount of data.
Author: Bargunan Somasundaram
– “#MyPathToSuccess – Work-Integrated Learning Program for People Enabling Teams”.
Editor’s Notes
In this edition, we bring to you an article by our Strategic Advisor, Kerrie Hoffman – “Business Transformation Part 1: The Journey From Traditional Business To Digital Business”. She writes, “Digital business today is sitting in a jet stream, with an ability to test and change business models in short periods of time and implement business changes in weeks and even days when digital technology is fully adopted.” Katy Sherman, Senior Director Software Engineering, Premier Inc. has written an interesting blog on leadership – “Stop Being a Leader! Be A Follower.” She writes, “We start teaching kids about leadership as soon as they enter preschool as if it’s the most important role in the world. Nobody teaches us to be followers. Or to appreciate followers.” Rajalakshmi has written “Drones – Disruption Reimagined?” She writes, “The United Nations Institute for Disarmament Research quoted a report saying that the global drone market is expected to increase four times by 2022 from its 2015 value and surpass a net worth of $22 billion, inclusive of both combat and non-combat drones in military.”
Soumika Das
I think it is safe to say that it’s not just the Apple fans but almost the entire tech world that waits for the annual Apple Special Event with bated breath. This year was no different. What was most interesting was the announcement of Apple’s foray into original video creation. Apple TV Plus, the streaming service would offer original content along with other titles across all Apple devices. Like they say, “Everybody wants to be the Netflix of something”, but experts think there are other motives behind this decision. Providing original content could be reason enough for people to buy new iPhones, sales of which have declined of late. It is also said that Apple is on a deadline to double its services revenue. With its wide user base, it wouldn’t be difficult to attract and retain viewers to its streaming platform. So how does it stack up against the competition? If star power and pricing plans are anything to go by, then the future looks promising. But will they be able to grab the top spot in this increasingly competitive market? Only time will tell. Last month, GAVS conducted a “Customer Centric Leadership Program” for the Business Enablers, in partnership with GLIM (Great Lakes Institute of Management), one of the premier Business Schools in India. Padma and Suha have written about it
Manojkumar has written “Prowess of Python”. He writes, “Learning Python is quite fun. Thanks to an innovative project called Jupyter, even a person who is just getting his feet wet in programming can quickly learn the concepts.” Priyanka has written, “Artificial Intelligence: How far has it reached?” She writes, “Artificial intelligence has become so commonplace that we don’t even realise that we are using it every day. Be it web searches on Google, product suggestions on Amazon, music recommendations on Spotify or just booking a cab on Uber.” Bargunan has written, “All about Apache Kafka – An evolved log.” He writes, “The data produced every year is in exabytes and is growing exponentially. There’s always been a search for an infrastructure to handle this amount of data. One such venture at LinkedIn in 2010 fructified in the creation of Kafka.” Happy Reading!
“Anyone who stops learning is old, whether at twenty or eighty. Anyone who keeps learning stays young. The greatest thing in life is to keep your mind young.” - Henry Ford In times of unprecedented disruption and high-velocity change, the path forward is through continuous learning, and having the intellectual curiosity to remain relevant.
#MyPathToSuccess – Work-Integrated Learning Program for People-Enabling Teams
Gone are the days when you learned a profession and practiced it throughout your entire career. There is a compelling need to evolve. To learn, unlearn, to work and to repeat. GAVS strongly advocates investment in its people and unlocking their potential to innovate and drive growth. GAVS, in partnership with GLIM (Great Lakes Institute of Management), one of the Premier Business Schools in India (founded by a Professor Emeritus at Kellogg School of Management) conducted a “Customer Centric Leadership Program” for the Business Enablers at GAVS – Talent Acquisition, Talent Management, Finance and Operations, and Administration Support. It enabled the teams to discover important Leadership Traits through Engaging and practical sessions with clear focus on building confidence and providing toolkits to lead others. Since these are the teams
Padma Ravichandran
Suha Sureshwar
responsible in influencing the morale, productivity and health of the workplace, many “real world” experiences, and examples prepared the participants to identify their Leadership Strengths and Struggles. Assertiveness Prof. Keshav kindled the change agent in each participant. He focused on how collaboration, selftrust, and flexibility can lead the way to us being outcome focused and enable our decision making. The journey of being Assertive commenced with role plays, and situational case studies on being selfaware, self-regulated, self-motivated to build Effective Relationships on the bedrock of empathy.
8
Influencing for Effective Leadership Prof. Suresh Varghis, emphasized on how leaders listen to connect, and provided influencing framework in personal leadership. He also challenged us with thinking patterns of a creator. Further he provided us with tools, and skills to strengthen influencing. The participants learnt sociograms to map stakeholder relationships, based on trust.
manage emotions at the workplace, with focus on emotional literacy – the facets and process of emotions. After multiple role plays, he discussed with the participants on the various tools that would help us in
One of the exciting exercises was to create a personal vision board, and while the participants created a personal vision statement, the need to be aligned to an organization’s vision, and making it real, was brought to the fore. Humanizing GAVS’ vision statement, brought out the GAVS DNA in each of the participants. The session closed with an understanding of How to Influence with Integrity. Process Excellence Prof. Keshav along with Prof. Venu, emphasised that there is process in every walk of our life and we subconsciously follow process in every single activity we do. They then went on and spoke about why process improvement brings in better efficiency and productivity, better customer and employee experience, and better management of risk to enable profitability. Teams discussed on observing processes at a function level, assessing the impact on stakeholders to mitigate risk, and maximizing profitability, to bring in improvements.
managing emotions. Such learning opportunities enable real time ondemand content for heightened self-awareness. The topics chosen for the program were pertinent to our area of work and the sessions were structured to first give us an understanding of the topic, evaluate where we stand and finally give us tools to improve. The professors ensured that the group was participative and all of us went back at the end of each module with at least one take-away for us to work on and improve professionally. The revelations we experienced were tremendous and have surely motivated all of us to look at the way we do our work differently. As a group it gives us confidence that Together we can achieve greater heights. It is a matter of great pride for all of us to be jointly certified by Great Lakes Institute of Management and GAVS.
Emotional Intelligence It was “Back to School” days for the participants, as this session was on campus, and the participants were back to a classroom to understand Emotional Intelligence at work. Prof. GN. Radhakrishnan made us realise the importance of how our Interpretations play a major role in the way we react or respond to a situation also stressing on the importance of not suppressing our emotions. He further discussed about the ability to
9
Originally Published by Forbes Technology Council: https://www.forbes.com/sites/ forbestechcouncil/2019/08/23/businesstransformation-part-1-the-journey-from-traditionalbusiness-to-digital-business/#2b0ffbdc6e80
Business Transformation Part 1: The Journey From Traditional Business To Digital Business
Never in the history of mankind has the velocity of business been increasing at such a rapid pace. This is largely driven by the rise of digital business models enabled by an exponential growth in technology. There is a plethora of information describing that we are in the Fourth Industrial Revolution -- and soon to be entering the fifth. What if we are actually in the midst of moving out of the industrial revolution and entering the next stage in our development? We just don’t know what to call it yet! I’m sure when mankind started moving from the agricultural age to the industrial age, they didn’t know what to call it either. There are three major drivers that point to a move to the next age: the exponential growth in technology, a gap in human adoption of that technology and dramatic changes to how companies operate in order to transform from traditional business to digital business. In order to make this journey, it’s critical to understand the difference between traditional and digital business. The Digital Flow Framework As someone who co-founded a company to work with enterprises to develop digital strategies and roadmaps, I created the digital flow framework to bridge the gap in understanding between traditional and digital business, with the goal of accelerating the journey to digital. This framework is based on a metaphor of speed. So, allow me to go off on a slight tangent and describe the three levels of speed:
Kerrie Hoffman Strategic Advisor, GAVS Partner at Get Digital Velocity Digital Advisor at FocalPoint Business Coaching
• • •
10
Speed 1: The fastest person to climb Mount Everest was ultra-runner Kilian Jornet, who went roughly 0.5 mph to accomplish his goal. Speed 2: A jet stream is significantly faster, reaching highs of around 250 mph. Speed 3: Solar winds move up to 1 million mph.
Traditional business is anchored firmly on the ground with changes in business models being reliant on Traditional technology that takes quarters and years to implement. Digital business today is sitting in a jet stream, with an ability to test and change business models in short periods of time and implement business changes in weeks and even days when digital technology is fully adopted. All the technology in the jet stream area of the diagram is mature enough to implement today. And up in the future of business are a number of exponential technologies that are in the development phase, being worked on by scientists, engineers and makers. These technologies have the potential to change every aspect of the world as we know it, and they will make our current way of doing business look relatively slow. Digital Flow Framework Business Outcomes And Recommended Actions Realizing what can be achieved at each level of the framework is a catalyst to drive action. Future business will be characterized by real-time business models, fully automated processes and rapid product releases resulting in frictionless business. The action to take now for most companies is to watch this space. Companies that plan on being a provider of the technologies at this level should be actively researching and developing their solutions. Digital business is characterized by a near frictionless business when technology and new ways of working are fully adopted. Full adoption enables rapid changes to business models and process velocity with a very high speed to value creation. The action for all companies to take is to invest heavily in digital transformation. At the speed of traditional business, business models are relatively static with a lot of self-induced complexity and constrained processes leading to a slow time to value for new capabilities. The action to take here is to freeze investments, divest in old ways of working and technology and use the freed-up investment to invest in digital. Three Components To Master The Digital Flow Framework And Achieve Digital Velocity There are three components to achieve digital velocity and flow: talent, operations and technology. Starting with talent, it’s important to move from a scarcity mentality about a war on talent to an abundance mindset. Applying talent capacity planning using digital process accelerators is key.
planning is a workforce that expands and contracts through alternate talent pools such as crowdsourcing, freelancing and the gig economy, the use of joint ventures with customers and suppliers, and partnering with universities, customers and other companies for IP generation. The second component to master in order to achieve digital velocity is to deal with the significant changes required in operations. In digital business, there is a “customer in approach” with extreme customercentricity. This means being committed to solving customers’ issues, providing a super experience and being willing to disrupt the company’s business model. From an internal organization standpoint, teams reorganize away from functional departments and into cross-functional teams working directly with customer microsegments. These teams have agile mindsets and methods and often use variations in internal process to cater directly with their customers. This is a very different approach from traditional business, where there is a “company out approach” in which work is accomplished in a waterfall fashion through siloed departments and the customer touchpoints are sales at the beginning and product and service delivery on the two ends. The last component to master in order to achieve digital velocity and flow is digital technology. At a minimum, it’s important for everyone in the company to be aware that digital technology is significantly different than traditional technology. Companies can’t achieve digital velocity with traditional technology. Stay tuned for part two of this series to learn more. Conclusion The move from traditional business to digital business is not about the destination -- it’s about the journey. Since the end state keeps moving, becoming excellent in the journey is key. To achieve digital velocity and flow, it’s important to master: digital talent practices, digital operations and digital technology. About the Author: Kerrie specializes in business growth and digital transformation. She is passionate about coaching others to reach beyond their potential in both business and life. She believes the world is moving towards abundance, and away from scarcity, and people need to understand how to tap into it.
In terms of employees, the time is now to utilize artificial intelligence (AI) to augment the talent pool, eliminating redundant and data-heavy workloads and speed up continuously. The other part of talent capacity
11
A couple of months ago my husband and I signed up for a few tango lessons at a local studio. Well, one thing for sure, we didn’t become the world’s best dancers. But through the dance, I learned a beautiful lesson in leadership. Or rather, the opposite of leadership - the art and joy of being a follower.
Stop Being a Leader! Be a Follower.
Continue reading to learn about simple principles that apply everywhere in life and at work, that will help you become a better follower and also a better leader. Social tango is danced in clubs and studios all around the world. It’s a dance of close embrace, tender connection, and quiet understanding. If you’re picturing a passionate artistic performance in which the partners look away from each other, that’s a different tango. Traditionally tango is danced by a man and a woman. Today the distinction is not very important, but what still matters is the fact that two people dance two different dances, one by a leader, and another by a follower. And yet, they do it together in a perfectly coordinated unison. As I was learning the lady’s steps, several things struck me as fascinating. First, the follower almost always moves backwards. She cannot see where she goes, so she can basically close her eyes and be mesmerized by the music (which a lot of people do). She fully trusts her partner (the leader) to create a path on a crowded dance floor, away from other couples, walls, and furniture. For some reason, our path inevitably led into a corner full of stacked chairs.
Katy Sherman Senior Director Software Engineering, Premier Inc.
Second, even though the dancers hold each other very closely, they don’t lean on each other, each person fully stable and perfectly balanced without their partner’s support. Third, they communicate without words. There’s no choreography. The entire dance is an improvisation, created by the leader on the fly, as he’s listening to the music and navigating his partner across the floor. The follower has no idea what dance she will be dancing. And yet, the understanding between two good dancers is amazing. They communicate by slight shifts of their weight, sending clear messages and making sure the partner understands their intentions. And the most unexpected discovery about being a follower was that she is, in fact, the most important person in this dance. You know how we always want to be leaders? We start teaching kids about leadership as soon as they enter preschool as if it’s the most important role in the world. Nobody teaches us to be followers. Or to appreciate followers. Or to even see them for what the truly are. But watch this video (and by the way, this is what social tango looks like, not that clumsy walking my spouse and I were doing). https://youtu.be/7-i1glazW_I
12
The truth is, in life and at work, we are always both leaders and followers. To be a good leader, we have to understand what it means to be a great follower. But most of all, we should take a moment and appreciate the joy and fun of being a follower. The freedom to create and generate ideas. An abundance of opportunities to turn ideas into reality. A chance to get into the zone, focus and, work. The sense of accomplishment in seeing things getting done.
Gender roles aside, in this 3-minute dance, the leader is a dark blob, carefully moving around the dance floor. He watches the crowd and figures out a safe path. He listens to the music beat and initiates the steps. He shapes an outline of the dance by suggesting the direction to his partner, the follower. Because it is really her dance. It is her grace, musicality, and beautiful footwork that we can’t take our eyes off. All we see is her lovely face, graceful arms, strong back, beautiful legs, elegant shoes. She creates the dance, she lives in the music, while he builds a safe space for her to be her best. He is modest, she is a show off. She respects his vision, and together they co-create, keep each other balanced and grounded, and allow each other to fully express themselves. We always want to be leaders, but let’s not forget that the real fun is in being a follower. Only as followers we actually create something meaningful. As leaders, we only suggest the direction and make sure the route is clear and safe. Then we stand a little to the side and let everybody see what a beautiful dance our followers have created.
About the Author: Katy is passionate about: •Leadership and vision • Innovation, technical excellence and highest quality standards • Agility achieved through teamwork, Agile, Scrum, Kanban, TDD, CI/CD, DevOps and automation • Breaking silos and promoting collaboration of Development, Testing and Operations under cross-functional umbrella of Software Engineering • Diversity of personalities, experiences and opinions. Things Katy does to spread the word: • • • •
Speak at Technology conferences (including as an invited and key-note speaker) Blog and participate in group discussions Collaborate with schools, universities and clubs Empower girls and women, help them learn about Technology and become engineers
13
Oil prices were in for a shock on a mid-September Monday morning, when two of Saudi Arabia’s oil production facilities were attacked by multiple drones. Around 5% of the world’s oil supply was hit and it took the US’s reserves opening news to calm the oil price jump. But the important question is how powerful are drones? If the news that has come out is accurate, 10 drones were successful against arguably the single most important piece of infrastructure in the global oil industry, present in a country whose defence spends are only next to the US and China.
Drones – Disruption Reimagined?
Before we conclude how drones could change the world, let us take a peek into the journey of drones. The drone is the popular name for unarmed aerial vehicles (UAV). These remotely controlled machines can fly without any physical human intervention on board.
Rajalakshmi M
The first recorded use of a UAV predates the actual airplane and goes as early as 1849 serving as a balloon carrier for military purposes. The first truly successful example of non-crewed remote-controlled aircraft was the de Havilland DH82B Queen Bee, which entered service in Britain in 1935 and seems to have been the motivation for calling such aircraft ‘drones’ (stingless male bees). Over time it was powered, used as target practice, used for reconnaissance and data collection, as decoys and finally in actual combat. The other documented use of drones includes package delivery, in agriculture (spraying pesticides, insecticides), environment monitoring, aerial photography and surveillance and during search and relief operations. The United Nations Institute for Disarmament Research quoted a report saying that the global drone market is expected to increase four times by 2022 from its 2015 value and surpass a net worth of $22 billion, inclusive of both combat and non-combat drones in military. Meanwhile, Goldman Sachs Research points out that the overall drone market including the consumer drones will be around $100 billion by 2020, which says the non-military market will be far bigger.
14
The consumer drones take a lot of inspiration from radio-controlled (RC) airplanes and smartphones which has led to the exponential growth of the abovementioned commercial drones. Let us take a look at how it has been used commercially.
150 medical products (blood and vaccines mostly), to places that are difficult to reach. Thanks to the on-time delivery of blood, maternal mortality rates are declining. This shows that in parts with difficult accessibility drones can help save precious lives.
In the agriculture sector, drones are being used to survey the health of the crops. Crop health can be assessed by using special multispectral cameras to take pictures. The relative intensity of colour in particular frequency bands is measured and thus identify undernourished and diseased plants. This can be done without having a manual checking of the crops which is more expensive and time-consuming. Satellite photography might also not be as economic as drones. Later, a GPS enabled tractor can do the needful and prevent chemical runoff.
The construction industry is using it for “reality capture�. Thousands of photos are captured aerially and then stitched and crunched together to make a 3D model. It is later matched with the digital model to check the deviations between the construction and the design. This helps to take corrective steps and also prevents errors. They are also being used to measure the mining stockpiles, whose manual stockpiling has been dangerous. We can also take a look at how drones will be used by the Indian Government. The Government is trying to map the entire country with precision. It wants to use the results for marking boundaries and help future property buyers. The State Government in India used drones for search and rescue after the 2015 floods in Chennai. Drone photography seems to be already in use in the entertainment industry and weddings. Drones could revolutionize the delivery market. Amazon has already announced its ambitious Prime Air that can deliver packages up to 5lbs within a 10-mile radius post-launch. Dominoes has also announced their drone delivery plans. But we can see how drones have helped save lives. San Francisco based Zipline took off in Rwanda in 2016. It has now become a national ondemand medical drone network that is used to deliver
With further advancements of AI, sensors, and cameras, usages of drones are only going to increase. But we also need to remember that the drones created panic at Newark, Gatwick and Heathrow. Flights had to be suspended. It also caused revenue loss and panic attacks. The same advancements in technology can be implemented to limit the damage of drones. Companies such as Indra with its Anti Drone system ARMS try to jam a single or swarm of drones. Radars that identify drones pass on the message to ARMS and later use infrared cameras to confirm and identify the type of drone. Sensors then sweep the radio spectrum to determine what signals the drone is using. This is followed by careful jamming that excludes all other airfield machinery. Various countries have their own regulations. These regulations generally cover where they can be flown, ranges, heights, sizes, types, etc. Some countries also demand registration. As I write this article post the Saudi attack, governments and experts are commentating on how ready they are for facing similar attacks. We will see many countries going on a purchasing spree of anti-drone capabilities. However, we might not see an all-out ban on drones.
Once technology hits the market, there is no stopping it. With all the benefits that drones can provide, they complemented so many industries in their use cases. Truly, drones have revolutionized photography, videography, surveying, and logistics. Only time will tell whether these drones priced at thousands of dollars can challenge defence mechanisms worth millions of dollars and cause ruckus again.
15
Sources: https://theaviationist.com/2019/09/15/everythingwe-know-about-the-drone-attacks-on-two-saudiaramco-oil-facilities/ https://www.indiatoday.in/world/story/saudiarabia-aramco-oil-facility-attacked-what-makesdrone-attacks-so-dangerous-1600169-2019-09-17 Air Power in the Age of Total War -By John Buckley https://www.economist.com/technologyquarterly/2017/06/08/drone-technology-has-madehuge-strides https://www.goldmansachs.com/insights/technologydriving-innovation/drones/ https://timesofindia.indiatimes.com/city/bengaluru/ drone-based-digital-mapping-of-country-begins-withktaka-maha/articleshow/71157367.cms https://techcrunch.com/2019/04/24/drone-deliverystartup-zipline-launches-uav-medical-program-inghana/ https://bestdroneforthejob.com/drone-buying-guides/ agriculture-drone-buyers-guide/
16
About the Authors: Rajalakshmi is part of the CEO’s Office at GAVS. When she is not working, she is fond of making herself aware of what is happening in the world and loves to understand why people behave the way they do. The means to these ends include reading, running, travelling and starting conversations with different types of people!
BBC’s ‘Monty Python’, a comedy series, that aired during the late 1960s was a huge hit. The Python programming language, released in early 1990s, turned out to be a huge hit too in the software fraternity. Reasons for the hit runs into a long list — be it the dynamic typing, cross-platform portability, enforced readability of code, or a faster development turnaround. Python was conceived by a Dutch programmer, Guido Van Rossum, who invented it during his Christmas holidays.
Prowess of Python
The ascent of the language has been observed since 2014 owing to its popularity in the Data Science and AI domains. See the Google Trends report in Exhibit 1. No wonder Python has risen to the 3rd position in the latest TIOBE programming index. Exhibit 1: Google Trends Report
Manojkumar Rajendran
Exhibit 2: TIOBE index
Python is being used by a surprisingly wide array of domains/ industries. The power of Python is exploited in the development of various popular web applications like YouTube, DropBox and BitTorrent. NASA has used it in space shuttle mission design and in the discovery of ‘Higgs-boson’ or God particle. The top security agency NSA used it for cryptography, thanks to its rich set of modules. It has also been used by entertainment giants like Disney and Sony DreamWorks to develop games and movies.
17
You’ll likely need to modify your C++ code to run on those different systems as well.
Now that the data is becoming ‘BIG’, programmers are resorting to Python for web scraping/sentiment analysis. Think of Big Data and the first technology that comes to a programmer’s mind in processing it (ETL and data mining) is Python. Learning Python is quite fun. Thanks to an innovative project called Jupyter, even a person who is getting his feet wet in programming can quickly learn the concepts. Possessing the features of both scripting languages like TCL, Perl, Scheme and systems programming languages like C++, C and Java, Python is easy to run and code. Show a Java program and a Python script to a novice programmer; he will definitely find the Python code more readable. It is a language that enforces indentation. That is why no Python code looks ‘ugly’. The source code is first converted to platform independent byte code making Python a cross platform language. You don’t need to compile and run, unlike C and C++, thus making the life of software developers easier. Let’s draw a comparison between Python and C++. The former is an interpreted language while the latter is a compiled one. C++ follows a two-stage execution model while Python scripts bypass the compilation stage. In C++, you use a compiler that converts your source code into machine code and produces an executable. The executable is a separate file that can then be run as a stand-alone program. Exhibit 3 This process outputs actual machine instructions for
the specific processor and operating system it’s built for. As shown in Exhibit 4, you’d have to recompile your program separately for Windows, Mac, and Linux:
Python, on the other hand, uses a different process. Now, remember that you’ll be looking at CPython, written in C, which is the standard implementation for the language. Unless you’re doing something special, this is the Python you’re running. CPython is faster than Jython (Java implementation of Python) or IronPython (Dot net implementation). Python runs each time you execute your program. It compiles your source just like the C++ compiler. The difference is that Python compiles to bytecode instead of native machine code. Bytecode is the native instruction code for the Python virtual machine. To speed up subsequent runs of your program, Python stores the bytecode in .pyc files: Exhibit 5
If you’re using Python 2, then you’ll find these files next to the .py files. For Python 3, you’ll find them in a __pycache__ directory. Python 2 and 3 are two major releases of Python, and 2.x will be obsolete by the year 2020. Python 3 is the preferred version among the development fraternity, thanks to its advanced features and optimized functionalities. The latest Python version is 3.7. The generated bytecode doesn’t run natively on your processor. Instead, it’s run by the Python virtual machine. This is similar to the Java virtual machine or the .NET Common Runtime Environment. The initial run of your code will result in a compilation step. Then, the bytecode will be interpreted to run on your specific hardware. Exhibit 6
If the program hasn’t been changed, each subsequent run will skip the compilation step and use the previously compiled bytecode to interpret: Exhibit 7
Exhibit 4
18
Interpreting code is going to be slower than running native code directly on the hardware. So why does Python work that way? Well, interpreting the code in a virtual machine means that only the virtual machine needs to be compiled for a specific operating system on a specific processor. All the Python code it runs will run on any machine that has Python.
Another feature of this cross-platform support is that Python’s extensive standard library is written to work on all operating systems. Using pathlib (a Python module), for example, will manage path separators for you whether you’re on Windows, Mac, or Linux. The developers of those libraries spent a lot of time making it portable, so you don’t need to worry about it in your Python program!
Python is also a glue language by facilitating component integration with many other languages. Integrating Python with C++ or Dot net is possible through the middleman Numpy. Numpy, one of the PyPI modules, acts as a bridge between other languages and Python. PyPI is a growing repository of two hundred thousand modules. So any developer can check out PyPI before venturing out to write their code. There are also active Python communities available to clarify our queries. Companies of all sizes and in all areas — from the biggest investment banks to the smallest social/mobile web app startups — are using Python to run their business and manage their data, especially because of its OSI-approved open source license and the fact that it can be used for free. Python is not an option anymore but rather a de facto standard for programmers & data scientists.
Python’s philosophy is “Everything in Python is an object”, just like in Linux where “Everything in Linux is a file”. By designing the core data types as objects, one can leverage the power of attributes of an object for solving problems. Every object or every datatype will have a unique set of attributes. It can interact with all databases including SQL databases such as Sybase, Oracle, MySQL and NoSQL databases such as MongoDB, CouchDB. In fact, the ‘dictionary’ data structure that Python supports is ideal for interacting with a NoSQL database such as MongoDB which processes documents as key-value pairs. Web frameworks written in Python such as Flask, Django facilitate faster web application building & deployment. It is also employed to process unstructured data or ‘Big Data’ & business analytics. Notable to mention are Web Scraping/Sentiment Analysis, Data Science and Text Mining. It is also used with R language in statistical modelling given the nice visualization libraries it supports, such as Seaborn, Bokeh and Pygal. If you’re used to working with Excel, learn how to get the most out of Python’s higher-level data structures to enable super-efficient data manipulation and analysis.
About the Authors: Manoj is an avid Python developer working as a Data analyst. He is an evangelist of Python and has used it to automate various manual procedures in GAVS, notably the LMS portal automation of training reports and the appraisal letter generation process. He is also an internal Python trainer in GAVS and helps various other projects in automating their manual procedure.
19
“The pace of progress in artificial intelligence is incredibly fast. Unless you have direct exposure to groups like Deepmind, you have no idea how fast—it is growing at a pace close to exponential.” - Elon Musk “A year spent in Artificial Intelligence is enough to make one believe in God.” - Alan Perlis
Artificial Intelligence: How far has it reached?
It wasn’t so long ago that humanoid robots were merely a fantasy. Not anymore. Now there are advanced humanoid robots like Sophia, Atlas and Talos which can imitate human gestures, do variety of search and rescue tasks and can also operate power tools. Sophia has appeared on various talk shows like the Tonight Show with Jimmy Fallon, and in some music videos, one of which had her as the lead female character. She also has Saudi Arabian citizenship, becoming the first robot to have a nationality. This sparked interesting conversations on whether she could vote or marry, or whether a deliberate system shutdown could be considered murder. A video of Atlas robot was also released to YouTube where he was seen performing backflips and practicing robot parkour.
Priyanka Pandey Sophia robot on the Tonight Show with Jimmy Fallon
Atlas robot doing a backflip On August 22, 2019, Russia successfully launched a Soyuz spacecraft with no human crew but a humanoid robot, Skybot S850, originally known as FEDOR (Final Experimentation Demonstration Object Research). However, it was not the first robot to go into space. In 2011, NASA sent up Robonaut 2, which returned to Earth in 2018.
20
works of science fiction. Some examples include Movies like Star Trek, Transcendence and Captain America, and television shows like Warehouse 13, Simpsons and Black Mirror. A still from the episode of Black Mirror which features full brain emulation
FEDOR robot Artificial intelligence has become so commonplace that we don’t even realise that we are using it every day. Be it web searches on Google, product suggestions on Amazon, music recommendations on Spotify or just booking a cab on Uber. We all have had enough discussions on how artificial intelligence can change everything around us. But how far have we reached in this journey?
On July 31, 2019, The Verge published an article about an initiative called ‘Sentient’ which was presented at the 35th Annual Space Symposium in Colorado Springs, CO. A product of the National Reconnaissance Office (NRO), Sentient is a fully integrated intelligence system that can coordinate satellite positions and may soon be used to manage battlefield operations during military engagements. In simpler words, American intelligence agencies have been developing a top-secret ‘Artificial Brain’ Military AI System. Research related to Sentient have been ongoing since 2010. Until now, it had been treated as a government secret, except for a few indirect references in speeches and presentations. Government officials are still tight-lipped on what the AI system can do and how it will be used in future conflicts. So, what really are Artificial Brains? Artificial Brains are man-made software and hardware that are just as intelligent, creative, and self-aware as humans. These machines can function similar to an animal or a human brain. Not just that, there have also been researches about Whole Brain Emulation (WBE). Also known as ‘mind uploading’ or ‘mind copying’, WBE is a futuristic process of scanning the mental state of a particular brain and copying it to a computer. This computer then can process information and respond in essentially the same way as the original brain would do. So, the knowledge and intelligence of anyone can be preserved and used forever, even after the death of that person. Artificial Brain and WBE has been a theme in many
In May 2005, the Brain and Mind Institute of École Polytechnique Fédérale de Lausanne (EPFL) in Switzerland founded a project called, ‘The Blue Brain Project’. This project aims to create a digital reconstruction of rodent and eventually human brains by reverse-engineering mammalian brain circuitry. The project is headed by the founding director Henry Markram—who also launched the European Human Brain Project (HBP) which is a ten-year scientific research project that aims to advance knowledge in the fields of neuroscience, computing, and brain-related medicine. “It is not impossible to build a human brain and we can do it,” he said at a TED Global conference in Oxford, “…and if we do succeed, we will send a hologram to TED to talk”. In 2018, Blue Brain Project released its first digital 3D brain cell atlas of every cell in the mouse brain which provides information about major cell types, numbers, and positions in 737 regions of the brain. This can accelerate the progress in brain science massively. While Blue Brain is able to represent complex neural connections on the large scale, the project does not achieve the link between brain activity and behaviours executed by the brain.
An image obtained during digital reconstruction in the Blue Brain Project
21
Joshua Blue is another project under development by IBM that focuses on designing and programming computers that can think like humans. It is said to acquire knowledge through external stimuli present in its environment, similar to how children learn human traits through interacting with their surroundings. IBM has not yet released any significant information regarding how Joshua Blue will physically gather information, but they have revealed that it will be a computer with a network of wires and input nodes that function as a computer nervous system. This nervous system will allow the machine to interpret the significance of events. Other than Joshua Blue, IBM is attempting to imitate the common functions of a human brain through two of their other projects — Deep Blue, a logic-based chess playing computer, and Watson, a question-driven artificial intelligence software program. There is an ongoing attempt by neuroscientists to understand how a human brain works with the goal of having something known as Strong AI. Given current trends in neuroscience, computing, and nanotechnology, it is likely that artificial general intelligence will emerge soon, possibly by the 2030s. Strong AI has been a controversial topic as some believe it can be inherently dangerous. This may lead to human cloning and it cannot be estimated how big this threat might be against nature. A major problem in this is that an unfriendly artificial intelligence system is likely to be much easier to produce than a friendly system. Some public figures, such as Theoretical physicist, Stephen Hawking, Microsoft founder, Bill Gates and Tesla and SpaceX CEO, Elon Musk, have advocated research into precautionary measures to ensure future super intelligent machines remain under human control and ‘AI Takeover’ remains a hypothetical situation.
Whatever the future holds for AI, it sure is to evolve our lives to the next level. References: http://www.wild1055.com/jimmy-fallons-duet-withsophia-the-robot-is-as-sweet-as-it-is-unsettling/ https://metro.co.uk/2017/11/17/boston-dynamicshumanoid-robot-atlas-has-learned-to-dobackflips-7086173/ https://www.syfy.com/syfywire/russias-humanoidrobot-looks-like-robocop-has-ai-brains-and-is-goingto-the-iss https://www.epfl.ch/research/domains/bluebrain/ blue-brain/gallery/ http://www.sohu.com/a/241926618_127245 https://in.pinterest.com/pin/149674387592270782/ https://www.azquotes.com/quote/1486005
About the Authors: Priyanka is an ardent feminist and a dog-lover. She spends her free time cooking, reading poetry and exploring new ways to conserve the environment.
On the other hand, there are people who are a major proponent of AI like Facebook founder, Mark Zuckerberg. There are many examples for the use cases of Artificial Brain, one of which could be driverless cars. The world’s largest car makers are investing in technologies which could replace a human driver. But no matter how safe driverless cars become, the AI driver will eventually face the moral dilemma of having to decide whether to prioritize the safety of its passengers or others who might be involved in a collision. In such cases, the artificial brain can help make decisions to have more capacity to deal with these kinds of ethical conundrums.
22
All about Apache Kafka – An evolved log
Call it big data or the big bang of data – we’re in an era of data explosion. Our daily lives generate an enormous amount of data. Let’s do some simple math. About 12 billion ‘smart’ machines are connected to the Internet. Considering there are about 7 billion people on the planet, we have almost 1.5 devices per person. The data produced every year is in exabytes and is growing exponentially. There’s always been a search for an infrastructure to handle this amount of data. One such venture at LinkedIn in 2010 fructified in the creation of Kafka. It was later donated to Apache foundation and now it’s called Apache Kafka. What’s Kafka? Apache Kafka is a Versatile, Distributed, & Replicated publish-subscribe messaging system. It lets you send messages between processes, applications, and servers. To understand what a publish-subscribe messaging system is, understanding how a point-to-point messaging system works is important. In a point-topoint messaging system, messages are kept in a queue, and multiple consumers can consume the messages. Once a message is consumed it disappears from the queue.
Bargunan Somasundaram In a publish/subscribe system, messages are persisted in a topic. Unlike in a point-to-point system, consumers can subscribe to one or more topics and consume all messages on that topic. Different consumers can consume messages and remain on the topic so another consumer can receive the same information again. Hence, Kafka is a publish-subscribe messaging system. “More than 33% of all Fortune 500 companies use Kafka.” Apache Kafka is a distributed real-time streaming platform, but in the eyes of a developer it’s an advanced version of a log which is distributed and structured. Why Kafka? The two major concerns of Big Data are to collect it and to be able to analyze it. A messaging system like Kafka can help overcome these challenges. This allows the applications to focus on the data without worrying about how to share it. For systems which have high throughput, Kafka works much better than traditional
23
messaging systems. It also has better partitioning, replication, and fault-tolerance which makes it a great fit for systems which process large-scale messages. Following are the reasons to choose Kafka over any other messaging system: • One of the most powerful event streaming platforms available open source • Offers solid horizontal scalability • A perfect fit for big data projects involving real-time processing • Durably stores the data using Distributed commit log meaning that the data is persisted on the disk. • High reliability, since it is distributed and replicated. • Has excellent parallelism since the topics are partitioned. Core components of Kafka Kafka’s main architectural components include Producers, Topics, Consumers, Consumer Groups, Clusters, Brokers, Partitions, Replicas, Leaders, and Followers. • • •
•
•
•
•
24
Records: Data is stored in the form of key value pair with timestamp which is called Record. Kafka Records are immutable. Topic: Topics are a stream of records and are subscribed to by multiple consumers. It’s the highest level of abstraction that Kafka provides. Partition (A Structured commit log): It’s an ordered, immutable sequence of messages that are continually appended to. It can’t be divided across brokers or even disks. The memory needs to be contiguous. The records in the partitions are each assigned a sequential id number called the offset that uniquely identifies each record within the partition. Segments: Each partition is sub-divided into segments. Instead of storing all the messages of a partition in a single file, Kafka splits them into chunks called segments. The default value for segment size is a high value (1 GB). Brokers: A Kafka broker (also called node or server) hosts topics. A Kafka broker receives messages from producers and stores them on disk by assigning them a unique offset. A Kafka broker allows consumers to fetch messages by topic, partition and offset. Zookeeper: Zookeeper is a centralized service which is used to maintain naming and configuration data and to provide flexible and robust synchronization within distributed systems like Kafka. Zookeeper has the responsibility to maintain the leader-follower relationship across all the partitions. Cluster: Multiple Kafka brokers join to form a cluster. The Kafka brokers could be distributed in different data centers and physical locations for redundancy and stability. The Kafka brokers communicate between themselves using zookeeper.
•
•
•
•
Replication: All distributed systems must make trade-offs between guaranteeing consistency, availability, and partition tolerance (CAP Theorem). Apache Kafka’s design focuses on maintaining highly available and strongly consistent replicas. Strong consistency means that all replicas are byte-to-byte identical, which simplifies the job of an application developer. Producer: Kafka producers send records to topics. The records are sometimes referred to as messages. While producers can only message to one topic at a time, they’re able to send messages asynchronously. Using this technique allows a producer to functionally send multiple messages to multiple topics at once. Because Kafka is designed for broker scalability and performance, producers (rather than brokers) are responsible for choosing which partition each message is sent to. Consumer: Kafka consumers read from Topics. Kafka consumer maintains the partition offset to consume messages or data from topic, since Kafka brokers are stateless. The consumers can rewind or skip to any point in a partition simply by supplying an offset value. Consumers Group: Multiple consumers who are interested in the same topic join to form a Consumer group which is uniquely identified by group.id. Each consumer group is a subscriber to one or more topics and maintains its offset per topic.
When applications send data to a Kafka Broker (Node), the data gets stored in a topic, which is the logical grouping of partitions. Partitions are the actual unit of storage. In a multi node configuration, the data is spread over multiple partitions across different machines. Now the data sent to the Kafka Cluster is durably persisted to a partition. As explained before partition is an immutable data structure, where data can only be appended. The data is sent to a partition based on the following rules, 1.
If a producer specifies a partition number in the message record, then the message is persisted to that topic. 2. If a message record doesn’t have any partition id but has a key, then based on the hash value of the key, the partition is chosen. hashCode(key) % noOfPartitions 3. If no key or partition id is present, then Kafka uses round-robin strategy to choose the partition. To achieve parallelism, each topic can have multiple partitions. Number of partitions is directly proportional to throughput and parallel access. In a distributed environment, even though a topic has multiple partitions, each partition is tied to a single broker only, it’s not shared among the nodes. How does Apache Kafka work?
What if a Kafka node fails and all the partitions tied to that node become unavailable? To overcome this scenario, Kafka uses replication. A duplicate of each partition is maintained in all the nodes. At all times, one broker ‘owns’ a partition and is the node through which applications write/read from the partition. This is called a partition leader. It replicates the data it receives to other brokers, called followers. They store the data as well and are ready to be elected as the leader in case the leader node dies. At any point of time, all the replicas will be identical to the leader (original) partition. This is called In-Sync
Replication. For a producer/consumer to write/read from a partition, they need to know its leader so, this information needs to be available from somewhere. Kafka stores such metadata in Zookeeper. Kafka must periodically flush the data in the disk. Even though the partition is an immutable data structure, it must purge the data based on the retention period. Since deleting a single large file is error prone, a partition is further subdivided into segments. Instead
of storing all the messages into a partition, it is split into chunks called segments. Whenever a segment has reached its max value, a new segment is created, and it becomes the new active segment. Inside the partition’s directory in the Kafka data directory, the segments can be viewed as index and log files. /opt/Kafka-logs # tree Why does each segment have .index file accompanied by .log file?
One of the common operations in Kafka is to read the message at a particular offset. For this, if it has to go to the log file to find the offset, it becomes an expensive task especially because the log file can grow to huge sizes (Default - 1G). This is where the .index file becomes useful. Index file stores the offset and physical position of the message in the log file. The 00000000000000077674 before the log, index and timeindex file is the name of the segment. Each segment file is created with the offset of the first message as its file name. In the above picture, 00000000000000077674.log implies that it has the messages starting from offset 77674.
25
The index file describes only 2 fields, each of them 32 bit long: • 4 Bytes: Relative Offset • 4 Bytes: Physical Position As explained, the file name represents the base offset. In contrast to the log file where the offset is incremented for each message, the messages within the index files contain relative offsets to the base offset. The second field represents the physical position of the related log message (base offset + relative offset). Content of index file: • Index offset: 77723, log offset: 77713 • Index offset: 77710, log offset: 77700 Content of log file: offset: 77723 position: 77713CreateTime: 1568206189326 isvalid: true keysize: -1 valuesize: 10 magic: 2 compresscodec: NONE producerId: -1 producerEpoch: -1 sequence: -1 isTransactional: false headerKeys: [] payload:Hello World offset: 77710 position: 77700 CreateTime: 1567613494343 isvalid: true keysize: -1 valuesize: 18 magic: 2 compresscodec: NONE producerId: -1 producerEpoch: -1 sequence: -1 isTransactional: false headerKeys: [] payload: Hello world there If you need to read the message at offset 77723, you first search for it in the index file and figure out that the message is in position 77713. Then you directly go to position 77713 in the log file and start reading. This
makes it effective as you can use binary search to quickly get to the correct offset in the already sorted index file. From the above explanation, we can derive the time complexity for few scenarios, •
•
•
To find a particular partition = O(1) Constant time since the broker knows where the partition resides in, for a given topic. To find a segment in a partition = O(log(n)) since the first part of the segment log file indicates the first message offset. So, the binary search can be used to find the right segment. To find a message in a segment = O(log(n)) The index file contains the exact position of a message in the log file for all the messages in ascending order of the offsets. The offset can be found using a binary search.
Now using one of the above scenarios, the Kafka will locate the message and serve the consumers. As apache Kafka is a pub-sub messaging system, the consumers who have subscribed to a topic will receive the data and can consume it. The consumer stores (commits) the offset every time it pulls data from a topic. By specifying the offset next time, the consumer pulls data from the topic from the offset mentioned in a reliable way. This is how Apache Kafka works!
About the Author: Bargunan is an open source lover and a Java enthusiast. His passion is to share his knowledge by writing his experiences about them. He believes “Gaining knowledge is the first step to wisdom and sharing it is the first step to humanity.”
26
“You can’t connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future.” - Steve Jobs
27
28