Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>"can do bulk processing on data in your database way more efficiently than anything living in the application layer."

Not necessarily. All depends on particulars. Very complex processing of reasonably sized chunk of data especially when can be done in multiple threads / distributed can be way more efficient.

I've head very real case: consulting company was hired by TELCO to write the code that will take content of the database and create one huge file containing invoices to clients. Said file would then be sent to a print house that can print the actual invoices, and mail those to clients.

They tried to do it with stored procedures and had failed miserably - it would run for a couple of days give or take and then crash.

I was called for help. Created 2 executables. On is a manager and the other is multithreaded calculator that did all the math. Calculator was put on 300 client care workstations as a service. Dispatcher would do initial query from accounts table for current bill cycle, split account id's into few arrays and send those arrays to calculators. Calculators would suck needed data in bulk from a database, do all the calculations and send the results back to dispatcher for merging into final file. TELCO people were shocked when they realized that they can have print file in less than 2 hours.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: