Grails & Realtime

166 views
Skip to first unread message

Christopher Dimitriadis

unread,
Jun 27, 2014, 5:11:51 AM6/27/14
to grails-de...@googlegroups.com
I have recently seen a presentation called "Reactor-Grails-realtime-Web" (http://www.slideshare.net/StphaneMaldini/reactor-grails-realtime-web-devoxx-2013) indicating that future version of Grails may embed the "grails-events" plugin, giving the framework the functionality to work in an async/realtime way seamlessly like Node.js. Is this really happening? I think it will be a "milestone" addition that will skyrocket Grails. All the existing plugins (including the standalone "grails-events") give us the opportunity to have async/realtime functionality but they don't use the Grails conventions/artifacts. It would be great to embed "grails-events" plugin resulting in framework that acts like Sails.js (http://sailsjs.org)!!!

zyro

unread,
Jul 7, 2014, 3:29:00 PM7/7/14
to grails-de...@googlegroups.com
let me just state that this topic not not "under the radar". i just
tried to reach out to smaldini to be able to provide some sort of
consolidated feedback.

one of the challenges is that this topic has so many facets reaching
from push-messages(e.g. websockets) over backend-communication(e.g.
messaging) to realtime data(e.g. reactive-streams)...

thoughts of the core team (esp. considering where grails 3 is heading
are also _really_ much appreciated of course).

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/cbd73a15-96c1-48b7-b46b-8c43e5500484%40googlegroups.com
> <https://groups.google.com/d/msgid/grails-dev-discuss/cbd73a15-96c1-48b7-b46b-8c43e5500484%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Christopher Dimitriadis

unread,
Jul 7, 2014, 7:28:42 PM7/7/14
to grails-de...@googlegroups.com
First of all I'm really glad that someone replied to this topic! I think it's very important to address issues/topics like this for further improvement of the framework. Realtime is the hyped topic the last years, considering the benefits that brings to backend scaling (see vert.x), and it would be a great opportunity for Grails to evolve. It's very encouraging that the core team considers the realtime a not "under the radar" topic and we all hope to see great things from them. Keep up your excellent work!

Graeme Rocher

unread,
Jul 8, 2014, 4:33:54 AM7/8/14
to grails-de...@googlegroups.com
Christopher we are planning to evolve Grails 3.0 in a direction of a
more event driven system with potential integrations with Reactor and
Realtime a possibility but we first need to get the basics of Grails
3.0 right (the new Gradle build and the rearchitecture on top of
Spring Boot) once we have done this we will revisit the topic, but we
would love to know the kinds of features you would be keen on seeing.

Obviously as mentioned by zyro it is a broad topic and includes a
whole bunch of areas (web sockets, Servlet async, Netty etc.) so there
is still much to define in my eyes

Cheers
> --
> 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.
> To post to this group, send email to grails-de...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grails-dev-discuss/8ee3c43f-b09f-4452-97ba-20bc1d3020b8%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Graeme Rocher
Grails Project Lead
Pivotal

Christopher Dimitriadis

unread,
Jul 22, 2014, 8:55:23 AM7/22/14
to grails-de...@googlegroups.com

Sorry for the late response but I am currently working on some grails projects!


Indeed the evolution of Grails in a realtime/event loop framework is not straightforward but it will bring a new area for Java/Groovy developers seeking for a more efficient way to scale their web apps. The are many benefits considering the fact that a multi-threaded environment will merge with server realtime events/event loop. I have recently reviewed a Node.js framework called Sails.js and literally, if you wouldn't have to code in JavaScript it would be exactly like Grails (the name is obvious). I really liked the fact that in Sails.js you could write the business logic inside the controllers as always but the client/server communication was handled with Socket.IO. The server code is the same like handling HTTP requests but in client you use Socket.IO. Sails.js automatically understands that it is a Socket.IO request and calls the relevant controller/action. "It just makes HTTP and Socket.IO interoperable, making it easier than ever to add realtime/pubsub/comet functionality to your app". I think that kind of functionality would be absolutely great for Grails and not having to add extra code/plugins(events/atmosphere plugin) or write the logic inside Services. Maybe the switching from HTTP/Socket.IO request could be configurable on Controller/action level through annotations or as always globally (Config.groovy or UrlMappings.groovy). Of cource Socket.IO reguires both client/side implementations, so there will be a need for a relevant plugin that can be used inside gsp. Another issue is the server. Do you considering Netty for this matter? Tomcat 8 defaults to NIO, with no extra configuration, so we could leverage that!


Well thank you for giving me the opportunity to discuss with you these matters and I'm looking forward for your response!




Christopher Dimitriadis

Reply all
Reply to author
Forward
0 new messages