-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(backend): adding idle and polling mechanism to imap #1196
base: master
Are you sure you want to change the base?
feat(backend): adding idle and polling mechanism to imap #1196
Conversation
4f60d8d
to
af8cda5
Compare
b84879e
to
4434dc0
Compare
console
Outdated
|
||
|
||
// Load the application dependencies and bootstrap the application | ||
require_once __DIR__ . '/index.php'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Load the dependencies here and don't include index.php. Treat console as a separate entry point in the application. index.php will be for web requests and this one for cli.
composer.json
Outdated
@@ -38,6 +38,7 @@ | |||
"bacon/bacon-qr-code": "^1.0.3 || ^2.0.0", | |||
"christian-riesen/base32": "^1.3.2", | |||
"composer": "^2.0.0", | |||
"cypht/cli-service": "*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we define another package? It doesn't seem to be runnable without main cypht repo, so better stay as just a subdirecrory in this repo. No need for composer dependencies here.
Please ping me when you add the ratchet lib and polling, so I can review again. |
750292c
to
47ac17f
Compare
47ac17f
to
bec8af8
Compare
96f8987
to
3d6cfae
Compare
46fae2f
to
3269e27
Compare
b170a37
to
39e5ea3
Compare
…pht into imap-idle-polling-mechanism
…ack,twilio,nexmo,broadcast
85adaff
to
1b03512
Compare
5e5c2fd
to
318da41
Compare
@kroky Could you review this for me again ? I'm currently working on integrating it with the UI, and the plan is to launch everything through the interface. The Ratchet integration is not implemented yet. |
I think we are heading in the right direction but I wonder if we really need all those classes - I see concepts like scheduler, jobs, queue manager, event notifications, etc. - since we are already using symfony components, aren't there libs to use for these implementations? I think we are implementing way too many things currently on ourselves and the code looks similar to other laravel or symfony components. Did you take inspiration from somewhere? If so, can't we use those libs as they will be better maintained and tested if we do so? |
FYI, this is coming soon: https://gitlab.com/tikiwiki/tiki/-/merge_requests/5453/ |
After a discussion with @Shadow243 about the reasoning behind the manual implementation of the new concepts, we decided to go ahead with this approach rather than introducing a ton of external dependencies which would require even more 3rd party libs. Some considerations from the discussion with Steven:
|
"ext-curl": "*", | ||
"ext-fileinfo": "*", | ||
"ext-iconv": "*", | ||
"ext-json": "*", | ||
"ext-mbstring": "*", | ||
"ext-openssl": "*", | ||
"ext-session": "*", | ||
"composer": "^2.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep this list alphabetically sorted.
Summary
This PR introduces a backend service that includes:
Key Features
Event Class: Implements an event dispatching system where events can be defined and dispatched across the system. This allows for decoupled execution of processes in response to events.
Scheduler: Manages task scheduling with cron-like expressions, mutex handling to prevent task overlapping, and timezone support.
Commands: Defines and executes registered commands with dependency injection support.
Notifications: Notification system with extensible drivers for various channels (e.g., Telegram, SMS, Slack). It allows sending notifications based on event triggers such as new emails.
Listeners: Allows the system to react to dispatched events by triggering actions such as notifications or logging.
Example Usage Command using database queue driver
Example Usage Command using sqs queue driver