Close

Creating a Message Oriented Middleware paradigm:

A project log for Control My Lights

Control My Lights using a website, Twitch chat, YouTube chat. controlmylights.net

edward-c-deaver-ivEdward C. Deaver, IV 10/16/2020 at 20:000 Comments

By May I knew I wanted to break up the project into components or loosely coupled classes that would allow as many data inputs as I wanted and as many outputs. To do this I initially used ExpressJS and SocketIO to build a router to push data around my system. I now know Express is one of the slowest web servers for NodeJS and is not made for this. I had it setup to accept a Post request to the “sendcolordata” endpoint running on my machine. The internal components, like the eventual MongoDB component and Arduino component, would connect to the SocketIO server running on the “internalcolordata” room. Going with this architecture, Message Oriented Middleware, allowed me to build individual components like a website to control it, and easily test each component. Another benefit to this architecture was it allowed the files to act as microservices, so if the Twitch component failed or the Mongo component failed, the whole program would stay up. This also allowed me to implement a queue system, initially using Bull, later Redis for color commands.

For the first half of the project this was the architecture:

Then this: 

Then finally this: 

Discussions