Category Archives: What I Read

What I Read

Microservices Architecture: Benefits, Challenges, Design Patterns, Tools, and Best Practices

This blog covers a high-level introduction to the concept of microservices and how they differ from traditional monolithic architectures.

What are microservices?

  • Microservices are a way of designing software systems as a collection of independent, modular components
  • Each component, or microservice, is designed to perform a specific function and can be developed, deployed, and scaled independently of the others
  • Microservices communicate with each other through APIs, which can be accessed over a network

Why use microservices?

  • Improved scalability:
    • New instances of a microservice can be added as demand increases, rather than requiring a single, monolithic application to be scaled vertically
    • This can make a system more resilient, as the failure of a single component is less likely to affect the entire system
  • Improved flexibility:
    • The modular nature of microservices allows for more rapid iteration and deployment of new features
    • This is particularly useful in fast-paced and highly dynamic environments
    • Allows for a more agile approach to software development: Microservices can be developed and maintained by different teams, allowing organizations to be more responsive to changing business needs

Challenges of using microservices

  • Testing can be more complex:
    • It can be more difficult to test the interactions between multiple microservices than a single, monolithic application
    • This may require more complex testing strategies, such as integration testing and end-to-end testing
  • Deployment can be more complex:
    • Coordinating the deployment of multiple microservices can be more complex than deploying a single application
    • This may require more sophisticated deployment pipelines and processes
  • Monitoring can be more complex:
    • It can be more difficult to monitor the performance and health of multiple microservices than a single application
    • This may require more sophisticated monitoring and alerting systems
  • Microservices can require more infrastructure:
    • A microservices architecture may require more infrastructure to support the deployment and operation of multiple microservices
    • This can increase the complexity and cost of operating a microservices-based system

Examples of successful microservices implementations

  • Netflix: Netflix has implemented a highly scalable and resilient microservices architecture to support its streaming service This has allowed Netflix to quickly roll out new features and updates to its service without disrupting the entire system
  • Amazon: Amazon has used microservices to enable the rapid iteration and deployment of new features for its e-commerce platform
  • Uber: Uber has implemented a microservices architecture to support its ride-sharing platform

Considerations for implementing microservices

  • Identify the appropriate granularity: Each microservice should be focused on a specific function, but it should not be so granular that it becomes difficult to maintain and scale
  • Design APIs carefully: The APIs that microservices use to communicate with each other should be well-designed and easy to use
  • Choose the right technology stack: It is important to choose the right technology stack for each microservice, based on its specific requirements and the needs of the overall system
  • Consider the impact on your organization: A microservices architecture may require changes to the way your organization approaches software development and operations, so it is essential to carefully consider the impact on your teams and processes

Design patterns that can be used when implementing microservices

There are several design patterns that are commonly followed when building microservices-based systems:

  1. Single Responsibility Principle: Each microservice should be focused on a specific function and have a single responsibility. This helps to ensure that microservices are modular and easy to understand, maintain, and scale.
  2. API Gateway: An API gateway is a microservice that acts as a reverse proxy, routing requests to the appropriate microservice and handling tasks such as authentication, rate limiting, and caching.
  3. Service Registry: A service registry is a microservice that maintains a directory of all the other microservices in the system, allowing them to discover and communicate with each other.
  4. Load Balancer: A load balancer is a microservice that distributes incoming requests evenly across multiple instances of a microservice, improving scalability and availability.
  5. Circuit Breaker: A circuit breaker is a microservice that acts as a fail-safe, preventing other microservices from repeatedly attempting to call a microservice that is unavailable or experiencing errors.
  6. Retry Pattern: The retry pattern is a technique for handling transient errors, such as temporary network outages or resource contention. It involves retrying a request to a microservice if it fails, rather than immediately returning an error to the caller.
  7. Bulkhead: A bulkhead is a technique for isolating critical resources, such as database connections, to prevent a single resource from being overwhelmed and causing a cascading failure.

Tools that can be used for implementing microservices

There are many tools that can be used to build and operate microservices-based systems, including:

  1. Containerization platforms: Containerization platforms, such as Docker, allow developers to package microservices and their dependencies into lightweight containers that can be easily deployed and scaled.
  2. Cluster management platforms: Cluster management platforms, such as Kubernetes, allow organizations to automate the deployment, scaling, and management of microservices across multiple servers.
  3. API management platforms: API management platforms, such as Kong or Tyk, provide features such as authentication, rate limiting, and caching for microservices APIs.
  4. Service mesh platforms: Service mesh platforms, such as Istio or Linkerd, provide features such as service discovery, traffic management, and observability for microservices-based systems.
  5. Monitoring and alerting tools: Monitoring and alerting tools, such as Prometheus or Datadog, allow organizations to monitor the performance and health of their microservices-based systems and receive alerts when issues arise.

In conclusion, microservices architecture can offer significant benefits for organizations looking to improve the scalability, resilience, and flexibility of their software systems. While it is not without its challenges, the benefits of a well-designed microservices architecture can be significant, as demonstrated by successful implementations in organizations such as Netflix, Amazon, and Uber. Suppose you are considering implementing a microservices architecture. In that case, it is important to carefully consider the granularity of your microservices, design your APIs carefully, choose the right technology stack, and consider the impact on your organization.

Page Visitors: 358

Shoo trackers and advertisements away

I started this series of blog with my concerns at the amount of data that exist today. You can read the blog here.

After this blog i took the hat of an astrologer and started prediction…😀. My prediction one can be read as a blog here.

My second prediction can be read here. This is where i was stating that incognito mode of browser will/should be made default.

My third prediction can be read here.

Recently i was just going through some blogs in regards to Web 3.0, yes… another topic is slowly gaining more and more traction… slowly many sites would start advertising themselves as being Web 3.0 compliant.. 😀


Coming to the point…

In prediction two, i was mentioning that it is just matter of time when someone creates extensions for browsers (existing), using which you will be able to have more control on advertisements (even Chrome has already started features whereby advertisements can be stopped), trackers (where the hell are you, what are you doing, what are the data you like to share and so on..).

Yes, seems many are thinking of same and now i see a browser namely Brave (i am not advertising you to start using this browser right away), in which they pitch exactly the same aspects and brings in control on privacy, what data is transferred and so on…

If you go through their site, they say things which are quite intriguing to give it a try..

They say…

  • We as users have full control on privacy (privacy by default).
  • Blocks various trackers (control over what data is transferred) by default. They even say that, by doing this, you reduce data consumption. If you have unlimited data package, this is not for you, but for a guy like me who doesn’t want to have data, apart from very specific requirements (yes, i need for maps and i read blogs, nothing else, everything else is avoided from my data plan), this is quite handy because when reading over internet it can avoid data consumption (by the way, in my blog i am using Google ads…. 🤓).
  • By the way if you feel that you need to give some helping hand to some free blogs/sites, you have power to do so (or at least what i read) and you can also get rewarded if you are ready to see the ads these blogs/sites serve. Now, that is something i wrote in my blog while predicting.

So, all in all, you now have a brand new browser which gives us more control. Please note, i haven’t used Brave, nor i have plan at this stage. But the point is that, its coming and we don’t have to wait a great deal for having some control on this.


Its unfair that, these advertisement providers (Google Adsense) use our data package and show these to us and we as end users are not getting a cut… 😀. Also, they track us like anything with our data and then use our data for/against to their advantage. In this due course, more than us, all the other parties are gaining with our private data…😀.

Customer is king, but in this case, seems we are cheated… what do you say?

Share/like the post to spread the word and if you believe in what is written down… Thanks folks…

Disclaimer: I use Google Adsense which gives me money to run this site… contradicting, isn’t…😁

My so called innocent blogging (wordpress backed) site, when run using Brave is showing as below… 🤣… be careful folks…just to be sure… i am just shows ads from Google and i use that to run my site (i have to spend close to 100$ an year to run this site with my own registred domain).

Page Visitors: 270

Web Application Development Guidelines

Disclaimer: The content in this blog is plagiarized from various sites and blogs and is considered as a place where all their views are consolidated and put into a view which can be used as a guideline for any web application development. All the articles from which this blog is based is given below in the “Reference” section. Thanks for all the great authors and their work. Truly Appreciate!

Introduction

This document aims at providing a basic guideline using which UI/UX  team can develop the web application story board. Mobile optimized web application is gaining traction and it’s time for any web application being developed to consider mobile devices. On a high level mobile optimized sites can be built using the below:

  • Responsive Web  Design (RWD) – The document does give more insights and details on this design as this most talked design consideration in regards to web application.
  • Having different set of HTML and CSS catering to desktop and mobile device served by detecting the user agent and a single URL. Not considered to be a real way forward because of alternates (RWD).
  • Two set of URL for desktop and mobile and is decided agent sniffing the user agent. Again, not considered as a choice because of alternates available and cons attached to it is high as opposed to pros.

Design Principles

Some of the design principle which needs to be kept in mind is:

  • Responsive Web Design
  • Mobile-first design
  • Progressive enhancement and gracefully degradation

Responsive Web Design

figure1

Figure 1 Responsive Web Design

Ethan Marcotte coined the term responsive web design (RWD) in the year 2010. Responsive web design is a setup where the server always sends the same HTML code to all devices and CSS is used to alter the rendering of the page on the device using media queries. In essence responsive web applications respond to their environment. It’s considered as a cost effective way to mobile application. RWD is achieved using the following:

  • Fluid/flexible grid-based layout
  • Fluid images and media
  • Media queries and media query listeners

Having said that we can indeed have a mixed approach where we have a fixed width for large and medium screen widths and fluid widths for small ones. Whether small, medium or large, one site for every screen out there is the ultimate aim which RWD brings onto the table.

Why Use?

  • Day by day number of devices, platforms and browsers are increasing and your application should be able to support as much as possible without breaking and without compromising user experience.
  • A single URL for a piece of content makes it easier for your users to interact with, share, and link to your content
  • No redirection is needed for users to get to the device-optimized view, which reduces loading time. Also, user agent-based redirection is error-prone and can degrade your site’s user experience

When to use?

  • Time & Money
  • Browser support
  • Performance
  • Content
  • Website Vs. Web App

Frameworks

If you go for framework, it will definitely save time. Otherwise, we can go in-house, to have more control but we might be stuck where we are if there is no roadmap. There are good amount of frameworks, well tested and established which can be used:

  • Twitter Bootstrap
  • The Goldilocks Approach (http://goldilocksapproach.com/)
  • Foundation
  • Skeleton etc.

At an onset, Twitter Bootstrap is the most promising one and once we do a full on paper evaluation to arrive at a choice.

Mobile-first Design

Historically, most web designers and their clients have approached the desktop side of any project first, while leaving the mobile part as a secondary goal that gets accomplished later. There’s a growing trend in the industry though to flip this workflow on its head and actually begin with mobile considerations and then work up to a larger desktop version. Mobile-First Responsive Web Design is a combination of philosophies/strategies, and ultimately boils down to a broader application of good old web best practices. As the digital landscape gets increasingly complex, we need to design experiences that work across the entire spectrum of digital devices.Mobile First is a philosophy created by Luke Wroblewski and as detailed above highlights the need to prioritize the mobile context when creating user experiences.

Why?

  • Mobile isn’t a trend, nor is it even the future, it’s the present.

o   Almost 25% of the Web’s traffic now comes from mobile. If you didn’t build a responsive site, you’re already losing a quarter of your users.

o   Mobile device sales are increasing across the board with over 85 percent of new handsets able to access the mobile Web

o   Mobile device sales are increasing across the board with over 85 percent of new handsets able to access the mobile Web

  • There are good amount of tools, technologies and framework available which will let you do this design principle easily.
  • Announcement from Eric Schmidt in 2010 that Google was going to be taking this approach from now on. No problem going behind great leaders in this space.

When to use?

All the points as discussed in RWD holds good. It does put some constraints and pressure on the developer but its worth in long run and above all good for business.

Progressive Enhancement and Graceful Degradation

Mobile-first responsive web design comes down to using Progressive Enhancement and Graceful Degradation as a foundation for web strategy and design. Designing with progressive enhancement involves smartly adding layers of enhancements to a strong foundation in order to deliver an accessible and optimized experience to all. Starting with mobile and designing with progressive enhancement covers all bases (even if just at a rudimentary level).

Progressive Enhancement and Graceful Degradation

 

Figure 2 Progressive Enhancement and Graceful Degradation

Note: Don’t misunderstand visualizing the above figure as almost equal to the RWD figure. Not only will the form factor changes when being used across multiple devices, the capabilities of browsers rendering these pages also have different capabilities.

How an application should be conceived and designed to achieve this design principle

 

Figure 3 How an application should be conceived and designed to achieve this design principle

Figure 3 above depicts as to how to code your web application and what are the languages to be used and for achieving what. The content should be taken care using HTML (HTML 5), all styles and presentation around the content should be handled completely using the CSS (CSS 3) and behaviour should be achieved using JavaScript.

How the code should be structured to achieve this  design principle

Figure 4 How the code should be structured to achieve this  design principle

Figure 4 above explains Figure 3 in technical aspect clearly. You need to have a base HTML along with base CSS and JS which renders just fine in any browser (old ones). You need to have next set of nice CSS and JS which will adds more styles and behavior to the base one which works just fine in medium range browsers (IE 6, IE 8 etc.). You need to have awesome CSS and JS adding on top of base and nice CSS and JS, which will run just fine on all modern browsers (Chrome, Firefox etc.).

Why?

  • If this design principle is not given due respect, developer may limit the websites functionality considering it work fine in older browsers
  • Sites break when rendered with older browsers

Considerations

  • Use HTML 5 and CSS 3 and make sure that the code is W3C compliant
  • Consider above design principles in all aspects (guideline as to when each should be considered is detailed in the following section)
  • Use detection libraries like Modernizr (http://modernizr.com/) to eliminate or rather adapt your web application to various HTML5 and CSS 3 capabilities each browser supports.

Guidelines

Any web application being developed can be categorized broadly into different categories. One such category is:

  • Internet based (staff as well as external customer accessing web applications)
  • Intranet based (exclusive for staff)

Another way of categorizing a web application broadly is as below:

  • Web application having a definite mobile strategy

o   Maintaining a mobile only site and based on the user agent detection call appropriate URL’s

o   Having a native application specifically developed to cater to the mobile devices

  • Web application not having a definite mobile strategy

o   Most of the intranet staff application fall into this category (this is something which has been done in the past but with the growing tendency of staff asking for application to be accessed using a mobile device is growing)

For internet based web application having a definite mobile strategy, making the web application align with these design principles should be looked upon on a case to case matter as there is a cost involved in making a web application align with these design principles. Since there is a mobile strategy already existing for this web application, users does have an alternate way of accessing the application wither using a dedicated mobile URL or using a native app. Having said that, both mobile web URL and native app does have some dependency on the device being used and ideally considering the cost, going with our design principles and considerations as detailed above is encouraged. For internet based web application not having a definite mobile strategy, the application should be built using all the design principles and considerations as detailed above. The reason being, the application can be used by users in different parts of the world using different devices and browsers and the application should be ready to support this diversity. For intranet based web application having a definite mobile strategy, to not overburden the budget the design principles can be compromised but considerations should be taken into account and implemented. Ideally, if the application is responsive in nature even the mobile strategy of either having a dedicated URL for mobile or a native app can be reconsidered and can be taken out of service and replaced with the responsive site. For intranet based web application not having a definite mobile strategy, according to the usage patterns (analytics gathered from existing application or forecast and prediction on usage of mobile devices) the decision on whether to go with design principles has to be made. But, the considerations have to be taken into consideration and implemented. Note: Optimizing for every web-enabled device on earth is impossible, so eventually you need to make the strategic decision of what target devices and browsers for which the web application needs to be optimized. This decision can be based on existing applications analytics per market research on target web applications user base.

Take-Away

  • Users care for content
  • Users use only one browser
  • Give incentives for users to upgrade to a modern browser
  • Support best possible experience (based on device and browser capabilities), not the same experience for all users
  • Do your presentation/styling using only CSS (CSS 3) rather than using tools or manual coding
  • Don’t try to make older browsers to do things they are never meant to do. If you do, you will have long development time, too many bugs and it will perform badly (slow pages).
  • Set of Html’s and CSS (the URL remaining the same) catering to whether the user agent is desktop or a mobile device seems too much maintenance havoc and should be avoided and replaced with RWD.

References

Page Visitors: 996

Google – HR Functions

While reading any article i like to mark important and catchy phrases, which i can skim through at a later point. This article is in no way belong to me. It was written by “John Sullivan”, the detail of author and the original article URL is given below. As described, i just went through the whole article, found it awesome, marked important points while i read and thought of sharing it in here so that, people who would like to just skim through the matter quickly an do so by just go through the article highlights. I don’t know if this is a good practice nor i don’t know whether it is legal. If this is not legal, please update a comment and i will do the needful.

The original article is highlighted and saved as an image. Please click the image, zoom to read it clearly.

Original URL – http://www.ere.net/2013/02/25/how-google-became-the-3-most-valuable-firm-by-using-people-analytics-to-reinvent-hr/

About the author

Dr John Sullivan is an internationally known HR thought-leader from the Silicon Valley who specializes in providing bold and high business impact; strategic Talent Management solutions to large corporations. He’s a prolific author with over 900 articles and 10 books covering all areas of Talent Management. He has written over a dozen white papers, conducted over 50 webinars, dozens of workshops and he has been featured in over 35 videos. He is an engaging corporate speaker who has excited audiences at over 300 corporations / organizations in 30 countries on all 6 continents. His ideas have appeared in every major business source including the Wall Street Journal, Fortune, BusinessWeek, Fast Company, CFO, Inc., NY Times, SmartMoney, USA Today, HBR and the Financial Times. He has been interviewed on CNN and the CBS and ABC nightly news, NPR, as well many local TV and radio outlets. Fast Company called him the “Michael Jordan of Hiring”, Staffing.org called him “the father of HR metrics” and SHRM called him “One of the industries most respected strategists”. He was selected among HR’s “Top 10 Leading Thinkers” and he was ranked #8 among the top 25 online influencers in Talent Management. He served as the Chief Talent Officer of Agilent Technologies, the HP spinoff with 43,000 employees and he was the CEO of the Business Development Center, a minority business consulting firm in Bakersfield, California. He is currently a Professor of Management at San Francisco State (1982 – present). His articles can be found all over the Internet and on his popular website www.drjohnsullivan.com and on www.ERE.Net. He lives in Pacifica, California.

 

Article about Google and its HR practices

Page Visitors: 834

What is VIP (Networking)

In the world of hardware and networking you would have heard this term being used often. When two networking gurus meet these terms comes in between and to be honest I didn’t know what this is. I just Googled as always and here are the relevant patches that I found which can be collated as below:

Abbreviated as VIPA, a virtual IP address is an IP address that is shared among multiple domain names or multiple servers. A virtual IP address eliminates a host’s dependency upon individualnetwork interfaces. Incoming packets are sent to the system’s VIPA address, but all packets travel through the real network interfaces.

Pasted from <http://www.webopedia.com/TERM/V/virtual_IP_address.html>

A virtual IP address (VIP or VIPA) is an IP address assigned to multiple applications residing on a single server, multiple domain names, or multiple servers, rather than being assigned to a specific single server or network interface card (NIC). Incoming data packets are sent to the VIP address which are routed to actual network interfaces.

VIPs are mostly used to consolidate resources through the allocation of one network interface per hosted application.

Pasted from <http://en.wikipedia.org/wiki/Virtual_IP_address>

There are many uses of VIP, but for me the one which is more important is how using a domain name the routing happens correctly to the exact web application in a web server in which there are multiple web applications being hosted. Figures are easy to understand and below is one such figure which made me understand this concept which I got in the internet.

Image courtesy: http://www.foundrynet.com/services/documentation/sixl/images/slb-real-hosting-virtual.jpg

Page Visitors: 5802

Closure in Java

According to Tom Hawtin

A closure is a block of code that can be referenced (and passed around) with access to the variables of the enclosing scope.

In programming languages, a closure (also lexical closure or function closure) is a function or reference to a function together with a referencing environment—a table storing a reference to each of the non-local variables (also called free variables or upvalues) of that function.

Pasted from <http://en.wikipedia.org/wiki/Closure_%28computer_science%29>

 JSR Proposal: Closures for Java

Summary: Add support so programs can operate on an arbitrary block of code with parameters, and simplify the use of methods that receive such blocks.

This JSR provides support for operating on an arbitrary “block of Java code”, or body, which is either a statement list, an expression, or a combination of both. We call the mechanism a closure expression. Wrapping statements or an expression in a closure expression does not change their meaning, but merely defers their execution. Evaluating a closure expression produces a closure object. The closure object can later be invoked, which results in execution of the body, yielding the value of the expression (if one was present) to the invoker. A closure expression can have parameters, which act as variables whose scope is the body. In this case the invoker of the closure object must provide compatible arguments, which become the values for the parameters.

In addition, this JSR may support a new invocation statement for methods that accept a closure to simplify their use in common cases.

Pasted from <http://www.javac.info/consensus-closures-jsr.html>

Since Java 1.1, anonymous inner class have provided this facility in a highly verbose manner. They also have a restriction of only being able to use final (and definitely assigned) local variables. (Note, even non-final local variables are in scope, but cannot be used.)

Java SE 8 is intended to have a more concise version of this for single-method interfaces*, called “lambdas”. Lambdas have much the same restrictions as anonymous inner classes, although some details vary randomly.

Lambdas are being developed under Project Lambda and JSR 335.

*Originally the design was more flexible allowing Single Abstract Methods (SAM) types. Unfortunately the new design is less flexible, but does attempt to justify allowing implementation within interfaces.

Pasted from <http://stackoverflow.com/questions/5443510/closure-in-java-7

References:

http://tronicek.blogspot.ae/2007/12/java-closures-tutorial.html

Bringing Closures to Java 5, 6 and 7 – http://mseifed.blogspot.se/2012/09/bringing-closures-to-java-5-6-and-7.html

Page Visitors: 300