diff options
| author | Sam Wilkins <samwilkins333@gmail.com> | 2020-01-10 06:35:30 -0500 |
|---|---|---|
| committer | Sam Wilkins <samwilkins333@gmail.com> | 2020-01-10 06:35:30 -0500 |
| commit | a1760ecbb780dc17a7675bd60fb50aa1103fa961 (patch) | |
| tree | 8cdaae6f81ea00d27183d03f9373fde26ae3ec7d /src/server/session/README.txt | |
| parent | cf3e869023d3027ae42c828ba3670b77d838ac50 (diff) | |
added hierarchical structure to session
Diffstat (limited to 'src/server/session/README.txt')
| -rw-r--r-- | src/server/session/README.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/server/session/README.txt b/src/server/session/README.txt new file mode 100644 index 000000000..ac7d3d4e7 --- /dev/null +++ b/src/server/session/README.txt @@ -0,0 +1,11 @@ +/** + * These abstractions rely on NodeJS's cluster module, which allows a parent (master) process to share + * code with its children (workers). A simple `isMaster` flag indicates who is trying to access + * the code, and thus determines the functionality that actually gets invoked (checked by the caller, not internally). + * + * Think of the master thread as a factory, and the workers as the helpers that actually run the server. + * + * So, when we run `npm start`, given the appropriate check, initializeMaster() is called in the parent process + * This will spawn off its own child process (by default, mirrors the execution path of its parent), + * in which initializeWorker() is invoked. + */
\ No newline at end of file |
