Architect Interview Questions & Answers

I am Paramesh , Currently working as Architect in Singapore. I just collect below information from my circles who recently attended the Architect Interview. I just draft the questions here. I will post the answer for those questions soon. Hope it will useful to refresh your mind before interview .



1) What is difference between SOA VS Micro Service Architecture ?














SOA Micro Service
Exposing the Business Functionality into Services in enterprise level , it will serve more thanon functionlity Small business functionality decomposed into small services .
Services runing /sharing the resources It will not sharing the resources instead it will deployed and execute independently
Scaling is not easy since its enterprise level Easily scaled in service level
Its seems heavy and infra level its expensive Its not heavy and infra wise its very simple not much expensive
Sharing the common module and common resources All are independent
Communication through only ESB , its act as hub in SOA env There is no ESB all are exposing as API
Support both SOAP and REST Ideally its REST
Centralized Data Governace Decentralized the Data Governance
Long Term commitement with Technology stack Elimiate the Long Term Commitment with Technology stack
Standartize the Interface Contract ie Mostly recommended the consumer driven contract approach There is no contract in service level


All the cross cutting concern managed by Infra level Manage by API


2) What is Difference between Micro Service and RestFul Webservice ?
[ANS]

MSA - Architecture Style simillar like SOA
RESTful -

Technical approach to implement the webservice which used to exposed the services and communicate through HTTP protocol .

Restful Service is mandatory approach in MSA .

3) What is difference between Big Data and Data leap?
[Ans]
Big Data is concept to store and processing the large amount of Data which includes Structured/semi/UnStructured Data
Data Leap is storage of large amount of Data

4) What is advantage of Devops ? How to maps the Devops and MicroServices?


5) What is Infra as code in Devops Context?

[Ans]
Processing and provisioning the Hardware configuration through script instead of Manual
IAC mainly for automated the Provisioning the Hardware

Tools to support IAC : Puppet/Ansiable/Openshift/Chef and etc

6) What is main functionality of ESB?
 [Ans]
Orchestration
Transformation
Transportation
Mediation
Non Fumctionality - Scaling /Security/Availability

7) Give some example for Enterprise Integration Patterns with real time Example?

EIP Description Example
Content Based Router
Consume the message from one channel and examine the message content , based on the data/type need to route to different channel .Basically routing based on the content


We received the Customer data which inclues the Post Paid /PrePaid based on the data it will redirect to either Postpaid channel or Prepaid Channel


MessageFilter
Its specical kind of router to eliminate the undesired messages based on the certain creteria


We need to publish the Promotion for certain customer like we have two kind of customer Public customer and Enterpriase Customer , We need to send the Promotion notification to Enterprise level customer with some promotion code .Here we are using Message Filter


Spilitter
Consume the composite message and spilit into series of separate message and pass to the channel


We consume the purchase order from customer which contains the data for several system like VAS/Mobile/Date and etc , splitter will split the message into indidual message and send to respective channel or system


Message Translator
Translate the message from one format to another formate




Content Enricher
Special kind of translator , we need enhance the missing data before route to the final channel


We have legacy System as front chnnel and trying to get the data from new BCC application. But data format between two systems are different . We have the data transformation enhanced the missing data in the request before route to designation channel


Content Filter
Remove the unused data from message and route to the respective channel




CDM
Its data model independent to any application , each application to produce/consume in this format




P2P Channel
Send the message to P2P to ensure that only one receiver successfully received the message




P2S Channel
One input send to multiple output channel , each out put received only one time




Dead Letter Channel
Failed/Expired message route to dead letter channel


Message route to dead letter queue due to time out /failure/expire and etc ie not successfully process the data then it will redirect to dead letter channel . Another queue will pick the message then process it


Wire Tap
Consume and receive message route through this channel , mainly used to testing/trouble shooting




Message Gateway
Encapulate the message specific code ie client not able to access the message instead it can access through Gateway




Message Agreegator
Consume the complete set of related message and collect /aggregate and send to the channel

We received the different induval mobile purchase order and combine /collect then send to respective channel for further processing




8) How do we implement the singleton design Pattern in cluster environment?
[Ans]
Singleton Pattern used to create the single instance in JVM level .However to reuse the same instance in cluseter env in the following ways
1) Application Sever API - every application Server itself provides the api to manage the instance in Cluster level Ex: JBOSS 's MBean and Weblogic Singleton Service ,Object Grid in Websphere
2) Teradata ,Oracle Coherence
3) Third Party Tool like JGroups
4) Message Service
It will used to create the instance in the Cluster Env.


9) GITHub vs GIT flow ?

GIT GitHub
Its distributed version control which used to store/track the changes of the file Its repository to mange the GIT in enterprise level . Its providing the UI to manage the one or more GIT in the enterprise level
Concepts from Git: Repositories, branches, remotes, committing, pushing, pulling, merging, rebasing, reverting, and cherry-picking. Concepts from GitHub: Pull requests, issues, wikis, forking someone else's repository, Gists, github.com.

10) What is the difference between Cluster and Load Balancing ?
Refer Cluster and load balancing blog
11) What are technique in Load Balancing mechanism ?
Refer Cluster and load balancing blog
12) How do you do the performance tuning in the DB?
Ans
   Check the Query execution time and blocking area through execution planner /query optimizer
   Create the Index for all the search fields
   Check the Fetch Type option
   Use Preparedstatement instead of statement if you are using JDBC
   Implement cache for retrieve operations
   Check the SQL statement , select the specified columns instead of *
   Use view for reporting purpose instead of retrieve the data from multiple table
   Use Data source to establish the connection which manage by container or App server
   Implement/use the appropriate batch framework for bulk updates instead of updates individually
   Implement the Sharding in DB level if you have more data in the table.
   Drop the index before perform bulk batch updates .
   Review the Trigger (if any) table level.
   Avoid to use the function in the query (where condition).

13) What is basic action needs to taken during the code review ?
Refer Code Review Check list
14) Continuous Integration VS Continues Delivery VS Continues Deployment

CI

CI , Pieces code from various team build in centralized place to prevent the integration issue in early stage. CI only for build and perform the basic unit test for piece of codes from various teams.

CD:

Sequence of process to be performed like all the test case in the test environment .
Frequent shipping the code into respective env by manual process .

CDeploy
 Shipping the code into PROD by automated process. 
15) List of Tools used in your Env for Devops?
CI- Jenkins
CD- JIRA/CI Pipeline/Puppet
16) What is difference between Proxy and Adaptor Pattern?
Ref Design Pattern blog
17) What is difference between Chain of Responsibility design Pattern and Command Pattern ?
Ref Design Pattern blog
18) What is difference between Template and Prototype Pattern?
Ref Design Pattern blog
19) What is difference between Façade and Factory ?
Ref Design Pattern blog
20 ) What is use of flyweight design Pattern?
Ref Design Pattern blog
21) What is difference between Lazy and Eagar Fetch?
Lazy Loading : In the ORM world , we can define the Fetch Type in entity level either Lazy or eagar.
Lazy :
  We can restrict the loading the relation entities vid getter
 Better performance and more coding
Eagar -
Load all the relation entities as default
Slow in Performance But convenient.
22) What is the advantages of Hibernate?
It will work all the database with min change of code level
ORM all are treat as Object no need to know about the SQL
Hibernate provides the caching implementation
Hibernate provide the Version to prevent the concurrency
Provides the HQL similar to SQL to perform the SQL stuff
Hibernate provides the criteria to prevent use the SQL/HQL with Binding option instead of passing the parameter directly in query.

23) What is difference between Spring WS and JAX-WS?
Both are implementing Web service in different ways
Spring WS :
Its only supports Contract First approach
Maps to Castor/XMLBean/JIBX and etc
Easy to implement the versioning since its contract first approach
JAX-WS
It support both approach
Mapping only through JAXB

24)  Different ways of SSO handling ?
25) What is different types of Caching ?
Three types of caching
Session Cache or first level cache
Default cache , object stored in the session
Second level Cache
You have do the following steps to perform the second level cache
Define the concurrency strategy
Define the cache parameter like expire and any other attributes
Query Cache
Query result can be cached with specific parameter . it mainly used to store the more frequent query result
Default is true .You can set the query result cache in region level also .
Ex : if I want to store the query result for Employee table info and I can kept in specific region in query cache ie with specific name

Concurrency Strategy :
Transactional
read only
NonRestricted Read and write
Read Write

JBOSS cache only supports all , rest of the second level cache providers only support few
26) Demon thread ?
27) What is advantages of Spring ?
28) What is the use of Spring Boot?
29) API Management - Functionality ?
Functionality
URL Abstraction
Rating management
Concurrency Management
Security
Agreegation
Logging
Fault management
Preference Policy
Caching
30 ) Types of scaling
31) How do we implement the Versioning in JAX-WS and JAX-RS?
Refer SOAP VS REST

32) How do you perform the Business Process in Micro Service world same as BPM in SOA world?
33) Why we need the DEVOPS?
[Ans]


34) What are different ways of Indexing in DB?

Index is mainly used to fast fetching records from table

Types of Index

1) B Tree Index -

2) Bitmapped Index

3) Function based Index

4) Table Index - It will index not based on the row , scan the entire table always

35) What is difference between SQL and NOSQL?
36) What is difference between ACID and BASE?
37) Different ways of Integration style ?
38) What is Dead letter Queue?
39) What is the difference between P2P and P2S message channel?
40) What is the use of WireTap?
41) How to handle the exception Handling in Camel ?
42) What is Bundle and Features ? Advantages
43) Karaf Vs Fabric Container
44) What is the difference between Message Filter and Content Router?
45)  What is difference between Decorator pattern and Observer Patter?
46) What is difference between JPA and Hibernate?
47) Basic Characteristics of Micro Service
48) What is service Discovery and Service Registry in Micro Service world?
49) What is dead lock in DB ? How to avoid ?
50) Pessimistic Vs Optimistic lock ?
Refer the Blog
51) What is the use of Query planner in DB?
52) Code Review Consider the following
Refer the Check list
53) what is difference between GIT and SVN?
54) Singleton Bean VS Singleton Design Pattern
Refer the Design Pattern
55) What are types of scope in Spring Bean ?
Singleton
Prototype
Request
Session
Application
Global
56) What is RESTful Service ? What are action in RESTful webservice?
57) What is the difference between RequestBody and RequestParam?
58) At which scenario REST and SOAP WS service are useful?
Refer Rest VS Soap
59) What is Architect main role in EA level ?
60)  What is DB Sharding ?
its row level Partitioning in the Table ie Implement the Horizontal Partition in table level rather than splitting in Column level Partition .

Mainly used for fast Retrieval in the large scale project

It will reduced the Response Time .
Following Ways to implement the sharding

1) Functional Based
2) Expression Based
3) Meta Data Based

61) What is materialized View ?
MV , its stored the result set of Query
Basically it contains physical data from the tables
It can update the data .

62) What is Cluster Index and Non Cluster Index?
Cluster Index mainly used for faster retrieval .
It will only one cluster index in table level.
It will sorted the rows same as table
Non Cluster index , we can create more than one in table level

63) MVC VS MVCC
MVC - Model View Controller

Multi Version Concurrency Control

Mainly used for Concurrency control.

64) What is SQL Injection and Cross Site Scripting (CSS), Cross Site Request forgery, LDAP injection?
65) What is Server side mashup and client side mashup?
66) What are the important factors needs to consider when application in Internet?
67) Transaction/JTA/Distributed Transaction
68) What is SSL? How to enable the SSL and Flow of SSL?

69) What is SSO ? Various ways to implement the SSO?
70) What is Contract First and Contract Last approach ?
71) Service Orchestration and chorography
72) What is the difference between SOA and WebServices?
73) What will happen if more than one users access the RESTful Services?
74) What is difference between SOAP Fault and Exception ?
75) What is DDM /TDD/EDA?
76) What is Camel ?
77) How do throw the error message to user in Restful Webservice world?
78) Ways to implement the Exception Handling in RESTful WebService?
https://dzone.com/articles/exception-handling-spring-rest
79) come with proper design pattern for the below application
  1. Hotel Management
  2. Car Parking
  3. Ticket Booking
80) What is aquator and DEVTools in Spring Boot?
81) What is Circuit Breaker Pattern?
82) Service Based Contract VS Consumer Driven Contract
83) Versioning in Web Service (SOAP /RESTful)
84) RESTful VS REST?
85) Puppet VS Chef VS Ansiable
86) @RequestParam VS @PathVariable in RESTful WS?
87) What is Pipeline in Jenkins ?
88) How to create the package in Maven?
89) What is async message?Some EIP for async
90)










  

Comments

Popular posts from this blog