(e-mail address removed) said:
I m fairly new to programming. The problem that I need to solve this
time is we have BEA Weblogic 8.1 installed on our server here and there
are client installations on about 20 workstations all running on UNIX.
Now, what I need to do is write a java/perl program/script to get the
data from a file from each of these workstations at every 2 minutes
interval and store those data in a temp folder on my server. Now, can
somebody help me find how do i go about programming this ? What
language do i use to do this ? And how will I read the data from the
clients PC ?
Any help will be much appreciated,
Even if the help comes in form of questions?
I hope these questions help you to refine your problem.
- what do you mean by "client installation" -- what client?
- does it matter which end initiates the data transfer - so does it
have to be the server that initiates the data transfer, or is it
enough to trust the clients to push the data to the server at the
required intervals?
- what kind of acucracy do you need for the "every two minutes"?
If it's ok for the clients to push the data, and the timing accuracy
needs are not too strict, you might be able to just write (in a language
of your choice) a small program making an HTTP POST request from the
clients to the server, pushing the data and needed metadata in the
request. You'd also need a small application written on top of your
WebLogic server to process and store the received data according to
your needs. You'd time this with the regular Unix 'cron' subsystem.
Still pushing the data, but if the 'cron' accuracy is not enough (task
starts with cron may be few seconds off), you'd need to create your
own server application to run continuously on the clients, which then
would do the HTTP POSTs with better accuracy than achievable with
just 'cron'. In both cases, I recommend running 'ntp daemon' on the
client machines to synchronise their clocks with some common time
source (even just one of the client machines, or, if possible, with
the server machine).
Then to the worst situation; if you have a requirement that all data
transfers be initiated by the server. If this is the case, you'll need
to write some network-lisetening server application to be continuously
run on all of your client machines. Be careful with security issues,
if this is the case -- it's all too easy to create security problems
when writing network-listening programs. For this requirement (transfers
initiated by the server) there just is no other way: there has to be
something on the clients that co-operate with the data gathering program
running on the server. And yes, you'll have to write also the server
data gathering program from scratch in this case; the WebLogic software
will not help for building this. The timing options here are again
'cron' (with a one-shot/short-running server program), and a long-running
server program doing the timing internally.
Both of the languages you proposed have the necessary tools for building
all this functionality. Mostly the language choice depdends on the
development experience you have available to the project.