tursodatabase / turso-docs

Turso Documentation
https://docs.turso.tech
MIT License
11 stars 49 forks source link

Add sqlite3 compatible Node package to documentation #51

Closed penberg closed 8 months ago

penberg commented 1 year ago

@barbieri pointed out that https://github.com/libsql/libsql-node-sqlite3, which is a compatibility package with sqlite3 should be documented. Perhaps even preferred over the libsql specific APIs, which require developers to learn a new API.

CodingDoug commented 1 year ago

We had a lengthy discussion about this. I'm not in favor of making a compatibility library the preferred choice for one major reason - it handcuffs our ability to push incompatible feature updates directly to the hands of developers. When we start to add thing like end user auth and realtime updates, a compat library will likely not have the right integration points to make those work well. We'll end up pushing people back to the native APIs to use incompatible features.

Secondly, libsql-node-sqlite3 simply doesn't work everywhere. It requires nodejs, which is fundamentally incompatible with what many of our customers are doing in edge environments, especially Cloudflare. We should push people to the most compatible and portable solutions first, then offer compatibility layers for the specific cases where they are desirable (e.g. Knex).

Thirdly, we have no evidence that people find the current SDKs difficult to use. They are already extremely simple. If anyone has specific observations about their ease of use, I'd love to know more, because that might be doing something wrong that should be improved asap.

Fourthly, there is advantage to all of our client SDKs for all platforms to expose more-or-less isomorphic APIs. This makes it easy for someone to jump between them and understand their shape and function. And ultimately, sites like Stack Overflow can answer a question about one SDK and have it essentially apply to the users of all of them.

(Related: I already feel like the go SDK should offer a public native API that matches our other SDKs, while also offering the current driver as compatibility layer to maintain in parallel.)