News for hackers. Stuff that matters.

typingmonkey

The use case is to build a RxDB plugin that backups the users data into the prequel api.
Is there a way to get a stream of changes out of prequel (via websocket)? That would make it possible to live-sync between the customer's devices.
EventReduce - An algorithm to optimize database queries that run multiple times

https://github.com/pubkey/event-reduce

Using SQLite in the browser is great until you have users that open your app in more then one browser tab.
Re:Ask HN: What are your predictions for the world in 2023? on Saturday December 31, 2022 @09:07AM (#34196537)
Zuckerberg will stop developing the metaverse.
Re:Ask HN: What is your new year's resolution? on Saturday December 31, 2022 @06:52AM (#34195638)
To not fix other peoples bugs on my github repos.
Mark Rober also gets support from the LA police while they do not care about normal peoples theft.
Re:Lichess gets a big upgrade. It doesn't go as planned on Thursday December 15, 2022 @02:29PM (#34004407)
That would only confirm that the new lichess version is faster, but not that scala3 is faster then scala2.
I do not understand this hatred agains browsers or javascript in this thread. It is not like the author has invented the world and is now responsible for it.

Btw. I made a similar tool that lets you wrap calls to resource X and then run call Y when X is idle. For example you can de-prioritise network requests or database writes. https://github.com/pubkey/custom-idle-queue

Isnt that what twitter has already done in the last years?
Re:Putting 5,998,794 books on IPFS on Saturday November 19, 2022 @05:42PM (#33675648)
Fair point. From my experience people often think ipfs works equal to sth like a shared drive or filecoin, so I had to point that out.
Re:Putting 5,998,794 books on IPFS on Saturday November 19, 2022 @05:29PM (#33675494)
You cannot "put stuff" on ipfs. Either you seed it or someone else does. If noone seeds it, it is gone. I bet most of it will be offline in 3 months.
Re:PlanetScale Boost on Tuesday November 15, 2022 @08:13PM (#33617591)
See also the Event-Reduce algorithm which is a more lightweigt version of the similar principle. https://github.com/pubkey/event-reduce
Re:Ask HN: An advice that changed your life? on Saturday October 29, 2022 @09:01AM (#33383675)
In germany it is called the holy-johannes-grasp.
Re:Nothing Says over 40 Like Two Spaces After a Period on Tuesday October 18, 2022 @05:17AM (#33244781)
Satoshi Nakamoto used 2 spaces after a period.
> reimplement IndexedDB using FoundationDB. IndexedDB is also a key value..

I did sth pretty similar last month: https://rxdb.info/rx-storage-foundationdb.html

It supports indexes, mongoDB queries etc. to store and query JSON documents via RxDB on top of FoundationDB.

Re:Mainnet Merge Announcement on Wednesday August 24, 2022 @10:32AM (#32579964)
Originally it was 3200 eth, but the price has risen too much.
Ok now I understand.

You can come to the RxDB discord for a chat if you want. I am really interessted in using WebAssembly for browser side storage.

I look forward to the day where someone reimplements IndexedDB via Webassembly, with the exact same API, so that we have a faster IndexedDB which uses the old one as storage layer :)

Thank you for these links, I will inspect that.

As far as I know, accessing IndexedDB from WebAssembly only works by passing the data through the JavaScript layer (correct me if I am wrong). So from how I think WebAssembly works, it is likely not any faster then directly doing that in JavaScript. I mean, the storage layer does not have to do any heavy computations, so tunneling the data would be more expensive then what you get from plain js.

When you store the data into an IndexedDB based key-value store, how does the querying work? Do you still use IndexedDBs secondary indexes when a query only matches a range of documents, or does the K-V store has any method to support querying a subset of the data without fetching the whole database state?

There are 2 things called "file system api" in the browser. One is the "File System Access API" to store files on a users OS. This cannot be used to store data of a database.[1]

The other one is the "real" filesytem api, which is not supported by most browsers. [2]

[1] https://developer.mozilla.org/en-US/docs/Web/API/File_System...

[2] https://caniuse.com/filesystem

I am developing a web/JavaScript database for several years now [1]. What I do not understand is, how graph based databases, (like surrealDB or gundb) plan to have great performance when they run in the browser. The thing is that you are always limited to store your data inside of the browsers IndexedDB. So as soon as you do not work with the same document-based model similar to the IndexedDB API, you will have big troubles when it comes to performance. For example how can you store and query graph based data in IndexedDB without heavily overfetching either on read or on writes? IndexedDB is already way too slow.

[1] https://github.com/pubkey/rxdb

Re:Ideas for DataScript 2 on Sunday August 14, 2022 @07:05AM (#32458277)
Sounds like the feature set of RxDB [1].

[1] https://github.com/pubkey/rxdb

Older »