none
Concurrency Mode, Instance Context Mode RRS feed

  • Question

  • I am trying to figure out the best ConcurrencyMode and InstantContextMode.  

    My WCF service basically drops files in a directory that are picked up by a 3rd party system that than drops another file and that the service picks up and processes.  I am using the C# Process Runner for this.

    I am told the 3rd party system can do this for multiple threads at one time.

    With that being said, what would be the best settings for this approach?

    I am currently running:

    ConcurrencyMode = ConcurrencyMode.Single,
    InstanceContextMode = InstanceContextMode.PerCall

    I'm using NetTCIP Bindings.

    However we seem to get a lot of timeouts with this approach.

    Any help would be much appreciated.

    Thank you,
    Marty



    Mardo



    • Edited by Mardo Monday, July 22, 2013 4:14 PM
    Monday, July 22, 2013 4:04 PM

Answers

  • Hello Marty,

    Based on the explanation, I believe that the service that drops the files in the directory is disconnected from the 3rd party system.  If so, then the concurrencymode and instancecontextmode will not have an influence on the 3rd party system's processing of the files.  My guess is each file is given a unique name and the 3rd party system will process the files as soon as they appear in the file concurrently.

    In regards to the timeouts, what system is reporting these?  Are these unusually large files?  If your system is reporting the timeout is it a timeout between a client and your system? 

    If you post an example of the timeout error that might shed some light.

    Cheers,

    Jeff


    Jeff

    Monday, July 22, 2013 8:58 PM
  • Great; yes, I believe your settings are correct for what you want to accomplish.  This assumes you are just receiving the sent bytes from the client and creating a file without using a shared resource like a singleton within your solution.

    I think you will get more gain adjusting the other parameters associated with the service on how the message is sent.  These values you will need to adjust depending on your particular situation; e.g., large files or lots of small files.

    In regards to a client timeout, try adjusting the binding timeout values greater than the default minute (in case you have not done this).


    Jeff

    Tuesday, July 23, 2013 12:13 AM

All replies

  • Hello Marty,

    Based on the explanation, I believe that the service that drops the files in the directory is disconnected from the 3rd party system.  If so, then the concurrencymode and instancecontextmode will not have an influence on the 3rd party system's processing of the files.  My guess is each file is given a unique name and the 3rd party system will process the files as soon as they appear in the file concurrently.

    In regards to the timeouts, what system is reporting these?  Are these unusually large files?  If your system is reporting the timeout is it a timeout between a client and your system? 

    If you post an example of the timeout error that might shed some light.

    Cheers,

    Jeff


    Jeff

    Monday, July 22, 2013 8:58 PM
  • That is exactly right how the service works.

    The timeouts are from the WCF client and the Server.

    Would the settings I have there allow for multiple connections at one time from the client? I assume it would..

    I dont have an error right now, but its usually a timeout error that the WCF client has.

    Thank you Jeff!


    Mardo

    Monday, July 22, 2013 11:48 PM
  • Great; yes, I believe your settings are correct for what you want to accomplish.  This assumes you are just receiving the sent bytes from the client and creating a file without using a shared resource like a singleton within your solution.

    I think you will get more gain adjusting the other parameters associated with the service on how the message is sent.  These values you will need to adjust depending on your particular situation; e.g., large files or lots of small files.

    In regards to a client timeout, try adjusting the binding timeout values greater than the default minute (in case you have not done this).


    Jeff

    Tuesday, July 23, 2013 12:13 AM