× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hello Scott,

Am 03.08.2021 um 20:27 schrieb Scott Klement <midrange-l@xxxxxxxxxxxxxxxx>:

But, the design of the event loop does lead to added complexity when you have to wait for external events, such as waiting for database or other file access. In Node, you have to either deal with "callback hell" (like you do in browser-based JavaScript) or resolving Promises... though, honestly, once you get good at Promises they work very well. So for multi-processing, its hard to beat.

On the other hand, Python is simpler because you don't have to worry about Promises/Callbacks. It's a bit more clunky for web programming, writing REST APIs, or other types of server code (unless the server is very simple or low-volume) than Node.js, but for stuff like scripting (similar to what you'd do in CL, REXX, bash scripts, etc) Python is considerably easier.

This reminds me about a solution having been programmed by someone I don't know. Coded in Node, runs on Linux, should SELECT from an MSSQL Server, adjust a few strings and INSERT it into DB2 on IBM i. We're talking about less than 500 records.

After running flawlessly for Months (eventhough the script initially ran around 30 seconds), the cronjob starting the Node script often indicated error messages about timeouts. The developer shrugged and said, the SQL Server is too slow.

After some failures to fix the issue at hand, I reimplemented the same functionality in Perl myself. Running in much less than one second, as I'd have expected from the beginning on.

I conclude: Choosing the right tool should also take your own skills into account. :-)

:wq! PoC


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.