Training, Open Source computer languages

PerlPythonMySQLTclRubyC & C++LuaJavaTomcatPHPhttpdLinux

Search our site for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
Cottage industry or production line data handling methods

If you're running a cottage industry, for efficiency's sake you'll run the first process on each of your raw components first, and store the partially-completed elements in a basket as they're processed. When you've completed that first process, you'll then apply the second process to each element in turn, then the third process, and so on. For small scale production, that's a much MUCH better use of your time and resources that setting up all processes in what's probably a very small area and trying to take components through from end to end.

But if your level of throughput is to be several magnitudes greater, the cottage industry approach doesn't work and you'll want, in a bigger area, to set up a production line. You'll have more overheads, as each stage of the line will need someone to operate it, but you'll save on the need to store large numbers of intermediate components, and you'll save on the time spend putting down and picking up components at each stage too.

Data handling flows can resemble a cottage industry or a production line .... and it depends on how much data you have as to which approach will be the most effective.

In Shell Programming, using a series of operations each of which reads from a file, and saves out to a file with > style redirects, is your cottage industry approach. Using a pipe - | is more production line, with a buffer usually of 4k between the processes.

In Python, functions such as range and readlines return complete lists which you subsequently use - cottage industry. Alternatives such as xrange and xreadlines are generators which are running in parallel with their calling code and so are your production line. And you can write your own generator functions; you can spot them in existing code if you see the yield keyword.

As well as using the cottage industry / production line comparison, I also compare the one-at-a-time approach to being akin to filling up a reservoir from one process, then using the reservoir until it's empty from another. If you have a huge amount of data, then you're likely to overflow your reservoir and have your program fail. However, running the processes at the same time is rather like joining them with a pipe, with a tap that is turned on and off each time a new chunk of data is required. This is how I've successfully trained clients who have data files up to 10Gbytes in size to handle their data in easily written Python scripts.
(written 2006-06-07 06:20:11)

 
Associated topics are indexed under
Y105 - Python - Functions, Modules and Packages
A167 - Web Application Deployment - Shell Programming
A101 - Web Application Deployment - Linux -An Introduction For Users

Back to
Getting rid of variables after you have finished with them
Previous and next
or
Horse's mouth home
Forward to
Almost everyone loses
Some other Articles
Python 3000 - the next generation
Over zealous police activity?
Want to be a technical trainer in the UK?
Almost everyone loses
Cottage industry or production line data handling methods
Getting rid of variables after you have finished with them
The Fag Packet Design Methodology
Domain Listing Center and Domain Registry of America
Python modules. The distribution, The Cheese Shop and the Vaults of Parnassus.
We can offer a room, but we can't operate on a dog
1829 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

© WELL HOUSE CONSULTANTS LTD., 2008: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 0800 043 8225 or 01225 708225 • FAX: 0845 8382 405 or 01225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho