vaizard / glued-integrations
Integrations manager.
Installs: 7
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/vaizard/glued-integrations
Requires
- php: ^8.3
- ext-apcu: *
- ext-bcmath: *
- ext-curl: *
- ext-gd: *
- ext-gmp: *
- ext-imap: *
- ext-json: *
- ext-mbstring: *
- ext-mysqli: *
- ext-pdo: *
- ext-pdo_pgsql: *
- ext-readline: *
- ext-soap: *
- ext-xml: *
- league/openapi-psr7-validator: ^0.22.0
- nyholm/psr7: ^1
- nyholm/psr7-server: *
- php-di/php-di: ^7
- psr/http-message: ^1
- ramsey/uuid: ^4
- sabre/event: ^6
- slim/http: ^1
- slim/slim: ^4
- vaizard/glued-lib: dev-main
- zeuxisoo/slim-whoops: ^0.7
Requires (Dev)
Suggests
- ext-xdebug: For dev only
This package is auto-updated.
Last update: 2025-10-28 17:04:42 UTC
README
IF is Glued's integration framework, message queue and scheduler.
Implementation Overview:
- if microserviceis a set of methods implemented as a separate git project- glued-if-service_nameto interact with a foreign service
- deploymentis a configuration and authorization context of an- if microservicedefined by a row/object of the- if__deploymentstable
- actionis a- deployment:microservice.methodmap stored as a row in the- if__actionstable. actions are triggered by calling an API endpoint (webhook) or by the IF scheduler.
- action statemakes a stateful history using- if__actions_states
- scheduleris implemented as a set of cron-like rules with some extra sugarcoating (i.e. ttl) stored in the- if__schedulertable and an associated producer that will periodically fill up the- message queuewith work and runner daemons that will subscribe to this queue and launch workers (perform the webhook api calls)
- message queueis implemented as the- if__mq_queuetable configuring message queues clients can subscribe to.
- messagesare implemented as the- if__mq_messagestable which maps a queue to a message payload and message headers (i.e. ttl, requesting, replies, etc.)
- notificationsare implemented using the pg_notify capabilities and can be further extended with rabbitmq.
- loggingis by default implemented using the monolog library.
Integrations
IF orchestrates if microservices which facilitate integration with anything thats out there.
- Each if microserviceimplements working with a remote/externalservice.
- Each if microservicehas associateddeployments(a set of attributes describing usage of anif microservice), i.e:- deployment metadata (i.e. name, description, etc.)
- deployment connection (i.e. remote host, auth tokens, rate limits, etc.)
- deployment RBAC rules* (i.e. who can use the if microservice)
 
- Methods implemented by an if microservice(i.e. CRUD operations against an external service) are associated to deployments asactions(actions are if microservice methods runnable in the context of a deployment configuration). actions- can run on-demand (i.e. provide a caching data transforming interface to external services such as glued-if-ares_gov_cz)
- can run according to a schedule (by the scheduler)
- can interact with each other (via the message queue)
 
*) RBAC is provided by glued-core's authorization proxy
Scheduler
tbd
Message queue
The message queue is loosely inspired by RabbitMQ to enable an easy transition between the builtin PostgreSQL based queue and Rabbit. The indented MQ usage is
- to distribute scheduled tasks to workers,
- to facilitate communication between the loosely coupled microservices
- to ensure internal notifications to users are send and individually delivered (with or without user confirmation)
IFMQ, when acting as a RabbitMQ-like message brooker, implements the concepts of
- producers/ code responsible for generating messages - php implementation is part of glued-lib
- queues/ 'message destinations' implemented via the- if__queuestable
- consumers/ clients subscribed to queues
- exchanges/ code responsible for delivering messages to queues - direct (unicast), fanout (multicast), header (rule based multicast)
Messges can be