aboutsummaryrefslogtreecommitdiff
path: root/src/server/session/README.txt
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2020-01-10 06:35:30 -0500
committerSam Wilkins <samwilkins333@gmail.com>2020-01-10 06:35:30 -0500
commita1760ecbb780dc17a7675bd60fb50aa1103fa961 (patch)
tree8cdaae6f81ea00d27183d03f9373fde26ae3ec7d /src/server/session/README.txt
parentcf3e869023d3027ae42c828ba3670b77d838ac50 (diff)
added hierarchical structure to session
Diffstat (limited to 'src/server/session/README.txt')
-rw-r--r--src/server/session/README.txt11
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