Tuesday, August 17, 2010
32 bit or 64 bit for web server
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
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
Sunday, October 25, 2009
Send email from UNIX | 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
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
vi editor is throwing error '5826'
export EDITOR=vi