8 comments

[ 2.5 ms ] story [ 31.6 ms ] thread
I ran away from Java years ago due to its stupid, heavyweight interface/class based OOP. Now most of projects're using Typescript to simulate Java again on browsers/nodejs. Am i done yet ? No, of course, i still use javascript and unit test as before.
At first glance TyX looks like a quite impressive and comprehensive toolkit. Are there other comparable frameworks that make a good starting point for understanding the completeness and functionality of this one?
What about Google Cloud functions?
> Express is an established node.js web framework and there is a wealth of third party middleware packages that may not be available in other form. The ExpressService base class uses aws-serverless-express to host an Express application. This is not intended to host existing Express applications but more as a solution to bridge the gap for specific functionalities, for example use Passport.js to implement user authentication.

Interesting, that's not something I've considered when building lambda functions in JS. Does this add to the cold start time? Probably, right?

I feel like, when using Lambda, the point is to be lean and not invoke a framework. Using the middleware makes sense, but why not add an adapter for the package you want to use?

I'm just spit-balling.

Why would you do a multi-route API inside a Lambda? Doesn't that defeat the purpose of the Lambda itself?
That (or the command pattern) is quite useful when you’re building chat bots and similar things. So it might make sense if the API has a small surface area.

Not sure I would use it for a full blown backend though. That seems unwise.

It's not an awful way to do things, provided your app can run comfortably in a lambda. You get dev ergonomics (run locally like a traditional app), and you avoid cold-starts for infrequently-invoked endpoints.

You still get all the "serverless" benefits of FaaS, but don't need to architect absolutely everything around that paradigm. If in the future you want to move to running the thing on instances, you can do so pretty trivially.

It looks like the routing and server could well be rolled up into one FaaS on AWS Lambda. Apex Up does something similar for multiple languages and handles the API gateway config as well as custom URL SSL certs etc.

I used Apex Up for a while and it was fairly amazing for deployment. I stopped using it because the nature of my work changed.