Comments (5)
@noamoss in our context, queuing systems are used to manage asynchronous jobs that do not need (for various types of "need" - performance, application semantics, etc.) to be dispatched and returned in the request/response cycle of a web app.
Dispatching emails is a classic example of this. Dispatching them in a request/response cycle means the web app has more processing to do before it can respond back to the client (especially true in languages like python).
So, what is commonly done is to dispatch a "job" (a job might be a function and its arguments), put it "somewhere", and call it "later", allowing the response to return without calling the job. This design has additional benefits like the ability to retry the job if there is a failure, to set dependencies across jobs etc.
In GovFlow, because Node is an event-driven web server (it is asynchronous by design), we do the "dispatch" part using some node functionality, but, we don't get the benefit of the ability to re-run jobs, inspect job health, etc.
A concrete example is, if we try to dispatch an email and the receiving server is temporarily down, we don't know and we can't try again later.
A job queue will allow us to manage such tasks, which run run the background of the web server, more robustly.
from govflow.
@noamoss @amirozer I looked into it last week and it seems this is probably the best solution for this in node:
https://github.com/OptimalBits/bull
@amirozer if you have other choices that are in use, let me know.
from govflow.
@pwalsh not sure I understand the core of this issue, can you elaborate a bit?
from govflow.
So, SendGrid has a send_at functionality - and it turns out that Twilio does too. This basically solves our whole issue:
- we dont need to manage our own queue or schedule - they do it
- we just dispatch message tasks to those backends as we normally do
- we do need to update our communication model like in the previous comment to ensure we are tracking what got send properly (enough), and save some rendered message data for potential debugging purposes
from govflow.
This is now done in ba32772 by using the functionality of our service providers Twilio and SendGrid.
from govflow.
Related Issues (20)
- Add explicit close date for service requests HOT 1
- Expose proper CLI for commands HOT 4
- Typing repositories and injecting their dependencies HOT 1
- Communication templates missing from published package HOT 1
- Error building projects using Govflow as dependency: migrate cli source code not found HOT 3
- Allow editing of a service for a service request HOT 1
- Repositories and Services
- Limit access to backoffice API by user permissions
- Explicitly create log of events related to each request HOT 1
- Support request submissions by email HOT 1
- Different types of "services" or "request types" HOT 1
- Add user-readable Ticket ID field HOT 3
- Workflow enhancement - assignment and "ownership" logic to users via departments HOT 19
- Support email as an inbound channel HOT 3
- Update display of referenced objects in audit strings HOT 1
- Pluggable auth
- SMS communication HOT 3
- Two-way SMS implementation HOT 1
- Tracking SMS subscription status HOT 1
- Possible enhancements for message disambiguation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from govflow.