Friday, July 25, 2008

: $'\r': command not found in Cygwin

If you happen to have this kind of error for no reason, please make sure you convert your shell script file to UNIX format using any text editor like Notepad++. Initially it seems like a weird error but yet another valid issue with Cygwin + XP editor.

Here is an example, If you create a script in Notepad++

-------------------------------------------------------------------
#!/bin/bash
#
# My Cygwin weird error
#

clear
echo
"Knowledge is Power"
-------------------------------------------------------------------


When you run this script directly from Cygwin (by editing it from Notepad) you might forget to set the file format to Unix. This often result in following error.

-------------------------------------------------------------------

./print_a_line.sh: line 1: $'\r': command not found
Knowledge is Power

-------------------------------------------------------------------

Or,

You can convert them to UNIX format using shell utility dos2unix

So, Thats it! You are set!

Thursday, July 10, 2008

Getting Power of Attorney from Indian Consulate

How to get Power of Attorney from Indian consulate??

You might be thinking "Why is someone creating a blog on how to get POA....??" Well, you are right! there is no big deal with that. But I found it difficult getting this only because "lack of information". So, i thought it would help ppl out there searching for some info on this. After all internet is used for that "Information" Right?!

As I said, No big deal, In two options you can get this done.

1. Going personally to Indian Consulate
2. Getting this document signed through mail


1. Going personally to Indian Consulate.

Make sure you have the following documents....

i. A Completed Miscellaneous form (download it from consulate website)
ii. POA documents to be signed by Consular.
iii. Photo copy (Xerox) of POA document (you need to hand this over to consulate)
iii. Original passport
iv. Photo copy (Xerox) of passport (you need to hand this over to consulate)
v. 2 passport photo (1 is enough for misc form. but you may want to affix a photo on POA and sign on it. This is not consulate requirement though)
vi. $20 for consulate fee.

The consulate (i went to NY consulate) usually opens at 9.30am. The documents are accepted from 10am to 12.30am. You need to wait until 4.30pm to get the documents signed. The guy who is in information center was quite helpful.

DO NOT SIGN ON ANY DOCUMENT (esp. POA). You should do it in front of consulate official at the counter.

Even if you have not taken your photos, there are few photo centers, you could get it in an hour or so.

2. Getting this document signed through mail

i. Misc form and copy
ii. POA documents duly notarized and copy should also be notarized. This is just attestation that you are signing the document in front of some official trusted parties.
iii. Money order for $20 (fee)
iv. Original Passport and a copy

You need to also include return currier charge for consulate to send them back. Please check your consulate site for more information.

Send all these documents in mail and they are supposed to be delivered back in 5-7 working days.

Tuesday, June 17, 2008

Firefox 3 released

After long time buzz, finally Mozilla firefox was released today(17th June 2008). More than 2.5years of development with 3 release candidates, on 11th June, it was announced that 3rd and final release candidate would be released on today.

Compared to Firefox 2, FF three has bucket full of features which may not be visible directly to any common users, However if you want to appreciate the differences, take sometime to go thru this article . And, as expected, new firefox imports all your bookmarks and personal setting (not add-ons yet) from FF2 when you install FF3. It also creates a new installation directry, which would enable you to uninstall the application, in case you dont like it.

I came to know this interesting link which counts each and every downloads across globe. Its amazing to know that the downloads are already reached around 28,61,500 and its still counting. This link was put up with nice flash, to see downloads for each country.

Also check this out, Mozilla Firefox is aiming for Guinness World of records for most downloads in 24hrs.Kewl!! I helped firefox and you??

Is it a new web browser? - Yahoo BrowserPlus™

C'mon guys, give us(web developers) some break!! We are fed up with lot of browsers in existance. Yeah!! see.., there was Netscape initially, IE5 and then came IE6 and Firefox was born (Gecko browser) around 2004-05 then we had Safari (on Unix and Windows) and then came out "the" trouble maker of all IE7 (for some reason, I dont like this guy) and Now, Yahoo BrowserPlus??!!

You got to be kidding me!!! Howmany browser could be supported by us as poor web developers?? These are questions and frustrations was racing in my mind when I came to know about Yahoo BrowserPlus™.

However, after digging little more into this, I felt some relief that it is not web browser as such but these guys are trying to help web developers community. "Cool, these guys are in our side!! :)"

Well, BrowserPlus is like a plugin or Add-on to any web browser.(really?, I did not find anything related to browsers compatibility though). Yahoo also put up some interesting demo's for developers to try.

It worked only on firefox for me. The idea sounds grovvy. However, I am right now doubtful about the compatiblity for all the browsers. I also tried on Opera, but did not work. I hope Yahoo may throw this with more features in future. Would it be a pain reliever (atleast for some extend??)??. Lets keep our fingers crossed!!!

Saturday, June 14, 2008

Weblogic - Aqualogic Service Bus - EAI - Part 2

I hope you are familiar with ALSB Admin console. If you don't have Weblogic ALSB please visit my previous blog for seeting up ALSB on your window machine.

I assume that you have WL server running and you can open Admin console of ALSB (http://localhost:7001/sbconsole/) in a web browser. Please note, if you are installing WL10.0 bundle, the port number for ALSB may be 7021.

How ALSB works:

In a nutshell, ALSB acts as a proxy between client and service (any service lives in server). The proxying is done by creating a Proxy Service and Business Service in ALSB. I hope the below diagram could help you understand the "request" and "respose" flow.



As diagram illustrates, ALSB stands between client and service / server to route the requests and responses. Here, I have shown 2 proxy service and 2 business service. However, a project could have 'n' number of proxy services and business services. If you happen to have more proxy and business services, you may want to touch base with customer support folks regaring performs impact. I would suggest to have more than one ALSB instances to avoid any performance bottle necks. Few jargons definitions are below.

Project in ALSB.

A project is nothing but a group of proxy and business services. You may like to group proxy and business services of billing services in one project and a separate group for order management services.


Proxy Service:


You have guessed it! Proxy service is contacted by the client to eventually get response from target service. ALSB allows developer or ALSB administrator to modify any request data and metadata through Admin console configuration. For example, consider a case, where you have web service, is contacted by two different vendors (clients) with two different XML requests. You don't need to write code to understand both request formats. Instead, ALSB Proxy service could be configured using XQuery to convert the request XML to desirable / server understandable format. This means easy addition of new clients with any changes to Target service, which evetually facilitate easy integration of systems.

Using XQuery programming, literally, all request data or parameters could be modified. If also allows to write logics to decide which business services to contact in runtime. This is one of the key feature of an ESB.

Business Service:

Business service represents target service's URL. Business services are contacted by proxy service to route the requests to target service. If there are more than one target service (multiple instances of same service for scalability), all the URL can be added to single business service. ALSB also provides features for load-balancing of services. Business service also helps to fail-over services. Meaning, if one target service is down, Business service routes the requests to another service when there is an outage encountered by ALSB. It means high availability of your services.

Setting up ALSB:

As mentioned earlier, business services (BS) and proxy services(PS) are grouped under ALSB projects. So, before we create PS, BS, lets create a new project.

1. Open Admin console of ALSB. http://localhost:7001 or http://localhost:7021

2. Go to "Project Explorer" on left panel.

3. Once the Enter project name in text box in "Enter New Project Name:" and click on "Add Project". If the text box is not enabled, please click on "Edit" on top left panel.

4. Project entry is added to the projects table just below that. Click on your project.

5. Select a "Resource" type from drop down options. First we create PS, So, select Proxy service from the option. On selecting PS option, next page should be automatically loaded.

6. Provide, proxy name and make sure you select "Any XML service option. Click on Next>>. As you can see, here, ALSB can support other services like Messaging, WSDL and SOAP services.

7. Select protocol as "http" and leave rest of the options with default values. Click on Next>> to save the settings for proxy service.

Now, you can new proxy serive is added to "Resources" table.

8. Next, create a business service by selecting "Business Service" in the drop down options.

9. Follow the setting wizard. Provide BS name and type. Please make sure you select same type as PS. Click on Next>>.

10. on next page, we have to some important configuration for BS. Select protocol as http and Load balancing Algorithm as round-robin. Provide End point URL of Target service. In our case any website url. Since other options are not much important at this level, please go with default values and click on Next>>.

11. Since, we are dealing with website, select HTTP request as "GET" and leave rest of the options with default values. Go to next page to save the settings.

Now that we have created both proxy service and business service, you might be wondering! "Wait a second, are we not supposed to hook up proxy service with business service???" Yes!! We should!. That's next.

I would recommend to save the configurations so far that we have done by hitting "Activate" button on left top panel. Please note, in ASLB console each time as you modify setting, they are created as sessions. Later, if you find that one of the setting needs to be reverted back to original setting. You can go to "View All Sessions" and clicking on appropriate icon under Options.

if you clicked on Activate button, Click on "Create" again to create a new session.

Configure Proxy Service:

1. Click on your project under project explorer section. In Resources section, click on "Edit Message Flow" icon ( the one is activated) under "Actions" column.

2. On the next page right click on proxy service cover and select "Add Route". Here, as you can see, you can "Add pipeline pair" to add request and response pipelines. Under request and response pipelines, you could "Add Stage" to perform logic operations.

3. So, we have added new Route, Right click on RouteNode1 to select "Edit Route" to modify setting. You can also modify the name of this node to a meaning ful name by selecting "Edit name and Comments".

4. On Edit Route page, click on "Add an Action" --> Communication --> Routing
5. Now, you get new node added to this page. Click on "*" to select which business service should be contacted by this PS. You can also add other Request and Response Actions like modifying header or to perform some logic operations or Log the event to server log file for reporting purposes.

6. "Save All" this settings and Activate the session to be effective.

Here, PS is hooked up with BS. You can contact PS through your browser by typing http://localhost:7001/proxyServiceName
The response should be eventually from the target website URL. Hope you are getting a proper response. You can further explorer to add stage (as mentioned in step 2) and modify request data and headers.

You can also refer below reference documents from BEA site for more information.

References:

1. ALSB tutorial from BEA site.

2. User guide for developer and users from BEA.

3. Overview and ALSB architecture.

4. BEA forum for ALSB.

Tuesday, May 27, 2008

Weblogic - Aqualogic Service Bus - EAI - Part 1

This blog is to gather my learnings and understandings about Weblogic(WL)'s Aqualogic Service Bus (ALSB). Initially, i could not appreciate this awesome product from BEA. ALSB is meant mostly for Webservices and SOAP requests. I was trying to use these functionalities for normal GET and POST requests in RESTful services. Before we proceed further, lets look at some basic SOA jargons.

Service Bus:

Service Bus is considered as Enterprise Application Integration (EAI) tool, that would facilitate easy integration of various services (that are building blocks of any software system). This integration tool is created with various technologies that are opted for software middleware infrastructure. So, please note that ESB is not a programing language itself.

Also, ESB is NOT an app or web server. This is an application (could be web application) that runs in an web container. So, if you want to play with ALSB, you would need both WL server and ALSB. You could download trial version which you can use for 60days.

Basic Features of an ESB:


1. Loose coupling of services in a software system. This would provide great flexibility of modifying / enhancing any part of the system without affecting much on the other dependents.

2. ESB should be standard based and flexible, and should support many transport mediums like Messaging Service, SOAP, XML and text etc.

3. It should allow integration with very less coding. In other words, should be configurable.

4. ESB should be more scalable and highly revolvable.

All other features are added as vendors think it is necessary for an ESB. So, an Architect can select appropriate product based on their needs.

Ok! Lets get our hands dirty.


Installation:


ALSB setup can be (of course, trail version) downloaded from BEA site. I downloaded ALSB 3.0 which comes bundled with WL server 10.0.

There is nothing special about this installation. I just followed the installation setup wizard and it went perfect on my XP machine.

Basic Setup:

As basic setup, I created a user domain for my test project. You don't need to create a new domain, if you prefer to work on example domain, which is created with installation.

So, I created a domain using Start --> All Programs --> Bea Products --> Tools --> Config Wizard. Please follow this link if you have any questions on specific setting.

Once domain is created, start weblogic server from Start --> All Programs --> Bea Products --> User_projects --> --> "Start Server for AquaLogic Service Bus Domain"

Look for server state as running. When server is up and running, it would open Weblogic Admin console automatically. Since we are interested in ALSB and its console, I am not going to discuss about Weblogic Admin Console here.

Weblogic products are considered as one of the best and user friendly because of their Admin Console. All settings and cluster, server maintenance and deployments everything could be done through Admin console.As we expected, ALSB has a Web Admin console, where most of the configuration can be done by just few clicks of mouse.

Ok. I like to wind up this blog at here. So, we have completed the installation of ALSB and before I start next topic, you could play around with various options in admin console to get used to it.

See ya in next blog!

Wednesday, March 5, 2008

Cool Firefox Addon - Tab effect

Hi ppl,

I am back again with a cool stuff this time. (It looks like now a days, I am regular on creating blogs (Ohh hooo!!! A pat myself on the back!). Ok! whatever..! What I have got for you guys? ta da.. A firefox Addon/extension (let me know if you see a difference). This is ever cool stuff is called as "Tab Effect". The developer had done really excellent job creating extension using DirectX 8.

This tab add effects to your "tab changing" event. So, whenever you change tab from one to another, you see the page/tab swiveling to your current screen. I have added a demo video here.



You can grab the Add-on from Firefox site
General Complaints:

I have seen few ppl crying that this addon crashes their browser, when they open their browser with this addon 'enabled'. I think I am one of the luckies person to have this working. If this is not working in your machine, I would suggest you to check with your DirectX version and any specific settings. You can also report your issues/concerns to the author at http://sourceforge.net/projects/tabeffect/.

Sunday, March 2, 2008

A Great Video - Inspiring!!

Hi folks,

As I mentioned in my previous blog, my great entertainment site has been shutdown. So, I spent this weekend on Youtube and found the following list of great videos, listing it for you guys!!

You might have watched this before, they are worth watching them again!!

The Great Video



And making of above video.....

It is really mind-boggling when you see the pain the crews have gone thur to make this video.


Part I



Part II



Part III

Stage6 was shutdown forever

Guys, later last week i came to know that one of the great video streaming site "www.stage6.com" is shutdown forever. This is my great entertainment since it was released. I am a unhappy user just like other 17.4 million user who miss the site.

If you did not get to know abt this side before, please visit this link. Stage6 was capable of streaming Dvd quality videos and if you happen to have broadband internet connection, this was great side to get get video contents raging from "Home made videos" to latest movie entertainment video.

The side was developed to have very good user experience using Ajax cool functionalities.

Sad! Sad! We lost a great side. Now that I am searching for similar kind of site which would provide me same (high quality videos) contents.

join me for the hunt......!!! :-(