4 ms·
Lol you guessed it. I actually like vertx over spring in general. the rxjava is the real problem.
by rr808 3y ago
Lol you guessed it. I actually like vertx over spring in general. the rxjava is the real problem.
- winrid 3y agoEven in Node I found the rx* libraries to be a bad abstraction and slow. I tend to just have my own observable stuff as I only want a small feature set in that regard anyway.
- porridgeraisin 3y agoYes same. I write myself a nice typed pipe() [2], and a one-after-the-other promise queue[4] whenever I need it but that's it really. I use web streams a lot. The most abstract I'm usually willing to get is using River [5] instead of array's map/filter/reduce. There seems to be an absolute obsession over these libraries now though. I assume it's fueled by every frontend library pushing functional patterns. See Effect [1] for example, it's insane how much is piled on. [1] https://effect.website https://effect.website [2] type Fun<A, B> = (a: A) => B export const pipe = <A, B>(f: Fun<A, B>) => { return { to: <C>(g: Fun<B, C>) => pipe((arg: A) => g(f(arg))), start: () => f, }; }; [4] class TaskQueue<U = any> { private pending: Promise<any> = Promise.resolve(); add = <T,>(task: () => Promise<false extends true & U ? T : U>) => (this.pending = this.pending.then(task).catch(task)); } [5] https://GitHub.com/wiselibs/river https://GitHub.com/wiselibs/river
- porridgeraisin 3y agocorrection: https://GitHub.com/wiselibs/wise-river https://GitHub.com/wiselibs/wise-river
- p2detar 3y agoI love Vert.x and I actively use it right now. I actually like what they did with the Future [0] and Promise [1] interfaces, although there are a bunch of confusing (to me at least) aspects with the .map and .compose methods. That being said my biggest hurdles are always combining blocking with async code. That usually bloats my code. Examples are blocking LDAP search that needs not block the event loop. 0 - https://vertx.io/docs/apidocs/io/vertx/core/Future.html https://vertx.io/docs/apidocs/io/vertx/core/Future.html 1 - https://vertx.io/docs/apidocs/io/vertx/core/Promise.html https://vertx.io/docs/apidocs/io/vertx/core/Promise.html
- kabes 3y agoBut rx comes out of the .net world, not from node