Introduction to HTTP/2

The reason I got started with topic is that, there  were some buzz around Visual Studio 2015 RC support for HTTP/2 and Windows 8 – IIS support for HTTP/2. I was curious to learn further about the HTTP/2 and sharing my findings in this article.

About HTTP/2.

HTTP/2 is the first new version of HTTP since HTTP 1.1, which was standardized in RFC 2068 in 1997.

  • HTTP/2 enables a more efficient use of network resources and a reduced perception of latency by introducing header field compression and allowing multiple concurrent exchanges on the same connection. 
  • It also introduces unsolicited push of representations from servers to clients.
  • This specification is an alternative to, but does not obsolete, the HTTP/1.1 message syntax. 
  • HTTP’s existing semantics remain unchanged.

HTTP/2 allows the server to “push” content, that is, to respond with data for more queries than the client requested. This allows the server to supply data it knows a web browser will need to render a web page, without waiting for the browser to examine the first response, and without the overhead of an additional request cycle.

Quoting from MSDN:

HTTP/2 is a new version of the HTTP protocol that provides much better connection utilization (fewer round-trips between client and server), resulting in lower latency web page loading for users.  Web pages (as opposed to services) benefit the most from HTTP/2, since the protocol optimizes for multiple artifacts being requested as part of a single experience.

The browser and the web server (IIS on Windows) do all the work. You don’t have to do any heavy-lifting for your users.

[Source: MSDN]

HTTP v1.1 vs HTTPv2

  • HTTP/2 leaves most of HTTP 1.1’s high level syntax, such as methods, status codes, header fields, and URIs, the same. The element that is modified is how the data is framed and transported between the client and the server.

At a high level, HTTP/2:

  • is binary, instead of textual  ( the reason being is – “Binary protocols are more efficient to parse, more compact “on the wire”, and most importantly, they are much less error-prone, compared to textual protocols like HTTP/1.x, because they often have a number of affordances to “help” with things like whitespace handling, capitalization, line endings, blank links and so on. “)
  • is fully multiplexed, instead of ordered and blocking
  • can therefore use one connection for parallelism
  • uses header compression to reduce overhead
  • allows servers to “push” responses proactively into client caches

Taking help of an image visualization

http-timing-diagram

Major Milestones:

  • December 2014: The HTTP Working Group presented HTTP/2 to IESG for consideration as a Proposed Standard.
  • Feb 17, 2015: IESG approved it to publish as Proposed Standard
  • May 2015: The HTTP/2 specification was published as RFC 7540

Browser Support:

  • Chrome supports HTTP/2 by default.  (from version 41)
  • Google Chrome Canary supports HTTP/2 by default. (from version 43)
  • Chrome for iOS supports HTTP/2 by default.  (from version 41)
  • Firefox supports HTTP/2 which has been enabled by default since version 34.
  • Internet Explorer supports HTTP/2 in version 11, but only for Windows 10 beta, and is enabled by default. Currently only HTTP/2 over TLS is implemented.
  • Opera supports HTTP/2 by default (from v 28 onwards)

Reference Links:

Static vs Singleton Classes

Recently while I was attending an interview I came across a question Static vs Singleton. Though I know the differences I couldn’t answer it properly, as I was not refreshed my programming knowledge before the interview.

I would like to quote a reference to Jalpesh’s blog article (www.dotnetjalps.com) explaining the difference:

Difference between Static and Singleton classes:

  1. A singleton classes allowed to create a only single instance or particular class. That instance can be treated as normal object. You can pass that object to a method as parameter or you can call the class method with that Singleton object. While static class can have only static methods and you can not pass static class as parameter.
  2. We can implement the interfaces with the Singleton class while we can not implement the interfaces with static classes.
  3. We can clone the object of Singleton classes we can not clone the object of static classes.
  4. Singleton objects stored on heap while static class stored in stack.
  5. A Singleton class can extend the classes(support inheritance) while static class can not inherit classes.
  6. Singleton class can initialize lazy way while static class initialize when it loaded first
  7. Static classes are sealed class while Single ton classes are not sealed.

Credits to Jalpesh Vadgama  – “Computer Geek, Developer, Mentor, Life long learner, 10+ Years of Experience in Microsoft.NET Technologies, Awarded Microsoft Mvp(C#) for year 2010,11 and 2012.”

Why SOA ?–Service Oriented Architecture

SOA starts with a simple idea – the concept of service. Services are unassociated, loosely coupled units of functionality that are self-contained. Each service implements at least one action, such as submitting an online application for an account, retrieving an online bank statement or modifying an online booking or airline ticket order.

There are multiple definitions for SOA:

The OASIS group and the Open Group have both created formal definitions.
OASIS’s Definition of Service Oriented Architecture
A paradigm for organizing and utilizing distributed capabilities that may be under the control of different ownership domains. It provides a uniform means to offer, discover, interact with and use capabilities to produce desired effects consistent with measurable preconditions and expectations.
The Open Group’s Definition of Service Oriented Architecture
Service-Oriented Architecture (SOA) is an architectural style that supports service-orientation. Service-orientation is a way of thinking in terms of services and service-based development and the outcomes of services. A service is a logical representation of a repeatable business activity that has a specified outcome (e.g., check customer credit, provide weather data, consolidate drilling reports)

The purpose of SOA is to allow users to combine together fairly large chunks of functionality to form ad hoc applications built almost entirely from existing software services. The larger the chunks, the fewer the interfaces required to implement any given set of functionality; however, very large chunks of functionality may not prove sufficiently granular for easy reuse. Each interface brings with it some amount of processing overhead, so there is a performance consideration in choosing the granularity of services.

SOA as an architecture relies on service-orientation as its fundamental design principle. If a service presents a simple interface that abstracts away its underlying complexity, then users can access independent services without knowledge of the service’s platform implementation.

Horizontal Layers of SOA

SOA-based solutions endeavour to enable business objectives while building an enterprise-quality system. SOA architecture is viewed as five horizontal layers:

  1. Consumer Interface Layer – These are GUI for end users or apps accessing apps/service interfaces.
  2. Business Process Layer – These are choreographed services representing business use-cases in terms of applications.
  3. Services – Services are consolidated together for whole-enterprise in-service inventory.
  4. Service Components – The components used to build the services, such as functional and technical libraries, technological interfaces etc.
  5. Operational Systems – This layer contains the data models, enterprise data repository, technological platforms etc.

Cross Cutting – Vertical Layers of SOA

There are four cross-cutting vertical layers, each of which are applied to and supported by each of the following horizontal layers:

  1. Integration Layer – starts with platform integration (protocols support), data integration, service integration, application integration, leading to enterprise application integration supporting B2B and B2C.
  2. Quality of Service – Security, availability, performance etc. constitute the quality of service parameters which are configured based on required SLAs, OLAs.
  3. Informational – provide business information.
  4. Governance – IT strategy is governed to each horizontal layer to achieve required operating and capability model.

Benefits:

The use of services provides major benefits:

  • In contrast to the use of large applications, which tend to be “information silos” that cannot readily exchange information with each other, the use of finer-grained software services gives freer information flow within and between enterprises. Integrating major applications is often expensive. SOA can save integration costs.
  • Organizing internal software as services makes it easier to expose its functionality externally. This leads to increased visibility that can have business value as, for example, when a logistics company makes the tracking of shipments visible to its customers, increasing customer satisfaction and reducing the costly overhead of status enquiries.
  • Business processes are often dependent on their supporting software. It can be hard to change large, monolithic programs. This can make it difficult to change the business processes to meet new requirements (arising, for example, from changes in legislation) or to take advantage of new business opportunities. A service-based software architecture is easier to change – it has greater organizational flexibility, enabling it to avoid penalties and reap commercial advantage. (This is one of the ways in which SOA can make an enterprise more “agile”.)

[Quote: TheOpenGroup.org]

Now to coming to the question “Why SOA?”, I believe mostly it is answered.

In summary  SOA helps you with:

  • Reuse and composition. This is particularly powerful for creating new business processes quickly and reliably.
  • Recomposition. The ability to alter existing business processes or other applications based on service aggregation.
  • The ability to incrementally change the system. Switching service providers, extending services, modifying service providers and consumers. All of these can be done safely, due to well-controlled coupling.
  • The ability to incrementally build the system. This is especially true of SOA-based integration.

Reference Sources:

Gartner: Magic Quadrant for Cloud IaaS, Worldwide

As per Gartner Worldwide Cloud IaaS Spending to Grow 32.8% in 2015. The new Gartner Magic Quadrant for Cloud IaaS report released on May 2015 places IaaS companies under the following categories:

  • Leaders: Amazon AWS and Microsoft 
  • Challengers: Unfortunately there are no challengers for Amazon/Microsoft as per the report. 
  • Visionaries: Google, VMWare, CenturyLink, IBM SoftLayer
  • Niche Players: Rackspace, CSC, Fujitsu, Verizon, Dimension Data etc.

Unfortunately HP’s Public Cloud is too small to be considered in the report. As HP already announced their exit from Cloud Computing. 

Gartner_IaaS_2015

Read more from Gartner Report here (Courtesy Amazon).

Do you remember the old days some people predicted Microsoft will be a failure in Cloud. What do you say now? My intend is not a debate here, but people should not be judgemental for the sake of proving they are smarter one’s in the planet. 

Let us admit AWS and Azure rocks.. 

Some good references:

http://venturebeat.com/2015/05/19/hps-public-cloud-is-now-too-small-to-be-included-in-gartners-big-market-report/

http://www.forbes.com/sites/centurylink/2015/05/19/that-magical-quadrant-time-of-year-a-review-of-gartners-2015-cloud-report/

http://connect.cloudspectator.com/cloud-vendor-benchmark-2015-pdf-download

Office 2016 Preview available

Microsoft has released Office 2016 Preview

Download links

Obtain license key from: https://products.office.com/en-us/office-2016-preview#howToGet

Read more about features available from official blog: http://blogs.office.com/2015/05/04/office-2016-public-preview-now-available/