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 8877981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:36:06+00:00 2026-06-14T19:36:06+00:00

I have a WCF Service that is transferring large files. Currently I’m using Singleton

  • 0

I have a WCF Service that is transferring large files.

Currently I’m using Singleton service with list of instances from my class to hold the state and to response to the client requests for transfer progress and so on.

The instanced class itself handles new threads for each transfer when needed.

Clients who add transfer requests and request progress can disconnect meanwhile and reconnect at random time for the requests.

Also several different clients may want to request progress of all transfers that are going on.

Everything is working great as it is, but I’m sure there is better way of doing this?

Storing state somehow in SQL?
Storing state as I’m currently doing and somehow reconnecting to the same instance? How to get data from all instances then?

I hope you understood my rather long question 🙂

  • 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-06-14T19:36:07+00:00Added an answer on June 14, 2026 at 7:36 pm

    Yor solution would work great if there is only one instance of yor WCF service.

    When you instantiate more than 1 instance with loadballancing then that approach won’t work.
    In such case you need to keep the state is some place which is common to all instances. It could be SQL, State server, another WCF service which could keep state, etc.

    UPDATE:
    You need to generate id for each file tranfer task. Then Singletone can assosiate id with instance which does transfer (let’s call it Executor).
    When client wants to get progress or cancel transfer then it requests Singletone and provides task id.
    Singletone should use task id to resolve the actual Executor and forvard client’s request to the right Executor.

    As result you will be able to instantiate as many Executors as you need. Client should not worry which exactly Executor processes file. Everithing what client should know is task id.

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

Sidebar

Related Questions

I have a WCF service that can return large amount of data depending on
I have a WCF service that needs to hosted using basicHttpBinding using SSL. So
I have WCF service that uses raw messages (Message class). 1) Service side: [DataContract]
We have a wcf service that takes large amount of data. As a requirement
I have a WCF service that I'm using in my Silverlight project. I've followed
I have a WCF service that returns some JSON from a serialized object: public
We have a WCF service that we recently switched from self-hosting to IIS-hosted. It
I have a WCF service that uses ODP.NET to read data from an Oracle
I have WCF service that I can upload files. XElement upload = service.UploadFiles(id, File.ReadAllBytes(filePath));
I have a WCF service that returns a class that implements IExtensibleDataObject. I need

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.