You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think, passing context as second parameter is wrong. API can't be scaled. For example, I want to support SharedArrayBuffer and need to pass it as third parameter for existing API. Maybe later, some additional parameters passed as fourth, fifth, e.t.c parameters.
Need to pass options object as second parameter and it can be scaled in more mature way.
Also, I think context, inspired from microjob, has ugly design:
I think, passing
context
as second parameter is wrong. API can't be scaled. For example, I want to support SharedArrayBuffer and need to pass it as third parameter for existing API. Maybe later, some additional parameters passed as fourth, fifth, e.t.c parameters.Need to pass
options
object as second parameter and it can be scaled in more mature way.Also, I think
context
, inspired from microjob, has ugly design:node-routine/src/index.ts
Lines 58 to 66 in 95c554d
Maybe need to deprecate it and implement simple
data
, which received as parameter on "go function":It solution so friendly with TypeScript type inference via generics.
Also
JSON.stringify(data)
more performant instead it:Also exists problem with dynamic function body:
And
eval
of it can't be cached for high-load purpose applications and V8 JIT can't properly optimise it.The text was updated successfully, but these errors were encountered: