News for hackers. Stuff that matters.
Re:KV.js by enjoylife on Tuesday April 18, 2023 @12:53AM (#35610098)
Yep. This is a quintessential example of “I’m going to learn by recreating the essence of a complex thing”… taken to the end. And then a logo is slapped on top. I’m all for js libs but this is not performant. Just use redis.
Re:KV.js by hem777 on Tuesday April 18, 2023 @02:32AM (#35610648)
Can you run Redis in browser? You can’t.

Is an in-process, in-memory database faster than making a query over network? Yes it is.

Re:KV.js by nbittich on Tuesday April 18, 2023 @02:54AM (#35610792)
no need an extra layer of abstraction to get an "in memory" database in javascript. no need, babel, webpack, ChatGpt, npm and 10000 libraries for this really. Let me show (works even on the browser):

const KV = {};

KV["credentials"] = {access_key: "XXXX", secret: "YYYY"};

console.log(KV["credentials"].secret);

Re:KV.js by hem777 on Tuesday April 18, 2023 @03:25AM (#35611008)
Maybe? Depends on the rest of the software you’d be developing and what features and abstractions you’d need.

The point was that “just use redis” is a poor and incorrect advice.

Re:KV.js by hombre_fatal on Tuesday April 18, 2023 @06:59AM (#35612330)
Now show me the rest of the functionality of the OP library like TTL.
Re:KV.js by nbittich on Tuesday April 18, 2023 @01:07PM (#35616762)
Someone already replied to this in another comment.
Re:KV.js by thegeomaster on Tuesday April 18, 2023 @05:39AM (#35611826)
* * *
Re:KV.js by gregors on Wednesday April 19, 2023 @11:36AM (#35629499)