Sharing Top Content from the Angular-sphere.

Building a real-time web app with Angular/Ngrx and Vert.x

  • Here is an extract of the corresponding code (from RemoteAction) { if (action.publishedByUser) { console.error(“This action has already been published”); return; } action.publishedByUser = this.currentUser; string) { (error, message) = { // Handle message from subscription if (message.body.publishedByUser === this.currentUser) { // Ignore action sent by current manager return; }…
  • Any actions that extend RemoteAction class will be published to the event bus.@Injectable()export class AppEventBusEffects { constructor(private actions$: Actions, private appEventBusService: AppEventBusService) {} // Listen to all actions and publish remote actions to account event bus @Effect({dispatch: false}) remoteAction$ = this.actions$ .
  • filter(action = action instanceof RemoteAction action.publishedByUser == undefined) .
  • do((action: RemoteAction) = { }); @Effect({dispatch: false}) login$ = this.actions$ .
  • do(() = { });}You can see all of this in action by locally launching the server and the client app in two separate browser windows.Bonus: the demo app also includes user status (offline/online), based of the event bus connection status.The counter state is shared and synchronized between connected clients and…

Welcome to the real-time web! It’s time to move on from traditional synchronous HTTP request/response architectures to reactive apps with connected clients (ouch… that’s a lot of buzzwords in just…

Welcome to the real-time web! It’s time to move on from traditional synchronous HTTP request/response architectures to reactive apps with connected clients (ouch… that’s a lot of buzzwords in just one sentence)!

To build this kind of app, MeteorJS is the new cool kid on the block (v1.0 released in october 2014): a full stack Javascript platform to build connected-client reactive applications. It allows JS developers to build and deploy amazing modern web and mobile apps (iOS/Android) in no time using a unified backend+frontend code within a single app repo. That’s a pretty ambitious approach but it requires a very opinionated and highly coupled JS tech stack and it’s still a pretty niche framework.

Moreover, we are a Java shop on the backend. At AgoraPulse, we rely heavily on :

So my question is…

What are the best choices to build real-time Angular client apps, connected to a JVM-based backend these days?

Our requirements are pretty basic. We don’t need full Meteor’s end-to-end application model. 

We just want to be able to :

Reactive apps is a hot topic nowadays and there are many great libs/platforms to build this type of event-driven architecture on the JVM:

Note: for Grails, the Spring Websocket Grails plugin looks interesting, especially if you use the full Spring ecosystem: Mike Plummer has a great example and a blog article about Websockets in Grails 3.0 .

ReactJS and Angular are the…

Building a real-time web app with Angular/Ngrx and Vert.x