Best way to integrate Meteor functionality into a large existing webapp


#1

We have a large production suite with a React/Redux front end. The back end is structured as a collection of micro-services written in Scala or Haskell, that offer endpoints supporting a custom websocket JSON based protocol. It’s well architected, scales well to our customer base, and our development team is familiar it’s design and happy with it. The build system uses webpack.

In parallel to this, we have prototyped some new stand-alone functionality in Meteor using Blaze. The server side is significant with external processes that connect using DDP to send/recv real-time data for monitoring and an external graph computation engine. Heavy use of collections, server side methods, etc.

I’d like to merge the Meteor app front end into our production suite by having a “split” client that includes the Meteor fed React components along with a DDP websocket to the Meteor backend, which is run in parallel with all the other Scala and Haskell backend micro-services. One webapp in one browser tab is the requirement. Conversion of the salient front end parts to React is straight forward. Use of the Meteor server nodejs process in parallel with the Scala/Haskell micro services seems easily doable as just another endpoint.

The major roadblock has been that the Meteor build process is monolithic, requiring the entire project be built with Meteor and follow their conventions, which breaks our current build system and approach. The only acceptable integration is one where Meteor client code could be built and integrated into the current build process, and at runtime the only impact is when pages with the Meteor React components are used.

The recent 1.3 and 1.4 changes to use an imports directory, decoupling of Blaze and the ability to feed Meteor data into React components are all helpful. My real question is if this is possible today. Not sure that minimongo and other dependent pieces are decoupled sufficiently yet. I’m also concerned about how the integrated project would be built, since Meteor cannot take over our build. Is something brewing on the horizon that will help?

Meteor is excellent for this kind of prototyping and would like a path for integration with our production suite. I’m looking for suggestions, pointers to any examples, or advice how this can be accomplished.

Thank you,
Mike.