This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Got a Tandem legacy system, ugly screens, Online servers, and data, all on the Tandem. Self-studied Java, then went to Java class for a week. Meanwhile, I rewrote an ugly legacy screen in Java and rewrote the screen's Tandem data server in C. Requests and responses are FTP'd back and forth to test functionality. The Java "interface" is merely a fileWriter and a fileReader. The Java I/O is split off into a separate little class, with a RqstMethod and a RespMethod, but it's really no big deal. I knew I was writing a client/server app with a giant Black Hole for connectivity, but I thought surely there'd be a plug & play solution to fill the gap. I mean like we're a big company with scads of web applications, I thought surely there'd be a company approved methodology for filling the black hole I created. But, it's pretty clear that there isn't any money in my group's budget to pay another group in the company to tell us how eliminate this web connectivity black hole. Instead of concrete help, my coworkers merely talk about using an NT server they found gathering dust in a spare room and suggest I should rewrite my Java to be a servlet that would respond to the User with web pages. Up to today my attitude has been to hide in my office focussing entirely on my 2 end pieces and hope that somebody will eradicate my Black Hole for me, but today a co-worker let me know that he bought 2 Java networking books for our group's "Java library", implying that I should use them for ideas on establishing web connectivity, and it pissed me off, you know? I mean like I spent a lot of time writing the Java code and corresponding C data server, why should I also have to write the network server, and hook it all up by myself? I don't know squat about web connectivity. Any comments on how I could simply accomplish some basic web connectivity?
I can't quite work out what you need from your post, but I'll have a stab at it. You have some sort of Java client application which has a graphical UI and reads/writes data to a "file". You have some sort of data server written in C, running on the Tandem system but I don't know what sort of IO you use with that. If both systems expect to read/write to files, the simplest answer might just be to use one of the remote file systems. Can both of your machines use NFS? SAMBA? Anything equivalent? Otherwise what sort of network access do you have from the two machines? Do you have a web server on the Tandem which can run CGI scripts? Do you have any sort of terminal emulation software which you can use from Java on your client machine? If you can answer some of these questions we can probably make some progress.
Thanks for your reply. Sorry that my initial post mostly just vented my frustration, but didn't give much useful information. Here's the Tandem part: TCPIP Line Handler listens on a TCPIP port/line and routes requests to the data server, which reads Key Sequenced files (think IBM VSAM) with realtime data, then the data server formats a response, which goes back out on the port/line. Don't worry about the Tandem side, it's handled. Talking to the Tandem, I envision a Jave Servlet running on an NT server, with the Java Servlet executing a "Socket" class call. You can think of the Tandem Line Handler having already done the equivalent of a "ServerSocket" call. To me, all of this seems trivial, easily doable. Jumping to the other side of my Black Hole, I have a combination application/applet written in Java. It needs to be an application to handle the fileReader and fileWriter intermediate testing I/O. However, when the Black Hole is bridged, I envision the Java I've already written coming from the Servlet as a "web page" that has my applet imbedded in some minimal Html. I envision the fileReader and fileWriter stuff replaced by InputStream and OutputStream exchanges between the Applet and Servlet. I envision the Applet and the Tandem exchanging requests and responses, with Servlet mostly just a pass thru. I envision the Applet as a thick client that builds requests when buttons are pressed and populates TextFields and Labels with data obtained by parsing responses that arrive as a flat stream of data from the Servlet, which merely passed thru the Tandem response. My question is therefore, how do I get the Applet and Servlet talking in the manner I've described. I've read about the Applet "tunneling" to the Servlet, with the aid of a "web server", but I don't understand this much. How is the first page requested? How are subsequent pages requested? Where does the web server reside? Is the web server like a pass thru between the applet and servlet? Is the Applet/Servlet exchange in JSP (Java Server Page) protocol?