JavaScript Server Page: https://npmjs.org/package/jssp
We use it to build our nodejs service status pages.
On Wednesday, January 15, 2014 4:28:52 AM UTC+8, Gregg Caines wrote:
Hey all... I'm wondering if anyone can point me to the current
best-practice for isolating requests in a web app.
Could you share how you did that?
I intend to test that kind of thing *before* building a real
application, I am new to node (I came from C++) and it may be an
interesting learning path (even if a bit difficult)
Thanks
Alain
=== Minha MesaXYZ: http://mesa-reprap.blogspot.com.br/ ===
Em
Hi Alain,
We use streamline.js. We have developed a big application with it ( 100 k
lines of streamline souce code). For an example of what a streamline app
looks like (with exception handling), see
https://github.com/Sage/streamlinejs/blob/master/tutorial/tutorial.md
Bruno
On Thursday,
the sane thing to do when your Node process encounters an error is to
shut down and restart the process
So, let's suppose we create some app, let's say google forum, like this.
There are important, frequently used and well tested stuff like showing
list of topics and post reply.
And rarely
When somebody goes to that low important section of setting, he'll just trigger an automatic restart in a few minutes plus a bugreport to developers. That's how domains are supposed to work. Nobody is saying you should crash right away. 15.01.2014, 13:01, "Alexey Petrushin"
Thanks for spending the time on this, Forrest (and everyone else so far as
well of course!).
that the sane thing to do when your Node process encounters an error is to
shut down and restart the process.
I actually agree that uncaught errors should crash the server, but what I'm
asking for
In general I'm trying to solve the problem of keeping the server running
despite bad code in a particular request
Given that no water-tight technical solution to this problem has been
suggested on this thread, perhaps this entire problem should be approached
from a different angle.
You won't get the problem is you use either streamline.js or fibers. A
try/catch in your request handler will catch all exceptions that may be
thrown by the current request (and only those exceptions). Streamline will
also give you a TLS (thread local storage) equivalent: useful if you need
to
check out Koa http://koajs.com/ you won't get separate stacks like you do
with node-fibers but similar otherwise (built with generators)
On Tuesday, 14 January 2014 12:28:52 UTC-8, Gregg Caines wrote:
Hey all... I'm wondering if anyone can point me to the current
best-practice for isolating
+1 for Fibers
On Wednesday, 15 January 2014 00:28:52 UTC+4, Gregg Caines wrote:
Hey all... I'm wondering if anyone can point me to the current
best-practice for isolating requests in a web app. In general I'm trying
to solve the problem of keeping the server running despite bad code in a
I've heard that generators helps to catch errors but didn't seen any good
explanation how to do that, if anyone knows such an article please post
link here
On Wednesday, 15 January 2014 07:48:38 UTC+4, Alexey Petrushin wrote:
+1 for Fibers
On Wednesday, 15 January 2014 00:28:52 UTC+4, Gregg
Well even though all the responses so far would require some pretty
non-standard solutions (and therefore major changes to our current app), I
really do appreciate them. We have logging, metrics and alerts on server
restarts, so we know about and fix restarts as fast as possible I believe,
As I see it, there are a few paths open to you that don't require you to do
a total rewrite using a different framework:
1. This is pretty much the exact problem that domains were designed to
solve. It's up to you to decide whether you want to recover from errors or
to shut down the process
You can use this module: https://github.com/CrabDude/trycatch It won't require any major changes to the app. I think this is exactly what are you looking for. As for better general solution, I'd second @tj on that, generators are a nice idea. I didn't try koa, but looks promising. Also, this
I've heard that generators helps to catch errors but didn't seen any good
explanation how to do that, if anyone knows such an article please post
link here
With the galaxy library, you just use try/catch to handle errors with
generators. The model is the same as async/await in other
15 matches
Mail list logo