What's wrong with many tabs? The DB handles getting hit by many tabs correctly -- it's just as if many processes were hitting the db in a non-browser environment.
It's mostly works with OPFS but with a few edge cases. They are working with the browser vendors on improving this in OPFS.
Alternatively run it in a SharedWorker (https://developer.mozilla.org/en-US/docs/Web/API/SharedWorke...), which seems to have made a comeback after being dropped for security concerns. Or do some sort of leader election with browser tabs and use a BroadcastChannel.
SQLite WASM uses SharedArrayBuffers and Atomics to turn async OPFS apis into blocking APIs (really just _one_ api -- getSyncAccessHandle)
Given the use of SharedArrayBuffers and that SharedArrayBuffers can't be used in a shared worker (funny), SQLite WASM doesn't work in shared workers.
If getSyncAccessHandle was made synchronous then maybe everything would just work. It'd also improve SQLite WASM perf by 30% according to their measurements [1]
You can't write to SQLite from multiple processes either, so you mitigate that exactly the same way you do for a desktop app (i.e. show "Can't access DB for writing because other instance is running")
You can write from multiple processes and this is enabled by default (see PRAGMA locking_mode [1]). If you've got multiple writers you might have to occasionally handle SQLITE_BUSY and retry.
If your app cannot handle concurrency while your back-end i/o is via a machine-local singleton, that sounds like a a problem which will come up for more than just multiple tabs. If architecting around this known-fact is a challenge, an engineer may have bigger problems.
I think it's too late, he bet the company on it and has no other long term plans. With the inevitable implosion of online advertising and the declining interest in FB properties I think they are going to show more signed of struggling next year.
They could also stop civil asset forfeiture - in 2014 that surpassed burglary in the US as the top form of theft by value. Without being charged or convicted of any crime police can take cash and property, which can then be sold for funding. The case is brought against the property instead of the individual, and then to get it back they have to prove the innocence that it wasn't used in a crime, rather than the state having to prove that it was.
Somehow they still manage to write people a lot of tickets, something that generates revenue for the police, and steal the money of legal marijuana businesses, something else that generates revenue for the police.
There are no consequences to the police for ignoring the parts of the job that do not directly generate revenue for the police.
This is not an overarching problem with "the criminal justice system" other than the fact that the police almost everywhere in the US have a culture of graft and rentseeking, and won't do anything if there isn't money or press involved.
yeah, people won't ever admit that Twitter was already dead.
It's probably because many Twitter former employees lurk here on HN and can't understand why nobody is rooting for their beloved platform, of course shame on EM for his abusive behaviour, people before money, always, but nobody will miss Twitter if it really dies.
Half of what Twitter does is superfluous and the rest is badly executed.
A normal company would not survive with only 20% of the staff, Twitter might thrive, because honestly, at its core, as many have already pointed out, Twitter is “writing on a bathroom wall”.
Also: never forget that this happened and then Kashoggi was killed by the Royal Prince Bin Salman
But while people are worried now that Prince Al-Walid invested 1.9 billion dollars in Musk's Twitter, they also forget that till 2020 he owned 4.6% of Twitter through the Saudi investment fund he controls, the shares were acquired in 2015, when the spy was already working for Twitter and the management had already confronted him about the issue!
I don’t think so. The tech stack is (was) quite impressive, if we don’t forget that Twitter is basically a real-time read-write database which is famously hard to scale/distribute.
Not the same. A single tweet may need to be distributed to 50 million followers. I’m not a distributed database guy, but that to to me looks like a very different problem than what WhatsApp faces.
Let’s not compare all employees to devs. Twitter has (had) absolutely business critical other teams, they are a very human-facing company. Does whatsapp have to make decisions whether to ban/unban a former US president? Also, I think Twitter gets a much more uneven usage - their daily usage is lower, but peaks can be similar (~1 billion user).
Also, graph algorithm’s likely don’t scale linearly, 10 times more edges may have much much more resource usage.
So you're saying WhatsApp had no critical other teams, but Facebook bought them anyway for a record breaking sum of money at the time, because they looked nice on picture?
I don’t know, but I’m fairly sure that the user base is the most valuable part of a social network/messenger platform, not the tech stack, or the staff.
If Twitter's Grand Pubah sends one tweet, it goes to 118M people. I can't see how many times he tweets per day, but it's way over 10, and just that would generate 1.2B messages.
When Elon tweets, I'm guessing Twitter doesn't go do 118M write transactions to all his followers. But what it would have to do is flag all 118M accounts as "something as changed". Then the next time one of his followers is on Twitter, which could be a month from now, that flag means "uh oh, better go see what changed", and to do that, all of the follower's "following" accounts have to be accessed to find the change, if there is only 1 change flag per Twitter account.
If Twitter keeps a change flag per "Following" user, that makes finding changes easier, but also means lots more flags to keep updated.
Or, you could go "stateless" and not use flags, but then it seems like you'd be doing a lot of work for users who may not see it for days or months.
How many people do you talk with on WhatsApp? Also, how many of those live in very very different geographical areas? I feel twitter’s graph has much more edges, and the nodes (users) can’t be partitioned as well.
Also, Twitter does real-time data analysis, which is another of their money sources, and takes a huge amount of computing.
This is very nit picky. The entire web works by severs “seeding” data to the client, so by your logic you can’t “put stuff” on the web. The difference with torrents and IPFS is you can have multiple servers seeding the same content, and not be dependent on any one.
I’m not making any predictions about how long Z library stays up, but the illegal seeding of movies and tv shows has remained very strong until today.
IPFS is actually worse to put stuff in than the web or torrents, in my experience.
Last time I tried it, the ipfs service used its own storage scheme. Meaning it's not like pointing Apache at a directory. You take your stuff, and upload it into ipfsd first, and it puts that data into its storage system.
So to do this from scratch (not mirroring somebody else's content) needs a minimum of >62TB -- 31TB of content, which ipfsd will then package into 31TB more + overhead in its storage area.
And of course if you're doing this, you're expecting other people to mirror this stuff, so count on hundreds of terabytes of traffic.
So this is easily ~$3K in hard disks alone, plus the NAS/server hardware, plus traffic, plus the willingness to risk the FBI coming and grabbing all of it.
IPFS isn't my favourite tool either but you are wrong.
> So to do this from scratch (not mirroring somebody else's content) needs a minimum of >62TB -- 31TB of content, which ipfsd will then package into 31TB more + overhead in its storage area.
IPFS has `nocopy` option for quite some time now, which avoids copying.
> And of course if you're doing this, you're expecting other people to mirror this stuff, so count on hundreds of terabytes of traffic.
Of course you are expecting other people to mirror this stuff, and naturally that will generate some traffic. How is this not a problem with web mirrors or torrents?
> IPFS has `nocopy` option for quite some time now, which avoids copying.
Oh, didn't find about that one. Thanks!
> Of course you are expecting other people to mirror this stuff, and naturally that will generate some traffic. How is this not a problem with web mirrors or torrents?
I mean, if I put a book archive on the web, I'd expect the vast majority of people to just grab whichever book they were interested in. Mirroring is a possibility, but a non-trivial thing to accomplish, and can be discouraged.
Meanwhile, on IPFS I'd expect a much higher likelihood of somebody trying to replicate the whole archive, so one would do well to keep that in mind and to be prepared for it.
Re #2: Perhaps that's true, but on the other hand, the load will be distributed across all seeders with IPFS whereas your web server will be the only one shouldering it.
I have entire sites hosted for free this way, whereas other hosts like vercel and netlify will charge you for traffic. you can just put your big assets on ipfs+filecoin pins and have unlimited traffic. the ipfs CDNs help with performance.
IPFS is a caching or distributing layer, not a persistent storage. There are some attempts to make a storage that backs IPFS by Filecoin team (Filecoin and IPFS teams have a lot of overlap.)
Yes, but there are people who claim that IPFS is uncensorable or permanent. I saw that a lot from NFT salespeople who were claiming you’d own something forever with no further payments needed, or even that a copyright claim couldn’t take it down.