Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kentonv
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
41 ms
·
751.
▲
by
kentonv
3y ago
Out of curiosity, what makes the aliased version less compact? Naively I'd think there's not much room to optimize the representation of a byte array.
752.
▲
by
kentonv
3y ago
Nice tutorial. One catch: // asynchronously make the request to the counter service // don't wait for this to finish before responding back to the client fetch("https://api/" +
753.
▲
by
kentonv
3y ago
100% of people writing databases also know how fsync() and msync() work. I interpreted this thread as being targeted at a wider audience.
754.
▲
by
kentonv
3y ago
> This is not true. This depends on how the file was opened. You may request DIRECT | SYNC Well sure, but 99.9% of people don't do that (and shouldn't, unless they really know what they are doing). > In the world of today, y
755.
▲
by
kentonv
3y ago
I'd expect most serious web servers support it. I've written one that does (workerd), it's not too hard. That said, it's tricky to use if the server also does TLS termination... then you need kTLS, which is a much bigger
756.
▲
by
kentonv
3y ago
Oh, hmm, yeah, perhaps OP meant something more like using raw sockets to get packets directly into userspace without relying on the kernel to arrange them into streams? I'm not very familiar with that though.
757.
▲
by
kentonv
3y ago
Yes. I think mmap() is misunderstood as being an advanced tool for systems hackers, but it's actually the opposite: it's a tool to make application code simpler by leaving the systems stuff to the kernel. With mmap, you get to avo
758.
▲
by
kentonv
3y ago
Probably the most common example is sendfile() for writing file contents out to a socket without reading them into userspace: https://man7.org/linux/man-pages/man2/sendfile.2.html
759.
▲
by
kentonv
3y ago
> Be prepared to deal with blocks not necessarily updating to disk in the order they were written to, and 10 seconds after the fact. This can make power failures cause inconsistencies. This is not specific to mmap -- regular old write()
760.
▲
by
kentonv
3y ago
> I think cap'n'proto gets a little closer to having an actual notion of objects, in that the protocol has actual identifiers built in. But it's still more about services than objects. Cap'n Proto is all about the obj
761.
▲
by
kentonv
3y ago
Compliance is a completely different conversation. In the Cloudflare Workers platform, we have a number of features to control "jurisdictions" where compute runs or where data is stored. These are meant for compliance, not for per
762.
▲
by
kentonv
3y ago
These are offered more as an escape hatch in case the system doesn't do what you want automatically. But the goal is definitely for the system to do what you want automatically, so that no one ever has to provide these hints. I actuall
763.
▲
by
kentonv
3y ago
When this site says Wasmer's "cold start time" is 50ns, what is it measuring? You can't even do a syscall in 50ns. Cloudflare's 5ms includes time to read the application code from disk. (I'm the one who origina
764.
▲
by
kentonv
3y ago
I was going to complain about a GCC codegen bug open since 2007 but it looks like it finally got fixed in 2020! https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33799 Clang still has the same bug though, filed in 2012. ht
765.
▲
by
kentonv
3y ago
I share ocdtrekkie's confusion here. Your original complaint was the lack of a "miniflare", i.e. a simulator for local development purposes. But you can run Sandstorm itself locally and there are in fact tools to streamline t
766.
▲
by
kentonv
3y ago
To clarify, Sandstorm does not sell any service today. It is an open source project that makes it much easier to self-host apps on your own server -- maybe in a datacenter, maybe on a device in your home. Once upon a time, years ago, Sandst
767.
▲
by
kentonv
3y ago
The maximum size will increase to at least 1GB in the near future, enabled by our recent rewrite of the underlying storage layer. Perhaps we can push it further, even, we'll see. But yes, I think the next step is then some sort of shar
768.
▲
by
kentonv
3y ago
Sandstorm was actually a startup with product and marketing and we did spend a lot of time trying to make it as simple as possible to install. The only way to make Sandstorm easier to set up would be to partner with hosting providers to off
769.
▲
by
kentonv
3y ago
FWIW, the most-active Sandstorm developers over the past couple of years, such as zenhack (to whom you replied) and ocdtrekkie, are not Cloudflare employees, and never were. (They were never Sandstorm employees either.) For my part, I am in
770.
▲
by
kentonv
3y ago
https://sandstorm.io/how-it-works Sandstorm implements a capability-based security model, where not only does each app run in a strong sandbox, but a new instance of the app is created for each document (or whatever the a
771.
▲
by
kentonv
3y ago
I wrote a blog post answering that: https://sandstorm.io/news/2014-08-19-why-not-run-docker-apps Oof... 9 years ago.
772.
▲
by
kentonv
3y ago
Ah! Fair point. ;)
773.
▲
by
kentonv
3y ago
No, Sandstorm is not owned by Cloudflare. Cloudflare hired most of the team (myself included) but the company remained independent. Sandstorm the company dissolved last year. The open source project remains alive via the Sandstorm Community
774.
▲
by
kentonv
3y ago
Note that although there is unfortunately no complete standard that we could follow for `connect()`, the API is largely based on the JavaScript streams standard. `connect()` itself returns a ReadableStream and a WritableStream representing
775.
▲
by
kentonv
3y ago
So, a challenge here is that SQLite is designed for single-writer scenarios. One writer performing a transaction necessarily has to block any other writer from proceeding in the meantime. (There are some experimental approaches in the works
776.
▲
by
kentonv
3y ago
Yes, that's correct, and yes, that's the reason. :)
777.
▲
by
kentonv
3y ago
It's definitely something we're thinking about but I don't have any sort of timeline, sorry.
778.
▲
by
kentonv
3y ago
> If CF offered support for running x64 linux .NET6+ binaries on these edge workers, I'd probably block off the next 3-4 weekends to play around with the stack. The trouble with "containers on the edge" is that if we just
779.
▲
by
kentonv
3y ago
Cloudflare Workers "Bundled" is a legacy mode that is not the default these days. Unbound mode (the default for paid subscriptions) offers 30s CPU time.
780.
▲
by
kentonv
3y ago
On a brief look, I agree that your link [1] does not appear to be thinking about capabilities correctly. It seems to make the classic mistake of orienting around verbs (actions you can do) instead of nouns (specific resources you can operat
More ›