TensorFlow

As a leading company in Machine Learning, Google had build DistBelief as a proprietary Machine Learning framework. As it’s usage grew, they decided to build the second generation of this library. This also resulted in code refactoring, making it faster and in general elevating the robustness of the application. This new version of Machine Learning framework was named as TensorFlow and was also made “open-source” by Google.

TensorFlow
TensorFlow is popularly used with Python API

Basics of TensorFlow

Tensor is a multi-dimensional array of base data types. The name TensorFlow is derived from the word “Tensors” and the operations done on the tensors. Machine Learning is all about data and hence tensors are the basis of the framework used for Machine Learning. It is written using C++ and CUDA (Nvidia’s language for programming GPUs). However, it provides APIs for Python, C++, and Java in addition to few others.

TensorFlow allows you to create models for machine learning and also allows you to train those models. Vary famous example usage of TensorFlow is Image recognition. You can use supervised learning method to train the dataset using TensorFlow and then use that model to use it in your application.

While there are some alternatives available, TensorFlow is gaining popularity among the community interested and working in Machine Learning field. It’s APIs are easy to use and allow students and researchers to iterate and create models quickly. It has a high level of accuracy and also has the ability to run on several parallel processors using server farms of GPUs and TPUs (Tensor Processing Units).

Interesting Use cases:

  • Image recognition – identify and name objects/persons in a given image
  • Text-based applications such as translation and language detection
  • Text summarization
  • Voice or sound recognition

One of the interesting use cases that I came across was by a company called “Connecterra”. They are using wearable sensors to collect data from cows on farms. Data collected is passed through TensorFlow. A model has been created which allows detecting possible health issues for the cows and giving advanced intimation to farmers. The company is also claiming to show 30% more yield for their customer farmers.

Related Links

Related Keywords

Machine Learning, Supervised Learning, GPU, CUDA, Python

 

Scala

Scala is a functional programming language which is gaining popularity over past few years. There are some key benefits of using functional programming and this language in particular.

Scala Programmer
Scala Programmer – representative image 😉

What is Scala?

As mentioned above it is a functional programming language which compiles the code into Java bytecode. Once compiled, this bytecode could be run on any JVM (Java Virtual Machine). Scala can directly use Java libraries as well as it’s own libraries. It is also known for statically typed nature. It simply means the code gets checked thoroughly during compile time itself for all the variables and their types. This helps in identifying bugs early on and reducing the issue identification during runtime.

Scala was first introduced in 2003 and was an attempt towards creating “Better Java”. As a result, it has features of OOP as well as functional programming built-in, making it very powerful language to use. It’s compiler has capabilities to infer quite a few things about the variables, functions, and classes. This, in turn, helps developers write very concise code.

Key Features

  • Type inference
  • Singleton Object
  • Immutability
  • Powerful Pattern Matching for switch/case statements
  • Higher-order methods (methods that take methods as input)
  • Traits (Improved version of Interfaces)
  • Concurrency

This language has been considered as best language to support concurrency. It considers the availability of several cores such as in GPUs which can give you benefits of parallel execution.

Essentially, Scala can do everything Java can do and also in a better fashion!!

Related Links

Related Keywords

Functional Programming, Java, Big Data, Hadoop

 

GraphQL

GraphQL is a query language that was developed by Facebook for their internal development. However, later it was made open source in 2015. It is gaining traction since then but has a lot to cover to be called as popular.

GraphQL
GraphQL – query language to fetch and manipulate data

What are the main advantages of GraphQL?

GraphQL highly simplifies the fetching and manipulation of data, even when the operations tend to be complex. In “fetch” type of query, it provides exact data as requested by the client – no more no less. This makes the communication highly efficient. The important advantage is that the response format is specified by the client and is not decided by the server. Also, the structure of the data is not hardcoded as in REST APIs.

GraphQL makes the complex request very simple to implement as compared to REST APIs. e.g. additional filters and options both are pushed into query string parameters when using REST APIs. And that makes the request unreadable and difficult to understand which one is a filter and which one is an option. whereas GraphQL allows forming queries in a nested format, making it readable as well as easy to process.

GraphQL Server implementation is available in several languages including Javascript, Python, PHP, Ruby etc. Readymade server implementation from Facebook is also available, which uses Node.js.

Types of GraphQL operations

As can be guessed, it supports two types of operations:

  • Fetch data
  • Manipulate data (Create, Update, Delete)

Typically, you use GET request to fetch the data and POST request to manipulate the data. Using GET allows the responses to be cached at various levels and adds to the efficiency of the overall architecture.

Both REST and GraphQL support evolution of APIs i.e. support for additional fields and deprecation of unused fields, without impacting any of the endpoints.

You can read more about REST and GraphQL here and here. But essentially, both have their own advantages and in a microservices architecture, both could live together happily!!

Related Links

Related Keywords

Microservices Architecture, REST, Node.js

Serverless Computing

Serverless Computing is a computing model where servers are not used. Are you kidding me? You are right. This is not a case. Serverless Computing is actually a misnomer. What it really means is developers are freed from managing the servers and are free to focus on their code/application to be executed in the cloud.

Serverless Computing
Serverless Computing – You won’t need such a huge space!!

So, how does Serverless Computing really work?

In this computational model, you only need to specify minimum system requirements such as RAM. Based on that the cloud provider would provision the required resources such as CPU and network bandwidth. Whenever you need to execute your code, you hit the endpoint and your code is executed. In the background, the cloud provider, provisions the required resources, executes the code and releases the allocated resources. This allows cloud provider to use the infrastructure for other customers when they are idle. This also gives out the benefit to the customers as they are not charged for the idle time. Win-Win situation for both, isn’t it?

Serverless Computing is popular in microservices architecture. The small pieces of code which form the microservices can be executed using Serverless components very easily. On top of it, cloud provider also handles the scaling up. So if there are more customers hitting your serverless endpoint, cloud provider would automatically allocate more resources and get the code executed.

Any precautions to be taken?

Absolutely. Every developer needs to keep few things in mind while developing code for Serverless computing:

  • The code can’t have too many initiations steps, else it will add to the latency.
  • The code is executed in parallel. So there shouldn’t be any interdependency which would leave the application or data in the incoherent state.
  • You don’t have access to the instance. So you can’t really assume anything about the hardware.
  • You don’t have access to local storage. You need to store all your data in some shared location or central cache.

So who all provide this option?

  • AWS (obviously!!) was the first one to provide this (2014) – AWS Lambda.
  • Microsoft Azure provides Azure Functions
  • Google Cloud provides Google Cloud Functions
  • IBM has OpenWhisk which is open source serverless platform

Support for languages varies from provider to provider. However, all of these offerings support Node.js. Among other languages, Python, Java are more popular.

Related Links

Related Keywords

Serverless Architecture, API Gateway, AWS S3, Microservices Architecture

Bootstrap

One of the meanings of word “Bootstrap” means starting up with minimal resources. In technology, term “Bootstrap” refers to a front-end web framework, which needs minimal work to get your website ready. It provides basic structure in the form of HTML and CSS based design templates, forms, buttons, and other web components. With the use of provided libraries, one can set up her website pretty quickly.

Bootstrap - Build responsive websites quickly
Bootstrap – Build responsive websites quickly

What does Bootstrap provide?

Default configuration provides a grid system made of 12 columns. A developer can choose how does she want to arrange the data amongst these 12 columns. She can choose to have only 2 column structure each column spanning 6 cells or she can also choose to have the first column as 4 cells and second as 8 cells. Each row could have a different structure as per the need of the design.

Bootstrap provides easy-to-use classes to support grid structure mentioned above. It also provides easy-to-use classes for standard HTML components such as buttons, lists, tables etc. Standard look-n-feel for messages (alert, error, warning, notice etc) is also added to the framework.

Additionally, it also provides jQuery which is used by the framework for standard validations, event handling, and other several things.

What are the advantages of Bootstrap?

Following are few of the several advantages of using Bootstrap framework for your website:

  • Responsive – websites built using this framework can adapt to the device size and can easily rearrange the components (hide, resize) as per the form factor of the device. In fact, the latest version of Bootstrap has been built with “mobile-first” philosophy. It helps a lot in the design of modern web and mobile-web applications.
  • Faster Speed Of Development – Given the availability of ready-made classes and components, one can quickly develop the website using this framework.
  • Customizability – You can also customize certain sections of the website by overriding the CSS classes.
  • Community Support – This is one of the frameworks which has huge community support – active GitHub project, several forks and several contributors. This is in addition to thousands of articles explaining how to use this framework.

The only disadvantage I came across about Bootstrap was – all the websites that use only basic Bootstrap, look alike! But this is something easy to overcome by customizing the website to a certain extent.

Any alternatives to Bootstrap?

Ample of them. Foundation, Skeleton, Pure.CSS, HTML5 Boilerplate and many more.

Related Links

Related Words

Web Framework, Responsive Web Design, Javascript, CSS, jQuery,