I'm going to provide the fingerprint authentication from server side via WebAPI. The below code is the fingerprint comparison part.
var allFingerprints = container.Fingerprints.OrderByDescending(p=>p.FingerprintID);
List<Fmd> fmdList = new List<Fmd>();
foreach (var fp in allFingerprints)
{
fmdList.Add(Fmd.DeserializeXml(fp.FMD));
}
IdentifyResult identifyResult = Comparison.Identify(customerFmd, 0, fmdList, thresholdScore, 2);
If the small amount(<3000) fingerprints are in the DB, I think it will be OK to read the fingerprint from DB and compare it. But if the amount of fingerprints is getting bigger and the server get a lot of API Calls from clients later, what is the best way to read fingerprint from DB and compare it? Do I have to keep the fingerprint list in the memory and compare it? Thank you for your valuable comments in advance.
If you are using EF some information will be in memory automaticaly. But if you want to make your own structure, use dictionary instead of a list. Also you can use redis for this purpose.