I'm looking for ideas on how you'd architect a system like so:
Records come in in bulk (say 100,000 at a time) from a variety of sources but primarily a flat text file.
This data needs to be shoved as-is into a SQL Server database table. However, various metrics need to be computed. For example, one field is a certain 4-digit code. Only certain 4-digit codes are valid and we need to track how many records arrived with bad 4-digit codes. There are other fields that need to be "validate" and the list of fields could change in the future.
What is a good design for such a system? Is it best to have events BadFourDigitCodeEncountered
and event processors OnBadFourDigitCodeEncountered
or is there a cleaner design that is easily maintainable going forward?
(I don't think it should matter, but I am using NHibernate as my ORM but maybe that is useful to know since NHibernate has various points to hook into?)
I should mention: using C# .NET 4.0.
Thanks in advance, Arlen