Re: Processing Streamed Data
Robert DiFalco <[email protected]>
| Newsgroups | gmane.comp.java.sun.rmi |
|---|---|
| Message-ID | <[email protected]> |
FWIW, my current guess would be to make an Externalizable class with no
data, and do all my database queries in #writeExternal flushing the data
as appropriate. The client side logic for what to do with the streamed
data would be in #readExternal. The client wouldn't really do anything
with the returned object. Just something like this:
Object o = server.readStreamedData();
The server would just implement the remote method like so:
public Object readStreamedData() ...
{
return new MyExternalizable();
}
Seems like cheating, but given that I can't find any preferred ways to
do this with RMI, it seems like this would work. Thoughts?
R.
-----Original Message-----
From: Robert DiFalco
Sent: Thursday, May 12, 2005 10:40 AM
To: [email protected]
Subject: Processing Streamed Data
I have a large set of data to process, consider say 400,000 records read
from a database that I want to pass to another machine to build a local
copy of the data.
I would like the client to make a request for the data and then setup an
ObjectInputStream to receive the streamed data from the server. The
server would just create an ObjectOutputStream and write the objects one
by one, with the client processing them with its ObjectInputStream until
EOF is hit.
What approach should I take for doing this with RMI, just using sockets
it would be pretty simple. Is there already an established protocol
(besides marshalling) that I could use to do this with RMI?
TIA,
R.
========================================================================
===
To unsubscribe, send email to [email protected] and include in the
body of the message "signoff RMI-USERS". For general help, send email
to [email protected] and include in the body of the message "help".
For a list of frequently asked RMI questions please refer to:
http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html
To view past RMI-USERS postings, please see:
http://archives.java.sun.com/archives/rmi-users.html
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff RMI-USERS". For general help, send email to
[email protected] and include in the body of the message "help".
For a list of frequently asked RMI questions please refer to:
http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html
To view past RMI-USERS postings, please see:
http://archives.java.sun.com/archives/rmi-users.html