I extensively used SQLite in a telemetry system for an electric race car. The car has an onboard computer, first a Raspberry Pi then a dual core Arm processor. Onboard code logs ~4000 messages a second into three SQLite databases. After a drive session a script merges the three databases into a single SQLite session log. The session log is decoded on a different computer to ~400 columns of time series data again stor…
> None of them could match the flexibility, ease of use, and throughput of SQLite. It sounds unbelievable that you couldn't append some CSV or binary record to file via an open file descriptor more efficiently than inserting into SQLite. (It's clear that to have the data already in SQLite form saves post-race steps.)
Why SQLite is so great for the edge
91–100 of 148 posts
Re: Why SQLite is so great for the edge
#92Earlier quoted context omitted.
Could be three different processes interacting with different systems. Say one process listening to a CAN bus, another to local Ethernet[1] and a third to some I2C/SPI sensors. If they don't interact otherwise, which they probably wouldn't given they're just logging telemetry, it's more flexible to just have them as separate processes. The I2C/SPI might be a Python script, the others in C/C++ or Rust say, whatever is…
Another question is what is interesting in a speeding electric car in such a way that 4000 events per second must be captured about it.
Curious to see how far off I am :)
Re: Why SQLite is so great for the edge
#93Re: Why SQLite is so great for the edge
#94For a tenanted SAAS app SQLite at the edge is a really compelling architecture. You have a single DB per customer/company/group with all their users woking against that. It can operate at the edge, closest to where the majority of the customers users are. SQLite could scale to even quite large customers with this. Another really compelling architecture is a DB per user, with partial/selective sync between the nodes.…
Re: Why SQLite is so great for the edge
#95Who exactly is using SQLite in production for non-trivial usecases (>10K QPS)?
Re: Why SQLite is so great for the edge
#96This no need to compile SQLite into your Cloudflare Worker. We provide it native on our platform as D1. And it gives you replication. https://blog.cloudflare.com/d1-turning-it-up-to-11/ Also, I think the idea of “edge” doesn’t make a ton of sense. What we really need is code and data that move around as needed for the best performance. See: https://blog.cloudflare.com/announcing-workers-smart-placeme... What people c…
Re: Why SQLite is so great for the edge
#97Re: Why SQLite is so great for the edge
#98Re: Why SQLite is so great for the edge
#99Earlier quoted context omitted.
Another question is what is interesting in a speeding electric car in such a way that 4000 events per second must be captured about it.
Good question. As a non-racer who enjoys watching racing, I'd imagine at least some accelerometers/gyros and load cells if they got them, and possibly Pitot tubes or similar for measuring aerodynamics when testing, to get a detailed understanding on the forces on the car and how it behaves. Motor currents probably up there too, to catch current spikes. Curious to see how far off I am :)
But at 4000 samples per second? You'd think twenty would be plenty.
NyQuist: 4000 samples per second means we are looking to get information about an up to 1800 Hz signal. A6 on the piano keyboard (excluding harmonics).
Sorry, I mean Nyquist. I was confused by NyQuil, the night time flu medicine.
Re: Why SQLite is so great for the edge
#100Last time I set up MySql it took me around 10 minutes. I don't what this person is smoking.