Commit Graph

10 Commits

Author SHA1 Message Date
1ff71d099e Update Dockerfile 2021-02-25 11:16:16 -07:00
ae9016fbf6 Update all imports to .js for esm support, use threads.js
threads.js has better support for modules - no need to give a
project-relative path to the worker file, which complicated the build.

Add rudimentary thread pooling w/ execution timeout.
2021-02-25 11:16:16 -07:00
e54f4c42f1 Update tsconfig, package.json to run in full ESM mode 2021-02-25 00:30:09 -07:00
a66a20b647 Cell = number instead of object, return flat array 2021-02-23 18:19:57 -07:00
c16a68e796 Use 0 instead of null to represent no value 2021-02-23 16:50:17 -07:00
09f740f86a Add cors 2021-02-23 16:47:58 -07:00
8f3217f3cc Implement Algorithm X for solving and generating sudokus 2021-02-22 20:03:47 -07:00
7ac3e6ad06 Use worker threads for sudoku generation
Moves sudoku generation off of the main thread. Allows for multiple
generation requests (up to the number of physical CPU cores) to be
served in parallel. Uses the "physical-cpu-count" node package to
determine the numer of physical CPUs of the host.

Also introduces a timeout which causes too-difficult (or impossible)
generation requests to fail if they take more than 5 seconds to
complete. In effect soft-capping the complexity of generated puzzles.
2021-02-20 18:57:18 -07:00
7f9cffbfdd initial commit 2021-02-19 23:55:49 -07:00
e13b4d737b root commit 2021-02-19 18:29:51 -07:00