473,395 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Two-way Communication /w Web Services

I am going to write a smart client application. This application will
be used both on an intranet as well as over the internet. Among other
things, the application needs to be able to tell the server to monitor
certain items/tasks and notify the client when the item/task has
changed. Initially, I wanted to use web services but I am not sure how
I would implement a two-way communication between the server and client
(pushing). Is it possible? If so how? If not what are the alternatives?
Remoting? What disadvantages would the alternatives have (security,
access rights, etc).

The only way I can think of right now how to get it to work with
webservices is by making an async call. The server would block the call
until something has changed or a timeout occurs. When the client wants
to be notified of the next change again he will have to make another
async call after the previous one has finished. Would this work?

Thanks

Aug 27 '06 #1
3 2518
Hufaunder,
a stateless HTTP application such as a webservice has no way of simply
dialing up a client over HTTP and saying "hey! Something's changed and here
it is!"

You would either need to use Remoting, or some sort of timer-based polling
mechanism that makes regular webservice method calls to some "GetStatus"
method.
Hope this helps,
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"hu*******@yahoo.com" wrote:
I am going to write a smart client application. This application will
be used both on an intranet as well as over the internet. Among other
things, the application needs to be able to tell the server to monitor
certain items/tasks and notify the client when the item/task has
changed. Initially, I wanted to use web services but I am not sure how
I would implement a two-way communication between the server and client
(pushing). Is it possible? If so how? If not what are the alternatives?
Remoting? What disadvantages would the alternatives have (security,
access rights, etc).

The only way I can think of right now how to get it to work with
webservices is by making an async call. The server would block the call
until something has changed or a timeout occurs. When the client wants
to be notified of the next change again he will have to make another
async call after the previous one has finished. Would this work?

Thanks

Aug 27 '06 #2
Peter,

Thanks for the reply. I had the feeling it won't work but was hoping
because Comet (the 'new' Ajax) can push data, too. I'm not familiar
enough with it to know how they achieve that.

In any case, any comments regarding my idea on making async calls and
the server just blocks until something changes? Also, what are the
disadvantages using Remoting over the internet?

Thanks

Peter wrote:
Hufaunder,
a stateless HTTP application such as a webservice has no way of simply
dialing up a client over HTTP and saying "hey! Something's changed and here
it is!"

You would either need to use Remoting, or some sort of timer-based polling
mechanism that makes regular webservice method calls to some "GetStatus"
method.
Hope this helps,
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"hu*******@yahoo.com" wrote:
I am going to write a smart client application. This application will
be used both on an intranet as well as over the internet. Among other
things, the application needs to be able to tell the server to monitor
certain items/tasks and notify the client when the item/task has
changed. Initially, I wanted to use web services but I am not sure how
I would implement a two-way communication between the server and client
(pushing). Is it possible? If so how? If not what are the alternatives?
Remoting? What disadvantages would the alternatives have (security,
access rights, etc).

The only way I can think of right now how to get it to work with
webservices is by making an async call. The server would block the call
until something has changed or a timeout occurs. When the client wants
to be notified of the next change again he will have to make another
async call after the previous one has finished. Would this work?

Thanks
Aug 27 '06 #3
Asynchronous method calls with the server "blocking" until something changes
is not an extensible approach IMHO. You can support events over remoting,
althought most experts recommend against that too. Basically you are turning
the client into a server and the server makes "event" calls to the client.
There aren't any particular issues with remoting over internet as you call
it, you can use either HTTP or TCP channel. Your remoting server can be
hosted in IIS which gives some nice advantages.

What I do is that if the client is expecting some state to change, it simply
polls the server every XX seconds and gets back a state object.
Pete
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"hu*******@yahoo.com" wrote:
Peter,

Thanks for the reply. I had the feeling it won't work but was hoping
because Comet (the 'new' Ajax) can push data, too. I'm not familiar
enough with it to know how they achieve that.

In any case, any comments regarding my idea on making async calls and
the server just blocks until something changes? Also, what are the
disadvantages using Remoting over the internet?

Thanks

Peter wrote:
Hufaunder,
a stateless HTTP application such as a webservice has no way of simply
dialing up a client over HTTP and saying "hey! Something's changed and here
it is!"

You would either need to use Remoting, or some sort of timer-based polling
mechanism that makes regular webservice method calls to some "GetStatus"
method.
Hope this helps,
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"hu*******@yahoo.com" wrote:
I am going to write a smart client application. This application will
be used both on an intranet as well as over the internet. Among other
things, the application needs to be able to tell the server to monitor
certain items/tasks and notify the client when the item/task has
changed. Initially, I wanted to use web services but I am not sure how
I would implement a two-way communication between the server and client
(pushing). Is it possible? If so how? If not what are the alternatives?
Remoting? What disadvantages would the alternatives have (security,
access rights, etc).
>
The only way I can think of right now how to get it to work with
webservices is by making an async call. The server would block the call
until something has changed or a timeout occurs. When the client wants
to be notified of the next change again he will have to make another
async call after the previous one has finished. Would this work?
>
Thanks
>
>

Aug 27 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Jamey Cribbs | last post by:
At the risk of calling my manhood into question, I humbly submit the following little diddy (which is a blatant rip-off of a heart wrenching melody of the '70s by that international superstar, Mary...
8
by: John Grenier | last post by:
Hi, I have to determine the "standing" (WIN - TIE - LOSS) from confrontations between two teams on a contest. The table matchResults has fields cont_id, team_id and contest_result (int). ...
6
by: Willem | last post by:
Hi, I have a newbie question: is it possible to make a search form in asp that searches in two different databases (access)? Willem
0
by: clintonG | last post by:
I applied aspnet_regsql to SQL2K which was working fine throughout Beta 2 development. After installing Visual Studio and SQL Express RTM my application has blown up. Logging in to the application...
9
by: Steven | last post by:
Hello, I have a question about strcmp(). I have four words, who need to be compared if it were two strings. I tried adding the comparison values like '(strcmp(w1, w2) + strcmp(w3, w4))', where...
6
by: Laura K | last post by:
This is probably a simple question but I want to make sure I am doing it right. I have a spoc with two select statements which results in two tables. Very Basic ...
3
by: Simon | last post by:
Dear reader, For matching of two fields it is required that the fields has the same content. But now I have the situation that two text fields has not precisely the same content but there...
8
by: Michael Schwarz | last post by:
Hi, I have a problem where I have two requests (i.e. two different windows that are using the same session) that are accessing the session collection. The requests will need more time on the...
13
by: paul.joseph.davis | last post by:
Hi, I've just had my first encounter with two-phase lookup and I'm scratching my head a bit. The idea behind two phase look up is pretty easy to understand, but I have a case that fails to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.