users@glassfish.java.net

Re: TCP to HTTP % HTTP to TCP convertion

From: Dick Davies <rasputnik_at_hellooperator.net>
Date: Tue, 7 Oct 2008 16:55:11 +0100

On Tue, Oct 7, 2008 at 4:25 PM, <glassfish_at_javadesktop.org> wrote:
> no i dont want to write my own protocol i need tcp ...

TCP is just going to let you open a connection. It's like a dialtone on a phone
- a low-level signalling protocol.

To do anything useful, you need to work out how the conversation is
going to work on
top of that e.g.

client says : I want this thing
server says: ok, here you are. It's X bytes long and this kind of object
client says: I have some data, it's N bytes long. Can you send it to
this object.
server says: sure, that worked.

How the server understands what client is saying, what is a valid
thing to say etc is
a whole other protocol layered on top of the first.
This is exactly how HTTP and TCP work.

You say you want to convert DICOM to HTTP. Which is more like
translating English speech to French .
But they both run over TCP*, same as all telephones use electricity.
[ * I assume, I've never heard of DICOM. ]

if you want to use an HTTP server for this, you're goyng to have to
write a DICOM->HTTP translator
to do this. Unless the DICOM protocol maps one to one to HTTP, you're
on a hiding to nothing.
An HTTP appserver doesn't seem to be the right tool for the job, unfortunately.


-- 
Rasputnik :: Jack of All Trades - Master of Nuns
http://number9.hellooperator.net/