Web Service Toolkit - Notify the Client

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Web Service Toolkit - Notify the Client

Johann Glaser
Hi!

I'm going to implement a data logger and a GUI frontend in FreePascal.
One (daemon) program gets data from a device connected via USB and
stores it to a file. A second program, the GUI frontend, connects to the
daemon and can retrieve the measured data and other stuff. Additionally
it can send commands to change the measurement settings.

All this is quite a typical application for RPC, so I plan to use the
Web Service Toolkit with SOAP.

Usually the frontend does a remote procedure call to the backend. There
is one important problem I'm facing now. I want the backend (service
provider) to notify the frontend (service consumer) as soon as a new
measurement value has arrived. So this is the reverse direction of
communication.

Is this possible? Can you please point me to information how to
accomplish this?

Thanks
  Hansi

--
Johann Glaser   <[hidden email]>
   Vienna University of Technology
       Electrical Engineering
____ http://www.johann-glaser.at/ ____

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Web Service Toolkit - Notify the Client

Michael Van Canneyt


On Sun, 3 Jun 2007, Johann Glaser wrote:

> Hi!
>
> I'm going to implement a data logger and a GUI frontend in FreePascal.
> One (daemon) program gets data from a device connected via USB and
> stores it to a file. A second program, the GUI frontend, connects to the
> daemon and can retrieve the measured data and other stuff. Additionally
> it can send commands to change the measurement settings.
>
> All this is quite a typical application for RPC, so I plan to use the
> Web Service Toolkit with SOAP.
>
> Usually the frontend does a remote procedure call to the backend. There
> is one important problem I'm facing now. I want the backend (service
> provider) to notify the frontend (service consumer) as soon as a new
> measurement value has arrived. So this is the reverse direction of
> communication.
>
> Is this possible? Can you please point me to information how to
> accomplish this?

This is not possible in SOAP, unless you do continuous polling.

I believe there are some Microsoft extensions which allow asynchronous
notifications, but they are not implemented in SOAP and also not in WST.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Web Service Toolkit - Notify the Client

Johann Glaser
Hi!

> > Usually the frontend does a remote procedure call to the backend. There
> > is one important problem I'm facing now. I want the backend (service
> > provider) to notify the frontend (service consumer) as soon as a new
> > measurement value has arrived. So this is the reverse direction of
> > communication.
> >
> > Is this possible? Can you please point me to information how to
> > accomplish this?
>
> This is not possible in SOAP, unless you do continuous polling.

Is it possible to delay a SOAP call a few seconds at the service
provider (until new data is available)? Hmm, this reveals the question
what are the timeouts for TCP/IP connection and for the web services?

Bye
  Hansi

--
Johann Glaser   <[hidden email]>
   Vienna University of Technology
       Electrical Engineering
____ http://www.johann-glaser.at/ ____

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Web Service Toolkit - Notify the Client

Michael Van Canneyt


On Sun, 3 Jun 2007, Johann Glaser wrote:

> Hi!
>
> > > Usually the frontend does a remote procedure call to the backend. There
> > > is one important problem I'm facing now. I want the backend (service
> > > provider) to notify the frontend (service consumer) as soon as a new
> > > measurement value has arrived. So this is the reverse direction of
> > > communication.
> > >
> > > Is this possible? Can you please point me to information how to
> > > accomplish this?
> >
> > This is not possible in SOAP, unless you do continuous polling.
>
> Is it possible to delay a SOAP call a few seconds at the service
> provider (until new data is available)? Hmm, this reveals the question
> what are the timeouts for TCP/IP connection and for the web services?

I think a few seconds are possible, a timeout is usually longer than
that. The webservices do not specify any values for timeouts. I'm not
sure whether the HTTP protocol has such definitions, but I would be
surprised if it had.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Web Service Toolkit - Notify the Client

John Coppens
On Sun, 3 Jun 2007 16:55:23 +0200 (CEST)
Michael Van Canneyt <[hidden email]> wrote:

> > Is it possible to delay a SOAP call a few seconds at the service
> > provider (until new data is available)? Hmm, this reveals the question
> > what are the timeouts for TCP/IP connection and for the web services?
>
> I think a few seconds are possible, a timeout is usually longer than
> that. The webservices do not specify any values for timeouts. I'm not
> sure whether the HTTP protocol has such definitions, but I would be
> surprised if it had.

If using the HTTP protocol, it's possible to define a refresh time of x
seconds using a meta-tag:

<META HTTP-EQUIV="refresh"
   CONTENT="3;URL='http://www.homepage.com/spot3.html'">

This is quite popular with webcams and such. But this is of course not
the definition of a timeout value, you would have to know when the next
value is due.

John
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Web Service Toolkit - Notify the Client

Johann Glaser
In reply to this post by Michael Van Canneyt
Hi!

> > Is it possible to delay a SOAP call a few seconds at the service
> > provider (until new data is available)? Hmm, this reveals the question
> > what are the timeouts for TCP/IP connection and for the web services?
>
> I think a few seconds are possible, a timeout is usually longer than
> that. The webservices do not specify any values for timeouts. I'm not
> sure whether the HTTP protocol has such definitions, but I would be
> surprised if it had.

Thanks. I'll try it this way.

Bye
  Hansi


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Web Service Toolkit - Notify the Client

Michael Van Canneyt
In reply to this post by John Coppens


On Sun, 3 Jun 2007, John Coppens wrote:

> On Sun, 3 Jun 2007 16:55:23 +0200 (CEST)
> Michael Van Canneyt <[hidden email]> wrote:
>
> > > Is it possible to delay a SOAP call a few seconds at the service
> > > provider (until new data is available)? Hmm, this reveals the question
> > > what are the timeouts for TCP/IP connection and for the web services?
> >
> > I think a few seconds are possible, a timeout is usually longer than
> > that. The webservices do not specify any values for timeouts. I'm not
> > sure whether the HTTP protocol has such definitions, but I would be
> > surprised if it had.
>
> If using the HTTP protocol, it's possible to define a refresh time of x
> seconds using a meta-tag:
>
> <META HTTP-EQUIV="refresh"
>    CONTENT="3;URL='http://www.homepage.com/spot3.html'">
>
> This is quite popular with webcams and such. But this is of course not
> the definition of a timeout value, you would have to know when the next
> value is due.

Yes,  but:

1. This is HTML, not HTTP. SOAP doesn't use HTML, it uses XML.
2. Even so, it's up to the client to actually implement the refresh.
   A browser will do this, but a simple RPC mechanism usually will not.
   (especially since it doesn't understand HTML)

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal