- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
08-10-2009 09:21 AM
is it possible to open a session to salesforce, set binding.maintainsession, then open several threads to load data?
Right now it looks as if I woul have to create different id's to load from different machines/fork the process.
Any ideas in if multithreading is available on sfdc?
Solved! Go to Solution.
08-12-2009 10:06 AM
I was told by Salesforce.com technical support that multithreading within a single JVM doesn't work. You'd have to have a separate JVM for each session, with 5 max per Salesforce user, 50 API sessions max if you use 10 different users. That would involve the multiple sessions each being started separately and talking to the master session. Too bad, since the only way to get really hot performance is to do separate sessions.
We have solved this for uploads to Salesforce in Relational Junction by providing key range selection, so you can run separate sessions, which each only look at a slice of the data. It works pretty well. Contact me if you want to know more.
08-12-2009 10:37 AM
I've had no problems splitting work across multiple threads. Simply have each thread open its own connection and draw from a shared pool of work to be done. Multithreading is not inherently a problem.
There is a limit on the max number of concurrent API calls that varies with each organization type: http://www.salesforce.com/us/developer/docs/api/Co
That may be the issue that you were thinking of, but that issue is independent of whether parallelization is achieved with multiple processes or multiple threads.