{"id":21638793,"url":"https://github.com/novactive/novaezaccelerator","last_synced_at":"2025-07-25T05:12:44.928Z","repository":{"id":57028630,"uuid":"281217948","full_name":"Novactive/NovaeZAccelerator","owner":"Novactive","description":"Novactive eZ Accelerator is an eZ Platform bundle for performance optimizations.","archived":false,"fork":false,"pushed_at":"2022-08-19T07:27:06.000Z","size":41,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-25T12:53:34.760Z","etag":null,"topics":["async","dxp","ezplatform","symfony","symfony-bundle"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Novactive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["plopix"]}},"created_at":"2020-07-20T20:21:51.000Z","updated_at":"2022-08-19T07:27:09.000Z","dependencies_parsed_at":"2022-08-23T16:20:26.868Z","dependency_job_id":null,"html_url":"https://github.com/Novactive/NovaeZAccelerator","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Novactive%2FNovaeZAccelerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Novactive%2FNovaeZAccelerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Novactive%2FNovaeZAccelerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Novactive%2FNovaeZAccelerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Novactive","download_url":"https://codeload.github.com/Novactive/NovaeZAccelerator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248443035,"owners_count":21104326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","dxp","ezplatform","symfony","symfony-bundle"],"created_at":"2024-11-25T04:11:44.206Z","updated_at":"2025-04-11T16:51:32.949Z","avatar_url":"https://github.com/Novactive.png","language":"PHP","funding_links":["https://github.com/sponsors/plopix"],"categories":[],"sub_categories":[],"readme":"# Novactive eZ Accelerator\n\n----\n\nThis repository is what we call a \"subtree split\": a read-only copy of one directory of the main repository. \nIt is used by Composer to allow developers to depend on specific bundles.\n\nIf you want to report or contribute, you should instead open your issue on the main repository: https://github.com/Novactive/Nova-eZPlatform-Bundles\n\nDocumentation is available in this repository via `.md` files but also packaged here: https://novactive.github.io/Nova-eZPlatform-Bundles/master/Accelerator/README.md.html\n\n----\n\n[![Downloads](https://img.shields.io/packagist/dt/novactive/ezaccelerator.svg?style=flat-square)](https://packagist.org/packages/novactive/ezaccelerator)\n[![Latest version](https://img.shields.io/github/release/Novactive/NovaeZAccelerator.svg?style=flat-square)](https://github.com/Novactive/NovaeZAccelerator/releases)\n[![License](https://img.shields.io/packagist/l/novactive/ezaccelerator.svg?style=flat-square)](LICENSE)\n\nAccelerate your Ibexa DXP (eZ Platform)\n\nThis bundles helps and aims to accelerate:\n\n- the overhall performances\n- your developments\n- productivity of your marketing/content creation teams\n- your business \n\neZ Accelerator leverages Symfony Messenger and adds asynchronoucity to eZ Platform allowing many things\nwith NO OVERHEAD and quite the opposite accelerating native actions.\n\nFor now, eZ Accelerator allows you to:\n\n- catch and dispatch asynchronously **any Events**. (_Careful though not all can be handle asynchronously_)\n- handle HTTP Cache Purge asynchronously\n- handle Search Indexation asynchronously\n\n\u003e Bonus! You can inject Middleware into the game!\n\n## How does that work\n\nFirst you need to understand the [Symony Messenger Component](https://symfony.com/doc/current/components/messenger.html).\n\n### Asynchronous HTTP Cache Purge\n\neZ Accelerator decorates the eZ Platform purger to dispatch the corresponding messages.\nTo enable the asynchronicity, you just need to know the Message FQDN\n\n- **Tag Purge**: Novactive\\Bundle\\eZAccelerator\\Message\\PurgeHttpCacheTags\n- **Purge All**: Novactive\\Bundle\\eZAccelerator\\Message\\PurgeAllHttpCache\n\n\u003e that's it! See the config example below\n\n### Asynchronous Search Index\n\neZ Accelerator decorates the eZ Platform Search Handler to dispatch the corresponding messages.\nTo enable the asynchronicity, you just need to know the Message FQDN\n\n- **Index Content**: Novactive\\Bundle\\eZAccelerator\\Message\\Search\\IndexContent\n- **Index Location**: Novactive\\Bundle\\eZAccelerator\\Message\\Search\\IndexLocation\n- **Remove Content**: Novactive\\Bundle\\eZAccelerator\\Message\\Search\\UnindexContent\n- **Remove Location**: Novactive\\Bundle\\eZAccelerator\\Message\\Search\\UnindexLocation\n- **Purge All**: Novactive\\Bundle\\eZAccelerator\\Message\\Search\\PurgeIndex\n\n\u003e that's it! See the config example below\n\n### Asynchronous Event handling\n\nThe concept is simple, everytime eZ Platform is doing something an event is triggered. eZ Accelerator gives you the \nopportunity to handle the event through a bus which gives you the opportunity to handle that event via a message \nsynchronously or asynchronicity using the transport of your choice.\n\nEverything is opt-in, you can still use the default event dispatcher or you can switch to the bus approach.\n\n## Configuration example\n\n### Handle the Event: eZ\\Publish\\API\\Repository\\Events\\Bookmark\\CreateBookmarkEvent through a bus SYNCHRONOUSLY\n\n```yaml\nnova_ezaccelerator:\n    system:\n        default:\n            # default_bus: a.default.bus.for.this.siteaccess.config\n            event_to_message:\n                eZ\\Publish\\API\\Repository\\Events\\Bookmark\\CreateBookmarkEvent:\n                    message: Novactive\\Bundle\\eZAccelerator\\Message\\VoidEventMessage # should be your own\n                    # stop_propagation: false # default\n                    # bus: a.specific.bus.for.this.siteaccess.config.and.that.event\n```\n\n\u003e You can decide to stop the event propagation as well if it makes sense.\n\n### Transport Configuration\n\n```yaml\nframework:\n    messenger:\n        buses:\n            my.bus: # could be anything and you can have many\n                middleware:\n                    - Novactive\\Bundle\\eZAccelerator\\Core\\SiteAccessAwareMiddleware\n\n        transports:\n            ezaccelerator: 'doctrine://default?queue_name=nova_ezaccelerator' # you decide the name does not matter\n\n        routing:\n            Novactive\\Bundle\\eZAccelerator\\Message\\VoidEventMessage: ezaccelerator\n            Novactive\\Bundle\\eZAccelerator\\Message\\HTTPCache\\PurgeAllHttpCache: ezaccelerator\n            Novactive\\Bundle\\eZAccelerator\\Message\\HTTPCache\\PurgeHttpCacheTags: ezaccelerator\n            Novactive\\Bundle\\eZAccelerator\\Message\\Search\\IndexContent: ezaccelerator\n            Novactive\\Bundle\\eZAccelerator\\Message\\Search\\IndexLocation: ezaccelerator\n            Novactive\\Bundle\\eZAccelerator\\Message\\Search\\UnindexContent: ezaccelerator\n            Novactive\\Bundle\\eZAccelerator\\Message\\Search\\UnindexLocation: ezaccelerator\n            Novactive\\Bundle\\eZAccelerator\\Message\\Search\\PurgeIndex: ezaccelerator\n```\n\nWith this configuration you can handle **asynchronously** whatever you want when you want.\n\n\u003e Again, careful when all the AfterEvent can probably all be handle asynchronously the main work has to be synchronous\n\u003e for most of the case. (Ex: Content Creation, etc.)\n\n## Considerations\n\n### Consumers and SiteAccesses in complex MultiSiteAccess situation\n\nWhen running the consumers, you will probably run them via **1** siteaccess (`default` maybe).\n\nThing is you might want to know the original SiteAccess. That's why eZ Accelerator injects the `SiteAccessAwareMiddleware`\nwhich tags the Message with the Orginal SiteAccess.\n\nNevertheless, and even more importantly, in your handler you need to handle according to the correct configuration.\n\nLet's imagine a situation where you have 2 siteaccess:\n\n- **A**: where the Varnish server is `V.IP.A` and database `DB.A` (default)\n- **B**: where the Varnish server is `V.IP.B` and database `DB.B`\n\nWhen you run your consumer, it will use `default` siteaccess which is setup for Varnish host `V.IP.A`\nA message from the siteaccess `B` is dispatched, it will be handle by the only consumer you ran connected in-memory to siteaccess `A`\nTherefore in this situation `V.IP.B` won't never be purged.\n\n\nTo handle those situations you can run and setup different consumers and transports and play with eZ Accelerator / Messsenger config.\n\nEx: \n\n- All default `config bin/console messenger:consume`\n- SiteAccess `A` `bin/console messenger:consume --siteaccess=A`\n\nBut you can also specify the `bus` and the `receiver`\n\n- `bin/console messenger:consume ezaccelerator --siteaccess=A --bus=something`\n\n\n## Features\n\n[Implemented](documentation/FEATURES.md)\n\n## Installation instructions\n\n[Installation](documentation/INSTALL.md)\n\n## Changelog \n\n[Changelog](documentation/CHANGELOG.md)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovactive%2Fnovaezaccelerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnovactive%2Fnovaezaccelerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovactive%2Fnovaezaccelerator/lists"}