Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Indigo

Vista - "Registering" clients w/ a service

 
 
Old 03-04-2006   #1 (permalink)
Damon Allison


 
 

"Registering" clients w/ a service

Hello,

When my client starts, I would like to "register" it with a service.
When something interesting happens in the service, I would like the
service to send messages to the registered clients.

For example, assume users open a client to monitor daily sales. As
orders are placed in a system, the server broadcasts messages to clients
with the latest sales data. The client can use that data to update the
display.

Is this possible within wcf? If so, how would I start? Is there a
binding, perhaps p2p, that I can use? I'm not quite sure where to begin.

Thank you,
Damon

My System SpecsSystem Spec
Old 03-04-2006   #2 (permalink)
Juval Lowy


 
 

Re: "Registering" clients w/ a service

Hello Damon,

What you describe is a publish/subscribe service. I have a small framework
that makes deploying such a solution a matter of two lines of code or so.
I will post it at some point as part of a whitepaper on WCF (no detailed
yet) or on the community web site.

Thanks,

Juval Lowy.

> Hello,
>
> When my client starts, I would like to "register" it with a service.
> When something interesting happens in the service, I would like the
> service to send messages to the registered clients.
>
> For example, assume users open a client to monitor daily sales. As
> orders are placed in a system, the server broadcasts messages to
> clients with the latest sales data. The client can use that data to
> update the display.
>
> Is this possible within wcf? If so, how would I start? Is there a
> binding, perhaps p2p, that I can use? I'm not quite sure where to
> begin.
>
> Thank you,
> Damon



My System SpecsSystem Spec
Old 03-04-2006   #3 (permalink)
Manny


 
 

Re: "Registering" clients w/ a service

Hi
In the Windows SDK documentation go to
WinFX Development -> Samples -> WCF Samples -> WCF Technologies -> WCF
Scenarios -> Design Patterns: List-based publish-subscribe. It gives you a
good idea how the mechanism works. The other offerings are also useful.

I downloaded the sample code, and it compiles in VS 2005 release version. I
could not get the web server part to work (the "service" project I ran into
the problem of accessing the IIS metabase, etc).

I created a ServiceHost project instead, then used svcutil to get the proxy
and config files.

Hope this is helpful.

Regards
Manny

p.s. Is it me or just that documentation for Vista and components is scant

"Juval Lowy" wrote:

> Hello Damon,
>
> What you describe is a publish/subscribe service. I have a small framework
> that makes deploying such a solution a matter of two lines of code or so.
> I will post it at some point as part of a whitepaper on WCF (no detailed
> yet) or on the community web site.
>
> Thanks,
>
> Juval Lowy.
>
> > Hello,
> >
> > When my client starts, I would like to "register" it with a service.
> > When something interesting happens in the service, I would like the
> > service to send messages to the registered clients.
> >
> > For example, assume users open a client to monitor daily sales. As
> > orders are placed in a system, the server broadcasts messages to
> > clients with the latest sales data. The client can use that data to
> > update the display.
> >
> > Is this possible within wcf? If so, how would I start? Is there a
> > binding, perhaps p2p, that I can use? I'm not quite sure where to
> > begin.
> >
> > Thank you,
> > Damon

>
>
>

My System SpecsSystem Spec
Old 03-04-2006   #4 (permalink)
Clemens Vasters [MSFT]


 
 

Re: "Registering" clients w/ a service

In addition to what Juval is saying, you could also do that with a duplex
contract.

If you download the code to my sample app newtellivision (see
http://newtellivision.tv/2006/01/30/TheGoods.aspx, get the source archive)
and look at the following files:

newtellivisionServer/LogProviderCallback.cs and
newtellivision.Server.Framework/IServerDiagnostics.cs and
newtellivision.Server.Framework/DiagnosticsLogService.cs

along with the configured bindings in

newtellivisionServer/newtellivision.exe.config

you will find an implementation of a System.Diagnostics Trace listener that
lives in a server process at which a client in another process can register
with the ILogProvider to establish a session
(newtellivisionServer/StatusPanel.cs does that) and where the client will
then receive the trace events occurring in the other process fed through the
duplex contract and into the LogProviderCallback implementation. In my app I
use that to populate a status window with events occurring in another
appdomain or in a separate service process. My model is "on machine" only,
but this will just as well work across the network.

Did that help?
Clemens




"Damon Allison" <dallison@no-spam.vis.cc> wrote in message
news:%23WzEHesIGHA.984@tk2msftngp13.phx.gbl...
> Hello,
>
> When my client starts, I would like to "register" it with a service. When
> something interesting happens in the service, I would like the service to
> send messages to the registered clients.
>
> For example, assume users open a client to monitor daily sales. As orders
> are placed in a system, the server broadcasts messages to clients with the
> latest sales data. The client can use that data to update the display.
>
> Is this possible within wcf? If so, how would I start? Is there a
> binding, perhaps p2p, that I can use? I'm not quite sure where to begin.
>
> Thank you,
> Damon



My System SpecsSystem Spec
Old 03-04-2006   #5 (permalink)
Damon Allison


 
 

Re: "Registering" clients w/ a service

Juval, Manny, Clemens :

Thank you very much for the responses. I was able to get a duplex
contract working and am underway. I appreciate the help.


Damon


Clemens Vasters [MSFT] wrote:
> In addition to what Juval is saying, you could also do that with a duplex
> contract.
>
> If you download the code to my sample app newtellivision (see
> http://newtellivision.tv/2006/01/30/TheGoods.aspx, get the source archive)
> and look at the following files:
>
> newtellivisionServer/LogProviderCallback.cs and
> newtellivision.Server.Framework/IServerDiagnostics.cs and
> newtellivision.Server.Framework/DiagnosticsLogService.cs
>
> along with the configured bindings in
>
> newtellivisionServer/newtellivision.exe.config
>
> you will find an implementation of a System.Diagnostics Trace listener that
> lives in a server process at which a client in another process can register
> with the ILogProvider to establish a session
> (newtellivisionServer/StatusPanel.cs does that) and where the client will
> then receive the trace events occurring in the other process fed through the
> duplex contract and into the LogProviderCallback implementation. In my app I
> use that to populate a status window with events occurring in another
> appdomain or in a separate service process. My model is "on machine" only,
> but this will just as well work across the network.
>
> Did that help?
> Clemens
>
>
>
>
> "Damon Allison" <dallison@no-spam.vis.cc> wrote in message
> news:%23WzEHesIGHA.984@tk2msftngp13.phx.gbl...
>
>>Hello,
>>
>>When my client starts, I would like to "register" it with a service. When
>>something interesting happens in the service, I would like the service to
>>send messages to the registered clients.
>>
>>For example, assume users open a client to monitor daily sales. As orders
>>are placed in a system, the server broadcasts messages to clients with the
>>latest sales data. The client can use that data to update the display.
>>
>>Is this possible within wcf? If so, how would I start? Is there a
>>binding, perhaps p2p, that I can use? I'm not quite sure where to begin.
>>
>>Thank you,
>>Damon

>
>
>

My System SpecsSystem Spec
Old 04-13-2006   #6 (permalink)
jNorton


 
 

Re: "Registering" clients w/ a service

Question regarding publisher/subscriber:

I have written a service that keeps track of callbacks to a client. In the
event that somthing "happens" the client can notify a specific client or all
clients. However, in the event that the service server "crashes" and is
restart, it no longer knows about the clients that it needs to notify, nor
does the client know that the server no longer knows about them. Any ideas
on how to resolve this issue?

John

"Clemens Vasters [MSFT]" wrote:

> In addition to what Juval is saying, you could also do that with a duplex
> contract.
>
> If you download the code to my sample app newtellivision (see
> http://newtellivision.tv/2006/01/30/TheGoods.aspx, get the source archive)
> and look at the following files:
>
> newtellivisionServer/LogProviderCallback.cs and
> newtellivision.Server.Framework/IServerDiagnostics.cs and
> newtellivision.Server.Framework/DiagnosticsLogService.cs
>
> along with the configured bindings in
>
> newtellivisionServer/newtellivision.exe.config
>
> you will find an implementation of a System.Diagnostics Trace listener that
> lives in a server process at which a client in another process can register
> with the ILogProvider to establish a session
> (newtellivisionServer/StatusPanel.cs does that) and where the client will
> then receive the trace events occurring in the other process fed through the
> duplex contract and into the LogProviderCallback implementation. In my app I
> use that to populate a status window with events occurring in another
> appdomain or in a separate service process. My model is "on machine" only,
> but this will just as well work across the network.
>
> Did that help?
> Clemens
>
>
>
>
> "Damon Allison" <dallison@no-spam.vis.cc> wrote in message
> news:%23WzEHesIGHA.984@tk2msftngp13.phx.gbl...
> > Hello,
> >
> > When my client starts, I would like to "register" it with a service. When
> > something interesting happens in the service, I would like the service to
> > send messages to the registered clients.
> >
> > For example, assume users open a client to monitor daily sales. As orders
> > are placed in a system, the server broadcasts messages to clients with the
> > latest sales data. The client can use that data to update the display.
> >
> > Is this possible within wcf? If so, how would I start? Is there a
> > binding, perhaps p2p, that I can use? I'm not quite sure where to begin.
> >
> > Thank you,
> > Damon

>
>
>

My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
"Extensible Authentication Protocol" service gives "The system cannot find the file specified" error Vista networking & sharing
"Dependency service or group failed to start" and unable to start Diagnostic Policy Service manually Vista General
HELP: Can't log in: "User Profile Service service failed the logon" Vista General
"De Service User Profile-service verhindert het aanmelden." Vista account administration
Changing "mailto" protocol via registry--no "clients" file under HKEY_USERS Vista mail


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46