Solved

Server Notification to WinClient?

Posted on 2002-07-15
8
250 Views
Last Modified: 2010-08-05
(I'm a newbie to .NET and SOAP calls, so please be gentle.)

Please consider this scenario (VB.NET):

1)  I have web-based functionality that I need users to leverage through HTTP protocol.
2)  When the user (via a WinClient app) submits binary data (again, via HTTP) to my web-side app, I will begin a new thread to process that data.  Therefore, control will be returned to the WinClient app very quickly.
3)  I need a way of:
     a.  Notifying the WinClient that processing is complete;
and     b.  Allowing the user (via a call to a Function) to retrieve his/her results of the procedure launched in step (2) above.

My question is, how do I do this?

I'm using a Web Service now where it makes sense, but I realized on Friday that I cannot merely create the client-side WebService "WithEvents" and expect the Web Service to relay notification events back to the WinClient.  In other words, this would not fly:

     '** Client-side VB.NET app
     Private WithEvents MyObj As New SomeWebApp.SomeWebService

     '** Catch those Server-side Web Service events here.
     '** Wouldn't THIS be handy?
     Private Sub MyObj_YourResultsAreReady()
           ...
     End Sub

But you see, I need functionality *LIKE* this.  I need the WinClient to somehow get notification from the Server *without* having to contantly poll a Web Service ("Are you done yet?  How about now?  How about now?") How do I work asyncronously with a server-side procedure, and still receive efficient notification in my WinClient app?

I'm going to make this a 200-point question, because I need more of an answer than just "use remoting" or something like that.  I can't expect a live, fully-documented solution for 200 points, but I do need some real help on how this can be done.  If you know of a website somewhere that contains a solution, then that would be great.

Thanks a lot.
0
Comment
Question by:bryker
  • 4
  • 3
8 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 7154584
The application is clientside and the webservice is serverside. You will need remoting to do what you want to do.

So, you will need to instantiate an object on the server and retrieve the events on the client. You can accomplish that through marshalling.

Use System.Remoting.RemotingServices and use the Marshal method (which is static, so you don't need to create an object) on your instantiated object (which should be derived from MarshalByRefObject).

CJ
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7154587
That way you CAN use WithEvents (as you probably already tried, you won't get any build errors).

CJ
0
 

Author Comment

by:bryker
ID: 7154769
And this could be done asynchronously?
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7156419
Yes (depending on the speed of the connection with the server, but basically it will be asynchronously)
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Comment

by:bryker
ID: 7157251

CJ:

>use the Marshal method (which is static, so you
>don't need to create an object) on your
>instantiated object

Where is this object instantiated?  For instance, is it on the client, or is it on the server?  Wouldn't someone (client or server) then have to UN-marshal it, to complete the reference passing?
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7157376
AFAIk not, but am not sure.

Will create a small example later today.

CJ
0
 

Author Comment

by:bryker
ID: 7165860
I've had to move on from this problem.
0
 

Accepted Solution

by:
ComTech earned 0 total points
ID: 7165936
This question will be placed in PAQ, and points refunded.

Regards,

ComTech
Community Support Administrator  
Experts-Exchange  

User has found info elsewhere.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now