Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Job Queues In Parallel

This is the code repository for the BC TechDays 2025 session "Turbo Mode: Job Queues in Parallel?":

Building high performing code is great, but then you find yourself hoping that the Job Queue runs that 1 job faster and faster. Sometimes, that's not enough, and we need to be creative to get even MORE performance out of our BC.

Join me for this session to find out how using deadlock resilient, batch operation code can increase your Job Queue speeds anywhere from 40 to 90% faster. I'm proud of this new dangerously powerful pattern, and want to see how the community can all benefit.

Pending link to video after it is uploaded.

Demonstration Goals

  • Making parallel tasks ‘split’ tasks between them with minimal collisions
  • Dynamically handle scope / scaling

The requirements to demonstrate the above are:

  • Big volumes of data
  • Each data item should require multiple steps which take some time

Demonstration Scenario

A multi-location company taking web orders. Each order:

  • May need to create a Customer record, match on email address & country
  • May need to create a ship-to address if the Customer already exists and the address / city / post code don’t match
  • All orders are dispatched from CENTRAL location, but:
    • If CENTRAL is out of stock, they want a Transfer Order from OVERSTOCK
    • If OVERSTOCK is out of stock, they want a Purchase Order (from Item Card’s replenishment Vendor)

Classic Processing Flow

A typical AL solution to handle these incoming orders would be like so:

  1. Input from an API into a Holding Table
  2. Mimic of common flow:
    1. Customer Check / Creation
    2. Ship-To Check / Creation
    3. Sales Order Creation
      1. Lines Creation
        1. Stock check
          1. TO creation
          2. PO creation
    4. Release Sales Order
      1. Email sent – shipment or backorder email

Notes:

If you want to run this code, please know it does a lot of data generation and cleanup tasks that are assuredly going to create and leave bad data. Do NOT use this in production.

Also, if you're using Dockers, note that this relies on doing write transactions with error handling, and the default behavior of Docker's "DisableWriteInsideTryFunctions" does not match online. You will need to update the Docker with

Set-NAVServerConfiguration -ServerInstance $instance -KeyName DisableWriteInsideTryFunctions -KeyValue false
Restart-NavServerInstance -ServerInstance $instance

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages