Click to See Complete Forum and Search --> : windows service


bratuha
January 13th, 2003, 08:27 AM
Hi All,

being relatively new to .Net environment I am wondering what is the best way to connect Windows Service to the client application.

The service is expected to receive and process queries that would take a long time to complete. after the completion if a client application is running it would send it the result otherwise save the result in a database.

Thank you

MartinL
January 13th, 2003, 02:41 PM
Are you talking about the .net server and .net clients?
If so, consider .net remoting technology.

If the client is not .net, you can use sockets or you can wrapp your server to behave as DCOM server.

Even you can use Web Services if the solution if internet-based and/or heterogenous (in the meaning of used OS)...

Martin

TheCPUWizard
January 13th, 2003, 02:51 PM
You can even use Web Services on a single machine!

Seriously, one of the decisions between remoting and web service it that Web Services are intended to be primarily stateless. While there are a number of ways of maintaining state, it is much simplier to use remoteing when state is important.

Remember maintaining state requires carefull design to make sure that resources are not lost if one side "goes away" unexpcetedly.

bratuha
January 13th, 2003, 09:02 PM
Right guys,

I'm writing both client and service with vb.net. The query will take a long time to complete so if i use remoting and the client app is closed we could have unexpected results and difficulties controlling outcome.

By the way what happens to the client thread when we send a remote call to a different app? does it get suspended untill the call is completes? how does one control the process of termination of one of the apps?

i've done this using msmq first but this is not acceptable since it forces the user to have the **** thing installed as well as taking up unnesesary resources and the app ment to be as small as possible. i'm thinking about sockets at the moment but having difficulties organizing them so that they wait and then accept messages from each other (i find it is not very well explained in msdn).

(if you have an example how to organise the process of sending custom structures/objects between them I would be ****ing gratefull.)

What do you think

Thank you 4 your time