What is a MAC address?

MAC address stands for Medium Access Control Address. MAC address is also referred as physical address or hardware address or Ethernet address.

MAC address is unique to the network device wanting to utilize TCPIP network or LAN or WLAN service. It is “burnt into” the device by manufacturer of the device or Card.

MAC address is composed of 48 bit or six hexadecimal digits, separated by colons or dashes.

Example – 00-14-2A-3F-47-D0

Remember Hexadecimal digits can be numbers from 0-9 and letters from A-F.

MAC address represents the manufacturer of the card and device number. The first three pairs of digits represents the manufacturer (called OUI-Organisationally Unique Identifier) and last three pairs of digits represents the number specific to the device(called NIC-Network Interface Controller Specific). ARP,Address Resolution Protocol is used to convert IP address to the MAC address. MAC address is very essential for the IP layer to work. MAC is the foundation for IP address to communicate packet from one system to the other. Similar to IP addresses, there are some MAC addresses defined for special purposes,For example FF:FF:FF:FF:FF:FF is reserved ror broadcast purpose.


What is the difference between NAT and PAT?

NAT stands for Network Address Translation and PAT stands for Port Address Translation.
A network address translation device obscures all details of the computers connected to the local network. NAT device acts as gateway for all the computers. Behind the NAT device, local network can use any network address space. NAT device acts as proxy for the local network on the internet.


A NAT device helps in increasing the security as it can prevents an outside attacker even to find the local network. This is because of local addressing scheme is not contiguous with the standard IP address space used worldwide.


PAT helps in optimum utilization of IP address space by way of allocating one dedicated IP address for the organization and internally uses IP addresses as per the need. PAT is the extension of the NAT

How TCP is different from UDP

How TCP is different from UDP

Unlike TCP, UDP is connectionless and provides no reliability, no windowing and no function to ensure data is received in the same order as it was transmitted. However, UDP provides some functionalities as supported by UDP such as data transfer, multiplexing and has fewer bytes of overhead in the data. This fewer bytes in the overhead makes UDP protocol need less time in processing the packet and need less memory. Also, absence of acknowledgement field makes it faster as it need not to wait on ACK or need not to have hold on data in memory until they are ACKed.


What is a networking gateway?

From networking point of view Gateway is a device which provides connectivity between two heterogeneous networks/systems to communicate. This is done using protocol translation. Gateway embeds both protocols of different systems in order to provide interoperability functions. Gateway can provide interconnectivity between more than two different systems also.

There are various gateways designed as per the need of different systems/technologies. These include GSM/CDMA gateway for VOIP, T1(1.544Mbps)/E1(2.048Mbps) gateway, access gateway, GMSC and more.


Angular 4.2

The Angular team continues to publish new versions of Angular according to the Semantic versioning. Angular version 4 was released on March 16, six months’ later version 2 was released. In the last three months two minor versions and a lot of patch versions were born with new stuff. Angular 4.2 is already here and we have a huge number of new features added for making animations easier and powerful. Part of them are defining the reusable animations, querying for inner elements, animating when routes change and building/controlling an animation using AnimationBuilder. So, let’s dive deep-in and know about the new features in Angular 4.2.

Angular 4.2


  • Angular Forms now includes validators for min and max attributes.
  • Developer can now bootstrap a component directly by passing an element reference to the bootstrap method of an ApplicationRef.
  • Enhanced i18n tooling including MissingTranslationStrategy and location notes in xliff2 files.
  • New compiler flag alwaysCompileGeneratedCode is available in opt-in, and will be turned on by default in the future.


Two new validators joins the existing requirement, minLength, maxLength, email, and pattern. Min and Max helps the developer to validate whether the input is at least or at most the value specified or not.

<input type=”number” [(ngModel)]=”user.age” min=”0″ max=”130″>

Update (2017-06-17): The min and max validators have been temporarily removed from Angular in version 4.2.3, as they are a breaking change. They’ll return in a major version, maybe 5.0.0.

Angular Animations

There are huge number of new features to make working with Animations easier and more powerful. Some of the new feature are:

  • Configure options and set input variables within animations.
  • Define reusable animations using animation().
  • Stagger multiple elements within an animation using stagger().
  • Enable queried elements to trigger their own animations.
  • Orchestrate a full-blown animation when routes change.
  • Programmatically build/control an animation using AnimationBuilder

A new query function has been introduced in the animation DSL, allowing to query the elements in the template. It uses querySelectorAll behind the scene, so the developer can use an element or a class as parameter. It also supports pseudo-selectors, and that opens a few interesting possibilities!

For example, you can now easily animate elements in a NgFor:

<div [@races]=”races?.length”>

<button class=”btn btn-primary mb-2″ (click)=”toggle()”>Toggle</button>

<div *ngFor=”let race of races | slice:0:4″>






trigger(‘races’, [

transition(‘* => *’, [

query(‘:leave’, [

animate(1000, style({ opacity: 0 }))

], { optional: true }),

query(‘:enter’, [

style({ opacity: 0 }),

animate(1000, style({ opacity: 1 }))

], { optional: true })



Now, every time an element is removed from the races array, it will slowly fade out. And when an element enters, it will slowly fade’s in.

Animation has also been added to build reusable animations. The syntax allows to have dynamic parameters with default values. The developer need to use a reusable animation, they can call useAnimation, and override the default parameters if they want to.


That’s all for this release! The focus was mainly on animations and tests, and the team is also working on reducing the bundle size of the applications, with the help of the Google Closure Compiler. We think we are going to learn more about that very soon!



Spring is a very popular Java based framework for building web and enterprise applications. Unlike many other frameworks which focuses on only one area, Spring framework provides a wide variety of features addressing the modern business needs through its portfolio projects. Spring framework provides flexibility to configure the beans in multiple ways such as XML, Annotations, and JavaConfig. With the number of features increased the complexity also gets increases and configuring Spring applications becomes tedious and error-prone. Spring team created SpringBoot to address the complexity of configuration. Explore this article and know more about SpringBoot.

Overview of Spring framework

If you are a Java developer, then there is a high chance that you might have heard about Spring framework and probably have used it in your projects. Spring framework was initially created as a Dependency Injection container but we all know it is much more than that.

Spring is very popular because of various reasons

  • Spring’s dependency injection approach encourages the writing testable code.
  • Spring simplifies integration with other Java frameworks like JPA/Hibernate ORM, Struts/JSF, and other web frameworks
  • State of the art Web MVC framework for building web applications

Along with Spring framework there are many other Spring sister projects which helps to build applications addressing modern business needs:


Spring Data : Simplifies data access from relational and NoSQL data stores.

Spring Batch : Provides powerful batch processing framework.

Spring Security : Robust security framework to secure applications.

Spring Social : Supports integration with social networking sites such as Facebook, Twitter, LinkedIn, GitHub, and much more.

Spring Integration : An implementation of Enterprise Integration Patterns to facilitate integration with other enterprise applications using lightweight messaging and declarative adapters.

There are many other interesting projects addressing various other modern application development needs.

In the initial days, Spring framework has provided XML based approach for configuring beans. Later Spring has introduced XML based DSLs, Annotations, and JavaConfig based approaches for configuring beans.

A quick taste of SpringBoot

Welcome to SpringBoot! SpringBoot do what exactly you are looking for. It will do things automatically for the user and allows them to override the defaults if they want to.

Instead of explaining in theory let’s see by example.

Step 1: Create a Maven based SpringBoot Project

Create a Maven project and configure the dependencies as follows:


<?xml version=”1.0″ encoding=”UTF-8″?>

<project xmlns=”http://maven.apache.org/POM/4.0.0″














































Wow our pom.xml suddenly become so small!!.

Step 2: Configure datasource/JPA properties in application.properties in src/main/resources as follows.








Step 3: Create a JPA Entity and Spring Data JPA Repository Interface for the entity.

Create User.java, UserRepository.java and HomeController.java same as in springmvc-jpa-demo application.

Step 4: Create Thymeleaf view to show list of users

Copy /WEB-INF/views/index.html that we created in springmvc-jpa-demo application into src/-main/resources/templates folder in our new project.

Step 5: Create SpringBoot EntryPoint Class

Create a Java class Application.java with main method as follows:


public class Application


public static void main(String[] args)


SpringApplication.run(Application.class, args);



Now run Application.java as a Java Application and point your browser to



Service Oriented Architecture

Service-oriented architecture (SOA) is an evolution of distributed computing based on the request or reply design paradigm for synchronous and asynchronous applications. An application’s business logic or individual functions are modularized and presented as services for consumer or client applications. The key to these services is their loosely coupled nature; i.e., the service interface is independent of the implementation. Application developers or system integrators can build applications by composing one or more services without knowing the services’ underlying implementations. For instance, a service can be implemented either in .Net or J2EE, and the application consuming the service can be on a different platform or language. Explore this article and get an in-depth idea about SOA.

Key characteristics of SOA

  • SOA services have self-describing interfaces in platform-independent XML documents. Web Services Description Language (WSDL) is used to describe the services.
  • SOA services connects with the messages formally which is defined through XML Schema. Communication among the consumers and providers or services typically happens in heterogeneous environments, with less or no knowledge about the provider. Messages between the services can be viewed as key business documents processed in an enterprise.
    SOA services are maintained in the enterprise by a registry that acts as a directory listing. Applications can look up the services in the registry and can invoke the service.


Architecture of SOA

Several service consumers can invoke services by sending the messages. These messages are transformed and routed by a service bus to an appropriate service implementation. The service architecture also provides a service management infrastructure that manages the services and activities such as, auditing, billing, and logging. In addition, the architecture also offers enterprises the flexibility of having agile business processes, better addresses the regulatory requirements like Sarbanes Oxley (SOX), and changes individual services without affecting other services.

Why SOA?

The reality in IT enterprises is that infrastructure is heterogeneous across the operating systems, applications, and system software. Some existing applications are used to run current business processes, so starting from the scratch to build new infrastructure isn’t an option. Enterprises should quickly respond to the business alterations with agility and should leverage the existing investments in applications and application infrastructure to address the new business requirements. SOA with its loosely coupled nature allows the enterprises to plug in new services or upgrade existing services in a granular fashion to address the new business requirements, provides the option to make the services consumable across different channels, and exposes the existing enterprise and legacy applications as services, thereby protecting existing IT infrastructure investments.

The Benefits of SOA

While the SOA concept is fundamentally not new, SOA differs from existing distributed technologies. SOA, with a ubiquitous set of standards, brings better reusability of existing assets or investments in the enterprise and lets the user to create applications that can be built on top of new and existing applications. SOA enables the changes to applications while keeping clients or service consumers isolated from evolutionary changes that happen in the service implementation. SOA enables upgrading individual services or services consumers; it is not necessary to completely rewrite an application or keep an existing system that no longer addresses the new business requirements. Lastly, SOA also provides enterprises better flexibility in building applications and business processes in an agile manner by leveraging existing application infrastructure to compose new services.


What is a RESTful API?

With all the hype surrounding RESTful web services, you’d think it was suddenly a new concept that shot forth on the scene only a year or two ago. The truth is, the concepts underlying RESTful APIs are as old as the web and are best understood from that perspective. Explore this article and know more about RESTful API and how it works.


REST technology is usually preferred as more robust Simple Object Access Protocol (SOAP) technology because REST leverages less bandwidth, making it more suitable for the internet usage. An API for a website is the code that allows two software programs to communicate with each other. The API spells out the proper way for a developer to write a program requesting all the services from an operating system or other application.

The REST is used by browsers can be thought as the language of the internet. As cloud usage is on the rise, APIs are emerging to expose web services. REST is a logical choice for building APIs that allows the users to connect and interact with cloud services. RESTful APIs are used by the sites such as Amazon, Google, LinkedIn, and Twitter.

How RESTful APIs works

A RESTful API breaks down a transaction to create a series of small modules. Each module addresses a particular underlying part of the transaction. This modularity provides developers with a lot of flexibility, but it can also be challenging for developers to design from scratch. Presently, the models provided by Amazon Simple Storage Service, Cloud Data Management Interface, and OpenStack Swift are the most popular.

A RESTful API explicitly takes advantage of HTTP methodologies defined by the RFC 2616 protocol. They use GET to retrieve a resource, PUT to change the state or to update a resource, which can be an object, file or a block, POST to create the resource, and DELETE to remove it.

With REST, networked components are a resource you request to access a black box whose implementation details are unclear. The presumption is that all calls are stateless; nothing can be retained by the RESTful service between executions.

As, the calls are stateless, REST is useful in cloud applications. Stateless components can be freely redeployed if something fails, and they can scale to accommodate load changes. This is because any request can be directed to any instance of component. That makes REST preferred for web use, but the RESTful model is also helpful in cloud services because binding to a service through an API is a matter of controlling how the URL is decoded. Cloud computing and micro services are almost certain to make RESTful API design the rule in the future.