Best way to provide the fingerprint comparison in the server side

南笙酒味 提交于 2020-01-13 06:48:06

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/33082211/best-way-to-provide-the-fingerprint-comparison-in-the-server-side

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!