c0nnexx10n : C0nnect1ng L1fe w1th Techn010gy

Byte by Byte Impressions on Technology, People and Process !

Archive for the ‘Architecture’ Category

Installing Apache 2.2.11 with Weblogic 10.3 on Ubuntu 9.04 64 bit

Posted by Vikas Hazrati on Saturday, October 10, 2009

This post takes you through the steps to install Apache 2.2.11 on Ubuntu 9.04 64 bit and make it work with Weblogic 10.3. The post walks through the steps that I followed, the problems that I faced and the solutions ( er..hacks) to get them resolved.

Installing Apache

  • Is simple do

sudo apt-get install apache2

If you want to build it from sources then follow these steps.

  • Once you have installed apache2 then the installation happens at the following locations in Ubuntu

Apache config files are in /etc/apache
Apache log files are in /var/log/apache
Apache libs are in /usr/lib/apache
Other files can be in /usr/share/apache, /var/lib/apache
executables in /usr/sbin apache and apache2ctl

  • Now to start apache execute the following

vhazrati@vhazrati-laptop:/usr/sbin$ sudo apache2ctl start

  • Note that the server is started as a root, else you might get the following error

(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

You should be able to access the default page on http://localhost now and see It Works!

Now, Integrating with Weblogic

Read the rest of this entry »

Posted in Architecture, Java, Weblogic, linux | 1 Comment »

Difference between Abstraction, Encapsulation and Information Hiding

Posted by Vikas Hazrati on Friday, June 5, 2009

So this one completes the hat-trick on blogs related to differences in succession.

Today during our discussion about defining service orchestrations we came up with the argument about the difference between Encapsulation and Information hiding. I cover abstraction here as a bonus ;)

Abstraction – in a nutshell is making visible what you want the external world to see and keeping the other details behind the wraps. Abstraction, as a process, denotes the extracting of the essential details about an item, or a group of items, while ignoring the inessential details. It hides the complexity. It is a technique by which we decide what information to hide and what to expose.

Information hiding - is making inaccessible certain details which would not affect other parts of the system. Just hiding it so that it is not exposed.

Encapsulation - is like enclosing in a capsule. That is enclosing the related operations and data related to an object into that object.If encapsulation was “the same thing as information hiding,” then one might make the argument that “everything that was encapsulated was also hidden.” This is obviously not true. For example, even though information may be encapsulated within record structures and arrays, this information is usually not hidden and is available for use. Encapsulation is just getting a set of operations and data together which belong together and putting them in a capsule.

Abstraction, information hiding, and encapsulation are different but related. Abstraction is a technique that helps us identify which specific information should be visible, and which information should be hidden. Encapsulation is the technique for packaging the information in such a way as to hide what should be hidden, and make visible what is intended to be visible. Encapsulation can be thought of as the implementation of the abstract class.

Posted in Architecture | 3 Comments »

Pull or Push, What do you like?

Posted by Vikas Hazrati on Thursday, June 4, 2009

There is enough confusion and debate about what is the best model for publishing from a CMS based system. Some advocate the pull model and others the push model based on the ability to scale and be more reliable.

Let us see the pros and cons of these

Pull

  • Suited for highly dynamic content
  • Suitable for situations in which you want to feed content based on personlization.
  • Pull CMS must be used with caching for ensuring faster reads and content independence.
  • Can feed data on demand and does not need time based or trigger based push mechanism

Push

  • Content Independence – if the CMS engine or database is unavailable the site could be down but with push, users would not know
  • Pull CMS with it’s server side scripting language and database requirements could place a higher load on a server than a Push CMS, at least during heavy usage hence Push would be useful for static content with a lot of reads.
  • Is server independent, it can push a set of HTML files in a web server independent format for consumption
  • Should have a schedule based or trigger based push mechanism

Theoretically, one can achieve push benefits by using pull+caching and hence all the benefits and dynamicity of pull come along with it.

Any page with the need of frequent updates such as real time statistics, user comments, automated relevant links and a host of other things would become stale pictures of the “baking” moment in a push environment such as described.

  1. Information on push
  2. Comparison between push and pull

Posted in Architecture | 2 Comments »

Non Functional Requirements: The Usual Suspects

Posted by Vikas Hazrati on Monday, April 20, 2009

In Part-I of this series we looked at what non-functional requirements were and how different people react to non-functional requirements.

nfrs

Ask any team what do we mean by NFRs and most probable answer would be the following and most probably in the order mentioned below

  • Performance
  • Scalability
  • Availability
  • Security
  • Maintainability
  • Reliability

If you come up with a different list on your first pass when asked about NFRs, let me know.

The NFRs which would generally give the biggest bang for your buck are Performance, Scalability, Reliability and Availability. Once you have taken care of these I would recommend looking at the others like Security, maintainability, re-usability, usability etc.

So lets us look at them one by one

Read the rest of this entry »

Posted in Agile, Architecture, Better Software, Java | 1 Comment »

How to Scale Your Web Application Without Looking Outside?

Posted by Vikas Hazrati on Saturday, March 7, 2009

You create a web application. The application becomes popular and you start getting a lot of traffic. Traffic which you had not imagined. The drawback … the response time increases, the threads on your web servers start building up and the application starts to get on its knees.

Under these circumstances what most organizations would do is to start looking externally at promise the world tools like terracotta, memcache, in-memory data grid, etc etc.

Nothing wrong with that and probably you would need them anyway but before getting there it might be worthwhile to look internally to see if there is stuff which could be done with the application. This includes

picture1_2 Read the rest of this entry »

Posted in Architecture, Better Software | Leave a Comment »

Getting Ready for SaaS

Posted by Vikas Hazrati on Monday, February 16, 2009

With the current economic situation, more often than not, organizations would be evaluating various options available to get more for the buck. 2009 would be remembered as an year where almost everybody is keeping their fingers crossed and praying to finish the year unscathed.

Given the current scenario the SaaS model fits well with the plans of many organizations. It sits at a sweet spot between build versus buy and gives the desired economies of scale.

However, before getting onto the SaaS bandwagon there are an important set of questions that the organization needs to answer. The mindmap below tries to summarize them.

Read the rest of this entry »

Posted in Architecture, Better Software, Infrastructure | 1 Comment »

Active Versus Passive Exception Handling

Posted by Vikas Hazrati on Friday, January 23, 2009

Exception handling is an important tool. The effective use of this tool would help in improving the reliability and availablility of the system.

Reliability is termed as the probability of failure-free software operation for a specified period of time in a specified environment. With good exception handling the system would be able to take corrective action and/or take an action which would ensure that the software will not fail.

Availability is defined as the uptime and is inversely proportional to the downtime and the recovery time. Good exception handling would ensure that if there is a failure then the problem can be isolated quickly and the recovery time is fast.

Thus effective exception handling would help both the reliability and availability of the software.

Lately there has been the much desired shift towards unchecked exceptions. Earlier, the client code had to catch a number of exceptions even though there was little that the client could do in scenarios such as programming errors or resource related errors.

What do you expect the client to do when the database is down? The best way would be to throw an unchecked exception through your layers and finally the presentation tier would deal with it so that the end user can see a relatively decent message on the screen.

Exception handling can be further classified into Active and Passive

  • Passive Exception Handling is when the exception is logged onto a file. Now the message would remain there unless someone looks at it and then acts upon it.
  • Active Exception Handling is when the exception message is pushed across for attention. An example would be to page the person or email the support group when an exception occurs. This push sends the message to the radar of concerned people/systems rather than waiting in a log file to be acted upon.

For critical pieces of the software it is essential that a strategy which combines active and passive exception handling is considered so that any failure is immediately looked upon so that recovery is faster. The reliability would also be higher as with active exception handling the faults would be potentially contained before they become failures.

Posted in Architecture | Leave a Comment »

How does Oracle GUID work?

Posted by Vikas Hazrati on Thursday, January 15, 2009

I was having a discussion with my colleague this morning about the guarantee that Oracle GUID would be unique on multiple horizontal stacks that we are deploying our application to.

My understanding is that for generating Pseudo random numbers you need to have some seed to start with, I was wondering what seed does GUID use to ensure that it is mathematically unique. Following is the answer that I discovered on the net.

“A Globally Unique Identifier or GUID is a pseudo-random number used in software applications. Each generated GUID is “mathematically guaranteed” to be unique. This is based on the simple principal that the total number of unique keys (2^64) is so large that the possibility of the same number being generated twice is virtually zero.

SYS_GUID generates and returns a globally unique identifier (RAW value) made up of 16 bytes.

On most platforms the generated identifier consists of a

  • host identifier,
  • a process or thread identifier of the process or thread invoking the function,
  • and a non-repeating value (sequence of bytes) for that process or thread.

Posted in Architecture, Database, General | Tagged: , | Leave a Comment »

Is the Cloud Storage Right for Your Business Data?

Posted by Vikas Hazrati on Thursday, December 25, 2008

Of late there has been a lot of interest in the Cloud owing to the promise of

  • Cost Saving
  • Scalability
  • Availability
  • Flexibility – On Demand capacity

Further, reports suggest that spending on IT Cloud services would reach $42 Billion by 2012 and in another year i.e. by 2013 a quarter of the IT spending growth goes to cloud based services. So in 3 years from now we would see a gradual explosion in the Cloud based services and a lot of it would go to the Cloud Storage.

storagecloud

Again, for Cloud storage cost is being touted as the biggest factor. This is because there would be a lot of saving in physical infrastructure, managing and monitoring. However, the critical factor apart from cost is the type of data being stored on the cloud.

Read the rest of this entry »

Posted in Architecture | Leave a Comment »

Drupal versus Joomla, How Did I Decide?

Posted by Vikas Hazrati on Wednesday, December 10, 2008

The CMS space is dominated by PHP solutions. Coming from a Java background I would have been happy to work with a CMS solution like OpenCMS or Magnolia but then, as you would have heard, wearing the Architect’s hat you have to be technology agnostic. Or, may be putting it is a better way less biased towards the technology that you like.

So I have worked on some commercial CMS solutions like Documentum and Weblogic CMS but obviously this time around I am not looking to pay for a solution. What are the solutions that we have in the open source space? We have a site called OpenSourceCMS that allows you to try out a demo of the potential candidates and then make up your mind. It has a wide variety of CMS solutions and you pick the one that you need. It also has a list which compares the CMS solution based on user rating.

So from here you can get some idea on what CMS are doing well as per the users. Taking the number fo hits, counts and user rating I narrowed down to 2 possible candidates Drupal and Joomla.

Next, I viewed the demos for the two at OpenSourceCM,

Read the rest of this entry »

Posted in Architecture, CMS | 6 Comments »