API:Best Practices

From Melissa Data Wiki
Jump to navigation Jump to search

1. Can I host the data files on a network share and access those files from multiple client computers?​

​ While it is technically possible to access data files located on a network share, it is highly unrecommended for anything outside of testing and not supported by Melissa Data. If you host the data files on a network server, you will likely run into stability and scalability problems. Our API's are designed to access data files only from the local machine. ​If you need a client/server architecture and you cannot install data files on each client machine, we recommend you use a web service (either hosted by Melissa Data or within your own company) instead.

2. Are your objects able to handle multithreading?

​​ ​​Our objects are able to handle mutithreading, but are thread neutral as opposed to thread safe.

Because of this, we recommend creating a single instance of the object per user / process and do not allow any instances from crossing threads.


3. How do we configure the filters/alerts to trigger when a License Key or database is nearing it's end date?

We encourage our customers to create an alert in your aplication that automatically emails the appropriate team member or pop up notification before the License Key or database expires. Our all objects return GetLicenseExpirationDate() and GetDatabaseExpirationDate(). Use these properties to create an alert.​​ Create an alert with a filter that specifies a time period date before the expiration of a License Key or Database . You should configure the alert so your team will have sufficient time to explore contract renewal options before the License Key or database expires.


4. How to I maximize the throughput for high volume environments

There are several factors to maximize the speed of our objects.

  1. Initialize the data file as little as possible.
  2. After creating the object, you must initialize the object and connect it to the underlying data files. Once you have done this, you can process virtually unlimited amounts of records. Initialization takes much more time than verifying a single record, so you only want to initialize once and then allow it to process a batch of records. In a web server environment, this means create a pool of object to service requests instead of creating a new instance per request.
  3. Server Resources
  4. Obviously the more robust the server the better performance you are going to get. We recommend at least 4 cores and 8GB of RAM but more can help especially in a multi-threaded environment.
  5. Disc Access Speed
  6. SSD level disc speed or faster is recommended