Stack recommendation

Hi, I´m new in the meteor world, and already read one introductory book: “Your
first Meteor application”

I have a use case for Meteor and I was wondering if you could maybe provide me with some insights about it:

I´m building (actually migrating from Java, Postgres, JSF, Primefaces, Jasper stack) a System which basically:

Constantly (Every minute or so) checks for XML files in a directory and read them. (I could probably change this and read them from MongoDB)

Validate the XML against an XSD

Consume a Web Service: I send the XML file to the WS and it returns a response weather it´s syntactically correct or not.

Digitally sign the XML with a P12 certificate

Consume a second Web Service and send the signed XML and get an ID number for the XML

Save the XML document in the PostgreSQL database

Generate a PDF representation of the XML

Send the XML and PDF to the user via email and make both files available through a Web Portal so the user can check their files whenever they want

Process multiple XML files at the same time (The current Java system is multithreaded)

Based on the described flow:

  • Can I use Meteor to accomplish the mentioned functionality? If not, why is Meteor called full stack? (probably I´m misunderstanding something here)
  • I guess I´ll have to use NodeJS (or anything else? Python? Ruby? That provides me with DDP/REST interfaces) to consume the WS?
  • What can be accomplished with meteor and what not?
  • Is there any multithreading capabilities I could use to process multiple XML files at the same time?
  • Is there anyway I can be constantly checking weather there´s a new XML file to be processed in a directory?

Thank you very much in advanced for your valuable comments guys!
I look forward to hearing from you, have a good one!

Meteor as a platform, in my view, excels in creating user-oriented realtime applications with lots of UI and data presentation. It’s all about building applications for people to use.

Your case sounds more like data handling and relatively pure business logic. Any scripting language with good libraries for the formats you mention would be fine, such as Python or Node. I recommend the latter, if you like a highly dynamic, functional way of coding.

2 Likes

Can I use Meteor to accomplish the mentioned functionality? If not, why is Meteor called full stack? (probably I´m misunderstanding something here)

Full stack in this context I think refers to Meteor covering the full stack (as opposed to Angular just handling the front end). Also Meteor uses one language, JavaScript across the whole stack.

I guess I´ll have to use NodeJS (or anything else? Python? Ruby? That provides me with DDP/REST interfaces) to consume the WS?

Correct. Meteor is built on top on NodeJS. So basically you can use any node modules with Meteor. However Meteor uses fibers which means that you’ll have to wrap async methods in order to use them. ex:
var writeFileFiber = Meteor.wrapAsync(fs.writeFile);
You could use another separate server using Ruby that can talk the Meteor (NodeJS) server but it’s not going to be turn key (you would need a DDP adapter on the Ruby server).

What can be accomplished with meteor and what not?
I don’t see any blockers but you’ll have to check the NPM site to make sure there are node modules that meet your requirements.

Node can’t multithread so you would have to spawn an extra process or have a pool of node machines that can act as workers to process a queue of jobs.

Something like watch - npm might work.

Save the XML document in the PostgreSQL database

So i’m not sure how supported this will be. There’s Space Elephant which provides integration with Meteor. However if your UI is not going to consume it you may be able to use a node Postgres module.


Will your project have a front end too? I’ve used Meteor for backend only projects and it works rather well. The DDP provides RPC methods to other servers and it makes it really easy to setup a micro-service architecture in like 5 mins. Also I did this because Node with callbacks is a pain and using Fibers was way more clean (You can even use try-catch!).

2 Likes

Hi, thanks for your reply! Yes, I´ll have a Portal where users can check their XML and PDF documents anytime they want. If it isn´t too much asking, maybe you could give me some pointers on how have you accomplished using Meteor for backend only projects?