Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting a Middle Tier and Blob/File Transfer

Status
Not open for further replies.

sleonard

Technical User
Mar 3, 2003
3
GB
I currently have a 2 tier application which I need to bring into the 21st Century by creating a Middle tier with all the advantages that will bring.

My problem is that some of the access to the storage/persistence layer is via an API which takes a file handle from the client. The API then writes a file from the server to the referenced area on the client.

If I create a DCOM object and place it on the middle tier, what will happen if I pass it a client file handle to be used in the same API call?

I hope that makes sense and hope someone can help.

Stephen ...
 
>> if I pass it a client file handle to be used in the same
>> API call?

if i follow you, that will fail since the file handle was opened on a different machine it will not be valid on the remote machine.

The client will have to stream the file bytes to the server in your new architecture.

-pete
 
Thanks pete,

I had thought as much but wanted some confirmation before I got stuck into testing it.

I think the problem in my case is streaming the bytes from the server to the client. Can you suggest a method for doing this?

I'm toying with several options, including mapped network drives (Ugly) and socket connections (still not ideal but much nicer).

Thanks again for your comments

Stephen ...
 
what is the client environment - OS, development language/tools?

I have been doing Socket dev since 1994 so for me it's it's usually my first choice. It is just so solid.

-pete
 
I just left a project where we needed the client on a web browser to upload a file to Domino (Lotus's Web server...YUK) and the Web Server called a COM object on an application server that ultimately put it into a SQL database. Now what we did was to have the client app (in this case the Web server is the client app) read the file into a binary array and pass that Binary array to the COM object's method as a parameter. The method then uploaded the contents of the file to the database.
Benifit of this method is that no "Shared" drive is needed.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top