Data Quality Tools, Mailing Software, Lists, NCOA, Data Enhancements

 | Shopping Cart Buy | Newsletters | Search

    Products         Solutions       Downloads & Trials       Support          Resources         Lookups       Contact Us  

Logged in as: Guest Search | Active Topics |

Melissa Address Validation is single threaded? Options · View
Hardy98515988
Posted: Friday, October 16, 2009 10:02:47 AM
Groups: Member

Posts: 1
I installed it in Windows and created my .Net application to wrap around the API. Then I created multi-threaded client to use it, it looks like everytime if I double the thread number the total response time is almost doubled.

Can somebody from Melissa cinfirm it?
Paul Nelson
Posted: Friday, October 16, 2009 1:14:40 PM
Groups: Administration

Posts: 59
Hello,

Our FAQ page goes into some detail on this...

http://www.melissadata.com/tech/aobjectfaq.htm

2.7.1 What is multi-threaded programming, with respect to MelissaDATA’s data quality tools?

When working with MelissaDATA API components, you are multi-threading in these situations:

• You have several threads, each creating an instance of an object.
• You have several threads, all using a single (or a few) instances of an object.

Be aware that sometimes you are multi-threading without even realizing it. This is particularly true for web applications. For example, a web service will often handle multiple requests simultaneously. Each request will be handled on a separate thread, though the code you have written to handle a request is oblivious to this.

2.7.2 What should be my primary concerns?

Primarily, the thread that creates an instance to an object ‘owns’ that instance and any other threads should not use that instance.

If you choose to violate this rule and ‘share’ instances across threads, your program must ensure that a thread is completely done using the instance before another thread attempts to use it. Often, this is done through the use of critical sections, mutexes or semaphores.

Bear in mind that it is very difficult to debug multi-threaded applications, and the precautions needed to share instances further complicate the issue.

The more practical solution is to ensure that each thread owns its own instance. However, when working with large numbers of threads, this can be problematic, as operating system limitations (open threads, file handles, memory, etc) can be a limiting factor.

2.7.3 Why is threading an issue?

At any given moment, an instance exists at a certain state. Two threads calling the same instance will usually cause the instance to change states in unexpected ways, leading to incorrect results and/or crashes.

For example, say thread 1 calls the Address Object (AO) with an address. The AO at this point is in ‘State A’. Then, before thread 1 can obtain the AO’s results, thread 2 calls the AO with a different address, putting it into ‘State B’. When thread 1 retrieves its results, it will retrieve the ‘State B’ results rather than the correct ‘State A’ results.

2.7.4 Can MelissaDATA’s API components detect improper thread usage and handle the situation accordingly?

No, they cannot. It is not a fault of the programming, but rather is inherent to the way microprocessors and operating systems are designed and used.
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by Yet Another Forum.net