Strengths app part 3

In the application development series part 2, we learned the use cases of this application. In this part, we’ll go through high level technical details of Spring Boot APIs and search integration of the application.

Below are REST APIs an search functionality for this application:

  • User API: It is a REST API for a user profile. It will allow to authenticate a user to view determined functionalities of the application. For example, only an authenticated user can vote on the strengths of a friend.
  • Strengths API: This API provides a feature to add, view, update, and delete a strength of a user.
  • Vote API: This API provide a feature to vote on a strength of a user. Only a friend can vote another friend’s strength.
  • Search functionality: To search a strength of a user, we’ve integrated AWS’s open search functionality. It is equivalent to Elastic Search. Strength API is integrated with open search via SNS configuration. When a strength is created, Strength API publishes a message to Elastic Search. In other words, we add a new strength entry into Open Search via SNS messaging which is integrated via Strength’s Add API method.

Later, we have a plan to add more features. We will update this page as we make more progress. Stay tuned.

In the next part, we will discuss the Desktop version User Interface part of the application.

Strengths app part 2

For the overview of the app, refer to part 1: here. In this part, we will describe the technology stack of this application.

This application is created to users who wants to learn SpringBoot, React JS, and other Java and react JS related technologies. Our approach of selecting the technologies stack is a bottom-up. That means, as we progress further, we will select teh right technology for the right module.

Technology decisions so far:

  • Rest API: We’ll build a REST API for strengths, users, and other functionalities using SpringBoot framework.
  • Web application: We’ll build a web application using react JS framework.
  • Database: We’ll use Amazon RDS based PostgreSQL database.
  • Hosting platform: This application will be deployed on AWS ECS infrastructure.
  • Search functionality: For an effective search functionality, this application will implement Elastic Search.
  • Search data feed integration: Data feed to Elastic search will be done using Amazon SNS service.
  • Cache mechanism: This is yet to be determined.

A high level architecture of the application: We’re yet to come up with a diagram for it.

This is a work in-progress page. We will update it as we make further progress with the application.

Application development series

Strengths app part 1

This is a series of articles about developing a simple web application.

Audience: Anyone looking for basic knowledge in building a web application.

Application summary: This is a strength analyzer application. This application allows a user to add his/her strengths. It also supports additional features.

Application use cases:

  1. Maintain a user profile: A user should be able to login to view his/her information.
  2. Maintain strengths of a user: Provide a way to add/view/update/delete a strength of the user. Provide a pagination of the strengths, for a better display. The user should also be able to search strengths.
  3. Maintain a friends list: a user should be able to add other users as his/her friends.
  4. Vote and comment on a strength of the user: Friends of a user should be able to vote a strength of a user. Friends of the user should also be able to comment (post) about user’s strength.
  5. Ability to search: A user should be able to search other users by the name and on a strength.
  6. Other yet to be determined features: to be determined as we progress on the development.

Intended users (actors) of the application:

  1. A user who wants to create his/her profile to publish his/her strengths. A user could be an IT engineer, a product manager, a home maker, a business man, or anyone.
  2. A user who wants to analyze his/her strengths, to find out his/her as-is and to-be goals. For example, consider a user who is looking for a job as a UI developer. He/she is experienced in Javascript, HTML, and CSS. To get a job as a UI developer, he/she analyzes the need of learning react JS.
  3. A user who wants to feel good about his/her strengths, by gaining popularity, support, and visibility within his/her friends list.

As we learn and add more use cases, I’ll update this page. In the next part, we’ll go over implementation details.

Product Manager Behavioral Questions and Answers

Audience: This is helpful to anyone who is conducting or appearing in an interview on the product management.

I used questions from this website and other websites, to collection questions. Answers are mine. These answers are not verified by anyone to be correct. These are based on my knowledge on the subject.

What do you see as a Product Manager’s main role within product development?

A product manager’s role is to plan and execute a product from start to end. Different responsibilities include:

  • Requirements gathering
  • Defining product vision
  • Working with design, engineering, and marketing

As a product manager, how do you stay user-focused?

A product should be user focused, to ensure users are getting what they need. To stay user focused, a product manager should view the product from user’s point of view understand personas, and use cases.

What main changes would you make to a product?

Depending on the situation, I’d like to review the approach. In my situation, I found out that the older system was not working as expected. We found out issues and changed the processes of the product.

How do you see your career developing in the next 5 years?

In five years from now, I see myself taking more leadership responsibilities to contribute in a company.

Tell us about a time you used data to influence an important stakeholder.

There was a migration project on a system. Engineering team was not in favor of implementing a change in a way my team was interested. I reached out to engineering lead with the data of last ten years. That data pattern helped him to learn why the request of the change is in a way. I empathized with him for the approach he suggested and at the same time, convinced him for a change. Finally, data patterns helped to make a right decision.

Tell us about a time you faced failure and how you bounced back.

It was about a beginning of my career as a developer. I had a task to complete. I had serious a bug in that utility. I prepared a utility to search all database functions in a project. My utility didn’t count all tasks correctly. It was a failure of writing the utility correctly. I failed to write it well. I learned that I must have thought about all corner cases and must have tested it with good data set. I fixed the approach by adding all corner cases. That fixed the issue.

How would you improve your favorite product?

I am always looking for ways to improve the current product. I’d continually monitor customer expectations, product analysis/monitoring trends, and the future growth. So, a continuous forward looking 360 degree process is important to improve any product.

What’s your approach to prioritizing tasks?

To prioritize tasks, I assess the business impact and the efforts to complete a task. I answered it here in my post of engineering manager interview questions.

Why do you want to work at [our company]?

I am really impressed with your services offerings. This is an area of my interest. I believe, I can contribute in this company because <fill in as per the company’s offerings and the candidates’ interest>.

Why do you want to be/what do you love about being a Product Manager?

I love the role of a Product Manager because a product manager has the ownership on the product. This allows me to think of past, present, and future roadmap of a product or its offerings. It is the area where I can apply my diversified experience and interest on engineering, design, and marketing.

How would you prioritize resources when you have two important things to do but can’t do them both?

I use a prioritization exercise to understand the business impact and the efforts on completing a task. I’ll prefer a one that has higher business impact and needs low efforts. If both tasks need same efforts, I will pick the task that has higher business impact.

Describe a scenario which required you to say no to an idea or project.

Saying no is important for a product manager. There was a situation when two stakeholder groups reached out for some new features. The product was in a migration stage. I already published the schedule of a freeze on both new and legacy products. I had to say no to both the new ideas.

How do you decide what and what not to build?

This is based on the prioritization exercise. I use a prioritization exercise to understand the business impact and the efforts on completing a task.

What is a product you currently use every day, why and how would you improve it?

Everyday, I use my online notebook, to take notes. I really love the way it is built. It solves many problems to me because by writing my problems and analyzing solutions to it, I feel in the control of the situation. I like this notebook because it is available everywhere as long as I find the internet. One big limitation on it is that it does not really support handwriting in a way I’d prefer. If I can, I’d like to enable handwriting on it.

There is a data point that indicates that there are more Uber drop-offs at the airport than pick-ups from the airport. Why is this the case and what would you do within the product to change that?

I’d like to understand the data points: how many customers are requesting for a drop-off, what are their pick and drop-off points, what are the charges, etc. For the pick-up, I’d like to understand what are the difficulties for the customers. Is it the location of the pick-up, are charges high for the pick-ups, and other related difficulties. If possible to send the surveys to the pick-up customers, it would be very helpful to understand their survey data about their feedback with the ride. Depending on the survey and non-survey analysis, I’d suggest changes into the product. After the changes, I’d monitor the pick-up counts, to assess the next steps.

How would you improve the functionality 10x of what it is now?

First, understand the as-is situation. Then, understand what does to-be scenario of 10X functionality means. To move from as-is to to-be, plan the steps, resources needs, and draft the timeline. After the plan is finalized, move into the execution.

How would you increase adoption of Google’s Fiber to the Home product?

First, we need to understand the current situation of the adoption. Google Fiber will need to compete with Comcast or similar internet providers. It will be helpful to find out unique features of Good Fibers that are not include in the competitors. We should plan for marketing of it, including special offers to the customers.

What is the key to a good user interface?

The key to a good user interface is simplicity. Other important features are:

  • Consistent UI behavior
  • Strategic use of colors and layouts
  • Use appropriate typography

Reference: https://www.usability.gov/what-and-why/user-interface-design.html

While we make X product for the general public, we also have a B2B division. What is your experience with juggling both markets?

In both the markets, main thing is to solve the problems of the customers. Personas may also be similar. Marketing strategies for both will be different.

Reference: https://www.productplan.com/learn/b2b-versus-b2c-product-management/

How do you know if a product is well designed?

Dieter Rams has created principles for a good design. refer to this page. As per Rams, these are principles of a good design is: innovative, makes product useful, aesthetic, makes a product understandable, unobtrusive, honest, long lasting, thorough down to last detail, environmentally friendly, and minimal.

How would you redesign a product?

To redesign a product, find out the pain points, as-is, and to-be scenario. Start documenting the as-is situation and to-be situation. Do not take anything for granted. Understand the pain points in the current product and the needs to revamp it to a new product. After understand the details, plan for a to-be scenario and its roadmap.

What is one improvement you would implement for our product in the next 6 months?

This depends on the product’s situation. If I am a new join, I’d first spend time in learning details about the product. If there is any feature that I found missing or good to be added, I’d like to request for the assessment of it. If I am already in the team, I’d like to assess the situation as Perth roadmap of the product, to decide what should be added in the next six months.

What is a major challenge our company will face in the next 12-24 months?

yet to answer it

How would you describe our product to someone?

I will begin with a problem that someone can related to the product. Then, I will describe how the product solves the problem.

Suggest a new feature for Amazon. What metrics would you use to measure its success?

I will suggest adding a book library feature to Amazon. It would be different than kindle as it would not be for audio only. To measure the success, I will prepare a roadmap of a launch model and a revenue model. I will track key metrics about revenue /profit tracking. For example, how many users are members, how many members are expected for the profitable model, and related metrics. I will also ensure we track the quality, uptime, and other similar metrics. Some key metrics to measure should be: daily active users, monthly active users, traffic, bounce rate, and Customer Satisfaction (CSAT) score.

TECHNICAL QUESTIONS:

Our engineering teams are pretty used to employing x methodologies. What is your opinion of them? Have you used them in the past?

I am familiar with agile, waterfall, and kanban methodologies. Depending on the situation, these all methodologies make sense. For example, for any operational continuous kind of an activity, using kanban would make sense. For the rapid releases, agile methodologies will be a good solution. If we know the roadmap of a larger product needs more time to build, waterfall methodology may be used.

What is the importance of engineers and technical teams as stakeholders? How do you integrate them into the overall product vision?

Engineering team is an integral part of the product vision. I prefer engaging them at the time of ideation. Sometimes, engineering team may have a great insight of a feature’s implementation and the alternate solutions to it. If there is a plan to build a product, it’s not possible to come up with a roadmap without involving engineering into it. So, engineering stakeholders are the integral part of the product vision.

PRODUCT MANAGEMENT QUESTIONS

What aspects of Product Management do you find the most exciting?

The most exciting part to me is convincing stakeholders towards a common goal. There are many cross-functional stakeholder teams like business, engineering, design, project management, security, compliance, and other teams. To plan and agree to deliver a product with a common goal to serve the customers is exciting and everyone generally is motivated to meet the needs of the customers.

Tell me about a time when you had to build or motivate a team.

There was a situation when I had build a cost-effective and a highly available team at offshore. To build the team at offshore, I inquired the options at multiple countries. It took time to figure out the right place and a right vendor. After that, the next challenge was to train the team on the expected deliverables. It took time to build the team, train the team, and helping team to perform per KPIs. At the end, we built a highly available and a cost-effective team at offshore.

What do you think a day to day would be like for a Product Manager?

Depending on the stage of the product roadmap, there would be different activities. On a daily basis, I typically start my day by monitoring metrics of the customers activities, driving the product roadmap, and strategy discussions for any upcoming changes.

How do you think Product Managers interact with engineers?

I have noticed that Product Managers and engineers discuss the features, changes, issues on a functionality level. A common interaction includes discussions about the priorities of changes, level of efforts on the changes, and clarifying requirements, as needed. I generally have noticed a deep respect between a product manager and a team of engineers.

How would you explain Product Management to a 6-year-old?

I’d describe the process of publishing a book. I’d say image I am ensuring a book is published that kids would like. I’d explain the process of publishing a book, starting from ideation, planned steps (like writing, taking pictures of the book, book editing, printing the book, pricing the book, selling the book, and delivering the book from store to the kid’s hand).

What aspects of product management do you find the least interesting?

I like the activities that are well planned. Working on left over low priority changes are least interesting to me. To manage these left over low priority changes well, I like releasing these in a planned release, instead of an adhoc plan.

Tell me about your role on your team, who else you work with, and how you work with them.

My role in the team is to manage the existing infrastructure of business applications/products. I work with business partners, legal, compliance, security, engineering, design, production support, capital planning teams, data analysts, and other related teams.

Tell me about how you interact with customers/users?

Reference:

Interview questions from https://productschool.com/blog/product-management-2/the-ultimate-list-product-manager-interview-questions/

https://www.altexsoft.com/blog/business/15-key-product-management-metrics-and-kpis/

Interview questions on leadership skills

Audience: anyone conducting/preparing for a technical leadership interview position.

What’s the best way to work with executives?

To work with executive, I prefer to follow the formal process per the company standards. Executive’s time is generally limited and they prefer a brief and to the point communication. Before reaching out to executives, it is important to understand if the topic worth the need of executive’s time. If it needs the time from executive, setting the expectation is important. I will determine if the topic to share with executives is to provide an information, or ask for any feedback or a decision. If it is about asking a decision, it’s helpful to prepare options. If a help is needed for an executive, it should be clear what kind of a help is needed. Executives prefer a clear communication and expectations. I will plan for it accordingly.

Is consensus always a good thing?

Consensus is not a good thing always. Depending on the situation, this strategy should be used. In my experience, there was a product that was working on a stable way but the company needed something completely innovative. To get such an environment, a leader challenged the existing environment. He did not have the consensus to proceed. But he did the right thing. In other situation, a consensus helped when I had to make a go/no-go decision on a success of failure of a User Acceptance Testing. Consensus helped as there were only few people in oppose and all such open issues could either be delayed or worked around.

What is the best way to work with customers and users?

The best way to work with customers or users is to understand their perspective and requirements. I believe the main goal of a product is to meet a customer’s or a user’s needs.

What kinds of people do you like to work with?

I like working with people who can collaborate well towards a common goal. This needs keeping individual approach secondary and thinking and planning for a common objective. This needs individuals to think beyond their individual achievements and focus on a teamwork. It is important to understand everyone’s perspective in the situations. The final decision must be that is needed for the success of the common goal.

What kind of people do you have a hard time working with?

I get hard time working with people who do not think for the success of the common goal. Instead, they may be driven from some other individual or team goals. To deal with such situation, I prefer to remind everyone about the common goal.

What would you do to get a team to stick to a schedule?

This depends on the type of the task. I will first provide a high level context of why we have a schedule and what do we want to achieve as a team within a schedule. Then, I will prepare a plan with everyone’s collaboration. Once everyone agrees with the plan and understand why we want to stick to the schedule, I suggest someone to schedule recurring meetings to check the progress status, blockers, and next steps. Ib the middle of the schedule, I prefer to remind everyone why this schedule is important , why we all agreed to it, and what are positive consequences of sticking to the schedule.

What’s the difference between leadership and management?

Leadership is about influencing, inspiring, and enabling others to make a positive impact. Management is about controlling group or entities to complete a goal on time.

Reference:

As I learn more, I will update this page. Thank you !

Design Thinking notes

Audience: This is for user who are looking for a basic overview of design thinking.

My notes are from this article on interaction-design website. I recommend it to everyone interested in learning this subject.

  • Five non-linear steps of design thinking are: Empathize, Ideate, Define, Prototype, and Test. This article is helpful to go through these five steps.
  • The seven factors that influence user experience:
    • Useful: A product must be useful to the users.
    • Accessible: Accessible is about ability of different-able customers to be able to use a product. Though the segment of customers could be small, it’s sometimes legally and sometimes ethically a critical element of a design.
    • Usable: Usability means how efficiently and effectively a product can be used by a user.
    • Findable: Find-ability means how easy it is for a user to find features within a product. A practical example is my wardrobe. If my clothes are easily findable, then those are more usable. Another example could be how easy it is to find the information on a website that you’re looking for.
    • Desirable: It is about the like-ability of a product by its users. For example, if I have two sources of learning a skill online, which one I will opt more likely.
    • Credible: It is about trusting the product. For example, a blog post is credible if a user can trust the the information on it.
    • Valuable: a product must delver the expected value. For example, if I read a book on a skills set, it must deliver the value of that basic skill.
  • Five characteristics of usable products:
    • Effectiveness
    • Efficiency
    • Engagement
    • Error Tolerance
    • Ease of Learning
  • Seven great UX research techniques: Card Sorting, Expert Reviews, Eye Movement Tracking, Field Studies, Usability Testing, Remote Usability Testing, and User Personas.
  • Interaction design introduction: It is the design of interaction between a user and a product. Five elements of interaction design are: 1D: Words, 2D: Visual Representations, 3D: Physical Objects or Space, 4D: Time, and 5D: Behavior.
  • Mobile Web UX design guidelines:
    • Keep navigation simple
    • Keep content to a minimum
    • Reduced the inputs required from users
    • Be mindful of internet connection issues

As I learn more, I will update this page. Thank you !

Behavioral interviews questions

Who should read this article: Anyone appearing in or conducting in an interview for a developer, engineering manager, project/program, or a product manager or above role.

Disclaimer: Answers to these questions below are based on my experience and I may be wrong for some answers or you may have another opinion or an answer to it. It’s advisable to come up with your own answers.

Tell me about a time when you faced a challenge and overcame it.

Nugget: Sure. I will describe a challenge of integrating with a system that provides flag of who’s eligible to contact and who’s not.

Situation: We had a migration project on marketing campaigns, to reach out to customers, to get their feedback on products. We were using a central user identification system, to know who is eligible to be contacted. I was not getting the answer to it.

Result: After more than 5 attempts to convince this group with repeatedly asking for same information in different ways, finally they were convinced. We did it in a way that provided us information.

Tell me about how you interact with customers or clients?

In my various roles, this has been done in a. different way. In my current role, I interact with my internal customers as my business partners. We discuss about customer experiences, new changes to the business, and how it can impact my owned infrastructure or business area.

Talk about how you overcame product failures/challenges or poor feedback.

There was a time when our product was not meeting the customer’s needs. We met with the group of customers periodically and explained our limitations. Unfortunately these failures increased day by day to a point that these were not manageable. Then, collectively, we took an innovative approach to come up with a next suite of products that overcame the failures for a longer time.

Tell me about a time when you had to influence a team.

Nugget: Sure, let me tell you a time when I had to convince a team to increase the scope of testing in a project.

Situation: For a customer facing campaign emails go-live, engineering team was in a hurry, to go-live with the campaign. They had a pressure of reaching an end of life of an application. I still had to convince them to increase testing coverage as it was a customer facing application.

Action: I listened to their situation/proposal. In this situation, I had to disagree with proposed testing coverage. I convinced them with past data when a problem occured, due to lack of testing. I shared my past mistake when customers experienced an issue. I also told them that I would have agreed to their proposal if it was an internal release BUT we represent the company and can’t risk the customers.

Result: Unfortunately, there were tough deadlines, due to a legacy end of life. Team agreed to increase testing coverage upto 80% of what I sugegsted. I compromised to reduce my ask a little bit. But it was a good enough testing plan that gave both the teams a win/win feeling.

Tell me about a time when you have made a mistake.

I will describe a situation of a project in that I provided I underestimated the level of efforts for the development. This situation added burden on me to finish the development task within the given timeline. When I came up with it, I didn’t know it’s a large effort task. I estimated it as a medium task. To mitigate the delay of the go-live, I had to work extra hours, to develop the component within the expected timeline. Ultimately, after working long hours, I managed to get through it and complete the task in the given timeline.

How would you handle if two executives are asking to prioritize two different features and you can plan only for

one?

I will describe a prioritization exercise for the situation. I will go through the features requested by both the executives, understand level of efforts in implementing it, and business priority of it. After going through it, to both executives together, I will explain the current bandwidth of how much we can accomplish/deliver. To do that, I will utilize the appropriate forum that is suitable for such a prioritization. Then, after the discussions, I will decide the outcome of selecting one feature to deliver it on time with the expected quality.

Tell me about a time you used data to make a decision.

I will describe a situation when we determined the priority of a fix depending on the volume of the issues. In a customer campaign, we wanted to fix an issue. But we had limited bandwidth to fix the issue. We analyzed the data to understand the criticality of the issue. It turned out that the chances of issues were less than 0.5%. We had to delay this issue fix over other higher priority issues. So, this is how data helped us making the decision.

As I learn more, I will update this page. Thank you !

Java programming notes

Who should read it: anyone looking for a quick overview of Java programming basic concepts.

Below are some common concepts about Java programming language:

Volatile: Volatile is a keyword that can be used only with variables. It can not be used within a method or a class.

We can use volatile when we want to read and write long/double variables. It can be used to achieve synchronization. Volatile guarantees that the value will be read from the main memory.

Synchronized block: There are two versions: a synchronized method and a synchronized statement. Synchronization helps to avoid multiple threads accessing the same code at the same time. For more on it, read here.

Static keyword: Static keyword indicates that the method or field that it declared static, belongs to the class. In other words, there’s the same copy of the field or method across all instances.

Class: A class is a blueprint that can define behavior using methods.

Object: An object is an in-memory instance that is created using the blueprint called, class.

Exception Handling: When a program is interrupted due to an unexpected event, that captured event may be called an exception. Use try/catch to catch an exception. If an exception is not caught, throw the exception to the other program so that another program handles it. In Java, there are three kinds of exceptions:

  • Checked exceptions: these are subject to try and catch.
  • Errors: These are generally exceptions that occur due to external situations.
  • Runtime exception: These are exceptions internal to application and these are generally occur due to unanticipated scenarios.

JDBC drivers: Java Database Connectivity (JDBC) is an API in Java that helps to connect a Java program with a database. JDBC API supports a wide range of databases. JDBC provides four types of drivers:

  • Type 1 JDBC-ODBC Bridge: Type 1 JDBC driver provides the connectivity to database via Open Database Connectivity (ODBC) drivers. It is limited to some options and the performance of type 1 driver is not great as it needs the translation of code from JDBC to ODBC format.
  • Type 2 Partial Java Driver: It is a partially Java enabled driver. It needs the binary code into client’s machines. The performance of it is slower than type 3 and type 4.
  • Type 3 Driver: It is a fully Java enabled driver that converts the net-protocol to the DMBS specific protocol. The limitation is that it needs separate JDBC middle-ware server to translate native specific connection interface.
  • Type 4 Driver: This allows direct connections to databases by using network protocol that sends the data to DBMS into the DBMS specific format. This is a very popular driver type.

Java collections:

Java has these collections:

  • Collection: It is a root of collection hierarchy.
    • List: List is an ordered collection.
      • Arraylist is an implementation of List.
    • Set: A collection that has no duplicates.
      • SortedSet: It is a sorted version of Set.
    • Queue: This holds multiple elements prior to execution. Queue typically has elements in FIFO (First In First Out) order.
    • Deque: This collection also holds multiple elements prior to execution. Deque can be both FIFO and LIFO (Last In First Out).
  • Map: Map object holds key and values. Maps can not contain any duplicate keys.
    • SortedMap: It is a sorted version of Map.

Note: I will further elaborate collections in the upcoming updates.

Comparator versus Comparable:

  • Comparable compares objects. We can override compareTo() method.
  • Comparator is external to the element we are comparing.
  • When we need to compare objects with the natural order, we should use Comparable. When we need to compare objects with their attributes, we should use Comparator.

Equals and Hashcode methods:

Equals compares two objects. Hashcode() method helps to get a hash code integer number of an object. Hashcode() method is used to compare two objects. To compare two objects, first we can compare their hash codes. If hash codes are same, next we can compare attributes of two objects.

Serializable and externalizable: Serializable serializes the object via JVM. It stores the object in a way that later it can be recreated. Externalizable allows us to store selected features of an object. Externalizable extends Serializable and add two methods: readExternal() and writeExternal(). To use externalizable, ensure that default constructor of the object’s class is public. Otherwise, it will not serialize the object and throw an error.

String intern() and deduplication: Java strings use heap memory, to store each string literals, even if it is the same string. String intern() can help avoid the storage of same string literals repeatedly. intern() avoid duplication of string strings. intern() uses string pool, to avoid storing more than one same string values in the heap memory. String intern() is a non-static method.

Multi-threading in Java: A thread is a smallest unit of processing. To achieve multi tasking, we use multi-threading and multi-processing. Multi threading does not allocate separate memory. It takes less time for threads to switch the context. We can can multiple processes running on a computer. Each process takes separate memory address space. Each process can have one or more threads in it. Threads share same address space.

Other Thread related topics:

  • Thread states:
    • New: a new thread, not started yet
    • Runnable: a thread running in JVM (Java Virtual Machine)
    • Blocked: a thread that is blocked, waiting for a monitor lock
    • Waiting: a thread waiting for another thread to perform
    • Time_waiting: a thread waiting for another thread for a time period
    • Terminated: a thread that is exited
  • ThreadLocal: ThreadLocal allows to create and read variables within the same thread. If we have two threads executing same code, these two threads can not see each other’s variables.
  • InterruptedException: InterruptedException is thrown when a thread is interrupted while waiting, sleeping, or otherwise occupied. For details, refer to this article.
  • Livelock, Deadlock, and Starvation:
    • Deadlock is a situation in that the processes block each other.
    • Livelock is a situation in which the states of the processes constantly change. This situation does not allow any process to finish the task.
    • Starvation: it is a situation in that all processes do not get the allocation of CPU time to complete a task.
    • For more, refer to this article.

Concurrent utilities: java.util.concurrent package has utilities to create concurrent applications.

Java NIO: Java NIO is an alternative to Java IO. Java NIO allows non blocking IO.

Java thread dump analysis: A thread dump provides a snapshot of currently running processes. If there is a performance problem or a deadlock problem, analyzing thread dump can help to understand/trouble shoot it. jStack is a simple utility to generate thread dumps. This is a simple article describing thread dump analysis.

Memory leaks: Memory leaks is a situation of having unused memory that is not garbage collected. If an application has severe performance issues or crashing suddenly or throwing Java Out Of Memory Error, these are symptoms of memory leaks. Minimizing static variables and using singleton pattern with lazy loads are useful techniques to minimize or avoid memory leaks.

Java app profiling and profiling tools: Java profilers can help to estimate how memory will be allocated for the program. It can help to improve the code. Some example of profiling tools are JProfiler and JavaVisualVM.

Synthetic class, method, and field: Synthetic class, method, and field are elements introduced by Java compiler. These are for Java’s runtime internal purposes. Java Synthetic items can be useful in debugging code. To know if a method is exposed to synthetic, we can use Java’s reflection API.

Java Bridge methods: These are intermediate methods created between source and target. Type eraser is a process of ensuring type constraints at the compile time.

Garbage Collection: Garbage collection tracks objects on heap memory and removes memory of unused objects.

Marker interface: A marker interface is an interface that has no field and no method.

Functional interface: It has a single abstract method.

Method reference: Method reference is a type of a lambda expression. There are four kinds of method references:

  • Static methods
  • Instance methods of particular objects
  • Instance methods of an arbitrary object of a particular type
  • Constructor

Class loaders: Class loaders load classes at runtime, on a need basis. There are different types of class loaders:

  • Bootstrap Class loader: Bootstrap Class loader is a part of JVM and written in native code.
  • Extension Class loader: It is a child of Bootstrap Class loader and loads extension of standard Java Classes.
  • System Class loader: A system Class loader loads application specific Classes into the JVM.
  • Custom Class loader: To load Classes outside local hard drive or network, we may need to use a customer Class loader.
  • Context Class loader: Context Class loader provides an alternative method to the class-loading delegation.

JVM shutdown hooks: JVM shutdown hooks are functions that JVM allows to run before shutting the JVM down. We can use these functions to release resources, before a JVM shuts down. A Caveat to these hooks is that JVM can run these hooks only in a normal termination. If a JVM is forced killed, it won’t get a chance to run these hooks.

Java Optional class: Java Optional class is introduced in Java 8. It is used to deal with NullPointerException.

References:

System Design Basics

Why and who should read this article: This article is for readers who are looking for a brief summary of system design concepts, as a reference for interviews, project needs, or a general curiosity.

What are key features of distributed systems:

  • Scalability: Scalability helps to meet the increased demand.
    • Horizontal scaling: it can be achieved by adding more servers to the existing infrastructure. Examples are MongoDB and Cassandra DB that are horizontally scalable by adding more servers.
    • Vertical scaling: it can be achieved by adding more resources (like CPU, RAM, etc.) to the same servers. An example is MySQL that can be scaled by switching it from smaller to a larger capacity machine.
  • Reliability: If I can be confident that the system will always succeed to serve the needs at all the time, I will call it a reliable system. For example, I can rely on my email system that it will always be available. Even if some of the services might fail, it is still reliable.
  • Availability: Availability means a system is operational in the time period. If a system has no downtime, it could be 100% available. Note: A system may be available but may not be reliable. For example, my email is available to use but what if it has a security issue? If it has a security issue, I will not rely on it to keep my emails secured.
  • Efficiency: Being efficient means the system works in a right way.
  • Effectiveness: Being effective means the systems provides output within the accepted quality and quantity.
  • Manageability: A system is manageable or serviceable if it can be repaired within the defined criteria.

What is a Load Balancer and how it distributes the traffic:

  • A Load Balancer helps in managing the traffic on servers. If a server is busy or if a server is not responding, the load balancer can route the traffic to another server. There are many ways to design the architecture using load balancers at the right place. For example, we can have load balancer before web servers, we can have it between middle layer/application servers or before the databases.
  • Load Balancing algorithms: Load Balancers have algorithm options to decide how to choose a server to send a requests to serve. Below are some of the options:
    • Least connection method
    • Least response time
    • Least bandwidth method
    • Round robin
    • Weighted round robin
    • IP hash

What are Redundancy and Replication concepts:

  • Redundancy is a way to avoid fault tolerance. In simpler terms, let’s say we have two web servers serving the traffic. What if we keep a third web server on a stand by mode? If by any chance one out of two web application servers fails to serve the traffic, we can utilize the third web application server with the failed web server. This third web server is a redundant server. I can recall my personal experience when one of two web servers failed. It was easy to utilize the standby/redundant server within an hour. It’s possible to plan for it without waiting for an hour.
  • Replication is a way to ensure the redundant servers are in sync. In the above example. what if a server fails but the redundant server is not up-to-date with the data/files on main traffic serving web servers? To avoid such a situation, it’s advisable to ensure such a redundant server has same information as other servers. Another common example is a database replication from a primary to a secondary database. In my experience, a server failed but the redundant server was not ready. It happened because the script responsible for the replication failed. To prevent such a failure of a replication, an automated period health and data check of replicated servers is important. Periodic dry-run of such a change process is recommended. As Benjamin Franklin said, “Failing to prepare is preparing to fail.”

What is Caching: and how it works:

Cache is a way to store data in memory for a defined period. This helps to access data faster. One simple example is HTTP session. In a web application architecture, we can keep the commonly asked data into cache. Other related information:

  • Cache helps in reducing latency and increasing throughput.
  • Content Delivery Network (CDN) systems use static media files. Generally, web applications use CDNs to store static media files. A CDN could be using a light weight HTTP server using NGINX. CDN is a network of servers that distributes the content from original server to multiple locations by caching the content closest to the users’ locations.
  • Cache invalidation: It’s important to plan for cache invalidation when theta is changed at the source (like a database). There are different ways to do it:
    • Write-through cache: this technique suggest to write the data in the cache at the same time when the data is written to the database. This prevents any data sync issue. But this increases latency of write operation as it has to write data twice.
    • Write-around cache: this technique suggests to just write the data to the storage (like a database) and not to write to the cache. When the data is accessed, it will take time.
    • Write-back cache: this technique suggests to write the data only in cache, not in the storage. After the end of a time period or conditions, data is saved into the storage. This has the side effect of missing the data from cache, if there is a crash in the servers string the cache data.

What is data partitioning:

Definition: It is a process of splitting the data into multiple small parts. After a certain point, it is better to scale horizontally, by adding more machines. Below are some ways to partition the data:

  • Horizontal partitioning: It is also known as data sharing. We put different rows into different tables. It could be done based on a range.
  • Vertical partitioning: In this type of partition, data table is divided vertically. For example, data can be stored in one DB server and images can be stored in another DB server.
  • Directory based partitioning: In this approach, partitioning plan can be stored in a look up service.

What are Partitioning criteria:

For more about partitioning, refer here. Below are brief notes:

  • Range based partitioning: This approach assigns rows to partitions as per a range. For example, I partitioned a MySQL DB table by months so that the database performance is optimized.
  • Key or hash based partitioning: this approach partitions the data with hash code on a key field. But hash based can be problematic to further expand in the future. So, using consistent hashing is recommended.
  • List partitioning: This is similar to range. In this approach, we partition the data based on a list. For example, we can partition based on region or based on a language preference.
  • Round-robin partitioning: In this approach, new rows are assigned to a partition on a round robin basis.
  • Composite partitioning: It combines more than one partitioning approaches. For example, we can first apply list partitioning and the hash partitioning.

What are the problems with data partitioning:

  • Joining database tables can be performance inefficient. To avoid it, try to denormalize data in a way that avoids data cross-joins.
  • Data partitioning can cause referential integrity. To avoid it, store the referential integrity logic in application code.
  • Schema changes are difficult with data partitioning. To avoid it, use directory based partitioning or consistent hashing.

When to use data partitioning:

We should use it when it is not possible to manage the data within a single node or a performance improvement is necessary.

What is a proxy server:

When a client sends a request, the first server that receives the request could be a limited, light-weight server. This light-weight server can further pass the request to the actual backend server. Such a first server is called a proxy server. It could be a hardware or a software. A proxy server acts as a firewall.

Advantages/usages of proxy servers:

  • Logging the requests.
  • It can also help in caching the responses.
  • Serving a downtime message when required.
  • Proxy server helps to add the security to the backend server.
  • Blocking some websites for the users within a company. Proxy server can also be used to bypass the restriction of a website for a company users.

Here are some types of proxy servers:

  • Open proxy: An open proxy is accessible by any user on internet. It can be anonymous (that hides the identify of the originated machine) or a transparent (show the identity of the originated machine).
  • Reverse proxy: A reverse proxy is for the server to get the response from other servers and send the response to the client. A Load Balancer is a use case of a reverse proxy.

What is a Heartbeat for systems:

In a distributed systems architecture, we need to know if other servers are working. To achieve it, we can have a centralized monitoring system that can get the uptime status of each server. We can decide the steps if a server is not working as expected.

What is a checksum:

Checksum is a way to ensure the data transferred from one system to another system is as expected. Checksum is calculated and stored with the data. To calculate the checksum, a hash function like MD5 can be used. Source and destination servers can match the checksum to ensure data is transferred from the genuine source.

What is quorum:

In a distributed system, a quorum is a process to ensure all required systems have the same information and it only completes a transaction complete when all systems have the needed information. For example, if we have three database servers. If we want to ensure that a transaction is only considered complete when all three databases instances get the same information and agree to the transaction. Quorum can help to ensure such an operation.

What is the Bloom filter:

Bloom filter is a data structure approach to quickly find an element in a set. Bloom filter structure informs if an element MAYBE in a set or DEFINITELY not.

How HTTP works: A user hits a URL on the browser. We use either http or https protocol. Second is a domain (like http://www.abc.com). We use a DNS (Domain Name Service) lookup to look for an IP for a domain. DNS information is generally cached. To look for a DNS, we have DNS servers. Finally a browser has the IP address of the server. Next, the browser get a TCP connection with the server. Browser sends a request to the server. Server sends an http response to the browser. Browser parses the responds and shows the response to the user on the browser.

Bare metal infrastructure: this is a term used for legacy physical server infrastructure. When an application needs the highest level of security, bare metals could be the most appropriate solution.

Virtual machines: This uses a hardware that is shared for multiple virtual servers. We use a hypervisor underneath guest OSs. The downside is that these could be vulnerable by noisy neighbor problems.

Containers: it’s a light weight stand alone package. We use a hardware and host OS. On top of it, a container engine is installed. On top of container engine, multiple containers are deployed. Containers are scalable and portable. Containers are less secured. They are vulnerable to security issues at OS level. To avoid security issues, we can run containers inside virtual machines.

Thank you for reading it. As I learn more, I will revise it.

References:

Product Management Overview: Part 3 of 3

This is a Part 3 of three series:

  • Part 1: Product Management (PM) role, Becoming a PM, Product life cycle, and understanding the company.
  • Part 2: creating an opportunity hypothesis, validating a hypothesis, and taking an idea into action.
  • Part 3: Working with design, engineering, and marketing. Finally, completing the product lifecycle.

Working with Design:

  • User experience (UX) design: it is about how a user interacts with a product. A customer should use the product and use it in the right way. A user-centered design is an approach from a user’s standpoint in using a product.
  • The design process has these phases: User research, information architecture, interaction design, prototyping, visual design, and content strategy.
  • The design process starts before writing the PRD.
  • Design relationship skills: A product manager focuses on an ideal customer and a design lead focuses on an idea user.

Note: I will revise the design details in the upcoming articles.

Working with Engineering:

  • Relationship with engineering: it is important to build a respectful relationship with engineering. They are hard working professionals who do many more things in addition to writing the complex code.
  • Software development methodologies: two famous mythologies are waterfall and agile. Waterfall is a lengthy and iterative process in that each iteration may take time. Whereas, agile is a short duration iteration process. Waterfall approach does not allow changes in between the process. Whereas, agile is a flexible approach. Scrum is an approach for agile development. Scrum uses time-boxed sprints.
  • Kanban: Kanban is a process that controls the work in-process items and focuses on moving to the next steps. In a simpler form, Kanban board process suggests to-do, doing, and done steps.

Marketing of the product:

  • Marketing a product: Marketing is important to launch a product successfully. Some companies have product Marketing Manager (PMM) roles that are external customer and partners facing.
  • Product Messaging: Product messaging is important to let customers know why they should use your product.
  • Launching the product: identifying a launch owner is a great way to launch a product. Going To Market ( GTM) can be divided into three steps: prelaunch, launch, and post launch. Prelaunch focuses on planning the launch by taking multiple steps. Launch focuses on mainly executing on the plan. Post-launch focuses on post launch analysis, marketing, and sales.

Completing the product life cycle:

It is important to celebrate the completion. it is also important to discuss how things went from start to end, to assess how the process an be improved for the future iterations.

Reference:

  • The Product Book: How to Become a Great Product Manager by Product School, Carlos Gonzalez de Villaumbrosia, et al.