hi,
first of all i think it is important that this topic is brought to
attention again and that we get a "common" understanding of what we are
dealing with, especially in the context of a grails-app.
i had some correspondence with smaldini regarding the
platform-core/events-push/grails-events/spring-websocket evolution and
the current state is (as i am currently aware of, please correct me if
something seems not correct):
- grails-events replaces the event part of platform-core
- events-push (newer versions) use grails-events now and leverage the
atmosphere framework for push messages
- spring-websocket is currently independend of the plugins above
when talking about websocket messaging i do not mean websockets
exclusively but more in general bidirectional and/or push communication
with (browser-) clients. frameworks like atmosphere and sock.js (which
is used by spring websocket) provide fallback options to
streaming/long-polling/etc. for servers/clients not yet fully capable of
websockets.
to avoid confusion regarding the technologies that are in use, i think
it is important to distinguish between
- event-processing (in terms of reactive programming) and
- websocket-messaging
now, given there is a multitude of technologies available for each of
those, my personal, opinionated selection (for use in a grails-app) is this:
- reactor for event-processing (possibly with the grails-events plugin)
- spring websocket messaging (possibly with the spring-websocket plugin)
because of a grails-apps underlying spring-stack that is there anyway,
reactor and spring websocket just fit _extremely_ good in my opinion and
both are very actively developed.
going back to the question of grails-events <--> spring-websocket
integration.
for me, the main question is if this layer of integration is necessary
(or provides enough benefits).
e.g.
- sending a push message from anywhere in the app is just a simple call
to brokerMessagingTemplate.convertAndSend(...) (instead of events-push
former browser: true flag)
- receiving a websocket-message is now working a bit different
(annotated controller method vs. former events-push annotated service
method). but imho, this is a very good thing because its a clear
separation of concerns. client messages, just like requests, hit the
controller layer, and not directly a service method. from there, sending
a reactor/grails-events event is just another call to reactor.notify()
respectively event()
also, there might be apps where people decide to use the following
combinations (neither would ):
- plain reactor without plugin / spring-websocket plugin
- grails-events plugin / spring-core websocket messaging without plugin
bottomline, this means even without special integration here, it is
perfectly possible (even simple i would say),
- to send push-messages to clients from anywhere (including event handlers)
- to trigger reactor events from anywhere (including received websocket
messages)
however, im very open to suggestions on
- what features a potential grails-events <--> spring-websocket
could/should contain
- what you liked about how grails-events <--> events-push worked and
what of that should be adapted
last but not least, smaldini: would be awesome if you chime in providing
your point of view :)
zyro
> --
> You received this message because you are subscribed to the Google
> Groups "Grails Dev Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
grails-dev-disc...@googlegroups.com
> <mailto:
grails-dev-disc...@googlegroups.com>.
> To post to this group, send email to
grails-de...@googlegroups.com
> <mailto:
grails-de...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/grails-dev-discuss/1574cf74-6dc5-4f7a-ba50-518600d33ba4%40googlegroups.com
> <
https://groups.google.com/d/msgid/grails-dev-discuss/1574cf74-6dc5-4f7a-ba50-518600d33ba4%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit
https://groups.google.com/d/optout.