I wrote Pode.Queues to be a companion module for use with Pode & Pode.Web projects. For those of you that don't know about these projects, I have found them to be the best PowerShell based web server and API delivery platform to date. You should really take a look!
Pode.Queues doesn't require that you use it with Pode. It contains code to detect if it is running under Pode or not which allows it to be used stand-alone with PowerShell run-spaces and you can still enjoy all of it's features. But where it really shines is operating under the Pode framework.
This module was born out of two needs: the need to have a communication and control structure between multiple PowerShell run-spaces; and the need for User to User communications mechanisms.
I try to write my scripts/APIs to be utilitarian where one script/page can call on another script/API to perform needed functions. You may ask, "If it is an API, couldn't you just issue a REST API call to the API?" The short answer is: Yes.
But why not do those API calls in memory instead of passing it through the NIC? Not to mention, how would you handle run-space Control commands to the APIs as "Interrupts" or "Events"? This module provides those abilities.
Also, what about wanting your site's users to have the ability to communicate between themselves, or having the ability for the site itself to be able to message a single user or broadcast a message to all users. Say something like the site notifying all users that it is about to restart itself so that the users have warning enough to save their work? Now you can!
Pode.Queues is a Cross-Platform module for creating Queues to handle inter-service (Run-spaces) Control/messaging and User messaging capibilities for use with Pode & Pode.Web modules. This module lends itself to "distributive" web sites and APIs where there is a "Control" site and one-or-many "Worker" nodes that are interconnected!
All documentation and tutorials for Pode.Queues can be found here - this documentation will be for the latest release.
To see the docs for other releases, branches or tags, you can host the documentation locally.
- Queues (First In - First Out - FIFO):
- Pode Registered Services (Run-spaces):
- Control
- Initialize; Terminate; Reboot; Run; Wait; Flush
- Messaging
- Pode <--> Run-space
- Run-space <--> Run-space
- Run-space <--> User
- Pode Registered Users:
- Messaging
- Pode <--> User
- Pode Broadcast --> All Users
- Run-space <--> User
- Run-space Broadcast --> All Users
- User <--> User
- User Broadcast --> All Users
- Messaging
- Control
- Pode Registered Services (Run-spaces):
- Stacks(Last In - First Out - LIFO):
- Global - Accessible by all Run-spaces/Pages
- "Personal" - Accessible only by the Run-space/Page that Created Them
You can install Pode.Queues from the PowerShell Gallery:
Install-Module -Name Pode.Queues
Pull Requests, Bug Reports and Feature Requests are welcome!
You can find a list of the features, enhancements and ideas that will hopefully one day make it into Pode here in the documentation.