From a1760ecbb780dc17a7675bd60fb50aa1103fa961 Mon Sep 17 00:00:00 2001 From: Sam Wilkins Date: Fri, 10 Jan 2020 06:35:30 -0500 Subject: added hierarchical structure to session --- src/server/session/README.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/server/session/README.txt (limited to 'src/server/session/README.txt') 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 -- cgit v1.2.3-70-g09d2