Test your Technical knowledge – Scenarios

  1. What is Internet of Things? Explain about any one of your recent work?
  2. Design DVD selling Software
  3. Design task scheduler for which cannot run when not running others scheduler
  4. how can you rollout certain functionality for only certain users?
  5. how do you design cab service application? What are the important functionalities needed?
  6. Design plumbing service – what are the basic functionalities needed?
  7. Suppose you have extremely large input data file to process, give the various options to process it? This was batch and input data file processing oriented question. Specific questions on batch based application design.
  8. Your application gone through the entire test phases and passed all gating criteria but in production now it is extremely slow. Business is looking for you to quickly act. What all the things your will do?
  9. How do you perform Code review for DAO?
  10. What is Capacity Planning? How do you perform?, What formula or technique you use to predict production infrastructure?
  • we determine load on system and based on historical data and expect judgment to extrapolate it.
  • complex scenario…saying I give you one high end sun Solaris machine, 64 gig ram….tell me how many concurrent user it will handle….basic formula
  • draw architecture for only those component which you design and propose in your last application……

Capacity Calculation

=====================https://wrongsideofmemphis.wordpress.com/2013/10/21/requests-per-second-a-reference/

  1. Total users
  2. Page per view
  3. Total Page view in Peak = Total users * Page per view
  4. Page view per secs = Total users * Page per view/no of working day * 3600

5.Hits per sec = Page view per secs * 140

 

Work Load Characterization Values Notes

—————————————————–

Total Visitors in Peak Time Window (PTW): 25000.0

Total Page views in Peak Time Window :100000.0

Number of working days in a month 21.0

Number of Seconds in PTW : 3600

Seconds in PTW = PTW in Hours x 3600

Page Views per second during PTW 30.0 Page views per second in PTW =

Total pages viewed in PTW / Seconds in PTW

Hits per second during PTW 4200 Page views per second in PTW * Number of Hits per Page (140)

CPU Time in ms per CPU/sec 1,000

Available CPU ms/sec per CPU 800 Based on 80% Utilization

CPU per Dynamic Portion of Page [ms] 120 (Based on 2.2 GHz Intel Xeon Processor (Standard))

CPU per Image Portion of Page [ms] 20 (Based on 2.2 GHz Intel Xeon Processor (Standard))

Total Web Server CPU Usage for Dynamic View [ms] 3600 (Page views per second in PTW * CPU per Dynamic Portion of Page [ms])

Total Web Server CPU Usage for Images [ms] 600 (Page views per second in PTW * CPU per Image Portion of Page [ms])

Total Combined CPU Usage for Dynamic Views and Images [ms] 4200 (CPU Usage for Dynamic Portion + CPU Utilization for Images)

40% CPU Overhead for SSL [ms] 1680 (Using SSL on Web Server Only)

System CPU Utilization [ms] 200 (Multiplexing, Job Scheduling, Application Threading Characteristics, etc.)

Total CPU Utilization [Web + Image + SSL + System] 6080

N  =  ( R + Z )  *  X

Where, N = Number of users

R = average response time (now you know, it can be pacing too)

Z = Think Time

X = Throughput (i.e. TPS)

Example, If N = 100, R = 2 sec, 100= (2+Z)*X and hence –> If Z=18, X = 5

I/O bound (DB Read, or reads a file, or gets the info from network) and CPU bound(like image processing or doing calculations)

 

https://wrongsideofmemphis.wordpress.com/2013/10/21/requests-per-second-a-reference/

  1. When you do code review for Spring, what are the key thing you look for…..Code review for Spring

instance variables and verify we don’t have data holders defined at class level…………………… if the code is

already in production and today you found there many such bean which has class level member data holders…..how you will communicate business on code change….because

business has so far not found this causing any problem in production?

Reference: Class level variable make thread safety issue for singleton bean

http://stackoverflow.com/questions/2183974/difference-between-each-instance-of-servlet-and-each-thread-of-servlet-in-servle

  1. Scenario 1) User is coming on application but either closing app or application is getting error out…how you still maintain data in system and take it forward.

Caching, messaging queue

  1. Scenario 2) Some of your services are not available, what you do to handle such scenarios?

fail safe approach – graceful exit

fault tolerant – allows system to work with same performance

  1. Scenario 3) In a workflow half of the operations are done but it partially failed in few systems in a distributed environment. How to do rollback in such distributed and multiple application integration scenarios?
  2. What is the problem Hadoop – MapReduce paradigm is solving?

Suited for loosely coupled parallelization tasks. Anything that involves doing operations on a large set of data, where the problem can be broken down into smaller independent sub-problems who’s results can then be aggregated to produce the answer to the larger problem.

  1. What if you don’t have caching framework? can you write your own…. draw a high level design for all the methods you need to write to

reload, refresh, cleanup and other tasks.

  1. How you determine memory bottlenecks in your application?

Read Heap Dump – Heap Dump is snapshot of object memory in heap

Look at largest size objects and analysis

Thread Dump -Snapshot of all the Threads in applications, need to be collected during application slow. It provide Thread ID, statuses, For analysis look for blocked and long running threads and based on ID , we can find code.

  1. What all Java built in feature you have used?
  2. If you want to build a scalable application, what all points you need to consider in application code?

static vs dynamic data separation

stateless, headless service

token based authentication

asynchronization

concurrency

caching

  1. What are the most critical challenges you faced in your last project?
  2. Why did you use specific data model?
  3. How do you evaluate a framework?

Analysis Business Need,

Suitability

Type of Framework

Extensibility

  1. Finding memory, performance, security and size of codebase
  2. Design well defined SAAS Based system

https://msdn.microsoft.com/en-us/library/aa905332.aspx

https://d36cz9buwru1tt.cloudfront.net/SaaS_whitepaper.pdf

http://www.intel.in/content/dam/doc/white-paper/cloud-computing-intel-it-architecting-software-as-a-service-paper.pdf

http://www.cmg.org/wp-content/uploads/2012/11/m_94_4.pdf

  1. design online instance messaging system
  2. Decide Type of Architecure( Centralised vs Peer to Peer)
  3. Protocol(websocket – xmpp)

3.Security – Encryption etc…

  1. Location detection – Rooster
  2. Servers – Types of service – Increase number of servers

Online Video Streaming

1.Raw Video 2. Compression 3. encode 3. store 4.

http://www.cs.ubc.ca/~krasic/cpsc538a-2005/summaries/06/

http://www.adobe.com/content/dam/Adobe/en/devnet/html5/articles/book-excerpt-the-definitive-guide-to-html5-websocket/9781430247401_Ch04.pdf

  1. how online video streaming works?
  2. NFR related with provided solution
  3. Tell about scenario where you chose different technologies
  4. Patterns
  5. tell about your recent accomplishments
  6. Challenging Project most dynamic and impactful continuous integration project
  7. complete tech flow ecommerce on AEM
  8. Essential things to be followed on API design
  9. Stability and consistency (version)
  10. Flexibilty
  11. Security

Whitelisting the method

Secure against CSRF

Validate access to resources

Validate all input

  1. Easy adoption

Reference Link: http://www.toptal.com/api-developers/5-golden-rules-for-designing-a-great-web-api

  1. various search engine
  2. POC with details –
  3. what are the factors considered while choosing any product?
  4. any 3 achievement done in the project
  5. Influence Team Members
  6. How payment system works?
  7. Design Payment, Payroll system?

Hints: Consumer applications

Provider application

Handshake between Producer and Consumer

Varioius Integrations

Building Blocks for Provider applications

 

Advertisements

Test your architect knowledge – Design a application to Integrate Medical Device with web.

Solution Steps:

Architecture Goals
Objectives.Purpose. Need of changes / Integration
types of devices/ # of devices need to be integareted
what the system has to do?
any intermittent changes related to system
Architecture significant Requiremnet
no of users
security issues
Report generation
alarm generation
Constraints

Medical devices are standalone and it need to be integrated with end to end workflow
Network toplogy
Web application restrictions
Define Approach for Structuring system
a) Connect with all Required Medical Devices
b) Data aquistion, transformation and storage
c) Middleware process – Message Oriented Middleware
d) Web Report system
e) Connect with / Provide API for end user devices
Define Deploying System

Reference

http://www.infosys.com/engineering-services/white-papers/Documents/medical-device-connectivity.pdf

http://mdcf.santos.cis.ksu.edu/sites/mdcf.santos.cis.ksu.edu/files/papers/SAnToS-TR-2008-02-device-coordination.pdf

https://www.hl7.org/documentcenter/public_temp_51BFCC33-1C23-BA17-0C473D9EED211170/wg/healthcaredevices/20140116%20An%20architecture%20for%20distributed%20systems%20of%20medical%20devices%20in%20high-acuity%20environments.pdf

Test your Architecture Knowledge – Design a SAAS based Healthcare Product/ecommerce app/ pay roll system

Matching Technical knowledge with various business scenarios often helps us to multiply our knowledge. In this blog I have listed one of the  scenario which I came across on my experience. Read the scenario and apply your thought process to refine your knowledge.Kindly note that this is my draft version and still enhancing improve further, your suggestions and comments are most welcome.

Scenario: Design SAAS based Health care application

Solution : Modern SAAS Architecture for Healthcare product

Key Factors
============
1.configurability,
2.multi-tenant efficiency,
3.scalability
Software
1.Line of Business – Financial
2.Customer oriented Services – Gmail etc
a.Business Model
b.Application Architecture
c.Operational Structure

Business Model
Thinking strategy should be changed from customer to provider
Software
Hardware
Professional Services

Scalable – maximizing concurrency,using application resources more efficiently
optimizing locking duration
statelessness – Token based Authentication
shared pool resources databases, network connections
caching – OffLoad Database
partioning data
Maturity Model
==============
1. Ad hoc – separate instance for each tenant
2. Configurab’e – same code, but configurable for each instance
3. Configurable and Multi Tenant Efficient – single instance for multiple tenants
4. Scalable, Configurable, Multi Tenant Efficeint- single instance with load balancer
https://msdn.microsoft.com/en-us/library/aa479069.aspx

Choice of Maturity Models Depends on following:
a.Business Model
b.Application Architecture
c.Operational Structure
Application Architecture
High Level Architecture
Presentation Tier
Smart client
Presentation
Browser
Metadata Services
User Interface and Branding
Workflow and business rules
Extenstion to Data Model
Access control
Process Services
Security Services – Directory Services
Authentication – Centralized or dedicated system
Authorization
Business Services – File System, Messaging, Databases

DB Design
Dedicated Tenant DB
Shared DB, Fixed Extenstion Set
Shared DB, Custom Extension
Scalability
Make stateless application
I/O operations in asynchrous way
Pool resources
DB operations – Maximize concurrency and reduce mutual lock
Scale DATA
Partitioning
Increase read write scalability using Caching or Cassandra
Operational Structure
Shared Services
Accurately track customers’ usage, and bill them for time or resources used.
Restrict or throttle access at certain times of the day, or in order to meet other criteria.
Monitor site access and performance, to ensure that SLAs are being met.
Perform other functions in order to ensure a seamless experience for your customers that meets or exceeds expectations.
Operational support services (OSS)—Handle operational issues such as account activation, provisioning, service assurance, usage, and metering.
Business support services (BSS)—Support billing (including nvoicing, rating, taxation, and collections) and customer management (which includes order entry, customer self services, customer care, trouble ticketing, and customer relationship management).

Monitoring for Availability and Scalability
===================
Shared DB
Shared DB, Separate Schema
Shared DB, Shared DB

Security for DB
Filtering – TenantView Filter avoids direct access of DB
Permissions –
Encryption – Tenant Data Encrption
Trusted DB Connections, Impersonation

Extentsibility Patern – Table customizations

Scalability Pattern
Replication and Partitioning
Replication – Use Single Master Replications
Tenant Based Horizontal Partitioning
Identifty Data that doesn’t need partition(Warehouse)
Identifty Data that need partition( User, Tenant based)

==========================

Reference

https://msdn.microsoft.com/en-us/library/aa479086.aspx

 

Test your Solution/Technical Architecture knowledge – Design online survey/exam website

Matching Technical knowledge with various business scenarios often helps us to multiply our knowledge. In this blog I have listed one of the  scenario which I came across on my experience. Read the scenario and apply your thought process to refine your knowledge.Kindly note that this is my draft version and still enhancing improve further, your suggestions and comments are most welcome.

Scenario:  How do you design for the following requirement?
The website required us to enhance with customer online exam, you need to design for this requirement. How do you store the data in db if the server gets crash?

Expected Thought Process:

1.how to avoid DB call for each and every user behavior?
2. Leverage suitable options for intermediate storage
3.Caching , NOSQL, Messaging etc(https://www.surveymonkey.com/blog/2012/11/09/a-tale-of-two-caches-an-installment-from-the-code-monkey-corner/)

Relevant knowledge area

a. Architecture and Design knowledge
b. Choosing relevant Technology choice

Solution:

Following are the few ways to achieve it
1. Caching( Distributed Caching)
2. NOSQL – Cassandra
3. 1 & 2 with primary and backup storage
Oracle Coherence Dist Caching

Lessons Learned:

1. Improve knowledge on transient temporary storage options like caching, Cassandra.
2. Explore further options.

Reference:

http://www.oracle.com/us/products/middleware/coherence/coherence-dist-caching-175812.pdf

 

Check your solution/ technical architecture knowledge – Design DB for User Interests List on ecommerce application

Matching Technical knowledge with various business scenarios often helps us to multiply our knowledge. In this blog I have listed one of the  scenario which I came across on my experience. Read the scenario and apply your thought process to refine your knowledge.Kindly note that this is my draft version and still enhancing improve further, your suggestions and comments are most welcome.

Scenario:  Business would like to develop a e-commerce site like amazon.com, and one of the requirement is users should get list of their interested products when they first login t a system. Design DB model for this requirement, and the DB relations should explain about all the relationship across a tables.

Expected Though Process:

  1. Find out basic buliding blocks, various systems need to handshake
  2. Build solution architecture
  3. OLTP vs OLAP (RDBMS vs NOSQL)
  4. detailed technical / application architecture
  5. pros, cons of each of the approach
  6. NFR details

Answers:

User Interest data can be collected from
a. user browser behaviour
b. order history
c. user profile

RDBMS approach
Following Tables are involved
a.Users
b.UserInterest
c.product
Relationships
a.One to many between user and user interest
b.many to many between userinterst and product tables.

NOSQL Approach:

As a good alternate option, we can Leverage NOSQL databases

References

  1. http://code.tutsplus.com/articles/sql-for-beginners-part-3-database-relationships–net-8561
  2. http://codeverge.com/asp.net.sql-datasource/database-design-help/530713
  3. http://www.codeproject.com/Articles/33052/Visual-Representation-of-SQL-Joins
    sql server guide
  4. http://www.techonthenet.com/sql_server/foreign_keys/foreign_keys.php
  5. https://howtoprogramwithjava.com/database-relationships-many-many-one-one/
  6. http://www.lornajane.net/posts/2011/inner-vs-outer-joins-on-a-many-to-many-relationship

Notes:

Cross Join(outer join)- no condition, cartesian product result
natrual join – only matching common field
inner join – This query will return all of the records in the left table (table A) that have a matching record in the right table (table B).
SELECT <select_list>
FROM Table_A A
INNER JOIN Table_B B
ON A.Key = B.Key

left join – This query will return all of the records in the left table (table A) regardless if any of those records have a match in the right table (table B)
SELECT <select_list>
FROM Table_A A
LEFT JOIN Table_B B
ON A.Key = B.Key

Right join- This query will return all of the records in the right table (table B) regardless if any of those records have a match in the left table (table A)
SELECT <select_list>
FROM Table_A A
RIGHT JOIN Table_B B
ON A.Key = B.Key

Outer Join –
This Join can also be referred to as a FULL OUTER JOIN or a FULL JOIN. This query will return all of the records from both tables, joining records from the left table (table A) that match records from the right table (table B)
SELECT <select_list>
FROM Table_A A
FULL OUTER JOIN Table_B B
ON A.Key = B.Key

Left Excluding Join –
This query will return all of the records in the left table (table A) that do not match any records in the right table (table B)SELECT <select_list>
FROM Table_A A
LEFT JOIN Table_B B
ON A.Key = B.Key
WHERE B.Key IS NULL

Right Excluding JOIN
This query will return all of the records in the right table (table B) that do not match any records in the left table (table A)
SELECT <select_list>
FROM Table_A A
RIGHT JOIN Table_B B
ON A.Key = B.Key
WHERE A.Key IS NULL

Outer Excluding JOIN

his query will return all of the records in the left table (table A) and all of the records in the right table (table B) that do not match.
SELECT <select_list>
FROM Table_A A
FULL OUTER JOIN Table_B B
ON A.Key = B.Key
WHERE A.Key IS NULL OR B.Key IS NULL