Quote

"Between stimulus and response there is a space. In that space is our power to choose our response.
In our response lies our growth and freedom"


“The only way to discover the limits of the possible is to go beyond them into the impossible.”


Wednesday 18 January 2017

Microservices the Ball-Bearings Running IOT


The IOT Advent


If each atom of earth is assigned an IPv6 address we will be still left with enough addresses to cover 100 earths.  As of today, every 'Thing' on the planet which can be assigned an IPv6 address for unique identification and transfer of data over network is 'Internet of Things'. It can be your shoe, hat, bed, dog, cat etc. Together this system of interrelated computing devices, working to provide varying data/information/solutions is called IOT or Internet of Things.


It is important to note only four important characteristics are needed to qualify for the world of IOT:
--It has to be a thing 😀
--It should have a unique identifier
--It should have over the network data transfer capability
--Removal of humans from the default data generation and transmission

The birth of IOT has been a result of the happy marriage between the Internet and wireless technologies. This marriage aims to build the fancy IOT world removing humans with micro-electromechanical systems (MEMS) and let them interact using Microservices. Unstructured machine generated data gets analyzed using Information Technology and gets converted/transmitted to an input required by another 'thing' on the internet, setting up a chain of connected 'Internet of Things'. So the walls between Operational Technology (OT) and Information Technology (IT) are removed in the IOT world.




Why Microservices fit in IOT World


Why Microservices for IOT, when SOA was already there? SOA proposed in nineties and flourishing until recently began to look insufficient with the advent of big data and could. Now with cloud and big data being a common solution, a new architecture was needed to fulfill new requirements. Hence microservices were adapted as a solution to the new challenges of distributed household computing requirements. The complexity of distributed yet collaborated computing could be reduced by features of Microservices architecture, such as each service is independent process, self-sufficient, deployable anywhere on the network, having data driven interfaces with minimal input and output. By design data management becomes decentralized as each microservice will have its own suitable data and data store. These features also make granular governance of microservices possible.

It’s growing with its pros and cons


While the advantages of microservices are making it popular in IOT implementations but challenges/concerns also remain. For example each microservice in a platform can be developed in a different language – C, Java, C++, Python, etc; but interoperability among vendors remain a concern. With ever increasing number of interfaces, security is another major concern for microservices which needs to be addressed in the ever growing world of IOT.


Tuesday 3 January 2017

Python Code Coverage

Coverage.py is a tool for measuring code coverage of Python programs. It monitors your program, noting which parts of the code have been executed, then analyzes the source to identify code that could have been executed but was not.

Its a simple tool to measure code coverage but is slightly buggy and it can be tricky if version issues are not taken care of. 

Coverage 4.3.1 installed from here with Pyhton 2.7 constantly gave 'file has no statistics' error. Seems like if file path has spaces then it gives this error. However for me I had no spaces in the file path or in the PyDev project. After some time I figured out that the problem was with the coverage module version. For some strange reasons/issue it works with coverage version less than 4.0.0.

So this is what solved the problem for me: python -m pip install "coverage < 4.0.0"




After this it worked like a charm. You can even drag and drop the folders which you want to analyze for code coverage. Isn't it cool??