https://github.com/mploed/grails-event-example
Example Project for demoing the new Reactor based event system introduced in Grails 3
https://github.com/mploed/grails-event-example
Last synced: 5 months ago
JSON representation
Example Project for demoing the new Reactor based event system introduced in Grails 3
- Host: GitHub
- URL: https://github.com/mploed/grails-event-example
- Owner: mploed
- Created: 2016-06-01T07:18:32.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-01T10:50:08.000Z (over 9 years ago)
- Last Synced: 2025-07-07T02:47:09.806Z (5 months ago)
- Language: Groovy
- Size: 140 KB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# grails-event-example
This is the example code for my presentation on the Grails 3 event system.
Link to slides: The slidedeck to this demo can be seen at https://speakerdeck.com/mploed/building-loosely-coupled-and-reactive-applications-with-the-grails-3-event-system
The example consists of two Grails Applications:
- our-awesome-cms is the central application
- somewhere-publishing-plugin is a plug-in
In order to run the demo you first have to run grails install in somewhere-publishing-plugin after that you can run grails run-app in our-awesome-cms
Please mind that the ArcitcleController#save is sending an event over Reactor's EventBus (which is tread pooled, see application.yml in the our-awesome-cms project).
The name of the vent is our.awesome.cms.article_published and it's payload is the actual Article.
Inside our-awesome-cms there are two services TwitterService, EmailNotificationService that are consuming the event (see the annotations)
In addition to that there is another Service called FacebookPublishingService in the somewhere-publishing-plugin which is consuming the given event as well.
This demoes the feature that we can now loosely couple plugins and applications that are using them.