Thursday, November 27, 2008

Reflections on Terrorist attack on Mumbai

What are the difierentiators from the previous attacks?

  1. Its more organized and more planned

  2. First time ammunition has come for sea route

  3. Not of Serial blasts in nature

  4. Used different kind of ammunition not just bombs including AK 47 attacks and indiscriminate firing at several places

  5. Targeted Posh areas and Foreigners

  6. It for longer time



What are the implications?

  1. Could shutdown the entire financial system of the country for a day

  2. First time foreigners died in attacks pulling India down further in morale infront of world contries

  3. Exposed India's vulnarability for terrorist attacks sans time and space for umpteen number of times

  4. Sent message to the world that India lacks cohesion and can compromise on security

  5. Could have caused a dent in the investor confidence

  6. Already made a dent in the cricketing schedules



Common people of India are having the following questions

  1. If US can stop with 1 attack why cann't India do that?

  2. Why are we so permissible?

  3. How far we need to afford these fortnightly attacks?



During this attack the conversations of the journalists with the terrorists there is conscious effort for misleading making that the attacks are done because of the oppression or perpetaration against muslims.. and its done by muslims in India.. but from the conversation its evident that its more a cross border terrorism rather than that of domestic religious terrorism. Sadly everything is construed by the Netas as communal and the general public should exercise refrain from commotion.

What are the bottlenecks and causes?

  1. Time and again there were attacks and there are only kneejerk reactions

  2. This issue has always been treated from communal angle and never taken more seriously because of lack of political will and vote bank politics

  3. There is no sustained effort in this direction with commitment from the government

  4. Indian politicians always give more importance to the vote bank politics than real issues at hand

  5. Thousands of small childern deprived of basic modern employable education are put into religious extremist factories, fed with mis-interpreted religious texts making them into hard-core fundamentalits



What could be done and what should be done?

  1. Need tight co-ordination between center and state for attacking the problem which has took the dimention of War

  2. Coming up with laws for tackling the issue and implement them in the right spirit not giving side to communalism while dealing with terrorism

  3. Understand that it could not be tackled in a piecemeal approach. All the machinaries like Intelligence, Miletary, Police must coherently work toward tacking such issues

  4. We need to understand that the root cause is with in us because with out the permisivity of the officials the ammunition could not have come. Desist corruption atleast in the matters of internal security

  5. Need to shelve the "Vote Bank Politics" at least at matters of National Security and deal with the persons involved in a stern way



The biggest question remains, Can India raise as a country devoid of religion, caste and creed against the single biggest challenge for its existance as a nation?

Tuesday, September 16, 2008

Utilizing 64bit JVMs in Java CAPS Integration Server

A very common error that is observed with Java CAPS Integration Server is "Out of Memory". When this happens we observe the following:

  • we can not deploy any applications further to the Application Server
  • slowdown of Integration Server

We can analyze the error at the application level using profilers or other tools like 'jhat'. But at the same time we might need to have higher memory needs depending upon the application.

CPU architecture has limitation on the JVM heap size that can be allocated for a process. Some operating systems reserve portions of process address space for OS use, effectively reducing the total address space available for mapping memory for user programs. For instance, Windows XP DLLs and userland OS components are mapped into each process's address space, leaving only 2 to 3.8 GB (depending on the settings) address space available, even if the computer has 4 GiB of RAM. This restriction is not present in 64-bit Windows.

The Java HotSpot FAQ says "The maximum theoretical heap limit for the 32-bit JVM is 4G. Due to various additional constraints such as available swap, kernel address space usage, memory fragmentation, and VM overhead, in practice the limit can be much lower. On most modern 32-bit Windows systems the maximum heap size will range from 1.4G to 1.6G. On 32-bit Solaris kernels the address space is limited to 2G. On 64-bit operating systems running the 32-bit VM, the max heap size can be higher, approaching 4G on many Solaris systems. ... If your application requires a very large heap you should use a 64-bit VM on a version of the operating system that supports 64-bit applications."

It further states "Generally, the benefits of being able to address larger amounts of memory come with a small performance loss in 64-bit VMs versus running the same application on a 32-bit VM. This is due to the fact that every native pointer in the system takes up 8 bytes instead of 4. The loading of this extra data has an impact on memory usage which translates to slightly slower execution depending on how many pointers get loaded during the execution of your Java program. The good news is that with AMD64 and EM64T platforms running in 64-bit mode, the Java VM gets some additional registers which it can use to generate more efficient native instruction sequences. These extra registers increase performance to the point where there is often no performance loss at all when comparing 32 to 64-bit execution speed. The performance difference comparing an application running on a 64-bit platform versus a 32-bit platform on SPARC is on the order of 10-20% degradation when you move to a 64-bit VM. On AMD64 and EM64T platforms this difference ranges from 0-15% depending on the amount of pointer accessing your application performs."

If we are deploying the Java CAPS applications on 64 bit operating systems which are having large memory we should leverage the availability of large RAM on such platforms and high end server machines. So we should able to start the Logical host or the application server with the following JVM options such that the server starts with Large heap.

We should able to modify the <jvm-options> section of the file <logicalhost>/is/domains/<domain_name>/config/domain.xml:

  • Add <jvm-options>-d64</jvm-options> at the start of the <jvm-options> section -- If neither -d32 nor -d64 is specified, the default is to run in a 32-bit environment.
  • Add either <jvm-options>-XX:+UseParallelGC</jvm-options> or <jvm-options-XX:+UseConcMarkSweepGC</jvm-options> depending upon the nature of the application(s) that are being deployed on the Integration Server. For a background ref to. GC Tuning.
  • Modify the following options in the section to appropriate values.
    • <jvm-options>-Xmx16384m</jvm-options>
    • <jvm-options>-XX:MaxPermSize=2048m</jvm-options>
    • The options I gave above are for 8 core , 64 GB RAM machine
  • The option <jvm-options>-server</jvm-options> may be removed since -server option is implicit with the use of -d64

Common Reasons for Out Of Memory Errors

Out Of Memory error can happen due to following reasons:

  • Garbage Collection Issues
  • Orphaned Class loaders
    • Thread context classloader
    • new Thread()
    • Dangling thread
  • Classes with following references
    • static variables
    • SQL Driver
    • Commons logging
    • java.util.logging.Level
    • Bean util
      • Details

etc..

We can analyze the problem(s) associated with such errors at application level by having GC details and/or heap dump

  • -verbose:gc with -XX:+PrintGCDetails for observing GC model for tuning or altering suitable GC for the application
  • -XX:+HeapDumpOnOutOfMemoryError
  • -Xrunhprof:heap=dump,format=b
  • jmap -dump:format=b,file=heap.bin <pid>

Analyze heap dump using Jhat

  • jhat -J-mx1024m heap.bin
  • http://localhost:7000
  • Using built-in or custom queries to narrow down leak suspects
  • Identify an object or class in the application
  • List reference chains

Wednesday, July 09, 2008

Why Interoperability And What it takes to be really interoprable

Why Interoperability?

Organizations invest time and money for building information systems over a period of time. These systems are built with the best of hardware and software that are available during that time. Due to the change in the socio-economic-political and opportunity reasons organizations are constantly challenged to update update themselves temporally, technology wise also. If we want that the existing solutions run as is (Which the client obviously wants since invested time and money) and yet see that these disparate systems talk to each other seamlessly we need interoperability amongst the systems.

When ever we think of such solutions in heterogeneous systems for integration we tend to think of SOA or WebServices. We also that these solutions are of panacea to all the ills of heterogeneous systems while integrating. But it takes more than just WS Software systems to be truly inter-operable. Lets examine what it takes to be inter-operable.

Lets get to the definition of interoperability:

ISO/IEC 2382 Information Technology Vocabulary defines interoperability as:

“The capability to communicate, execute programs, or transfer data among various functional units in a manner that requires the user to have little or no knowledge of the unique characteristics of those units."

By this definition we can deduce the following areas or levels are at which systems to be inter-operable:

  • Network and Infrastructure Layer - For interoperability amongst different protocols like TCP/IP, DNS, DHCP/BOOTP, AppleTalk, 802.1x, NFS/NIS (Different OS have different tools for making file systems accessible) etc..

  • Data Layer - For data access JDBC, ODBC, OLEDB, ADO, ADO.Net etc. Apart from that we are talking about file formats like XML and the different variants of XML organizations (the XML Serializers and De-Serializers available on different platforms make these documents inter-operable)

  • Program Layer - For taking care of Program level interoperability. We create services / programs that deal with the data in the Data Layer. These are of the following Channels

  • Technology specific binary formats -- RMI/IIOP in case of Java, .Net Remoting or COM interop. with respect to MS technologies. These can deal with the stateful data and have good performance numbers. But these have a caveat that they are proprietary that is the other end of the system also needs to be either Java in case of RMI and MS based COM/ .Net object in case of .Net Remoting and COM inter-op. But there are some tools like J-Integra, etc. for inter-operability between the MS – Java worlds. IIOP is supported by both Java and MS worlds.

  • WS - * Standard programs for exposing services. There are built on several set of standards like security, transaction, co-ordination and trust etc. for building robust inter-operational heterogeneous systems. WS stack is supported by both Java and MS worlds.

  • Rest style services using HTTP. These deal with stateless data.

  • Process Layer - This layer builds on top of the program layer and helps in orchestrating the programs or services. The need for this layer is because of the geographical / temporal dispersion of the organization of the Business and Systems. And also the raising business demand calling for

    • Asynchronous Availability of the systems for

    • High Availability

    • Transactional Nature of the Heterogeneous systems

    • Reliability

These requirements of the systems are met by the industry in terms of

  • Messaging Infrastructure (support for Queues and topics). Most of the MQ vendors have adopted to JMS standards and gave API for accessing the MI.

  • Mainframe Infrastructures – These are of BLI/SLI/Data and RPG types. These systems provide for unlocking of existing production systems but at the same time require callable interfaces. Again most of the systems have provided Java API for accessing the systems.

  • Business Process Infrastructure – these are evolved as open standards like BPMN and BPEL4WS etc.. These process infrastructure is supported with Adapters for connecting to the data channels. These are typically supported in Integration Servers of the vendors like Sun's Glassfish with Open-ESB, MS Biztalk server etc..

  • Security Layer – This layer integrates the users with the systems in a secured way. We can call this identity layer also. Here we see AAAs (Authentication, Autherrization and Accounting) for Inter/Intra Organization.

  • Authentication : Kerberos / Directories / X.509 / SSL/TLS etc..

  • Authorization : ACL systems / RBAC systems

  • Here We further talk about the SSO (Single Sign On) and the other inter-operable standards like SAML, WS – Federation, User token profile, CardSpace etc.. WS – Security standards deal with message level security too for maintaining integrity and non repudiation of the message that is traveling. The IDM (Identity Management Suites) comes into picture at this layer and all the major vendors like Sun/MS have their own IDM Suites for comprehensive solutions for organizational needs.

  • Management Layer – When we think of all the above infrastructure and disparate systems talking to each other for different needs, we need a way to manage the solution that is offered from some console. There comes need for Management protocols like SNMP/ WMI/ WBEM/CIM/JMX etc. for managing the application exposed interfaces and configurations. Every integration vendor offers some management connector for deployed applications.

Lets examine some of the layers from the JCAPS perspective and how does JCAPS offers interoperability in my next post.

Monday, July 07, 2008

Moving back to Hyderabad from Bangalore

I moved back to Hyderabad from Bangalore from Jun5, 2008. I was contemplating this move for long but because of several constraints I could not do so. I had to move against odds and also from the current Department and Role and Technology which I am currently very happy with.

After a month or so I now do not have any regrets though for this movement except for parting from the role and technology. I could now have a more balanced life with my family and could work on some basic things relating to personal fulfillment which I was neglecting since long.

Joining kids for Karnatic Music


Previous week I joined both of my kids for attending Music classes. The classes are run by a blind teacher Shri. Ravi Subrahmanyam. He has to his credit given several concerts at Ravindra Bharati.

I got a double benefit from this deal that my wife also started reviving her forgotten stuff.

Tuesday, March 11, 2008

Sun Tech Days 2008 Hyderabad


I recently attended Sun Tech Days event at Hyderabad. I was told that this event one of the biggest event Sun has after the Java One with respect to its attendance with 5000 people attending the same. I was told that around 30% are repeaters. One thing is clear its the biggest developer Tech Days of all with respect to attendees as well as sessions.

There might be couple of reasons for the same the first and foremost the kind of facilities which are excellent at the Hyderabad International Convention Center (HICC) and the other one Java is very popular among the services industry here.

The following are the interesting keynote sessions.
  • First day keynote is from Rich Green went on with JDK, acquisition of MySQL, xVM, happenings with
    GlassFish,
    NetBeans, Solaris and many
    other similar offerings provide a comprehensive suite of products that
    cover the entire portfolio of software. One thing he clearly missed is regarding 'SOA' offering of SUN though it offers a complete SOA stack, when there were many Program managers from the industry.
  • Second day keynote was by Oracle and it has done a beautiful presentation of its SOA Suite -- Fusion. There was one more keynote from David Axmark
    - MySQL
    co-founder. He explained about the following innovations which are a kind of revelations..
    • Storage
      Engine Innovation (Falcon,
      InnoDB,
      PBXT
      & others)
    • "Free" Time Innovation (MySQL proxy,
      Language Connector)
    • Buying Innovation (MySQL
      Cluster

      from Ericsson)
    • Business Innovation (open source in 1996, work with driver support from host of languages, on any platform, all compiled from one
      source code, designed with portability in mind, simple recompile for
      64-bit portability) and other different kinds of innovation give MySQL
      66% of market share in enterprises. Google, Facebook,
      Wikipedia,
      Yahoo, YouTube are some of the prominent names.
  • Thirdday there was a give away for the University students who's shown their mettle at the contest by Sun 'Code For Freedom'. This enthused the participants on the University Day.
I will be talking about the few of the sessions I attended and my feedback on the sessions soon

Saturday, March 08, 2008

NetBeans 6.1 Beta now available

Good news for the NetBeans lovers is that NetBeans 6.1 Beta is now available for download at http://download.netbeans.org/netbeans/6.1/beta.

The most interesting portion for me is the startup time and its has come a long way on that. The other notable features for me from a developers stand point are
  • MySQL support in Database Explorer
  • From documenting the code perspective Javadoc code completion is good
  • JSF 'CURD' Generator is back because of Popular demand
  • Update center modules for AXIS and SOAP UI
The availability of the following plugins makes NetBeans the leader in the RIA+SOA era
  • Visual Web Pack
  • the support for server side scripting with Project Phobos plugin
  • SOA Enerrpise pack with
    • BPEL editing and debugging
    • WSDL Editor with WSDL extensions for file/ftp/jdbc/sap etc.
    • XSD support
    • JAX-WS plugin making the development of Java based webservices easy
  • Integration with Sun's enterprise application server Glassfish + Open - ESB
I guess Eclipse is also catching up with the RIA+SOA world but NetBeans
still has a say there with its editors and BPEL Debugger etc.

Having said tht I feel that one thing that is not so good in NetBeans for making it 'The only IDE
you need!' is the debugger. I see that its the 'vulnerable' place in NetBeans where Eclipse still holds it.

The following things make Eclipse Debugger more attractive
  • Ease of use - even naive user can debug
  • Multi thread debugging
  • Feasibility to attach the source
  • Does not break when there is no source is available rather it does a 'jad' or 'javap' for you and gives the possible structure of the source file
  • If we give the project references it can locate the source file for you.