HP3000-L Archives

September 2003, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Emerson, Tom" <[log in to unmask]>
Reply To:
Emerson, Tom
Date:
Thu, 18 Sep 2003 11:06:41 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (42 lines)
> -----Original Message-----
> From: Jay Chandru [mailto:[log in to unmask]]
> 
> I am trying to establish a two way REAL TIME sync between 
> HP3000 and Linux.
> Thought sockets would be the way to go if i am looking for 
> something real time.

[I presume you mean "human" real-time -- "computer" real-time is another beast entirely...]

> I want to update the Oracle database sitting on the linux 
> machine with the data from the HP3000 through sockets.

Oracle presents an ODBC interface, does it not?  Could you use something like JDBC on the HP side to drive the transaction processing on the database server? [meaning you won't have to write any part of the "listener" -- that's already been done...]
 
> I presume that we will need to have a Listener program in linux always
> running. [...]

that's the usual case, yes.  An alternate would be to implement RPC on the linux side, which I suppose could be a fun investigative exercise, but truly horrendous to maintain :)

> Have a few questions with regards to the above approach
> 
> 1. Is the approach valid. Is there a better way to achieve this sync?

Another approach that won't require "fancy socket programming" would be to transfer the data in a basic data file [using FTP for instance] then at the end of the transfer, issue a "site" command to run a process on the linux side to process/load the data -- presumably you'll be writing "one transaction" to the file, and since you'll be processing the file in the same "session" as the transfer, the "real-time-ness" of this should be just fine. [we're talking a delay of less-than-a-second to load & execute the program...]

if the "site" command isn't appropriate or accessible, then write a program that opens a telnet session(*) and executes the program in a "pseudo-online" manner -- again, from the HP side of things you're doing all the work "in the same session" [or nearly so], so the timeliness shouldn't be an issue.

A further abstraction of this would be to do the whole thing in this pseudo-online manner: write a program (on the linux side) that accepts data from stdin, then your "session driver" process on the HP would simply run the program and pass the data as if it were typed in from the keyboard [side advantage: a human can run the program manually as well...]

(*) this is the part that can/would require writing "socket stuff" on the HP side only -- you would connect to the normal "telnet" port on the linux system, then issue socket writes to do the login, program execution, and data-to-be-passed-as-input (and presumably an exit/logout command to close the session)


> 2. If i am to write the listener program in linux, should i 
> be using any programming language to code the listener or can i use the 
> linux intrinsics.

Linux "intrinsics" are the various "C libraries", most of which exist on the HP as well, so if you're comfortable writing socket-stuff using the C library, well, you're already there...

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2