DAL / Model / Application-Design Question for a MVC Application

I have a device that stores raw binary log data as a BLOB in a MySQL DB. That process is a blackbox to me (closed source) which I cannot change. I know, however, how to decode that BLOB and transform it into some human readable data.
Inside that BLOB data stream various information is stored, such as dates, text messages, severity, errors, and so on I later want to present to the user calling my ASP.NET MVC application.

The way I’m doing it now is on the fly, meaning that the data is converted into a human readable format in my DAL layer of the ASP.NET application whenever the data is requested. The DAL layer in turn is consumed by the Model of the MVC application.

As the log data DB gets larger and larger I’m not sure if this is the right approach for a couple of reasons:
For example, as the log data is binary, all sorting / filtering / etc. has to be done by querying ALL the records, converting it to a human readable format, and perform the sorting / filtering / … on the converted in-memory dataset.

I thought about the alternatives and came to the following conclusion:

1.) Run a cron / scheduled / whatever job every n minutes and convert the new binary log data to something human readable and store that in the DB. I would have to keep track of the already converted rows, but that’s easy. This intermediate layer however would not be part of my ASP.NET application and as such would have to be maintained and tested separately. This is not that important. However, going that route would mean that the user would always miss the log data that accumulated between the last transformation run and now, in the worst case n minutes. A possible workaround would be to run that cronjob within a very tight schedule (like every 10 seconds or so).

2.) Use an insert trigger on the MySQL DB that immediately converts the data. Unfortunately, I’m afraid that I cannot use SQL/PSM to convert the data so I’d need a custom UDF written in C. Unfortunately, I’m not much of a C programmer and I’m lacking the fundamentals on how to write custom UDFs for MySQL.

3.) Keep things the way the are now, which will surely degenerate performance over time as I cannot use efficient indices on the raw BLOB data or perform any filtering / sorting operations on the DB side.

So that’s where I’m standing right now. The question is are there any OTHER approaches that come to your mind I haven’t thought of? Has anybody ever done something similar, and if so, what approach did you take?

Your first option — write something to convert it into normal DB data — is the right way to go here for a few reasons. It makes development easier as you have a clean demarcation of roles and you can get a functioning data processing app on one hand and test the front-end against test data on the other hand.

This code can be in C# and can even be in the same solution as the web app so you can work on them in concert if need be. They could even share some library level code if necessary opening things up to having some live decoding in the web app.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

DAL / Model / Application-Design Question for a MVC Application

I have a device that stores raw binary log data as a BLOB in a MySQL DB. That process is a blackbox to me (closed source) which I cannot change. I know, however, how to decode that BLOB and transform it into some human readable data.
Inside that BLOB data stream various information is stored, such as dates, text messages, severity, errors, and so on I later want to present to the user calling my ASP.NET MVC application.

The way I’m doing it now is on the fly, meaning that the data is converted into a human readable format in my DAL layer of the ASP.NET application whenever the data is requested. The DAL layer in turn is consumed by the Model of the MVC application.

As the log data DB gets larger and larger I’m not sure if this is the right approach for a couple of reasons:
For example, as the log data is binary, all sorting / filtering / etc. has to be done by querying ALL the records, converting it to a human readable format, and perform the sorting / filtering / … on the converted in-memory dataset.

I thought about the alternatives and came to the following conclusion:

1.) Run a cron / scheduled / whatever job every n minutes and convert the new binary log data to something human readable and store that in the DB. I would have to keep track of the already converted rows, but that’s easy. This intermediate layer however would not be part of my ASP.NET application and as such would have to be maintained and tested separately. This is not that important. However, going that route would mean that the user would always miss the log data that accumulated between the last transformation run and now, in the worst case n minutes. A possible workaround would be to run that cronjob within a very tight schedule (like every 10 seconds or so).

2.) Use an insert trigger on the MySQL DB that immediately converts the data. Unfortunately, I’m afraid that I cannot use SQL/PSM to convert the data so I’d need a custom UDF written in C. Unfortunately, I’m not much of a C programmer and I’m lacking the fundamentals on how to write custom UDFs for MySQL.

3.) Keep things the way the are now, which will surely degenerate performance over time as I cannot use efficient indices on the raw BLOB data or perform any filtering / sorting operations on the DB side.

So that’s where I’m standing right now. The question is are there any OTHER approaches that come to your mind I haven’t thought of? Has anybody ever done something similar, and if so, what approach did you take?

Your first option — write something to convert it into normal DB data — is the right way to go here for a few reasons. It makes development easier as you have a clean demarcation of roles and you can get a functioning data processing app on one hand and test the front-end against test data on the other hand.

This code can be in C# and can even be in the same solution as the web app so you can work on them in concert if need be. They could even share some library level code if necessary opening things up to having some live decoding in the web app.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật