vimdiesel

Untitled

Jul 25th, 2019
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. Parent web app receives a request for custom packing list - spins up a new process with a templeting engine that waits for a command.
  2.  
  3. it uses a semaphore to limit one thread being able to spinning up a process at a time
  4.  
  5. it keeps track of current running processes in concurrent dictionary of concurrent queues.
  6.  
  7. and uses named pipes to then communicate that it is ready
  8.  
  9. yhr parent web app starts a new thread, pulls the process out of its concurrent queue, sends the command message and then waits for the fully rendered index.html
  10.  
  11. the child process renders the html, streams it to a memory map file and then sends a message back to the parent app that the command is finished and gets put back in its queue
  12.  
  13. each process uses a mutex to confirm each child process is running, if one crashes or automatically shuts down after being idle the mutex will be released and the parent app will remove its reference to the process from the queue
Add Comment
Please, Sign In to add comment