Difference between revisions of "API:Best Practices"

From Melissa Data Wiki
Jump to navigation Jump to search
m (Admin moved page Best Practices:General API to API:Best Practices without leaving a redirect)
 
(One intermediate revision by the same user not shown)
Line 8: Line 8:
​​Our objects are able to handle mutithreading, but are thread neutral as opposed to thread safe.
​​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. In fact, we use this same approach to deploy our web services.
Because of this, we recommend creating a single instance of the object per user / process and do not allow any instances from crossing threads.


Although possible, we do not support an architecture implementing a static pool of objects. This requires mutexing, which would need to be correctly handled and implemented on your end.


==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.
<ol>
'''<li>Initialize the data file as little as possible.</li>'''
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.
'''<li>Server Resources</li>'''
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.
'''<li>Disc Access Speed</li>'''
SSD level disc speed or faster is recommended
</ol>


==3.  How do we configure the filters/alerts to trigger when a license 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 or database expires.  Our all objects return GetLicenseExpirationDate() and GetDatabaseExpirationDate(), use these properties to create alert.​​ Create alert  with a filter that specifies a time period date before expiration of License or Database . You should configure the alert so that your team would have sufficient time to explore contract renewal options before the license or database expires.


[[Category:Best Practices]]
[[Category:Best Practices]]

Latest revision as of 22:30, 19 March 2020

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