Tuesday, November 9, 2010

Telnet in Windows 7

Today I got an error while trying to use telnet in my windows 7 machine.

Refer this link and resolve this issue.

http://www.question-defense.com/2010/07/23/windows-7-telnet-is-not-recognized-as-an-internal-or-external-command

Tuesday, August 17, 2010

32 bit or 64 bit for web server

We had a confusion on how to go about the webserver, which 30 concurrent users are assumed to be using at a time. The application we are developing has a desktop component and webcomponent. So we decided to go with 32 bit OS for development and 64 bit OS for webserver. Webserver requires more RAM and also better configuration. I shall update this session on what all problems we will face during the course of project in this thread !!

Thursday, July 29, 2010

Data Transfer Object From Client to Server

I am designing a distributed application, and to satisfy a single client request, I found myself making multiple calls to a remote interface, which increases the response time beyond acceptable levels. I found out a solution by using DTO (Data Transfer Object).

When designing a data transfer object, you have two primary choices: use a generic collection or create a custom object with explicit getter and setter methods.

A generic collection has the advantage that you only need a single class to fit any data transfer purpose throughout the whole application. The main drawback of using collection objects for DTOs is that the client has to access fields inside the collection either by position index (in the case of a simple array) or by element name (in the case of a keyed collection). Also, collections store items of the same type (usually the most generic Object type), which can lead to subtle but fatal coding errors that cannot be detected at compile time.

Better option would be going with a DTO class object. In Dotnet, it already provides you with a DTO object called Dataset. You can add DataTables, their relationships and transfer across various modules.

Sunday, June 20, 2010

Perl | Could not dupe : Bad file number

Yesterday I encountered an issue while running the script which does ssh to a remote server using the perl library Net:SSH::Perl. After succesfully perform ssh->login($user) it was stopping the operation while I am trying to do ssh->cmd("/usr/sbin/ping $ipaddress).
After several investigation I found out that after trying to do the ssh->new($host), I am writing close(STDIN). The OS is sun solaris v4. This close of STDIN is creating the problem. I am now using the close STDIN down the line and everything seems to be working perfectly fine now.

Sunday, November 8, 2009

Reflexology

Reflexology is the physical act of applying pressure to the feet and hand with specific thumb, finger and hand techniques without the use of oil or lotion. it is based on a system of zones and reflex areas that reflect an image of the body on the feet and hands with a premise that such work effects a physical change to the body.

Sunday, October 25, 2009

Send email from UNIX | Perl script

This will show you how to send an email from unix server using a perl script.

open (MsgFILE, "> $msgFile");
print MsgFILE "\n I am sending an email to all of you \n";

close(MsgFILE);
print "\n sending mail....\n" if $debug;

open (MAIL,"|(cat $msgFile ; uuencode $file $to_file_name) | mailx -r $from -c $MailCc -s \"$Subject\" $to") or die "Cannot open sendmail: $!";

close MAIL;

To set up SSH Keys - UNIX

The process of creating SSH - Version 2 keys in the destination server is given below.

Login to source server using the your user id
scp id_dsa.pub user@destination_server:./id_dsa.pub


Login to the destination server using the user name and password
cd .ssh
touch authorized_keys2
chmod 600 authorized_keys2
cat ../id_dsa.pub >> authorized_keys2
rm ../id_dsa.pub

Logout from the destination server and try to login from source server again using the following command,

ssh -2 -v user@destination_server
Or
ssh destination_server