Thursday, March 31, 2011

WebSphere Job Interview Sample Questions 002

Intermediate Questions

1. Please talk about your recent WebSphere work experience?

Worked on WebSphere 8
Worked on WebSphere eXtreme Scale 7.1
worked on the streamlining and stabilizing of a very large financial WebSphere system
worked on the troubleshooting of a WebSphere Virtual Enterprise system

2. Why do you think that you can be a good WebSphere engineer?

UNIX experience
Good scripting expertise
C, C++, Java language programming
Long years of working on a variety of releases of WebSphere
Long years of working on large and complex WebSphere projects

3. Please explain the major differences between WebSphere 6 and WebSphere 7?

new features in WAS V7


* support Java SE 6
* Java annotation and injection support to reduce complexity
* Web services specification updates
* Flexible management model with Administrative Agent and Job Manager
* Manage DataPower through administrative console
* Properties file based configuration
* Fine-grained administrative security extended to administrative console
* Multiple security domain support
* Security auditing support
* Integration with MQ WebSphere V7 using JCA 1.5 resoure adapter
* Centralized Installation Manager (CIM)
* Rational Application Developer for WAS V7.5

4. Can you tell the major differences between Type 2 JDBC driver and Type 4 JDBC driver?
Type 2 Driver - Native-API Driver specification schematic of the Native API driver. The JDBC type 2 driver, also known as the Native-API driver, is a database driver implementation that uses the client-side libraries of the database. The driver converts JDBC method calls into native calls of the database API. The type 2 driver is not written entirely in Java as it interfaces with non-Java code that makes the final database calls. The driver is compiled for use with the particular operating system. For platform interoperability, the Type 4 driver, being a full-Java implementation, is preferred over this driver. However the type 2 driver provides more functionality and better performance than the type 1 driver as it does not have the overhead of the additional ODBC function calls.

Advantages

* Better performance than Type 1 Driver (JDBC-ODBC bridge).
* Provides Fastest performance than all 3 drivers as it calls native APIs(MySQL,Oracle...etc).

Disadvantages

* The vendor client library needs to be installed on the client machine.
* Cannot be used in web-based application due to the client side software needed.
* Not all databases have a client side library
* This driver is platform dependent
* This driver supports all java applications except Applets

Type 4 Driver - Native-Protocol Driver, Schematic of the Native-Protocol driver
The JDBC type 4 driver, also known as the Direct to Database Pure Java Driver, is a database driver implementation that converts JDBC calls directly into the vendor-specific database protocol. The type 4 driver is written completely in Java and is hence platform independent. It is installed inside the Java Virtual Machine of the client. It provides better performance over the type 1 and 2 drivers as it does not have the overhead of conversion of calls into ODBC or database API calls. Unlike the type 3 drivers, it does not need associated software to work. As the database protocol is vendor-specific, separate drivers, usually vendor-supplied, need to be used to connect to different databases.

Advantages

* These drivers don't translate the requests into an intermediary format (such as ODBC), nor do they need a middleware layer to service requests. Thus the performance may be considerably improved.
* All aspects of the application to database connection can be managed within the JVM; this can facilitate easier debugging.

Disadvantage

* At client side, a separate driver is needed for each database.

5. What is the major function of Job Manager?

* New profile type to support flexible management
* Use administrative agent to register base server profiles with a job manager
* To manage multiple cells, register deployment managers with job manager directly
* Use job manager to queue jobs for registered profiles
* Registered profiles retain autonomy and can be managed without the job manager
* Scales to support large number of registered profiles

6. What are the major new features of JDK 1.5 GC?

*Annotation not deployment descriptor
*GC - more options available such as nursery and tenured sections
*JPA support - no more EJB entity bean (Thank God)

7. What are the major benefits of database connection pool?
A connection pool is a service provided by an application server that can be used to improve data access performance with a group of open connections to the database being maintained persistently. Each time an application needs access to the database, it takes a connection from the pool, access the database then returns the connection to the pool. The connection pool technique removes the overhead incurred when the connection is open and closed. Such overhead can be extremely high for an internet application, which could have a massive negative impact on web applications performance.

8. How do you configure JMS?
Java Messaging Service (JMS) is the standard API for accessing enterprise messaging systems from Java-based applications. It provides methods and functions that are directly implemented by the underlying messaging provider. WebSphere MQ is the premier messaging middleware provided by IBM.

Configure JMS resources

* Create JMS provider
* Create JMS connection factory
* Create JMS queue or topic
* Create listener port
* Create JMS activation specification

9. How to produce a heap dump? How to direct heap dump to a specific location?

kill -3
The dumps go to the working directory.

10.What UNIX commands can be used to find CPU usage or memory usage or network state?

top
topas
ps
vmstat
netstat

11.How do you tell disk usage?
This sounds simple, but I have seen WebSphere consultants did not know what to do when WAS did not start due to 100% disk usage.

df -k
du -k

12.How to configure Introscope 8.1?

*install Introscope agent on the app server
*define Java general argument that includes a profile file that tells where is the Introscope EM along with other relevant information such as port number - the profile file is on the app server - the path has to be included
*create custom service on the WebSphere server via admin console - this specifies the Introscope class
*modify the PBD files to specify metrics to monitor  IBM document on setting up the PBD.

1. A URL is not working. How do you find out why?
First, I would exclude 3DNS and BIG IP by directing trying to get to the URL to the web server transport port. Then, I would try to see if the WebSphere Application Server's port for this URL is working. The key is to determine if the request has ever made to the web layer and application server layer. That is the important first step.

It helps to test all the way from the browser if the network connectivity is working.

For static pages, focus on the web server by examining the access log and error log of the web server. Determine if the web server in general is functional. Web Server resources are adequate.

For application server, examine web container thread, JVM GC, and look at log files for tell-tale message.

Produce dumps (thread, heap, core) and examine these dumps while sending them to IBM with the opening of a PMR.

2. Some users are experiencing latency. How do you find out why?
In the event that some users are experiencing latency or slow response time we should examine the complete request processing chain involving network, load balancers, HTTP web servers, application servers, back end databases, and hardware.

First we examine the network layer such as firewalls or switches and so on to make sure they work properly. Network devices have processing capacity and use memory much like any other hardware resource. Adding additional hardware resources to a network device will increase the throughput.

Then we can investigate load balancers and HTTP web servers to see whether they are over loaded or not. If yes, the web server plug-in tuning might be needed.

The next step is to examine the processing time of application servers at JVM, Web Container and EJB Container layer. For example, check the JVM heap utilization. If GC is too frequent or if the pause is too, then, tune GC.

And finally, the connection pool usage between application servers and backend data sources such as database should be checked. If the database backend is slow, the whole system will be slow. It helps to examine the network connection from the WebSphere Application Server to the database backend and if the database is working as designed.


3. What are the major benefits of vertical clustering and horizontal clustering?
Vertical clustering (process redundancy) involves creating multiple application server processes on a single physical machine, providing application server failover as well as load balancing across multiple application servers. This topology does not provide an efficient fault tolerance because a failure of the operation system or the hardware on the physical machine itself might cause problems to all servers in the cluster.

Horizontal clustering (process and hardware redundancy) involves creating application servers on multiple machines to take advantage of the additional processing capacity available on each machine. Using horizontal scaling techniques also provides hardware failover support.

4. If you add substantial more vertical clustering trying to overcome a bottleneck at the web container layer, what you have to watch out for as a potential system capacity issue?
The first concern is to watch the system memory capacity since the vertical clustering involves multiple JVMs running on a single physical machine and each JVM requires enough memory to achieve desired performance. The memory requirement is heightened even more if the clustering is
configured using servlet and JSP caching in at the web container layer.

Next we should investigate if enough messaging resources are in place to support the heavy communication traffic and loading to the database servers and other enterprise information systems. Throughput and response time under heavy web requests originated from the web servers must be measured to ensure that the vertical clustering meets the expectations.

5. What are some of the application code logic and construct that prevents the use of vertical and horizontal clustering?
Unique counters, traffic routers, and any Java artifacts that depends on a unique serialized valued to perform its business function. This type of the problems can be avoided if the WebSphere engineer engages early in the JEE project and provide WebSphere application development best practices to the application developers and architects.

6. Explain the main improvements of Java 6
1. improved caching capability - shared cache among JVM - caching more Java objectis than static classes - persist Java objects
2. 64 bit reference pointer compression to prevent performance penalty using 64 bit poniters
3. JIT more complied code for better performance

WebSphere Virtual Enterprise questions

1. Can you explain the main features of WebSphere Virtual Enterprise (WVE)?

*dynamic resource allocation through ODR, dynamic cluster, and autonomic computing
*edition management to run multiple version of the JEE application and interrupt free upgrades
*policy based SLA ensurance to focus on key applications
*maximize middleware infrastructure investment
*rule based routing

2. Explain what is ODR?
"The WebSphere Virtual Enterprise On Demand Router (ODR) component provides capabilities such as workload balancing, prioritization, health monitoring, and dynamic operations for dynamic clusters. An ODR can be configured to provide multi-cluster routing, including dynamic clusters located in remote cells, and routing to other servers that are not running WebSphere Virtual Enterprise. The ODR can serve as a replacement for the HTTP server plug-in, but in many configurations both components are used. The HTTP server could be located in the demilitarized zone to serve static content and to provide an entry point to the private network where the ODR resides." - IBM documentation

Think of ODR as a highly intelligent Web Server or Web Server plugin. It does not only route traffic to application server clusters according to a fixed weighted method such as Round Robin. It has the intelligence to understand the state of the application server and adjusts itself in routing behavior. The correct configuration and timely and wise application or ODR fixes are critical in keeping your WebSphere Virtual Enterprise system stable. ODR is the most critical component of WebSphere Virtual Enterprise.

3. What is a dynamic cluster?
"A dynamic cluster is a server cluster that uses weights and workload
management to balance the workloads of its cluster members dynamically,
based on performance information that is collected from the cluster
members. Dynamic clusters enable application server virtualization. "  - IBM documentation

The key here is load - the dynamic cluster can adjust load based on load between its members. 

"A dynamic cluster is an application deployment target that 
can expand and contract depending on the workload in your environment.
  Dynamic clusters work with autonomic managers, including the
application   placement controller and the dynamic workload manager to
maximize   the use of your computing resources. Dynamic clusters are
required   for many of the WebSphere Virtual Enterprise  autonomic 
functions, including high availability and service policies." -  IBM documentation

The critical message here is dynamically increase or reduce the number of work JVM instances.

"Dynamic clusters are similar to the server clusters that you can 
create with WebSphere Application Server Network Deployment , but  key
differences exist that make dynamic clusters much more robust. For
complete life-cycle management servers, the product controls the
creation and deletion of server instances and can start and stop servers.
For assisted life-cycle management servers,the product can control the
state of servers by stopping and starting servers from a pool of
predefined server instances. " - IBM documentation

Well - WAS ND cluster is static and WebSphere Virtual Enterprise has dynamically changing clusters if you switch to automatic mode of operation among "Manual, Supervised, and Automatic".

4. Explain what is the current IBM recommended upper limit for core group?
The members of the core group talk to each other by inter-process communication (IPC). "A CoreGroup is a set of WebSphere servers having a Group Communications System (GCS) fabric, which can be used for Virtually Synchronous messaging. WebSphere environment allows mulitcasts among the members of a core group." Therefore, if the size of the core group is too large, hence the communication burden as well as possible performance degradation. The last IBM recommendation that I heard was  Keith Smith (the chief architect of WAS XD): 50 or less.

5. Explain what is the inter-process communication mechanism replacing core group (service bulletin board) for WVE 6.1.1?
WVE's Bulletin Board (WVEBB) uses scalable peer-to-peer technology and WVEBB removes all WVE dependencies on HA manager and core groups. This is an important architectural change that tends to make your WVE environment more stable. The Bulletin Board (WVEBB) is disabled by default.  For details, please see this WebSphere Virtual Enterprise article.

IBM WVE article

-----------------------------------------------------------------------------------------------------------------
Come across some JEE job interview questions - may be useful to WAS professionals as well since JEE application server is a subset of JEE specification: JEE Interview Questions

A very good WAS interview question sample with answers: WAS Interview Questions

Another with detailed answers: Questions with detailed answers

No comments: