Pages

6 Jun 2012

WCF - Concurrency, Sessions and Throttling

WCF allows different way for Session and Concurrency management.

Session Management: configures how service object life time is managed during client requests.

  • Per Call - a new service instance is made for each method call from client.
  • Per Session - a single instance will cater all calls from a client.
  • Single Instance - all client calls will work under a single instance of service object.


Concurrency Mode: configures how service instances servers multiple client requests at the same time.
  • Single - a single request will be catered by service object, other requests need to wait during this period.
  • Multiple - multiple requests will be processed by service object by spawning threads. This approach is beneficial for good throughput.
  • Re entrant - single requesting client has access to the WCF service object thread, but the thread can exit the WCF service to call another WCF service or can also call a WCF client through callback and reenter without deadlock.



By default WCF services is configured to have Per Call session, Single ConcurrencyMode.

Throttling behavior of WCF helps in putting upper limit for no of sessions, concurrent calls & instances. Following flags are used for this

  • MaxConcurrentCalls
  • MaxConcurrentInstances
  • MaxConcurrentSessions 


23 May 2012

Configure SIP for Voip

Just because Nokia N810 not having GSM  module doesn't mean we cannot make phone calls. N810 has very good support for Session Initiation Protocol. We can use speaker or included headset or Bluetooth devices to make or take calls.

How to configure voipbuster SIP account

  1. menu -> communication -> Internet call
  2. choose add account
  3. in second screen Service : SIP
  4. next screen for username - <voip_username>@voipbuster.com password - <voip-pwd>
  5. next screen for account name - <voip_username>
  6. That's it
Enjoy.

22 May 2012

Week numbers in Outlook 2010

Follow these steps to enable week number display in Outlook 2010

  • File -> options
  • click on Calender
  • Under display options



17 May 2012

Vulnerability vs Threat vs Attack

Basics of Security starts with following keywords

Vulnerability is a hole or weakness of an Operating System or Application. This could be due to design flaw or implementation flaw, which allows an intruder to cause harm.

Threat is something like a disease which affects Operation System or Application. Threat is normally identified by the changes that is makes like signature of binaries/files, registry keys etc..

Attack is techniques used to exploit vulnerabilities of an application.

12 May 2012

Copy column names along with results from MSSQL Management Stuido

Sometimes it helps in copying column names along with query results. This can be turned on/off easily in MSSQL Management Studio easily

Go to Tools -> Options page of Management Studio, then under Query Results -> SQL Server -> Results to Grid, check/ un-check the feature.

What is vshost.exe ?

Right next to Visual Studio build of a CLR executable, we notice another executable ending with .vshost.exe


vshost.exe is a hosting process introduced by Visual Studio, for following benefits

  • helps in creating App domain and associating debugger to that. Normally this is a slow process, however vshost.exe makes this noticeably fast.
  • initializes the debugger for partial trust debugging
  • supports intermediate window for design time expression evaluation.
Still don't wish to have *.vshost.exe next your binary, then go to project properties -> Debug
And un-check the option.

4 May 2012

Vector Vs List

Vectors and Lists are belong to sequence containers of C++ Standard Template Library. Primary difference between two comes from the internal data-structure used by both,

Vector
Internally vector uses a dynamic array (continues block of memory), which grows in forward direction.
This means random access and insertion/deletion in the end is faster. However if we insert/delete at the beginning or middle, operations will take more time as entire contents needs to be pushed/moved.

List
List is realized as (doubly) linked list.
So insertion/deletion any where is faster, which internally works as altering next of linked list nodes. By default list doesn't support random access, and hence search inside list is slower.