@Arndt,
I can run multiple instances of my application but how exactly can I then "route the slow running tasks to the one and the rest to the other"?
Could you also elaborate on the session cache?
@Jonathan,
the response or fetched information returning from the "slow running task" (the connection to the SOAP-XML server) is not actually needed to complete the flow that the user is going through. It's actually an online contest (prize question):
- page 1 loads: user is asked for some data (name, address, ...) -> user clicks submit: data is not yet persisted but stored in the session
- page 2 loads: user is asked to answer a question and a tiebreaker (how many people will have participated by the end ...) -> user clicks submit: user's emailaddress is used to check if user already exists in the remote CRM (via SOAP), if not he is added, if yes, his CRM-id is fetched. Now, the user data along with his CRM-id and answers to both questions is persisted in an SQLite database.
Now, in my idea: wouldn't it be better, in the second step (page 2) to just immediately persist the user submitted data to the SQLite database to allow the user to continue the flow and to hand off the connection to the remote CRM to another app/process/Celery/whatever after which I can (if needed) update the user's data in de database?
Thanks already for all the responses!
Maarten