On Wed, May 6, 2020 at 6:58 PM Sam Ruby <ru...@intertwingly.net> wrote: > > The difference wouldn't merely be one of language syntax. The result > would likely be closer to an actor model than an object oriented model. > > https://en.wikipedia.org/wiki/Actor_model > https://en.wikipedia.org/wiki/Object-oriented_modeling
If you are a director and have a number of approvals, comments or whatever to commit, consider pulling the latest version of the node.js codebase and have it up and running when you do your commit. The current (Ruby) codebase supports websockets. That's how it tells browsers that there are updates to the agenda. The Node.js codebase also supports websockets, and also uses it to tell browsers that there are updates to the agenda. When run in development mode, the Node.js codebase will *ALSO* connect to the production server (Ruby) websocket as a client. So... once a change is committed the production server will notify its clients. Upon receipt of an agenda change notification, the node.js server will do a "svn update" of the local working copy of the private/foundation/board directory. If this causes files to change, a file system watch will cause the code to produce md5 digests of the contents of the files and send them to each of the browser windows connected to the node.js client. The code running in the browser will compare the name of the file changed against the agenda currently being displayed. If they match, it will send a HTTP GET request to the Node.js server for new information. The Node.js server will note that the .txt file is newer than the cached .json, and re-parse the agenda file and do its normal thing of pulling in information from LDAP and committee-info.txt and other sources. It will send the results down to the client. It will also cache the results. The client will also cache this result and update the redux store with new information. This will cause a number of React components to rerender. If the results of that render is different than the current DOM, the DOM will be updated. I didn't time it, but my sense was that the whole process took about two seconds. With a development build. Connected to svn and a a remote server. Here's a quote[1] from Ryan Dahl, the original author of Node.js: > Node is a single-threaded, single-process system which enforces > shared-nothing design with OS process boundaries. It has rather good > libraries for networking. I believe this to be a basis for designing very > large distributed programs. The “nodes” need to be organized: given a > communication protocol, told how to connect to each other. In the next > couple months we are working on libraries for Node that allow these networks. I'm excited by the possibilities. - Sam Ruby [1] https://www.americaninno.com/boston/node-js-interview-4-questions-with-creator-ryan-dahl/