Friday 24 May 2013


                                Batch Processing

Two ways you can process database records within the Force.com platform:
triggers and Visualforce controllers. Each has its own set of platform-imposed limitations,
such as how many records can be created at one time.As you accumulate tens of
thousands of records or more in your database, you might need to process more of records
than permitted by the governor limits applying to triggers and controllers.

Although Salesforce has simplified and incrementally relaxed governor limits in recent
Force.com releases, triggers and Visualforce controllers are fundamentally not suited to
processing large amounts of data in a multitenant environment.They are driven by user
interaction, and must be limited to provide good performance to all users.The Force.com
platform carefully controls its resources to maintain high performance for all, so resource
intensive tasks such as processing millions of records must be planned and executed over
time, balanced with the demands of other customers.

Batch processing makes this possible, and Batch Apex is the Force.com feature that
enables batch processing on the platform.With Batch Apex, data-intensive tasks are taken
offline, detached from user interactions, the exact timing of their execution determined
by Salesforce itself. In return for relinquishing some control, you the developer receive
the ability to process orders of magnitude more records than you can in triggers and
controllers.

 You are going to  learn how to use Batch Apex to create, update, and delete millions
of records at a time. It is divided into five sections:

  •  Introduction to Batch Apex: Learn the concepts and terminology of Batch Apex, what it can do, and when you should and should not use it.


  •  Getting Started with Batch Apex:Walk through a simple example of Batch Apex. Develop the code, run it, and monitor its execution.


  • Testing Batch Apex: Like any other Apex code, proper test coverage is required.Learn how to kick off Batch Apex jobs within test code.


  •  Scheduling Batch Apex: Although Salesforce has the final say on when BatchApex is run, you can schedule jobs to run using a built-in scheduler. Learn how to use the scheduling user interface and achieve finer-grained control in Apex code.

No comments:

Post a Comment