4 ms·
Nice work building something! It seems the node stuff only works with express? There are lots of other server frameworks and libraries in the node ecosystem.
by time0ut 6y ago
Nice work building something!
It seems the node stuff only works with express? There are lots of other server frameworks and libraries in the node ecosystem.
The way you configure the token needs some work, too. It really should be passed in in the client code instead of having people edit your library.
You may want to give clients a way to redact or suppress stuff in case they don't want to send any sensitive URLs over.
Have you done any benchmarks to see what sort of load this puts on a client app?
- aj_nikhil 6y agoThanks. Yes currently this will only work with Express.js. Agree that the token mechanism isn't the optimum right now, as on updating library you will have to reconfigure it. I will try what you suggested, of keeping it in the client code. About load this puts, all the work is done post sending the response the client from your node.js app so it should not impact response time at all. While manual benchmarking I couldn't see even 10s of microseconds difference while using this.
- SwiftyBug 6y agoI understand that it shouldn't impact response time because it does all the processing after it's been sent, but ultimately having that extra workload on your server should cause some impact, right?
- aj_nikhil 6y agoYes, extra requests your server/application has to send(to Apio) will put load on it. This is just a start so we will have to see how can we optimize this. Maybe agent based solutions which are used by Datadog or Newrelic might be a better way than Middleware based solutions.