Comments (15)
fwiw, I tried using sqlite in memory mode and it's pretty flakey, due to changes in table locking semantics.
docker run --rm -it --privileged --name k3s-server-1 rancher/k3s server --datastore-endpoint 'sqlite://file:memdb1?mode=memory&cache=shared'
from kine.
yep.
Some of the requirements to use the sqlite in-memory store are described here: https://www.sqlite.org/inmemorydb.html - I don't remember specifically what I ran into with locking, but it should be easy enough to reproduce.
from kine.
That might be hard, since kine expects a SQL compatible storage engine. Seems like if you want an ephemeral dataatore you could get the same result out of sqlite with the special :memory: database file path?
from kine.
yep, at the same time I also hope not to introduce other components to accomplish this.
from kine.
maybe we can using https://github.com/araddon/qlbridge to translate it. https://github.com/araddon/qlbridge/tree/master/datasource/memdb
from kine.
Introduce an SQLite with the in-memory file path is still a bit heavy for us, we need some further discussions.
from kine.
What specifically are you trying to achieve?
from kine.
fwiw, I tried using sqlite in memory mode and it's pretty flakey, due to changes in table locking semantics.
Is this still the case? I've recently started exploring kcp-dev/kcp#54 (comment) how to use kine with kcp as a means to support a light-weight binary CLI program that uses controllers. I was hoping to leverage an ephemeral, in-memory DB like sqlite in-mem for this purpose.
from kine.
You could just use kine but store the SQLite database in a temporary directory that's not persistent?
from kine.
You could just use kine but store the SQLite database in a temporary directory that's not persistent?
True, but part of the goal is a super portable, self-contained means of implementing controllers in CLI programs. I'll take your suggestion under advisement. Based on the response, can I assume that in-memory sqlite still does not work well?
from kine.
You're welcome to try it and see if it works for you. It didn't work very well for a whole Kubernetes cluster using the example command I gave.
from kine.
Ack. Thank you. So just to be clear, to your knowledge no one has a) tried it since you did last July or b) worked on it since then either?
from kine.
Seems to be the same issue described here: mattn/go-sqlite3#50 (comment)
from kine.
That might be hard, since kine expects a SQL compatible storage engine.
@brandond Is this statement still valid?
The reason I think it may not, is: here https://github.com/k3s-io/kine/blob/master/pkg/endpoint/endpoint.go#L59 kine
creates a raw etcd listener without any sql specific wrapper. It looks simple task to create any backend, not just SQL. As i see a backend only has to implement this interface: https://github.com/k3s-io/kine/blob/master/pkg/server/types.go#L20 and has to start it's own listener.
🙏
from kine.
We now have a non-sql backend in https://github.com/k3s-io/kine/tree/master/pkg/drivers/nats, but it was fairly non-trivial for the Synadia folks to implemement. You might look at that as an example though.
from kine.
Related Issues (20)
- amd64 publish steps fail due to missing dependencies
- Any plan to support `ProgressNotify` feature? HOT 11
- gRPC health probe on Kine deployment does not work HOT 4
- Kine responds with the resourceVersion corresponding to the maxRowId globally, rather than the one associated with the specified prefix. HOT 10
- k3s mysql数据库存储kine表 HOT 5
- Latest version release don't include build artifacts. HOT 2
- Opentelemetry instrumentation for sql drivers including postgresql HOT 2
- mysql: check db and table exist before creating
- Kine does not handle `WatchRequest_ProgressRequest` message
- Add metrics for received etcd calls HOT 16
- Document options for etcd client authentication in tcp listener HOT 2
- Kubeadm + Kine + NATS possible bug: illegal resource version from storage: 0 HOT 5
- Add support for SurrealDB
- kine periodic query causes MySQL CPU 100% load HOT 1
- [Question] Does Having A Caching Layer Make Sense? HOT 1
- "TTL event watch failed to get start revision" HOT 3
- [Question] is kine able to support data sharding in mysql? HOT 1
- Multi-replica Kine HOT 1
- Add support for RISC-V 64
- MariaDB in README HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kine.