Task Generator vs. Task Writer

An Engine Factory may identify a Task Generator or a Task Writer. By default the factory will supply a Task Writer. But if the engine developer provides a Task Generator then the Task Generator will take the place of the Writer. It does this because the engine can only have 1 writer and platform uses an "adapter" to wrap the generator and act like it's the Writer.

Task Generator defers the responsibility to writing the tasks to Platform. Platform uses a prepared statement for the insert and inserts the job record and tasks in blocks of 10,000. It does NOT commit until all tasks are generator so in large scale cases this can leave the transaction open for a while. It is important to note that this is actually a fairly performant operation. It's main draw back is requiring the read of all data into the middle tier to create a series of objects that it then must send back to the database to be inserted.

Task Writer is the "more advanced" version of generating the tasks developed to allow even faster methods of task generation OR exotic techniques like called a Stored Proc in the database OR generating a 2 level task structure utilizing dependencies (tasks have the ability to depend on other tasks – this allows for a hierarchy of tasks).

Task Writers generally fall into 2 categories... Bulk Insert of Insert Select. Bulk Insert is generally the most obvious technique where the developer reads in a set of data applying logic within the where clause and more logic in the middle tier to precisely identify the set of tasks. The Insert Select is generally lighter weight where the logic is in the where clause of the select.