Best way to provide the fingerprint comparison in

2020-07-30 02:34发布

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条回答
smile是对你的礼貌
2楼-- · 2020-07-30 03:24

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.

查看更多
登录 后发表回答