meteor / meteor-feature-requests

A tracker for Meteor issues that are requests for new functionality, not bugs.
Other
89 stars 3 forks source link

Meteor's Serverless story #284

Open formspoint opened 6 years ago

formspoint commented 6 years ago

I'd like the ability to EASILY deploy Meteor (--bare/minimal) to AWS Lambda (Serverless), using Meteor as a microservices backend.

For example. I'd like to take out the email feature from many of my applications, and build a centralized micro-email-service using Meteor + Express + Lambda.

I know this has been tried before: https://github.com/DispatchMe/meteor-lambdify, but according to the Repo:

We've tried to use this in production and it doesn't really work. The problem is that Lambda keeps the node process running, and this relies on the boot process working the same every time. But, if your node process is still running, the files loaded with require are cached, so the process doesn't boot in the same way every time. We have moved to running a Meteor worker in AWS Elastic Beanstalk's worker tier.

Is there a way tweak Meteor to make it more palatable on AWS Lambda so I can go Serverless in a few cases?

doctorpangloss commented 6 years ago

A significant amount of the meteor functionality is stateful—probably all of the distinguishing features. The particular kind of statefulness in meteor is very, very ill-suited for serverless environments.

The particular project you linked to kind-of reckons with this in an unusual way. If you want to cherry-pick non-stateful meteor code to use in some other application, your best bet is to copy and paste the relatively dependency-free code straight out of the repo.

j6k4m8 commented 5 years ago

I'm curious about this as well. Do you think that serializing state to, say, DynamoDB, would get us closer?

[EDIT] "Curious" meaning, I'd be interested in investing some time on this feature.