Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6555913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:52:40+00:00 2026-05-25T12:52:40+00:00

Perhaps I’m going about this the wrong way, but here’s my current setup. I

  • 0

Perhaps I’m going about this the wrong way, but here’s my current “setup”.

I have a silverlight client that uses Caliburn.Micro and a MEF container with a “LoadCatalog” class, to keep everything loosely coupled in an MVVM way.

I have a “common” dll where all the interfaces are kept.

All my views and viewmodels are separate projects, that only have a reference to the common dll.

The viewmodels use WCF (regular) to communicate to the backend. The frontend itself has a duplex connection to the backend.

Now here’s where the question comes to mind. Whenever the backend thinks it’s time to have a new screen appear at the frontend, it uses the callback channel to tell the frontend to load the next screen.

Does this seem like a good pattern to use? Or should I leave the management of what screen to load when to the frontend? I think it’s nice to have this in the backend, but perhaps this is some kind of anti-pattern I’m not aware of, hence the question.

Now for argument sake, lets say I want to keep this in the backend.

What would be the best way to go about managing the collection of callback channels on the backend? If I enable SessionMode.Required on all the regular WCF endpoints, as well as the duplex channel, does this persist state together over multiple endpoints (regular+duplex)? Or will this persist state only within a single endpoint?
My guess (from the tests I have been able to do so far) is that I need to add some logic, like for example provide the frontend with a guid as soon as the callback connection is made. And then use that guid in the regular endpoint connections so the backend knows which “client” it is.

And would I “ever” be able to reliably collect all the channels and detect current state if I made a collection of the callback channels that I receive? I can intercept the callback channel now (just 1 instance atm, no collections made or anything, so single user) and use that to tell the frontend what to do. But sometimes when the client stops abrubtly (in other words when an error occurs) and I start the client again, it seems like the previous (faulted?) connection is still “re-used” or something, without luck so the communication flow stops after connection the duplex endpoint.

Does this make any sense?

Hope there’s someone who has some experience in the matter that can shed some light on it for me. I’m no total newbie, but with regards to multiple connection and keeping them separated, I might need some pointers in the right direction.

Thanks!

Huron.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T12:52:40+00:00Added an answer on May 25, 2026 at 12:52 pm

    I managed to get this up and running.

    When I create the duplex connection from the frontend to the backend I return a unique Guid. From now on I use this guid for all communication I do with the backend.

    This makes the backend “recognize” the client.

    In the backend I have a list of connections (grabbed the callback channel and stored it together with the Guid).

    Just had to make sure to lock the list object whenever I iterate it or when I add/remove items from it, since it will be used from multiple threads by design.

    The pattern to take control from the backend seems to work great so far.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Perhaps I'm going about this the wrong way, but I'm using HXT to read
Perhaps there is a better way to do this, but here's where I'm at
Perhaps I'm going about this all wrong (and please tell me if I am),
Perhaps I'm misapplying Unity, but here goes. I have a couple of applications, both
Perhaps I'm missing something here, but it seems that anything in the object model
Perhaps this is mere wishful thinking, but is there a simple way (in ASP.NET)
Perhaps this is nitpicky, but I have to ask. I'm using Nokogiri to parse
Perhaps properties aren't the way to go with this, but I'm struggling to find
perhaps I'm asking the wrong question. I have code like this: class ExpressionGrammar(Grammar): def
Perhaps this is the wrong place for this, but I'm not quite sure where

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.