If our shop adopts node, we would probably use it to develop web and mobile apps instead of 5250 green screens (for future development). Over the years, we have accumulated a large number of 5250 green screen interactive programs. If we adopt node, I can imagine we will accumulate a similarly large number of node apps.
The way to host a large number of node apps is, according to my Google searches, routing. But there are different strategies for routing.
1. Use a reverse proxy to route requests to node apps, where each node app has its own URI and port number. The reverse proxy could be a web server or something like node-http-proxy. Redbird also appears to be a package for setting up a reverse proxy for node apps (
https://github.com/OptimalBits/redbird?utm_source=nodeweekly&utm_medium=email).
2. Use ExpressJS vhost to route requests to node apps, where each node app has its own URI and port number.
3. Use ExpressJS routers and module.exports to route requests to node sub-apps or modules (something like this:
https://vimeo.com/56166857).
So, I am left with a few questions. What strategy or combination of routing strategies would be best for ensuring high availability of node apps? What strategy or combination of routing strategies would be best for scaling node apps (e.g., using the cluster module)? Is reducing the number of unique ports being listened to by node apps a good reason for using the sub-apps strategy (option #3 above)?
Thanks,
Kelly Cookson
IT Project Leader
Dot Foods, Inc.
1.217.773.4486 ext. 12676
kcookson@xxxxxxxxxxxx
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Nathan Andelin
Sent: Tuesday, October 13, 2015 12:00 PM
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] Node.js vs. MS .Net Web Application Development
Is there a reason node's cluster module would not work on the IBM i?
I'm not aware of any reason that Node's cluster module wouldn't work on IBM i. But rather than writing code to add clustering into one's "application", my first inclination would be to launch multiple instances of the same application, with each answering on a different port. Use an external "proxy/load balancer" to route requests to each.
That's how most shops implement scaling on .Net too.
Although Node.js includes a built-in HTTP service, it makes more sense to me to pair it with an external proxy which would handle things like "caching" static files, gzip compression, encryption, request logging, request routing, etc.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.