Design a distributed solver for crossword-like word puzzles.
You are given a grid containing blocked cells and empty cells, plus a dictionary of valid words. Each contiguous horizontal or vertical run of empty cells is a slot that must be filled with one dictionary word of the same length. Intersecting slots must agree on shared letters.
Your system should support submitting a puzzle, solving it asynchronously, and returning either the first valid solution or all valid solutions. Discuss:
-
How to model the search problem.
-
How to use DFS with constraint propagation.
-
How to distribute the search across many workers.
-
How to decide when to split work into more distributed tasks versus letting a worker continue local DFS.
-
How to handle fault tolerance when workers crash or become slow.
-
How to support early termination once one solution has been found.