Readit News logoReadit News
ericraio commented on SQLedge: Replicate Postgres to SQLite on the Edge   github.com/zknill/sqledge... · Posted by u/clessg
simonw · 3 years ago
Following the PostgreSQL logical replication stream to update a local SQLite database copy is definitely a neat trick, and feels very safe to me (especially since you track the Log Sequence Number in a postgres_pos table).

The bit that surprised me was that this thing supports writes as well!

It does it by acting as a PostgreSQL proxy. You connect to that proxy with a regular PostgreSQL client, then any read queries you issue run against the local SQLite copy and any writes are forwarded on to "real" PostgreSQL.

The downside is that now your SELECT statements all need to be in the subset of SQL that is supported by both SQLite and PostgreSQL. This can be pretty limiting, mainly because PostgreSQL SQL is a much, much richer dialect than SQLite.

Should work fine for basic SELECT queries though.

I'd find this project useful even without the PostgreSQL connection/write support though.

I worked with a very high-scale feature flag system a while ago - thousands of flag checks a second. This scaled using a local memcached cache of checks on each machine, despite the check logic itself consulting a MySQL database.

I had an idea to improve that system by running a local SQLite cache of the full flag logic on every frontend machine instead. That way flag checks could use full SQL logic, but would still run incredibly fast.

The challenge would be keeping that local SQLite database copy synced with the centralized source-of-truth database. A system like SQLedge could make short work of that problem.

ericraio · 3 years ago
One use case I can see this being valuable for is for a client based application and Postgres being a centralized database. The client would just query SQLite and not need to write Postgres SQL.
ericraio commented on Apple calls on global supply chain to decarbonize by 2030   apple.com/newsroom/2022/1... · Posted by u/mfiguiere
notacop31337 · 3 years ago
The issue currently is that we have gone from around 88% fossil fuels to 83% fossil fuels in the last ~2 decades.

Electricity and power make up around 20% of global use, with manufacturing taking a portion of the pie closer to 30%. Migrating those systems is a very large hurdle, but I'll admit that whilst doing some investing around this recently, it seems to be a clear target by many organisations. Migrating traditional manufacturing processes for chemicals and base materials is going to have a massive impact on the overall situation.

In saying all this, the idea that we will be anything close to decarbonised by 2030 is a joke of epic proportions, the scale of the problem is mind boggling. Not that that means we shouldn't try, as it's a very necessary goal. But I actually think being more realistic about the scale of the issue is more likely to generate more interest in crafting fixes, as opposed to these bullshit goals that in many ways, make the problem sound solveable within the timeline. Which it isn't.

ericraio · 3 years ago
I understand the environmental reasons for a company to do this, it’s very important and would you happen to know the business incentives for them doing this?
ericraio commented on 37signals Leaves the Cloud   world.hey.com/dhh/why-we-... · Posted by u/klelatti
ericraio · 3 years ago
It almost seems like their is an opportunity to build a cloud hosting service, where mom and pop data centers can plug in their infrastructure to a cloud service and let the platform manage the renting and latency based routing.

If the software is developed enough, this enables an even more global distribution. Software services don't want to manage machines and data centers don't want to manage customers.

ericraio commented on Starlink Aviation   starlink.com/aviation... · Posted by u/lgats
esskay · 3 years ago
Not sure they'd need to go as far as removing the IFE completely, but a vastly more simple and cheap system could be used instead.

Airlines still rely on those massive clunky boxes under each seat, plus a server rack which adds a fair bit of weight.

Swapping to an all-in-one system - essentially a smart tv built into each monitor that just provides a browser and basic apps for major streaming services would reduce the overall weight of the plane, fix the annoyance of that big box where your legs are supposed to go, and provide entertainment on board.

There's also the costs that airlines normally have for licensing content - those would go away completely if everyone can just log into their own netflix or prime account.

ericraio · 3 years ago
My comment was just a quick idea and what you wrote is well put!
ericraio commented on Starlink Aviation   starlink.com/aviation... · Posted by u/lgats
eganist · 3 years ago
Edit: a fatal assumption that it's the airlines providing the service underpins my original post below, whereas instead it's the providers charging passengers directly. That's an entirely different model from below, so disregard my original comment aside maybe my last line. Preserving the comment for context though.

---

At 25,000/mo, assuming a jet makes 60 trans-con segments in the US per month and a price of $20 per passenger for access on a given segment, you'd need an average of at least 20 people to pay for a full flight's worth of internet access on each segment just to clear the monthly cost, not even counting the up front investment.

And that's for a standard narrow-body passenger jet, not the G650 etc. business jets that they're targeting.

This seems like a flex, not a tool.

ericraio · 3 years ago
Let’s not forget that this could be a value add, they can easily increase flight ticket prices by $20 and offer the service for free. They can also remove inflight monitors from the planes, reducing the weight of the overall plane, increase plane tickets by $10 and offer it Free. There’s many ways to play with the numbers
ericraio commented on FB feed is 98% suggested pages and barely any friends' posts   old.reddit.com/r/facebook... · Posted by u/Erikun
tootie · 3 years ago
I quit FB a few years ago when I realized the suggested posts were just way more interesting than anything my friends posted. Idk what that says about their algorithm. Or my friends.
ericraio · 3 years ago
Instagram turned into being what Facebook was supposed to be.
ericraio commented on FB feed is 98% suggested pages and barely any friends' posts   old.reddit.com/r/facebook... · Posted by u/Erikun
JustLurking2022 · 3 years ago
In fairness, reading your search term, I had no idea what you were talking about so it's not entirely surprising the organic content producers don't match those terms well. Looks like the SEO folks do though.
ericraio · 3 years ago
Google is supposed to be able to understand this given how much data they collect on individuals and the web.
ericraio commented on Two people in Tesla killed after crashing into parked semi at Florida rest stop   cdllife.com/2022/two-peop... · Posted by u/jader201
ericraio · 4 years ago
If we assume that this was FSD, why would the driver not take control if the car is exiting the interstate?
ericraio commented on Bonsai Browser is now open source   github.com/Bonsai-Desk/bo... · Posted by u/pps
JasonFruit · 4 years ago
"Is now open source!" is the new hot way to say "We quit." Open sourcing software you decided not to bother maintaining anymore is better than nothing, yes, but without a community devoted enough to it to keep it up to date, it's not much better than dead and gone.
ericraio · 4 years ago
Thankfully, it's MIT licensed and someone can innovate on top of this.

Deleted Comment

u/ericraio

KarmaCake day54May 25, 2012View Original