Edge Computing

Edge computing is distributed architecture methodology which brings some very specific advantages due to the distributed nature of the architecture. Using this architecture, businesses can enjoy benefits such as lower latency, reduced network bandwidth usage and near real-time processing of time-critical data.

Edge Computing
Edge Computing!! Ain’t it funny??

But what is Edge Computing after all?

With the rise of IoT (Internet of things) we are having several sensors or devices located at multiple locations. These sensors collect a massive amount of data. The businesses need to analyze and use this data for further processing. If all sensors are to send data to central server continuously, that would mean each one will need uninterrupted internet connectivity. It will end up in consuming huge network bandwidth. Also, sending data over the internet would also involve latency, which at least in certain cases may not be acceptable. All these things are expensive from a business perspective and here Edge Computing comes into the picture.

In this architecture, the collected data is processed near the edge by deploying some compute power – which could be low cost – near to the devices. This is referred as Device Edge. On these local machines, the data received could be received through local networks, not necessarily needing internet. Collected data could be processed near real-time and only actionable data is sent back to the central server immediately. Rest of the data could be archived as per the need on a periodic basis. As you can see, by deploying compute power near the devices, we have addressed all the three issues mentioned above.

There is another variant of Edge Computing. In above example, “Edge” is treated as an edge of the network where devices are located. Whereas in this other variant, “Edge” is treated as an edge of the cloud infrastructure. A close example of this is CDN – the static contents are cached on various edges across the globe and served based on geolocation of the request. However, CDN doesn’t involve any computing power.

There are some concerns about the security of the data at the edge locations, however, with careful planning, those could be handled satisfactorily.

Related Links

Related Keywords

Software Architecture, Cloud, IoT

Django

Django is a web app framework built using Python language. It is free and open-source (BSD license) framework used by many leading and well-known websites.

Django
Django Developer at work

What are the features of Django?

It uses Model-View-Controller architecture. The framework consists of:

  • Object-relational-mapper (ORM) which connects the data model with backend database (Model).
  • Web templating system to process HTTP requests (View)
  • URL dispatcher (Controller)

Being a framework, it also includes several components to ease the creation of complex web apps such as authentication module, web server, form component, cache module, support for XML and JSON representations and many more. As an addon, the distribution also contains tools to generate RSS/Atom feeds, Google Sitemaps, built-in mitigation for several vulnerabilities and also administrative interface.

Django framework implicitly enforces a certain way of developing your application, which might be construed as a limitation. However, this in itself maintains the sanctity of the code that is getting developed and keeps the code readable/maintainable even for your teammates.

Which websites are using Django framework?

The list is impressive. Disqus, Bitbucket, Instagram, Mozilla Firefox. Even Pinterest was built using Django, which later was migrated to Flask, another web app framework.

Alternatives for Django:

  • Flask
  • Falcon
  • Ruby On Rails
  • Laravel
  • Spring MVC
  • ASP .NET MVC

Why would you choose Django?

This framework is written in Python, which is easy to learn and also is one of the most popular languages. Built-in components and supporting modules make the development of the web app very fast. The add-ons provide the modules required for security. However, one of the important features of Django is template inheritance! You can define a base template and extend it for your further use.

Trivia

  • It is pronounced as Jango (D is silent with emphasis on J)
  • It was created in 2003 by two developers working at a newspaper.
  • It was made open source and Django Software Foundation was formed to maintain the software.
  • Framework as has been named after a guitarist  Django Reinhardt.

Related Links

Related Keywords

Web App Frameworks, Python, MVC, Software Architecture, Flask, Falcon

Kafka

Apache Kafka is an open source distributed streaming platform. It allows to publish/subscribe to data feeds (stream), it stores the data in a fault tolerant way and it allows consumers process the data as per the consumer’s need.

Key concepts in Kafka

It runs in a cluster, with configurable replication across the nodes.

Kafka
Kafka – source: https://kafka.apache.org/intro
  • Topics – These can be considered as message queues where publisher post their messages and consumers pick their messages.
  • Record – each record consists of a key, value and a timestamp.
  • Producer API – It allows publishers aka producers to post the messages or stream of messages to one or more topics in Kafka.
  • Consumer API – it allows consumers to poll the topics and fetch messages. Consumers can subscribe to one or more topics.
  • Stream API – it consumes the messages posted by publishers, processes them and posts the output messages back to Kafka system topics. Essentially they transform the messages.
  • Connector API – These connect Kafka topics to various applications and/or data sources.

History of Kafka

This platform was originally developed by the LinkedIn team and was eventually made open source. It is written in Scala and Java language. This platform can be used as a storage system, messaging system or simply stream processing. It achieves high throughput and low latency by batching the messages to optimize the n/w overhead and by using Java NIO. At its core, Kafka uses a simple binary protocol over TCP to communicate amongst various components.

Guarantees given by the platform:

  1. Records will always appear in the same sequence in the queue as they were received from the producers
  2. A consumer will see the records in the same sequence as they appear in the queue
  3. A topic with replication factor N, will be usable up to N-1 server failures, without losing any data.

Sample use cases

  • Message broker – can be compared with ActiveMQ or RabbitMQ
  • Website activity tracking – pushing various data points and then writing consumers to process the data
  • Log aggregation across various nodes

Related Links

Related Keywords

ActiveMQ, RabbitMQ, AMQP, Broker

Vagrant

You are part of a development team and you want to try out the latest version of the VM that your application uses. Or you want to make some configuration changes and test them out in your development environment. However, you are not sure if your changes would be useful or successful. And hence you want an ability to roll back the changes or potentially version control them. How do you do it? Vagrant comes to the rescue!!

What is Vagrant?

Vagrant is an open source tool for building and maintaining portable development environments. With the rise of complex architectures involving several different servers and technology stacks, Vagrant simplifies the task of creating and maintaining the required stack of software/libraries etc.

Vagrant stores the configuration in the form of a text file(s) and these files could be put under your favorite version control system such as git. If changes don’t work out, you can easily roll back and go to the earlier working stage. This capability improves the development productivity a lot and hence Vagrant has become a darling of several development teams.

This tool uses a concept of “provisioners” and “providers”. Provisioners are tools that allow to customize/modify the environments – examples are Chef and/or Puppet. Whereas Providers are services which provide virtual machines such as AWS, Docker, VMWare etc.

Vagrant Workflow
Vagrant – workflow [Source: https://objectcomputing.com/resources/publications/sett/march-2015-docker-vs-vagrant]
Vagrant abstracts the machine. It sits as a wrapper on top of underlying hardware. You can throw away the vagrant configuration and create new one very easily, by simply changing the config files. It provides command line interface, which can work in any environment irrespective of the underlying VM or OS. This additional layer provides the portability, simplicity, and interoperability. One developer can easily share this environment she has created with others and other can quickly set up the replica of the shared environment.

One might be tempted to compare Vagrant with other configuration management tools such as Chef/Puppet/Ansible. However, Vagrant is commonly used along with one of these tools as they serve different purposes.

Related Links

Related Keywords

Configuration Mangement, Docker, Chef, Puppet, Ansible, VMWare, AWS, DevOps

 

BAN / WBAN

We all have heard of LAN/WLAN (Wireless Local Area Network), MAN (Metropolitan Area Network), and WAN (Wide Area Network). Maybe you have also heard about PAN (Personal Area Network). Today. let’s know more about BAN / WBAN – Wireless Body Area Network.

What is BAN?

This is a network of multiple interconnected devices worn or implanted in a human’s body. These devices include monitoring devices such as pacemakers or BP monitors. Such a network typically includes a smartphone which acts as a mobile hub to collect data from wearables and implants and push it to a central repository to process/ analyze further.

Now you probably can guess one of the biggest beneficiaries of BAN/WBAN – medical field! Patients can be equipped with wearable monitoring devices and a smartphone. Then the medical team can monitor the patient’s health from a single location. This technology comes handy for remote monitoring or could also be extremely useful during a medical emergency where a small group of medics needs to monitor a large number of patients.

BAN
BAN – source: https://www.waves.intec.ugent.be/files/images/WBAN.img_assist_custom.jpg

So is this a standard terminology?

Yes, there’s an IEEE standard 802.15.6 defined for WBAN from Healthcare point of view.

It is a standard for short-range, low power, and highly reliable wireless communication in, on and around human body.

[Source: IEEE website – http://ieeexplore.ieee.org/document/7581523/]

BAN network cannot just monitor the human body, but can also initiate action. e.g. Insulin can be injected automatically into a diabetic patients body if the BAN detects lower levels of insulin in the body.

In some other use cases, a sports person can create BAN to gather data about her performance and subsequently make improvements to her game.

Some concerns about BAN/WBAN

  • Since this is a mobile network, which moves along with the human, security of the data becomes an important consideration. WBAN also needs to ensure that the data is collected from correct human even if there are multiple humans in the vicinity.
  • Privacy – this could be treated as an invasion of privacy and it is utmost important to obtain consent from the human to create and use BAN around his/her body.
  • Data management – data collected using such close monitoring is going to be humongous and hence needs to be managed well.

Related Links

Related Keywords

LAN, WAN, MAN, WLAN, RFID,