06-20-2017
I will write this assuming that the place they are generated/written is Site A and they have clients in Site B.
Even though they two sites may only be 20 miles apart, you may find that there is a much smaller link between the sites. It is common to have 100Mb network at both sites, but only a 2Mb link between them. For small files being read at Site B that is not a problem. The issue is with larger files. I would suggest having a process to get a copy of files to Site B. You could implement some logic like this:-
- When a large file is written to Site A, you should save a timestamp in a reference file and begin a copy to Site B. You can copy however you like, be that (s)ftp, rcp/scp, rsync or anything else that works for you.
- When reading a larger file at site B, read the Site A reference file first and get the timestamp, comparing it with the timestamp of the local file. If the Site B file is up to date, read the local file; if not then read the Site A file.
An alternate may be to remove the Site B file when a new file is written to Site A and atomically copy the file to Site B. That way the Site B client just has to read the Site B file. If that fails (i.e. there is no file) then read the Site A file.
Would either of these work for you?
I hope that it helps,
Robin
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am facing a weired problem in my FTP script. I want to transfer multiple files from remote server to local server everyday, using mget * in my script. I also, want to send an email for successful or failed FTP. My script works for file transfer, but it don't send any mail. There is... (2 Replies)
Discussion started by: berlin_germany
2 Replies
2. HP-UX
want to remove the thread
thanks (2 Replies)
Discussion started by: indira
2 Replies
3. Shell Programming and Scripting
want to remove this thread.
thanks (2 Replies)
Discussion started by: indira
2 Replies
4. UNIX for Dummies Questions & Answers
Good evening
I need your help pease
I know there are 2 commands(diff, or cp) to compare files in a directory. but the question arises:
1. can i compare zip files or ive got to unzip them?
2. how can i compare 2 files from a local to a remote server? (is there any special commad or ive got... (4 Replies)
Discussion started by: alexcol
4 Replies
5. UNIX for Dummies Questions & Answers
Hi experts,
I 'm newbie to unix world, now I have task to copy the latest files from remote server to my local. I believe this must be very common request in this community. I want you do it one more time for me please.
My requirement is something like this:
I receive files in the below... (3 Replies)
Discussion started by: parpaa
3 Replies
6. Solaris
Hi,
I am trying to automate the process of fetching files from remote server to local server through sftp. I have the username and password for the remote solaris server. But I need to give password manually everytime i run the script.
Can anyone help me in automating the script such that it... (3 Replies)
Discussion started by: ssk250
3 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
I am new to SHell scripting, can someone please help me with the below requirement.
1) LFTP a file to a remote server which supports FTPS. My current enviroment is Sun Solaris 5.10
2) I need to incorporate this in a shell which is currently sending files to a server that accepts... (1 Reply)
Discussion started by: subbu
1 Replies
8. Shell Programming and Scripting
Hi All
I need to transfer a file from a UNIX server to a windows server.
I saw that it is possible to do this using scp command by looking at the forum listed below:
... (2 Replies)
Discussion started by: vx04
2 Replies
9. Shell Programming and Scripting
Hi Guyz ,,
I'm an ERP functional guy , I really need to automate a script which required a shell script but have a little knowledge in shell scripting.
I need my generated files to be zipped first in one directory lets say (xyz) and then it needs to transfer another ftp server in... (3 Replies)
Discussion started by: Shogundion
3 Replies
10. Shell Programming and Scripting
Hi Team,
I am currently working on an integration project where in we have planned to receive files from an external source onto our system via FTPS(SSL). I am new to this part and would like to know the points for consideration and the points to learn to get this done. The files we receive from... (1 Reply)
Discussion started by: Rads
1 Replies
LEARN ABOUT DEBIAN
tfbs::site
TFBS::Site(3pm) User Contributed Perl Documentation TFBS::Site(3pm)
NAME
TFBS::Site - a nucleotide sequence feature object representing (possibly putative) transcription factor binding site.
SYNOPSIS
# manual creation of site object;
# for details, see documentation of Bio::SeqFeature::Generic;
my $site = TFBS::Site
(-start => $start_pos, # integer
-end => $end_pos, # integer
-score => $score, # float
-source => "TFBS", # string
-primary => "TF binding site", # primary tag
-strand => $strand, # -1, 0 or 1
-seqobj => $seqobj, # a Bio::Seq object whose sequence
# contains the site
-pattern => $pattern_obj # usu. TFBS::Matrix:PWM obj.
-);
# Searching sequence with a pattern (PWM) and retrieving individual sites:
#
# The following objects should be defined for this example:
# $pwm - a TFBS::Matrix::PWM object
# $seqobj - a Bio::Seq object
# Consult the documentation for the above modules if you do not know
# how to create them.
# Scanning sequence with $pwm returns a TFBS::SiteSet object:
my $site_set = $pwm->search_seq(-seqobj => $seqobj,
-threshold => "80%");
# To retrieve individual sites from $site_set, create an iterator obj:
my $site_iterator = $site_set->Iterator(-sort_by => "score");
while (my $site = $site_iterator->next()) {
# do something with $site
}
DESCRIPTION
TFBS::Site object holds data for a (possibly predicted) transcription factor binding site on a nucleotide sequence (start, end, strand,
score, tags, as well as references to the corresponding sequence and pattern objects). TFBS::Site is a subclass of Bio::SeqFeature::Generic
and has acces to all of its method. Additionally, it contains the pattern() method, an accessor for pattern object associated with the site
object.
FEEDBACK
Please send bug reports and other comments to the author.
AUTHOR - Boris Lenhard
Boris Lenhard <Boris.Lenhard@cgb.ki.se>
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are preceded with an underscore.
TFBS::Site is a class that extends Bio::SeqFeature::Generic. Please consult Bio::SeqFeature::Generic documentation for other available
methods.
new
Title : new
Usage : my $site = TFBS::Site->new(%args)
Function: constructor for the TFBS::Site object
Returns : TFBS::Site object
Args : -start, # integer
-end, # integer
-strand, # -1, 0 or 1
-score, # float
-source, # string (method used to detect it)
-primary, # string (primary tag)
-seqobj, # a Bio::Seq object
-pattern # a pattern object, usu. TFBS::Matrix::PWM
pattern
Title : pattern
Usage : my $pattern = $site->pattern(); # gets the pattern
$site->pattern($pwm); # sets the pattern to $pwm
Function: gets/sets the pattern object associated with the site
Returns : pattern object, here TFBS::Matrix::PWM object
Args : pattern object (optional, for setting the pattern only)
rel_score
Title : rel_score
Usage : my $percent_score = $site->rel_score() * 100; # gets the pattern
Function: gets relative score (between 0.0 to 1.0) with respect of the score
range of the associated pattern (matrix)
Returns : floating point number between 0 and 1,
or undef if pattern not defined
Args : none
GFF
Title : GFF
Usage : print $site->GFF();
: print $site->GFF($gff_formatter)
Function: returns a "standard" GFF string - the "generic" gff_string
method is left untouched for possible customizations
Returns : a string (NOT newline terminated! )
Args : a $gff_formatter function reference (optional)
location
start
end
length
score
frame
sub_SeqFeature
add_sub_SeqFeature
flush_sub_SeqFeature
primary_tag
source_tag
has_tag
add_tag_value
each_tag_value
all_tags
remove_tag
attach_seq
seq
entire_seq
seq_id
annotation
gff_format
gff_string
The above methods are inherited from Bio::SeqFeature::Generic. Please see Bio::SeqFeature::Generic for details on their usage.
perl v5.14.2 2008-01-24 TFBS::Site(3pm)