We have an CRM 2015 Online client that has an end of month Batch containing 3 million invoices. Each Invoice has 4 to 6 Product line items. Each Invoice has to be "processed" with custom business logic in C#.
So obviously a standard Workflow is much too slow to process these invoices because it is not inherently
"multi-threaded".
Has anybody encountered and engineered a solution to this huge performance issue Online?
Our initial ideas:
1) Create a custom "Master C# Workflow" that will split the 3 million invoice Batch into 1000 smaller Batches.
2) The "Master C# Workflow" will then spawn 1000 new C# "Slave Workflows" to simultaneously process the 1000 small Batches so we achieve faux "multithreading".
We have experimented with Azure WebJobs but the network latency kills the performance. So we are trying to keep everything "local" in the Online Sandbox by using only Workflows.
Before CRM Online we could do all kinds of tricks in the SQL Server to split large batches into small batches and do custom C# code without timeout issues. But Online is a different animal!
Has anybody cracked this nut yet? I have searched online and not found any solutions. Anybody want to share some ideas or even better a proven solution?
Just running tests/benchmarks is incredibly cumbersome with this staggering amount of Invoices in the Online environment.
Any help and guidance is greatly appreciated! Thank you!