What if the Trinity test had failed? - <AUTHOR> http://blog.nuclearsecrecy.com/2020/07/16/what-if-the-trinity-test-had-failed/ <comment><USER2> Everyone involved was confident the gun-type bomb would work. They'd tested bringing two pieces of enriched uranium close together in criticality experiments. That experiment killed several people at Los Alamos.

The big worry was it going off prematurely. When the Enola Gay took off to drop the uranium bomb on Hiroshima, their orders were that if they had to turn back, dump the bomb in deep water. A billion dollars to the bottom of the sea. That was preferable to taking the chance of blowing the airfield on Tinian off the map if the B-29 had a fire on landing.

Making enriched uranium was slow, but working. The gaseous-diffusion plant cascades were working, after months of startup. The second gaseous diffusion plant at Oak Ridge, K-27, opened in September 1945, a few weeks after the end of the war. If the war had dragged on, there would have been more uranium bombs.

<comment><USER3> > They'd tested bringing two pieces of enriched uranium close together in > criticality experiments. That experiment killed several people at Los > Alamos.

I think the fatal criticality accidents at Los Alamos involved a single chunk of plutonium and neutron reflectors: [https://en.wikipedia.org/wiki/Demon_core](https://en.wikipedia.org/wiki/Demon_core)

<comment><USER4> The Demon core story is quite fascinating, I compiled several Wikipedia articles to construct the full narrative: [https://svedic.org/history/demon- core](https://svedic.org/history/demon-core)

<comment><USER5> Anytime I'm jimmying something open with a screwdriver I can't help think of this story and how crazy dangerous holding two hemispheres of plutonium apart with a screwdriver really is.

</comment></comment></comment></comment><comment><USER6> A lot of people would have been very surprised if it had failed.

The physics wasn't considered a mystery by then. Failure would have been caused by fixable engineering and design mistakes - or sabotage - not because the idea was unworkable.

There _might_ have been some completely unexpected physics at scale. But given that nuclear reactors were already a thing, that would have been very surprising.

<comment><USER7> If your time tolerance is nanoseconds, the engineering is everything.

<comment><USER8> That's true with implosion but not gun type

<comment><USER9> Trinity was an implosion type bomb, so the required tolerances were tight

</comment></comment></comment></comment><comment><USER10> The Trinity test remains the most intellectually arrogant moment in history. The bomb could have ignited the atmosphere, turned us into another sun for reasons we didn't understand. They worried about this, and were fairly confident in their calculations. But every century of physics brings the realization we had little clue a century earlier. If the Trinity test had behaved in an unexpected way, we wouldn't be reading this. That's what I assumed the headline meant. I was disappointed.

<comment><USER11> You're getting hammered for this, but you're probably correct. One could imagine a parallel universe where our test didn't go so favorably.

One could also imagine a future physics breakthrough that we're fairly confident about, which turns out to be horribly wrong.

However, with each decade that the standard model turns out to be correct, one could also imagine that this chance will never happen again; that we'll be forever confident in our predictions. (This seems the most arrogant statement of all, though.)

<comment><USER10> The most important kind of intelligence is knowing what one does not know. There's a mindset counter to this, that substitutes a model for reality and then fervently believes the model. Math and physics exerts a very strong selection force attracting people fond of this substitution. The responses here do not surprise me.

Our extrapolations always take the form of moving along a tangent vector out from prior experience. Prior to relativity, Newtonian physics was the belief that we actually lived in that tangent space. Surprises come when the deviations are large enough for reality to curve away from our models. I thought I understood how materials behaved, till I was stuck briefly on a mountain at -30F. People dance on decks that collapse. They smoke joints on exposed foam mattresses. Surprises happen.

I appreciate that in this universe, our experience confirmed that physicists' absolute faith in the Trinity experiment was well-founded. A billion runs of parallel universes would have likely work out. Take this out to a quadrillion runs? It turns out that alien life has always been here at the subatomic level. Like dogs not liking fireworks, that nuclear ping really pissed them off, so they engineer a virus that wipes us out. Or it turns out that indeed there's a quantum basis to consciousness. After that nuclear ping, the atmosphere is fine, but everyone on that side of the Earth keels over, no longer able to think.

The Trinity test was a step further out along the tangent vector than we'd ever taken before. We were deliberately creating a version of a Carrington Event on Earth, with absolute certainty that we understood and anticipated all consequences. The odds of calamity were small, but our existence was at stake.

<comment><USER12> These type of concerns are pretty meaningless IMO. If we're going to speculate about stuff like what might annoy subatomic alien life or somehow creating some kind of quantum echoes or whatever that somehow destroy all consciousness, that brings us to the point of anything at all might happen for any reason at all. For all we know, me lifting my right pinky finger a quarter inch right now will result in the entire planet just winking out of existence.

Such things get into non-falsifiability. Sure, we can never prove true or false the idea that something we aren't even aware of might exist and do catastrophic things for reasons that make no sense to us. But if we take such ideas seriously, how could we ever do anything at all? Considering such ideas can only be either pointless speculation, or a power exercise - it's very good to be the person who decides what activities have an unacceptable risk of causing catastrophically bad things to happen for inscrutable reasons, and what don't.

<comment><USER10> We're inside a balloon together, poking at it with a needle. You're off on some philosophical discourse about falsifiability. And all I'm trying to say is we've never poked that hard before, are you sure you know what you're doing?

<comment><USER13> Maybe we (or some visitors in the past) already did, even harder? And it made _poof_?

I mean the concept of a [1] [https://en.wikipedia.org/wiki/Nuclear_lightbulb](https://en.wikipedia.org/wiki/Nuclear_lightbulb) reminds me of some descriptions of the inner workings of [2] [https://en.wikipedia.org/wiki/Vimana](https://en.wikipedia.org/wiki/Vimana)

Then there are things like [3] [https://en.wikipedia.org/wiki/Merkabah_mysticism#Prohibition...](https://en.wikipedia.org/wiki/Merkabah_mysticism#Prohibition_against_study)

A long time ago I saw some documentary about the ruins of the Khmer (No! NOT Ancient Aliens! Seriuosly!) where they overlaid the groundplot by LIDAR into the aerials which have shown only jungle. The thing is, that groundplot looked exactly like the planar layout of some on-die microwave emitter I've seen in some site like IEEE or phys.org a few weeks before.

I just thought _as above, so below_.

The older I get, the less unlikely I think of some so called "pseudo-history".

</comment></comment></comment></comment></comment></comment><comment><USER14> This is a pretty fascinating exploration into what wasn't known about the bomb prior to the test, the range of expectations about what would happen, and the various things that the test results affected.

</comment><comment><USER15> Site seems to be down. Archive link: [https://web.archive.org/web/20200716185116/http://blog.nucle...](https://web.archive.org/web/20200716185116/http://blog.nuclearsecrecy.com/2020/07/16/what- if-the-trinity-test-had-failed/)

</comment><comment><USER16> One of the most interesting stories about.. work life balance... was in Richard Rhodes' book ([https://en.wikipedia.org/wiki/The_Making_of_the_Atomic_Bomb](https://en.wikipedia.org/wiki/The_Making_of_the_Atomic_Bomb)), about fixing imperfections in the high explosive castings with dental tools just before (I think it was the night before?) the test. Another source here: [https://www.abqjournal.com/trinity/trinity3.pdf](https://www.abqjournal.com/trinity/trinity3.pdf)

</comment><comment><USER17> I find it most fascinating that when Little Boy was detonated the portion of only about one kilogram underwent fission out of the total Uranium mass of 64 kg. So much destruction from such a tiny amount of stuff...

</comment><comment><USER18> if you have never been to the nuclear science museum in Albuquerque NM is amazing... and a little surreal.

I remember walking outside to see the planes and icbms, off in a corner mixed in with some scrap was a pallet with a big metal cylinder thing. I thought it was construction equipment or just trash but, nope, it was a B41. The B41 is a 25mt air dropped bomb, the largest strategic nuke ever fielded by the US.

I had a couple moments like that at the museum. Behind a door was a bomb casing with B61 written on it with a sharpie.

these were the most destructive devices ever conceived of by man but just strewn about like what you'd find in some old timer's garage.

</comment><comment><USER19> there was a very early Sliders episode about exactly this!

[https://sliders.fandom.com/wiki/Asteroid_World](https://sliders.fandom.com/wiki/Asteroid_World)

<comment><USER20> They got the bit about nuclear power wrong though. Fission was discovered in Germany just before WWII, which is why Einstein (the real one) was concerned that the Germans might develop nuclear weapons first and advised the US to do it. At that point it wasn't obvious that a bomb was possible even if fission was, but even if it wasn't, the application of fission to power generation would still have been obvious.

If anything they'd have probably had more nuclear power generation, because the proliferation risk wouldn't have been a concern and the scary association with city-destroying weapons wouldn't have been such a PR problem.

<comment><USER21> > Einstein (the real one) was concerned that the Germans might develop nuclear > weapons first and advised the US to do it.

Leo Szilard had this realization, wrote the letter, and got Einstein to sign it.

[https://en.wikipedia.org/wiki/Einstein%E2%80%93Szil%C3%A1rd_...](https://en.wikipedia.org/wiki/Einstein%E2%80%93Szil%C3%A1rd_letter)

</comment></comment></comment><comment><USER22> "It should not be much less than me thousand tons unless there is an actual malfunctioning of some of the components."

"me" == "meh"?

<comment><USER23> "One" I think. Probably was "ne" and got autocorrected to "me" instead of "one" (would make sense, "less than me" probably occurs more often than "less than one").

</comment></comment><comment><USER24> TFA asks a bunch of what-if questions -- very good ones indeed.

> Would a failure at Trinity have changed the outcome of World War II in any > significant way? Ultimately this question relies on what you think caused > the Japanese to offer up a conditional surrender on August 10th, and then an > unconditional surrender on August 14th. In particular, it depends on how > important you think the Nagasaki bombing was for the decision-making of the > Japanese high command.

I think it's pretty clear that a) the Japanese had been willing to surrender on one condition (keeping the emperor) for weeks, b) the U.S. was holding out for an unconditional surrender, c) the USSR entering the war pushed Japan to make, and the U.S. to accept, a privately-conditional / publicly-unconditional surrender. I believe the bombs made little real difference. From a Japanese perspective they destroyed nothing that hadn't already been firebombed to smithereens -- all large- and medium-sized cities already had been firebombed to smithereens. It's really hard to believe that the war with Japan would have had a different outcome if either or both bombs had not been dropped.

But I found this very interesting:

> After getting the successful results from Trinity, Truman took a very hard > line with Stalin. He believed that the bomb gave him leverage for both the > end of World War II and the peace that would follow. Though he did not try > to argue that the Soviets should not declare war on Japan or stop their > invasion plans, he was less convinced he would need the Soviet entry into > the war, and did not encourage them.

Well! If he had been certain enough to demand that Stalin not enter the war, that might have meant we'd have no North Korea today. Interesting thought.

<comment><USER10> The mayor of Nagasaki reported that the bomb was a dud, and only then realized he'd heard nothing from the north half of the city. Same statistical paradox as the Brits reinforcing the parts of planes that returned with bullet holes, until someone said, "Um", ...

The Japanese surrendered before realizing that Nagasaki had been half destroyed.

The bomber crew was going to release on radar alone, against orders, realizing this made more sense than releasing over the ocean before landing. Then they saw an opening in the clouds. Not a good day for visibility; Nagasaki wasn't even the primary target.

</comment></comment><comment><USER25> Failed like didn't explode or failed like set the entire atmosphere on fire?

<comment><USER26> I think they refer to the failure mode where: Nothing happened for a day or two. All the experts travel to the location to try to understand what went wrong, in situ... and THEN the explosion occurs.

<comment><USER27> This really wasn't a plausible failure mode. They had many (9?) detonators which had to be very precisely simultaneous, and had done a lot of tests of those alone (this was cheap & easy). As long as just one of them worked, you would burn all the explosives (just not in the right order) and destroy the device.

<comment><USER28> I'm sure they had some redundancy in the systems required to fire those detonators too, but how much?

<comment><USER27> Not sure how you would quantify this, but enough? Inventing detonators that worked fast enough (i.e. small enough error in firing time) was one of the challenges. They did a lot of tests of those explosive lenses. (32, not 9, of course.)

The electronics to fire them would have comparatively easy to test well, and I'm sure they over-designed it all. I doubt that duplicating it would have made anything better.

</comment></comment></comment></comment></comment><comment><USER29> What if this website fails because it got hugged to death?</comment>


Super Mario Melodies (2011) - <AUTHOR> http://www.losdoggies.com/archives/1302

<comment><USER2> I (somewhat recently) taught myself how to play the piano solely by playing Mario songs. There's a pretty decent easy piano book which goes through the entire canon.

Here's a link to the book on Amazon: [http://www.amazon.com/Super-Mario- Series-Piano-Easy/dp/07390...](http://www.amazon.com/Super-Mario-Series-Piano- Easy/dp/0739083236/ref=sr_1_1?ie=UTF8&qid=1376166832&sr=8-1&keywords=mario+piano)

<comment><USER3> I bought Synthesia and a decent keyboard a while back for this very reason.

eg: [https://www.youtube.com/watch?v=bxbNtOfM-n0](https://www.youtube.com/watch?v=bxbNtOfM-n0)

</comment></comment><comment><USER4> So the power up sound is a sped-up version of the level end tune? That's cool. I knew Nintendo did a lot of tricky things to make the most out of those cartridges, but for some reason this one strikes me as particularly clever - even more than the cloud/bushes.

<comment><USER5> Not exactly. It follows the same chord progression. And the article makes no reference to the technical aspects of Mario music.

</comment></comment><comment><USER6> Here's a cached copy: [http://www.losdoggies.com.nyud.net:8080/archives/1302](http://www.losdoggies.com.nyud.net:8080/archives/1302)

</comment><comment><USER7> Do not forget Mario Piano ([http://www.mariopiano.com](http://www.mariopiano.com)) which has most of the same, including written score.

</comment><comment><USER8> This is too cool.

Aside: what is that neat flash package used to play and display the notation? For example, when you hover over the "1-up melody" notation, each note plays.

Or the "play slow" feature of the "Jump" music's glissando?

</comment><comment><USER9> Los Doggies is an awesome band. Buy their music: [http://losdoggies.bandcamp.com](http://losdoggies.bandcamp.com), and come see them if you're ever in the Hudson Valley!

</comment><comment><USER10> Heres a full version on Synthesia [https://www.youtube.com/watch?v=KTz94crRC6g](https://www.youtube.com/watch?v=KTz94crRC6g)</comment>


Node.js load balancer proof of concept - <AUTHOR> http://www.contentwithstyle.co.uk/content/nodejs-load-balancer-proof-of-concept

<comment><USER2> > new function() {

Well this is both pointless and dangerous.

Also using underscores is pointless, because those variables are in a closure, you don't even have to tell people that it supposed to be "private".</comment>


The Winners of the 2018 Drone Photo Contest, and Their Images Are Breathtaking - sahin-boydas https://www.artfido.com/the-25-winners-of-the-2018-drone-photo-contest-have-been-announced-and-their-images-are-breathtaking/ <comment> sahin-boydas 2017 [https://www.boredpanda.com/best-drone- photography-2016-skypi...](https://www.boredpanda.com/best-drone- photography-2016-skypixel-contest/)

</comment><comment> sahin-boydas 2018

[https://www.skypixel.com/contests/2018](https://www.skypixel.com/contests/2018)</comment>


Alan Bean, the fourth human to walk on the Moon, has died - <AUTHOR> https://arstechnica.com/science/2018/05/alan-bean-the-fourth-human-to-walk-on-the-moon-has-died/ <comment><USER2> Currently on the front page: [https://news.ycombinator.com/item?id=17163699](https://news.ycombinator.com/item?id=17163699)</comment>


Show HN: FORQY – New way to create a professional restaurant website - <AUTHOR> https://www.forqy.com/ <comment><USER2> Restaurants need this.

And it is free!</comment>


Ask HN: Need pair for job search in DC - <AUTHOR>

I'm currently living in Washington, DC, and looking for work as a developer.  I'm finding it hard to get motivated to do the drudge work involved, so I'm looking for someone to pair with (think pair programming, without the programming).
Basically, I need someone (probably in a similar situation) who I can sit across from in a coffee shop who could give a thumbs up or encouragement or a quick review of a cover letter, while I do the same for them.
Anybody interested? <comment><USER2> I'd like a job in DC too, however being a Canadian I assume its hard.</comment>


Ask HN: how difficult is for a SF based startup to hire an indian? - <AUTHOR>

i have been trying my luck to work for a SF based startup, so far i have applied for quite a number of startups based in SF, So, i just wanted to understand how difficult and costly it would be and why majority of them would reject the applications which come from india. or my thinking is wrong? please enlighten me. <comment><USER2> Most startups don't have the resources to deal with the legal hassle of hiring an international candidate. However, if you have exceptional talent, you might be worth the extra hassle.

Try your luck applying to larger and more established startups (like Dropbox and AirBnB), they are more used to dealing with visa issues.

</comment><comment><USER3> If they can hire someone locally, why would they want to deal with hassles to hire someone from outside of the country? Unless of course you may offer something (talent, skills) that they cannot find locally.

If they want to outsource - they'd go to Elance where $100 goes very long way.</comment>


Groupon Payments to compete with Square - <AUTHOR> https://blog.groupon.com/cities/introducing-groupon-payments/

<comment><AUTHOR> Now we know why they bought FeeFighters!</comment>


A fast, modern API for TV, Movies, Podcasts and more - <AUTHOR> http://openmedia.io/

<comment><AUTHOR> I'm working on an API that doesn't suck that will represent TV, Movies, Podcasts, WebTV, and other forms of media.

A stack-overflow inspired reputation system will reward community members to contribute translations, new shows, movies and corrections.

Background workers interface with EPGs, other APIs and streams of data from other sources.<p>An image proxy server means openmedia.io will do the heavy lifting delivering images in the dimensions that you want, backed by a speedy CDN.

<comment><USER2> are you thinking about other forms of media, maybe something like comic books?

there's actually a pretty large need for a comic api and there's only one right now (comicvine) that has been neglected for 2 years.

<comment><AUTHOR> I'm keen for any media which is a) structured and b) is an essentially append- only dataset.

I fear that existing APIs, through design and coincidence fail to address the needs of flexibly covering media of all types.

Join the list, look me up, or feel free to contact me to discuss

</comment></comment></comment><comment><AUTHOR> @carbuncle - If TMDB's licence allows, I can absolutely imagine offering the webhooks, and changes stream and a Movie type backed by TMDB. It's something I'll have to take up with their moderators.

@theallan - It depends whether that would be a _competing service_ under liberal interpretations of the law, when the legal chap has drawn up the API permission guidelines, I'll be sure to notify the mailing list. Under German law we have to be quite explicit about granting permission, but the beta list will be notified of the full terms of usage before the API opens. (My gut- feeling, no problem with using the data to back an app, that's sort-of what the data's for!)

<comment><USER3> Super - I look forward to hearing more about it!

</comment></comment><comment><USER4> Have you made any direct effort to integrate with home media solutions like XBMC or Plex?

Edit: I would also very much like to see something like this in ifttt.com

<comment><AUTHOR> Plex and XBMC would be ideal candidates for this API, each user could easily maintain their own pointer to the data set, and their synchronisation would be faster and more efficient than it is right now.

There's also a provision with the API (for personal use, so far) which turns a filename (and metadata, if you have it) into a JSON hash (or msgpack, of course) of the episode, show and season, etc.

This is also a potential avenue for being more widely made available.

</comment></comment><comment><USER5> I'm wondering about the kind of data you provide and what it's applications would be. Just to be sure, would this API somehow let me know if a new episode of say.. Mad Men comes out ?

Or is it only for me to query info regarding a specific episode ? What kind of data are you going to provide ? Some examples would really help!

<comment><AUTHOR> One would be able to look up a complete representation of the current known state of Mad Men, all known airing dates in all countries, places where it might be available to (legally.) steam in your jurisdiction, etc, etc.

These are all the features of a normal API. As well as access to the above, you could (selectively) register for updates to be pushed to a URL of your choosing when there are additions or amendments to the data held about the show. (or all shows, or all shows matching your criteria, etc)

</comment></comment><comment><AUTHOR> A word to the critics (thanks!), the copy has been modified to be less rhetorical and to be absolutely gender neutral. I've also switched away from Raleway as a body font, it looked a lot better on a retina display than on something with a more widespread resolution.

</comment><comment><USER6> Do you see music releases being available on this at any point in time?

</comment><comment><USER7> Stop using Raleway as a body font. Please.

</comment><comment><USER8> Doesn't trakt.tv do the same thing?

<comment><AUTHOR> I believe trakt.tv is the kind of service that might benefit from a simplified back-end system if it were to use openmedia.io. They likely use thetvdb, or epguides or similar now, or may even have their own integrations with EPGs.

Similar services: * Web: trakt.tv, watched.it, watched.li, gomiso.com, getglue.com * Android: TV Series, TV Show Favs, Twee, DroidSeries, MyEpisodes

I don't think that trakt.tv is really competing on an API level, but the data from openmedia.io would make building and maintaining a TV and movie tracker trivial.

<comment><USER8> Yeah, they use TVDB as a source, definitely. I'm just having trouble seeing what your app does, mind explaining it a bit more?

<comment><AUTHOR> The intention is to provide an API that requires little or no work on the part of the service relying on the data. Having had to work with thetvdb's API I can attest to having to download ~100 XML files (all languages…) in order to determine if anything is new, their API is often 2/3 days out of date, some internal caching problems and problems with scaling, they only deliver XML, poorly compressed (owing to key structure).

I believe services such as trakt.tv and similar should be able to do one thing, and do it well, offer a to-do list of shows you should watch, and summarise what you have watched. And they shouldn't have to write thousands of lines of code to interface with an API for what's actually quite simple.

In my (admittedly contrived, and not representative) benchmarks the JSON representing a typical TV series is 76% smaller, and parses 56% faster (that is probably representative of years of research and work into making fast XML parsers, and JSON being a relatively young format)

Also, I find it strange that they don't provide a notifications API or changes stream.

I don't want to call thetvdb specifically, many API and data providers make the same mistakes, if one can call a missing feature a mistake. (TradeDoubler, many financial APIs, etc)

Another departure from typical API design is to accept that many movies, shows, books and so forth are provided simultaneously (or, close to simultaneously), world wide, in multiple languages.

Therefore any API that purports to represent them must acknowledge that English isn't the _default_ language, but it may have been the language in which the media was authored, and that airing dates, shipping and printing dates are worthless without timezone and language information.

My goal is to make an API that is easy to use, and can open the creativity of the community up, by allowing something that is now rather difficult to become easy.

To call out some of the problems I've tried to solve: timezones; networks; outlets (web); airing dates vs. availability dates (locale specific); actors vs. hosts vs. cameos; returning series under the same name; specials vs. pilots vs. shows about a series; treating different languages with equal weight; encoding (utf-8 naturally); gzip; msgpack... I'm sure there are many more which I've forgotten, but that's the gist of it :-)

</comment></comment></comment></comment><comment><USER9> > supported on every platform known to man.

How about some non-sexist boilerplate?

<comment><USER9> Dear Hacker News: this persistent blind spot about the many casual, unconscious and dismissive ways the tech community excludes women - and get nerd-rage defensive about it when confronted - is a big part of why there are not more women in tech.

<comment><USER10> The habit of grepping all content for keywords without understanding context or definition inhibits rational discourse. Getting third-party apologist about it when confronted is a dead stop appeal to authority.

<comment><USER9> I understand the context and definition. It's still sexist. It's unnecessary and would be extremely easy to replace with a non-sexist term that is equivalent in both meaning and elegance. The extreme resistance even to acknowledge that there's something wrong with using "man" to mean "humans" is very telling.</comment></comment></comment></comment>


How do you test a new server provider? - <AUTHOR> <comment><USER2> Answers will vary. But there exist one true test of the provider's ability to stick with you through thick and thin: it's the Turing test!

See, providers have regressed (economy of scale and all) to the degree where their responses to inquiries/emails/requests are indiscernible from early wannabe AI chatbot implementations.

Take the time to email/call your potential provider and ask questions regarding the service. Do the responses pass the smell test? Is sales completely clueless and unable to answer questions about simple technical matters (red flag)? Can support carry out requests that aren't scripted?

Trust your instinct and common sense.

</comment><comment><USER3> I put up an extremely offensive (yet legal) image or video, then link to it from a conservative forum. I then log the date/time and calculate how long, if at all, my server remains online. If it can handle the DoS or DDoS, phase one is good. If the provider doesn't cave to demands to remove the site, then phase two is good. At that point, I would call them a good server provider.

If you are referring to benchmarking, I might do a few quick tests with bonnie++ and openssl speed tests for the server itself and some iperf3 tests for the network throughput.

<comment><USER4> How can you be sure a dos/ddos will occur?

<comment><USER3> I just have to put faith in two ladies and their cup.</comment></comment></comment>


Lawmakers Say Snowden Was 'Helped' by Foreign Power - <AUTHOR> http://www.securityweek.com/us-lawmakers-say-snowden-was-helped-foreign-power

<comment><USER2> Well, to be fair, the article says the two Republican congressmen actually just dangled some innuendo, but stopped short of providing evidence, naming names, or specifically citing what was gained by each party under the suggested arrangement.

For all the strain that computer automation puts on the common man, I am hotly anticipating the removal of humans from the machinery of governance.</comment>


Facebook: A Great Start to 2009 - <AUTHOR> http://blog.facebook.com/blog.php?post=46881667130

<comment><USER2> I enjoyed Marco Arment's response: <http://tumblelog.marco.org/68936456>

<comment><USER3> except that these are 30-day active users; 1 in 4 is not a spammer, and the fact that the distribution is skewed only makes facebook's stat more amazing.

and someone who runs a "short blogging service" in today's world shouldn't be complaining about making things of "lasting value".

<comment><USER2> Spoken like somebody who doesn't use Tumblr. Making multi-content posts east is not the same as "short blogging." I mean, you can't _make_ a short blogging criticism considering Twitter's out there, but Tumblr's system isn't short posting. Marco's a co-founder and he writes long posts frequently. Rather, it's a method of streamlining: if I want to discuss something I can. Tumblr used to call itself a scrapbook, and that's as good a description of it as any.

<comment><USER3> Would you consider tweets to be creations of lasting value? I think I could argue quite convincingly that Facebook's network, the connections it inspires and facilitates, and the social interaction it makes possible is of far more lasting value to the world and its people than any tweeting or blogging, especially when they're as devoid of content as the posts I've seen.

Making snide clever comments is easy, building something that is actually making a difference isn't.

<comment><USER2> I actually made the same comment in response to Marco: Facebook is not valueless. Neither is Tumblr, though. I don't know if it's "making a difference" in the sense of, say, social change, but it's providing the best product of its kind in the market. That has value to me.

I don't use Twitter. I think it's stupid. But creating a vast opt-in, entirely-indexed community is something of value. The fact that companies can search to find real-time who's talking about them is big and will be leveraged more in the future, and the fact that its APIs let Tweets be used for nearly anything is big too. So it _has_ value, even if it's value I will never need myself.</comment></comment></comment></comment></comment>


Astounding 'Facts' About Google's Most Badass Engineer, Jeff Dean - <AUTHOR> http://www.businessinsider.com/astounding-facts-about-googles-most-badass-engineer-jeff-dean-2012-1

<comment><USER2> _Jeff Dean doesn't have a Wikipedia page. Wikipedia has a page on Jeff Dean._</comment>


WolframTones – An Experiment in a New Kind of Music (2005) - <AUTHOR> http://tones.wolfram.com/generate/G16aF5KBayLGZqrbyXodKZNu6fmG6ANllrjanSNAPM <comment><USER2> The music is just awful. Try the Dance or Hip-Hop buttons and tell me you hear anything but 8-bit videogame music, not even remotely in the genre.

I love music and software and I play the synth myself (a Roland V-Synth with normal piano keys), but I don't see how experiments like this actually accomplish anything. People create music and art. Machines don't. And I don't they ever really will, frankly, because machines lack the emotional impetus or understanding to make art that's meaningful to people.

<comment><USER3> A human choosing to use a machine to automatically generate music is still a human choice that communicates something to other humans. It may not communicate an idea or feeling that resonates with you personally, but it's definitely saying something.

One of the fundamental changes in humanity especially in the recent past is machines. Of course artists are going to explore that relationship. Part of that exploration may be things you don't like. Maybe that's deliberate. Maybe the artist wants you to feel uncomfortable with the mechanization of our life.

Personally, I've been on a kick recently of listening to "synth jams" on YouTube. Musicians set up a big pile of drum machines, synths, effects, and argpeggiators and then play live sprawling evolving soundscapes. The result is a mixture of human choice and machine-like repetition, and it really does it for me. Plus all the blinking lights are pretty.

<comment><USER4> I gave it a go and listened to a bunch of these wolframtunes....all of which sounded very much like random walking melodies over rhythm tracks someone probably programmed, or specified with enough constraints that they sounded like a regular 4/4 rhythm. (I didn't fuck with the controls too much.)

I can accept your statement that "it's definitely saying something," with the caveat that all that random walking melodies are saying is: "I programmed a computer to generate a random melody."

The range of expression is limited when you're making a computer work on random input; it's pretty much limited to "this is a demonstration of the algorithm I programmed," kind of a far cry from how most music is written and received.

Synth jams are something else, they're driven by people through and through.

<comment><USER3> _> I gave it a go and listened to a bunch of these wolframtunes_

Sure, but that just says that _this particular_ combination of human and machine isn't very good. Lots of people play guitar poorly. That doesn't imply that guitars are bad instruments.

 _> it's pretty much limited to "this is a demonstration of the algorithm I programmed," kind of a far cry from how most music is written and received._

If I write an "algorithm" that simply plays back a hard-coded series of notes and timing that I selected, that's, I assume you would agree, a fully artistic expression. After all, that's how most working keyboard musicians work today. They play and record the MIDI notes. Now maybe I play a few melodies and write a program that just randomly selects between them. That's still 90% human- authored "art" plus a little random chance. Maybe the melodies get shorter and the random choices get larger. There is a continuum here between "human makes all decisions" and "human makes no decisions" and I think you'd have a really hard time putting a finger on it saying "everything below here is just algorithmic demonstrations".

Even acoustic instruments and our physical bodies have some stochastic processes. A tambourine player isn't controlling the hit timing of each individual cymbal on it. That doesn't lessen it. Maximum artistic value doesn't necessarily mean "maximum human intent".

See: [https://en.wikipedia.org/wiki/Indeterminacy_(music)](https://en.wikipedia.org/wiki/Indeterminacy_\(music\))

 _> they're driven by people through and through._

I think you might be surprised. Many synths and drum machines have randomness as an input and can use it to vary the timbre of sounds, velocity, whether or not to play individual drum hits, etc. For example, the Digitone lets you assign probabilities to individual notes and will roll the dice each time to decide whether or not to play it.

Even hand-authored LFOs with slow rates interact in ways the author is unlikely to be choosing deliberately. It's not like musicians are calculating the least common multiple of their various LFO frequencies to determine when the pattern repeats. They just tweak a few knobs and let them "randomly" wander in and out of phase with each other.

</comment></comment></comment></comment><comment><USER5> Meanwhile, in the world where generative music is made with the obvious involvement of actual musicians: [http://www.generativemusic.com](http://www.generativemusic.com)

</comment><comment><USER6> As a musician, Every sound I have tried is terrifying to the core. Well done. This is necessary like a new kind of Sleep. Actually, the Hip Hop button generated something almost palatable. All jesting aside, this is actually quite interesting, as it lead me to see the Elementary Introduction to programming with Sound in the Wolfram language. Some inflexible points of implementation: notes are represented by names and numbered pitches, like "C" and 5. This is interesting for Western music that enjoys the twelve-tone scale and chordal motion, but for generative computer music as long as we appreciate the natural harmonic string lengths we will have harmony: 3:2 and 4:3 representing relative ratios between pitches. Choosing static points on the spectrum and adding music programmatically is the perfect way to ignore everything that makes music musical, the relative ratio of frequencies

</comment><comment><USER7> I remember thinking this was terrible when it came out.</comment>


Virgin Galactic's SpaceShipTwo Has Crashed - <AUTHOR> http://techcrunch.com/2014/10/31/virgin-galactics-spaceshiptwo-has-crashed/?ncid=rss&utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Techcrunch+%28TechCrunch%29&utm_content=FaceBook <comment><USER2> [https://news.ycombinator.com/item?id=8540279](https://news.ycombinator.com/item?id=8540279)

Currently #1 on the front page - lengthy discussion. In fact, if anyone wants to say something and have _any_ chance it will get seen, you may as well comment here, not there, because that thread is long, rambling, and significantly off-topic.</comment>


Provisional patent filing tips? - <AUTHOR>

What experience have you guys had with filing patents, particularly provisionals? At Startup School one of the speakers mentioned that you could do it yourself for around $500 or so. Anyone have any insight into this or tried doing it themselves? Any links to good how-to's would be great. Thanks for the help! <comment><USER2> This is what we did in my previous start-up: we wrote up the process of all that we were doing, then researched as much as possible about what kinds of patents already existed in our field, and rewrote what we had to avoid infringing on those. The research was the hardest part, but now <http://www.google.com/patents> should be a big help. Then, we took what we had to a lawyer and asked him for advice. He ended up helping us file the prov. for less than $400.

</comment><comment><USER3> It should cost less than $500, I believe the filing fee is $125. Getting a lawyer involved will increase the price by several thousand.

I'd recommend the Nolo Press books on the topic. [http://www.nolo.com/product.cfm/ObjectID/1F0E4794-D236-43C3-...](http://www.nolo.com/product.cfm/ObjectID/1F0E4794-D236-43C3-908BF76B43DC13C2/310/) You can buy the pdf online or if you don't mind violating international copyright law they're mostly available on emule.

<comment><USER4> (warning: rant)

The PDF cost only $3 less than the paper book?

"No shipping fees."

Well, mighty decent of them.

</comment></comment><comment><USER5> chk this out <http://www.patentwizard.com/> along with the nolo.com book, you should be good to go

</comment><comment><USER6> Phil Emma of IBM has written in recent issues of IEEE Micro a useful (IMHO) series of 2 page articles about patenting. No-nonsense tips from someone with over 100 IT patents.

</comment><comment><USER7> Don't?</comment>


Do you have to be intelligent to develop AI? - <AUTHOR>
 I wonder if being intelligent, say (IQ >= 110),  is a necessary condition to develop AI. Many machine learning courses begin with "You don't need a lot of math" so their recipients are not supposed to be very smart and still they are going to develop the new AI. <comment><USER2>
      begin with "You don't need a lot of math" so their recipients are not supposed to be very smart

I would be weary about correlating high IQ with a high maths aptitude (and also of the reverse) -- since other things effect maths development more than IQ (The type of teacher you have, etc.); I had the pleasure of knowing quite a few people in MENSA over the duration of my childhood, and I can assure you that many of them had exactly the same problems with mathematics as the rest of the population.

I disagree that a high IQ is a necessary component of developing an AI (And I assume you're talking about Strong AI here); I would say that an expert in the field has a much better chance than the average developer, but since nobody (To my knowledge) has created a general AI we can't really know for sure.

It _would_ be interesting to see if AI researchers (or mathematicians, for that matter) tend to have a high IQ compared to other fields/jobs...

</comment><comment><AUTHOR> Perhaps my idea is that machine learning and AI is now a way to sell snake oil, specially when you try to give recipes and avoid the foundation. Today computer programs can do many task as for example predictions using models which require little o no tuning, so the user just press a button or write two or three lines of code. Someone can think that he is at the cutting edge of research pressing those buttons, perhaps that naive feeling is what I was fighting again.

<comment><USER3> AI dev is only pushing a few buttons: it's right it's _only_ pushing a few buttons but it takes an education to know which button to push. Even if it feels like pushing buttons doesn't mean it's not cutting edge because that's _your_ feeling, not the feeling of every one else. Maybe tech has reached a settled so far and the next plateau is not reached yet.

Also, AI is not the only area where progress can be made. Management of complex (complete?) systems is also an area of interest.

As for strong AI, I have a the feeling that those system will be much like sysadmin work of today.

</comment></comment><comment><USER3> There is a difference between doing AI Engineering and AI Research.

By the way, I still don't know what IQ really means in the sens of what's the difference knowing and IQ? I think success in research in general is a mix of knowing, dedication and luck.

</comment><comment><USER4> You need Statistics to understand machine learning, then of course one may learn some concepts by hearth. I am not sure then he could "develop the new AI" though.</comment>


The End of Solitude - <AUTHOR> http://chronicle.com/article/The-End-of-Solitude/3708 <comment><USER2> idk man I think quite the contrary. I think real self is never depicted online because of the "celerity" status people seek...thus the importance of privacy.</comment>


SF MTA Blames Uber, Lyft for traffic congestion in SF - <AUTHOR> http://www.sfgate.com/bayarea/article/San-Francisco-traffic-Uber-Lyft-SFMTA-blame-10791265.php <comment><AUTHOR> > According to the San Francisco Examiner, some 45,000 Uber and Lyft drivers > are now working in the city. By comparison, a mere 1,800 taxi drivers cover > the same turf.

Of course, they're not all working at the same time, so this isn't a great comparison. Lyft/Uber drivers also likely have a wider geographic range, so this probably counts drivers who serve primarily outside of SF but occasionally venture in.

Also, black car drivers don't show up in this data, further obscuring the true comparison.

The overall article wasn't bad, but stats like this don't help.

</comment><comment><USER2> It certainly doesn't help that our only subway covers 1/6th of the city. It seems like most other major cities are constantly investing in transportation infrastructure, and in SF the only large project I can think of is the new Transbay Terminal (which will probably make traffic congestion even worse).

Why does it feel like SF is so tragically mismanaged as a city? Is there something about the location that makes city planning more difficult, or is it just bad governance?

</comment><comment><USER3> This shows a fundamental lack of understanding of what these services provide. The real statistic would be to example private car ownership in the city. Namely, as Uber/Lyft become more prevalent, does private car ownership (or rate of growth thereof) shrink?

<comment><USER4> its more than just numbers

users make a point of forcing u-turns on busy streets running a red only to block the intersection in the other direction stopping a full lane to pick up or drop or a fare, or even just check their phones idling in the bus lane, ignore the honking bus, and forcing it* to take on and discharge passengers in the traffic lane

but in any case, it doesn't matter matter. for whatever reason SOMA is gridlocked throughout the day you can easily take an hour to traverse the last mile before the bay bridge. its just not working anymore. i think the ubers cause a lot of it..but someone has to do something

<comment><USER4> i did talk with someone from sfmta a couple days ago. they some really marginal ideas planned. basically they want the city to extend the taxi/bus only lanes further and further out from market. they also plan on taking out the center median on van ness to make a new dedicated bus lane.

as another poster commented some incremental investment in underground during the last 40 years would have made a big difference. after the disaster of extending the T into chinatown, not sure we can even meaningfully discuss that as a option</comment></comment></comment>


A Faux-O Deck of Cards – Mixing Functional and OO styles FTW - <AUTHOR>

A Functional OO Deck of Cards.. Let's build a deck of cards today using a hybrid approach, that is to say, lets use good Object Oriented design but keep our objects stateless and our functions idempotent.<p>http://rubylove.io/design_patterns/2014/03/24/a-faux-o-deck-of-cards/ <comment><AUTHOR> [http://rubylove.io/design_patterns/2014/03/24/a-faux-o- deck-...](http://rubylove.io/design_patterns/2014/03/24/a-faux-o-deck-of- cards)

Not sure why it wont link!</comment>


Ask HN: What are all the good launch platforms for an Internet startup ? - <AUTHOR>

It should be global, themed around internet and competitive like Techcrunch 50. Absolutely no charging money from participants. An award is a plus.
Sadly, I know only Techcrunch 50. <comment><USER2> Why do you need a "platform" to launch on? It really won't have any effect on whether or not your startup is successful.

</comment><comment><USER3> lol here I was contemplating EC2 vs AppEngine vs dedicated servers...</comment>


Googles long-term memory - <AUTHOR> http://shezi.posterous.com/googles-long-term-memory

<comment><USER2> It's called behavioural retargeting <http://en.wikipedia.org/wiki/Behavioral_retargeting> and it's becoming a lot more popular with advertisers. I get it all the time...

</comment><comment><USER3> Google cannot know if you already bought the RAM, or were still merely considering buying it. So it looks like they assume the latter, just in case.

</comment><comment><USER4> I was shopping for a simple necklace for the femm-bot and found an acceptable one at overstock. For at least the following month, I was positively bombarded with advertisements for that necklace. It was particularly annoying, since I had _already bought it_.

(I don't actually know which ad network I was being harassed by, it just happens to be the only long-term advertising I recall being exposed to)</comment>


A halloween tale regarding JavaScript on OS X - <AUTHOR> http://macscripter.net/viewtopic.php?pid=176463#p176463

<comment><AUTHOR> This is an insightful thread on Macscripter.net, about how bad the javascript implementation on OS X really is.

The dev team that implements JavaScript on OS X have even been provided with a reference implementation that does stuff the right way but no . . .</comment>


Ask HN: What is best Node.js framework? - <AUTHOR> Starting a new web project, expecting to handle 20,000 visitors a day.
Planned to use React.js and postgresSQL.
My co-founder suggested Express and Meteor.
Please suggest a best node.js framework. Why? <comment><USER2> React and postgres are great. I think you already have a solid stack with just those two. React offers a lot of what a large framework can eliminating a lot of the fluff things like Angular seems to include. That being said, I don't use frameworks and code in pure TS -> JS these days and borrow things a specific project needs from more popular frameworks, tweaking it for what I need.

Meteor is good for prototyping and getting something up fast. I find it very amateurish and highly abstracted. If you're a green developer, you aren't going to learn anything using Meteor. Also, I believe support for this framework is dying. Its highly, "Meteor's way or the highway"

Express is more just glue between your front end and your server/backend that uses Node as its adhesive. Its pretty great for eliminating a lot of boilerplate you would otherwise run into.

<comment><USER3> Depends on how advanced you want your routing to be I can see going with the from scratch rout, but that means you'll need to spend time writing unit tests..

You might as well fork and delete/modify a bunch of code.

</comment></comment><comment><USER4> Checkout Adonisjs and Mern stack.</comment>


Why C# is not a good choice for web development? - <AUTHOR> http://afshinm.name/why-c-sharp-is-not-a-good-choice-for-web-development?

<comment><USER2> This is an argument against your programming workflow rather than C# itself, it just so happens that in this case you can't edit the DLL to save yourself from your own bad practices.

There is no reason not to use C# in your article. It would be better titled "Why you should always use version control and maintain a production ready master branch"</comment>


Cloud Computing Without Containers - <AUTHOR> https://blog.cloudflare.com/cloud-computing-without-containers/?hH <comment><USER2> Hi, I'm the tech lead of Workers.

Note that the core point here is multi-tenancy. With Isolates, we can host 10,000+ tenants on one machine -- something that's totally unrealistic with containers or VMs.

Why does this matter? Two things:

1) It means we can run your code in many more places, because the cost of each additional location is so low. So, your code can run close to the end user rather than in a central location.

2) If your Worker makes requests to a third-party API that is also implemented as a Cloudflare Worker, this request doesn't even leave the machine. The other worker runs locally. The idea that you can have a stack of cloud services that depend on each other without incurring any latency or bandwidth costs will, I think, be game-changing.

<comment><USER3> At 1/10,000th of a server per each tenant (assuming 10,000 tenants) you can achieve "hard" isolation and far more cpu/memory per tenant using a TinkerBoard or something like that per client and charging a flat $2/mo with no hourly fees. That's a business model that I see materializing that can eat into your business.

EDIT to clarify: I'm assuming they can do 10,000 tenants per server. If they did 1 tenant per 1 TinkerBoard and charged $2/mo for it flat no hourly fee that would be an interesting business model IMO and it achieves hard isolation between tenacts.

<comment> roland-s Scaleway out of France has been doing baremetal cloud nodes for years. I used them during the beta and they are fantastic (despite slight latency due to being in France). Their smallest baremetal node starts at €3/mo for 4 ARM cores/2GB RAM/50GB SSD. Pretty cool infrastructure to be able to auto provision physical nodes on demand, but I think it's a different use case from the whole lightweight serverless processes on demand thing.

<comment><USER3> If only they supported NixOS... I would use them if/when they make the leap.

<comment><USER4> Are you sure they don't? NixOS can be installed on top of any Linux distribution, unless the hardware is really weird.

ETA: It looks like it is complicated, but might work. See [https://nixos.wiki/wiki/NixOS_on_ARM/Scaleway_C1](https://nixos.wiki/wiki/NixOS_on_ARM/Scaleway_C1)

</comment></comment></comment></comment></comment><comment><USER5> Disclosure: I work at Google Cloud.

Can you say more about the assumed security model here? We built gVisor [1] (and historically used nacl or ptrace) precisely because things like Isolates aren't (historically?!) trustworthy enough for side-by-side. Plus the whole V8-only ;).

Edit: But let me say, I still think this is awesome (and love seeing more people jumping into the "just run code" space).

[1] [https://cloud.google.com/blog/products/gcp/open-sourcing- gvi...](https://cloud.google.com/blog/products/gcp/open-sourcing-gvisor-a- sandboxed-container-runtime)

<comment><USER2> Hi, tech lead of Workers here.

This is tricky to answer concisely because we've implemented a huge number and variety of defense-in-depth measures. (Plus, I'm in transit right now and can't type much -- maybe I'll edit to add more details later.)

First, we believe Chrome has done a pretty good job hardening V8 over the years, and we get a lot of comfort knowing there's a $15,000 bug bounty for V8 breakouts. We update V8 continuously, tracking the version shipping in Chrome.

That said, we obviously don't simply rely on V8 for everything. We've modeled what a V8 breakout is likely to look like, and added a variety of mitigations.

Presumably, a V8 breakout bug is likely to allow an attacker to run arbitrary native code within the Workers runtime process. That's bad, but they will quickly run into some barriers to weaponizing this. For example, we obviously run with ASLR, so an attacker looking for other isolate's data would be flying blind and would likely raise segfaults. Any segfaults in production raise an alert and are investigated. Similarly, we run a tight seccomp fitler that denies all filesystem and network access, and if an attacker ever tries to invoke such syscalls, it will raise an alert and be investigated.

It's worth noting that we do not allow eval() (or any other mechanism of "code generation from strings"), hence all code we execute has to have been uploaded through our code deployment pipeline. This implies we have a copy of all code. When a segfault raises an alert, we immediately look at the code that caused it. Anyone using a zero-day against us is very likely to burn their zero-day long before they manage to pull off a useful attack.

You're probably also wondering about Spectre. Here's a previous comment of mine on that topic: [https://news.ycombinator.com/item?id=18280156](https://news.ycombinator.com/item?id=18280156)

Again, this is just a couple of the things we're doing... there's really too much to list in a HN comment. I hope to find time to write this up more formally in the future. :)

<comment><USER6> > we do not allow eval() (or any other mechanism of "code generation from > strings")

This is interesting, because preventing code generation from strings goes beyond `eval()` and `new Function()` - it also includes things like the output www.jsfuck.com can produce (which can indirectly call things like `eval()` and `new Function()` without ever mentioning `eval` or `new Function` in their source). How do you prevent things like that?

<comment><USER2> V8's embedding API provides an explicit option to disable them.

[https://github.com/v8/v8/blob/53d3f5ba2a7ee77244bdee882da9da...](https://github.com/v8/v8/blob/53d3f5ba2a7ee77244bdee882da9da188daa4c39/include/v8.h#L9097-L9110)

Line 9097, SetAllowCodeGenerationFromStrings()

</comment></comment></comment></comment><comment><USER7> Of course a language-specific sandbox with a highly restricted domain-specific API will be faster than an OS container or VM. The tradeoff is that it can run less applications unmodified, so less people can use it.

I think Cloudflare workers are a cool implementation of domain-specific scripting. I've used it and it's great. And with their scale I'm sure they'll advance the state of the art in various ways. But there's no radically new insight here.

<comment><USER8> With the advent of WASM, the mentioned sandbox is no more language specific. Threads & garbage collection are coming soon to WASM, which should open up most relevant languages in use today to this more efficient sandbox

<comment><USER9> > With the advent of WASM, the mentioned sandbox is no more language specific.

Which removes many of the advantages.

<comment><USER10> How do you figure?

<comment><USER11> One issue might be that Cloudflare won't have the source and can't recompile the code.

But perhaps web assembly is easy enough to decompile?

<comment><USER12> wasm doesn't as of now have any means of code generation independent from the JS api. There is also no way to obfuscate call targets or corrupt heap outside the module's linear memory. Any sandbox breaking bugs that do not involve JS would be codegen errors, AFAICT; in that case what you need to analyze is just the wasm blob and its interaction with the codegen pipeline.

</comment></comment></comment></comment></comment></comment><comment><USER13> I can't believe Cloudflare would run untrusted customer code side by side with that of other customers. V8 isolates sound great but did the Chromium team have this threat model in mind when designing them?

Not that long ago Cloudflare was bitten by a nasty bug where their own parser mixed up HTTP responses from different customers [https://bugs.chromium.org/p/project- zero/issues/detail?id=11...](https://bugs.chromium.org/p/project- zero/issues/detail?id=1139)

Cloudflare's response to this incident did not inspire a lot of confidence. What I am trying to say is that I won't trust their workers implementation unless a competent external security researcher audits it.

Edit: Related discussion [https://news.ycombinator.com/item?id=18417257](https://news.ycombinator.com/item?id=18417257)

<comment><AUTHOR> What about our response was lacking to you? I can tell you from the inside that huge amounts of code are being moved to rust to prevent that type of vulnerability from ever happening again.

<comment><USER13> > What about our response was lacking to you?

Several observations recorded in the Project Zero report about CF's response were problematic:

"I had a call with cloudflare, and explained that I was baffled why they were not sharing their notification with me."

"They gave several excuses that didn't make sense, then asked to speak to me on the phone to explain. They assured me it was on the way and they just needed my PGP key. I provided it to them, then heard no further response."

"I can already see that the (huge) list does not contain many pages that still have cached content from before the bug was fixed."

"Cloudflare did finally send me a draft. It contains an excellent postmortem, but severely downplays the risk to customers."

Granted, I have not been keeping up with what has changed at CF since then so maybe things are better. But the decisions taken wrt Workers doesn't inspire a lot of confidence. Even a Google Cloud engineer mentioned that Isolates probably aren't trustworthy enough to run untrusted code side-by-side [https://news.ycombinator.com/item?id=18417257](https://news.ycombinator.com/item?id=18417257)

</comment></comment></comment><comment><USER14> For quite a while now I've wondered why we do this. We take a physical computer and put a program on it that slices the machine up into multi-tenant abstractions called 'processes' so you can run more than one. Then somebody runs just one program on that machine in a process that uses all the machine that then slices the machine up into multi-tenant abstractions called 'X' (for various versions of X - isolates, containers, Erlang Actors, Database triggers).

If the Unix process abstraction is no longer fit for all purposes, why don't we get around to de-layering the operating system so that the Unix process abstraction is just another 'Virtual Machine' sat on top of something more fundamental?

Is it time for the return of the pure hypervisor?

<comment><USER15> You're asking for unikernels, which have had a recent renaissance: [http://unikernel.org/projects/](http://unikernel.org/projects/)

Some of the density advantages depended on Paravirtualization, which is quite difficult to make safe against Meltdown: [https://xenbits.xen.org/xsa/advisory-254.html](https://xenbits.xen.org/xsa/advisory-254.html)

</comment></comment><comment><USER16> > Simultaneously, they don't use a virtual machine or a container, which means > you are actually running closer to the metal than any other form of cloud > computing I'm aware of

I recognize this is just a little marketing (which is fine), but I'm not sure what this is supposed to mean any more.. containers have identical efficiency to running on a raw VM, and VMs only trap to emulation in very few circumstances (e.g. IO) any time in the past decade. Running pure compute load in a container, guest VM or host VM should have almost identical performance.

<comment><USER17> Especially since containers use vanilla processes and light-weight access control mechanisms that I wager V8 uses some of.

But they are running multiple client's services in the same process, so that's how they're saving - less context switching, smaller memory footprint, etc.

I'm interested in _how_ isolated the client's applications actually are...

<comment><USER18> Well, theoretically, perfectly. Practically, there's some exploits lingering in there for sure. But that's true for virtualizers too, so...

As the article says, faster spinup (since v8 is already running) seems to be the customer's greatest advantage only, saving an order of magnitude of memory is certainly a big deal for the operator.

I think since you can compile pretty Much anything to webassembly, porting over some existing tools might even be viable.

</comment></comment></comment><comment><USER19> As someone who works for a large CDN and who has been working in the networking space for over two decades, the one thing that really bothers me about CF is how hyperbolic they are on their blog and twitter.

>> Unlike essentially every other cloud computing platform I know of, it doesn't use containers or virtual machines.

This is light in comparison to their posts about QUIC, anycast geolocation, etc.

They surely have done a lot of interesting work, but they'd lead you to believe they're hosting half the internet, and invented every advancement to CDNs in the last decade.

<comment><AUTHOR> I'm sorry you feel that way. In general we feel like our biggest target with this language are the millions of people who wouldn't care about TLS 1.3, or QUIC, etc if we didn't make it clear how important they are. To us it's not about the people who know and love CDNs, it's all the people who don't, we're trying to speak to.

</comment></comment><comment><USER20> Gary Bernhardt kind-of predicted this. [https://www.destroyallsoftware.com/talks/the-birth-and- death...](https://www.destroyallsoftware.com/talks/the-birth-and-death-of- javascript)

<comment><USER21> The point about this approach being "closer to the metal" than other cloud providers definitely brought this talk to my mind. I just hope the nuclear war he also predicted for 2020 doesn't come to pass :/

</comment></comment><comment><USER22> I know Dart isn't that loved on here, but I had a pretty similar idea a couple of weeks back, a PoC serverless platform using Dart's Isolates, which are shared-nothing: [https://github.com/thosakwe/serverless_dart_platform](https://github.com/thosakwe/serverless_dart_platform)

I know that the article briefly addressed security, but in my head, I can't even work out how they manage to securely manage multiple tenants within the same process. This isn't a knock on them, it's a lack of knowledge on my part, and I'm wondering how that would even work.

Isolates in Dart can be run based on different dependency graphs (i.e. you can have an Isolate for user A's project, and a separate on for user B's, within the same process). However, things like the current working directory are shared by default. There's an IOOverrides class that lets you change this contextually, so theoretically you could hack something together that patches the entry point code to use it. I'm not sure how that could work in Node, though. What if someone were trying to overwrite another user's files?

Overall, though, the #1 thing that I can't reconcile in my head is that if all the isolates are running in the same process, wouldn't they all have the same permissions? What is there to prevent someone from touching another person's files, or, if they run in the same process as the server, more sensitive data? AFAIK you can't run a Worker/Isolate as a different user within the same process?

Not only that, but what about fork(2) bombs, etc.? The only thing I can think of is for Isolates to run under the context of some user who not only has no home directory, but also cannot spawn processes, or read/write/delete files.

Lastly, the only other thing I can't work out is how whether the Isolates run in the same process as the server (and if so, how do they do this securely), or how they communicate with the separate process, if technically any Isolate could console.log (maybe via TCP sockets?).

The whole CloudFlare workers concept is super cool... I just don't understand how it works. I feel like I'm missing some key here.

<comment><USER2> Like JavaScript running in your browser, workers don't get direct access to files or other resources on the machine. We provide a limited API which only allows safe operations. Currently that means a Worker can send and receive HTTP requests, and read and write from Workers KV (a distributed storage system). We'll add more storage options in the future, but not raw disk access.

<comment><USER22> Ahhh okay, makes a lot more sense. Thanks.

</comment></comment></comment><comment><USER23> Fastly's CEO (a Cloudflare competitor) gave a pretty great tech talk on what it means to be isolated: [https://www.youtube.com/watch?v=FkM1L8-qcjU](https://www.youtube.com/watch?v=FkM1L8-qcjU)

Guessing we'll see a competitive product from Fastly in the near future.

<comment><USER24> It's important to note that for caching purposes, you can already run VCL (Varnish Cache Language) on Fastly's edge servers.

</comment></comment><comment><USER25> Really interesting article but the ending is a little weird.

> This might mean Isolate-based Serverless is only for newer, more modern, > applications in the immediate future.

It sounds like you're implying unless your app is written with Node or Go / Rust then it must be legacy. That's not really fair to say.

Plenty of modern apps are built with Python, Ruby and Elixir. I don't know if they are all webassembly compile targets, but in either case, you should probably rewrite that to be less "better write everything in Node or you're a dinosaur!".

</comment><comment><USER26> Cloudflare workers seems amazing and I would love to migrate few thousands of nodejs lambda I have to cf workers... But... I noticed the 1mb limit for the function size, most of my functions are between 1.5mb and 8mb depending on the npm packages required. Also execution time for my functions is between 200ms and 30sec. (Loading remote data, transform it, generate pdf,...) and workers are limited to 5-50ms!

<comment><USER27> Cloudflare Workers execution time is counted a little differently. When you call fetch() in a Worker and are waiting for remote data, Cloudflare doesn't count that waiting towards the "execution time" limit. Other providers do.

Note: I work at Cloudflare

</comment></comment><comment><USER28> The article says that pushing a new lamda@edge function takes 30 minutes. That has not been my experience. I routinely push lambda@edge versions from the AWS console and the new versions typically run within a minute or so. Have others seen anything like a 30 minute propagation delay?

<comment><AUTHOR> Lambda@Edge is built on Cloudfront and pushing any change to Cloudfront generally takes 20-30 minutes in my experience. Can you tell me more about the change you're making? Is it code or config changing?

<comment><USER28> I'm talking about using the Lambda@edge console to push a new, numbered version of a lambda function written in node.js. I have pushed 100s of versions in this way, and I would guess that the mean time until the new version begins running is on the order of one minute. By "begins running", I mean that the new version number appears in CloudWatch output.

No other changes to config.

</comment></comment></comment><comment><USER29> Do you have plans to open source this work?

It'd be huge for p2p/decentralized apps. As of now, you can only decentralize data - this allows decentralized compute as well.

<comment><USER30> [https://github.com/laverdet/isolated- vm](https://github.com/laverdet/isolated-vm) is similar, and used by a competitor that has a similar offer

</comment></comment><comment><USER31> This is awesome. I noticed the "In an Isolate universe you have to either write your code in Javascript (we use a lot of TypeScript), or a language which targets WebAssembly like Go or Rust" \-- this is a very interesting statement! Being able to run wasm code means it could be possible to run .NET Core apps (really all I care about in the world right now) using such a system soon, thanks to work done for CoreRT ([https://github.com/dotnet/corert](https://github.com/dotnet/corert))

Really really interested to see where this could lead.

</comment><comment><USER32> > In an Isolate universe you have to either write your code in Javascript (we > use a lot of TypeScript) [or Wasm]

Not really: There are many nice managed languages that use JS as compile target. You can use ClojureScript, Scala, Purescript, Fable (F#), Haste (Haskell) etc.

</comment><comment><USER33> $5 minimum. Overpriced compared to any other faas service. Can only run one worker at a time. No thanks!

</comment><comment><USER34> There was a company Rackspace bought maybe 6 years ago that was building a semi-POSIX compatible layer on the v8 VM. They had Python running on it and it looked pretty interesting.

<comment><USER34> [http://www.zerovm.org/](http://www.zerovm.org/)

Not sure what progress has been made on it.

<comment><USER35> Looks like none in the past four years: [https://github.com/zerovm/zerovm](https://github.com/zerovm/zerovm)

</comment></comment></comment><comment><USER36> Wonder if you could build something similar using Go, A goroutine's overhead is only about 2KB. No idea how easy it would be to sandbox it.

<comment><USER37> It wouldn't be easy at all to sandbox it; that's the problem with every language that isn't Java or JS. (And I think people gave up on Java sandboxing a decade or more ago.)

<comment><USER17> What about JavaScript makes sandboxing easier than, say, Go, Python, etc?

<comment><USER37> Just the fact that it was designed for sandboxing hostile code from the beginning.

<comment><USER17> How does that design actually manifest itself? I don't know very much about this - what technical details about JavaScript make this easier? And then why doesn't Node support this kind of sandboxing, but V8 does, if it's so much easier to support sandboxing than other languages?

<comment><USER38> The primary advantage is that it's already done, really. It's not hard to _define_ isolated environments in almost any language you could name ("I should be able to have two runtime environments that support as much of the original language as possible, and they should not be able to affect each other" \- a thousand i's to dot and t's to cross, but that pretty much captures the idea), but _implementing_ them is another thing entirely. So much of the rest of language design tends to cut the other way, making sure that things are hooked together deeply for the convenience of the programmer.

I'm not particularly convinced Javascript is that much better than any other language as the language goes, but the implementation is far ahead of almost anything else. I know of other implementations of this idea in other languages ("Safe" in Perl [1], various attempts at sandboxing in Python which have generally failed, Safe Haskell [2], many others), but without the browser use case driving them forward, they tend to be poorly tested and even decay over time. It tends to be a use case popular enough to get some stab at support, but not popular enough to quite result in a robust, real-world-tested library support. The browser is an exceptional use case.

[1]: [https://perldoc.perl.org/Safe.html](https://perldoc.perl.org/Safe.html)

[2]: [https://ghc.haskell.org/trac/ghc/wiki/SafeHaskell](https://ghc.haskell.org/trac/ghc/wiki/SafeHaskell)

</comment></comment></comment></comment></comment></comment><comment><USER39> But this thing only runs JavaScript. The constant AWS bashing in this article doesn't make sense when the only fair comparison they can make here is AWS Lambda with a Node.js runtime against Cloudfare Workers.

<comment><AUTHOR> You can run any WebAssembly targeting language in a Worker.

</comment></comment><comment><USER40> So I'm guessing that in order to use modules from npm you use WebPack?

And what's available is the same as a Service Worker in Chrome. So you can use http fetch but there is no raw socket etc. Does it support WebRTC (not sure if there is a way to actually use that on the server but maybe there is some weird use case for communicating between Workers).

Also wondering what options there are for files or databases etc.

It sounds like the design is for them to handle individual requests, but just out of curiousity, how long can the workers keep running?

<comment><USER41> Yep I've got an index.js file that creates a simple API gateway via a basic switch() on the url pathname. Then individual files for each function. Bundle them into a single script with webpack and copy that into the Workers UI (there's an API for deployment too... eg can use Serverless Framework).

1MB max size, max 5-50ms CPU time, max 128MB RAM: [https://developers.cloudflare.com/workers/writing- workers/re...](https://developers.cloudflare.com/workers/writing- workers/resource-limits)

That said I've got a worker script running a pass-through websocket to GraphQL origin server and it keeps the connection open.

I'm doing authentication within the worker too. Long-term I can see ability to run absolutely everything there: microservices, GraphQL server (Apollo has a beta), auth, static SPA files, SSR etc. $0.50 per million calls ($5/mth minimum). And they intend to be within 10ms ping of 99% of the global population.

If they can workout how to do databases on the edge (they're working on it), then I can see a future where you could build scalable apps that serve millions of users for maybe less than $100/mth across the entire stack.

</comment></comment><comment><USER42> If you know how long a request takes you can roughly calculate how many requests per second your server can handle ... When working in JavaScript/Node.JS one thing that is both sync and very slow (almost 1ms) is console.log ! So next time when running benchmarks, try removing the console.log's =)

It's a mystery to me why we need millions of instructions just to put "hello world" in a pipe though. I'm thinking of learning low level programming, but I'm too scared of what I might find.

<comment><USER40> That's what's nice about programming retro computers like the C64. The number of layers you have to dig through is small and doesn't lead to a lot of unnecessary bloat or lag.

</comment></comment><comment><USER43> The article says: "Unlike essentially every other cloud computing platform I know of, it doesn't use containers or virtual machines. "

Surely there were others before like Azure Service Fabric ?

<comment><USER44> I've seen the automated provisioning and scheduling of jails and zones for application deployment, pretty much since they were invented. Automated UID provisioning for isolation and resource constraint and application package deployment, at least since the nineties.

Ultimately most of us want to put files on a server and start a process. There's just an endless variety of constantly re-invented ways to do that. Choose your scaffolding.

<comment><USER45> Jails and Zones are essentially containers - they're ways of isolating process from each other by basically constraining what they can see and change, at the kernel level.

What they're describing is actually running code from multiple people on the _same_ process.

<comment><USER44> A process is any instance of a program that's being executed. That definition doesn't change whether it's a program running as an ordinary Unix process, as an Isolate in a V8 runtime in a container on a virtual machine on a bare-metal blade in a DC rack, or as a hypothetical MIPS-like CPU on my whiteboard.

By "choose your scaffolding", I'm just saying "how much of the OS kernel would you like to re-invent?"

That isn't a wholly cynical position. Doing so might introduce new capabilities or cost efficiencies, which seems to be Cloudflare's pitch. But very often we get excited by the possibilities and lose sight of the tons of additional stuff now required to achieve quite simple things. In the worst case (e.g. VMware) we end up re-inventing hardware abstraction, scheduling, networking, memory management, and filesystems i.e. most of the damn kernel. Docker is a less egregious offender but still deserving of the "too much scaffolding" label.

In the very best outcome, the capability gets stripped down to the core enhancement and pushed back into the expectations for a base OS, which is for example why practically every OS now comes with a hypervisor and a container mechanism.

</comment></comment></comment></comment><comment><USER46> So awesome to see this on the front page just a day after I was complaining about Docker on another HN thread.

Seems like a very pragmatic system. Get some great benefits for a reasonably well defined and common use case (JavaScript apps that don't need to run external binaries), without doing anything crazy just to support apps that don't quite fit in the architecture. It might not work for everything, but for many apps this will be a very simple and low overhead solution. Kudos!

</comment><comment><USER47> Worker execution is limited to 15s of wallclock time. What happens if the client has a slow network connection and takes >15s to receive the HTTP response of a worker?

<comment><AUTHOR> It's actually required to _start_ all requests within 15 seconds, they can take longer before completing.

</comment></comment><comment><USER48> I'm working on an experimental function as a service based on CGI apps. It has a lot of advantages of the article:

\- Process isolation

\- Close to hardware

\- No cold start

But it also has some advantages like:

\- Any language, including compiled languages

\- Local testing, backed by a standard

I am still experimenting with the scaling potential; my biggest concern is memory requirements. Currently I'm writing the project's blog using the project, and then am going to do some performance tests.

It's hosted on a 5 dollar digital ocean instance at bigcgi.com.

[edited for formatting]

<comment><USER49> How would this not suffer from similar issues to Lambda? The start times are going to be worse per request than application servers today because all of the initialization can no longer be amortized. Long before containers became the hot new thing, people were using FastCGI to amortize these costs, and importantly, Scale - CGI requires expensive process creation on every request. You can't take advantage of fast, usermode context switching like with Goroutines or event-based architectures like Node.js because each request is a process in old-school CGI.

And how doesn't that put you to square 1 with isolation? Cloudflare is running multi-tenant loads; you ideally want to have fine grained control on resource utilization and access controls. With CGI, you pretty much have to reinvent Docker to get the same level of isolation...

I'm not sure I follow how this is superior to other solutions except for that CGI is easier to test locally.

<comment><USER48> A fast-cgi implementation is something I've looked into if plain CGI is not fast enough. Initially I want to see what exactly the performance comparison is with plain CGI, and then iterate from there.

As for resource utilization/constraints, it runs on freebsd and uses rctl to limit memory usage and number of processes. One thing I want to find out is how to balance user resource constraints with the total load of the shared server.

<comment><USER49> Oh, I see - so freebsd jails are used for this. At least for process isolation that seems like a solid approach.

Still, I do wonder how much of the problem with containers is container overhead. To me a big difference is about what costs can be amortized. With CGI, pretty much every cost is paid at every request. With long running daemons, the per request overhead is removed. With Cloudflare's functions, the scheduling, request, and startup overhead are (theoretically) removed, leaving mostly just execution.

With just CGI there's some win since you can drop the scheduling overhead, but I think you would probably lose that advantage as soon as you hit the upper limit where forking per request stops scaling. With FastCGI you can enable better scaling but since you now have to manage long running processes, you are officially in the scheduling business, though you could probably beat container scheduler like Kubernetes in terms of raw overhead.

I don't know. Maybe this is a good idea, but I'll admit my first impression was mostly "isn't this just CGI as it always was?"

</comment></comment></comment></comment><comment><USER47> I read through nearly all of the docs looking for testing guidance. How can I include a CloudFlare Worker in my automated integration tests?

</comment><comment><USER50> The implication this article makes that "containers" are somehow further from the metal than sandboxed javascript is disingenuous.

<comment><USER51> How so? Context switching has a cost, and the solution outlined within seems to achieve similar functionality while not paying nearly as much. The same is true for quota/resource management (what cgroups etc. would provide you with containers on Linux).

I haven't used this, just read the same article you have, but the claim seems reasonable.

<comment><USER50> You can run javascript in a container and its distance from the metal is no different than if you just ran the javascript outside of a container. Containers are just processes with limited visibility into the rest of the host, they're nothing like VMs.

We've _deliberately_ incurred the context switching costs of using multiple processes for _decades_ because the hardware-enforced isolation of address spaces via the MMU is _desirable_. Of course you can gain efficiency by throwing away the multiprocess model and running separate security domains in the same address space of a single process, we're not breaking new ground here by going backwards.

</comment></comment></comment><comment><USER52> Been exploring this idea in the app development context for a while now. I wished PNaCl had filled this role, but now think WebAssembly may take up this space instead as it has similar performance characteristics. The attraction of both these for us is that many languages can compile down to be run in wasm.

</comment><comment><USER53> This tech can be a game changer for applications where latency matters more than others. My question is about portability of this. If I spend enough time and port certain parts of my application to this , will it be just tired to CF workers runtime ? Is it possible to run workers on other clouds ?

</comment><comment><USER54> > An Isolate-based system runs all of the code in a single process and uses > its own mechanisms to ensure safe memory access.

What property of this application allows it to share CPU time and memory more efficiently than the OS can?

</comment><comment><USER55> The longer we go down this road, the more the sales pitches feel like Erlang.

</comment><comment><USER56> Can someone shine some light on how secure Workers are compared to containers that use cgroups and namespaces for virtual isolation?

</comment><comment><USER57> Are you planning to release any free plan on workers as firebase cloud functions does? The current offer is 5$/month...

<comment><USER58> Is $5/month too much?

<comment><USER59> (not OP) It is for a side project that gets very little traffic. I'm still paying that $5/mo just to play with this tech but I can't say it's not too much for my use case. I guess that's not the target market for Workers anyway

</comment></comment></comment><comment><USER47> Can I get an automatic email when my Workers begin timing out?

Will there be logs or graphs to help investigate such issues?

</comment><comment><USER60> Do workers allow you to run init code on cold-boot only, or do you have to do all of your init with each request? If the latter, presumably that would also mean that a language like Go (compiled to wasm, obviously) would have its runtime start up with each request?

<comment><USER2> Yes, you can run init code at cold-start time. JavaScript's global scope is evaluated once per isolate created, and you would normally instantiate your WASM modules at the global scope as well.

</comment></comment><comment><USER61> So does this mean my function(s) must be written in JavaScript? Or can it run wasm assemblies.

<comment><USER58> Both! [https://blog.cloudflare.com/webassembly-on-cloudflare- worker...](https://blog.cloudflare.com/webassembly-on-cloudflare-workers/)

</comment></comment><comment><USER62> > Even more importantly: Amazon is bad. It is monopolistic [...] Its owner > should have his immoral hoard of wealth forcibly expropriated by the state > before his power grows so great that all of society is warped by it.

That is a heck of a statement to make.

<comment><USER62> This was a reply to a different article, sorry.

</comment></comment><comment><USER63> Very cool tech. But ridiculously expensive. According to [1] you pay $5 per 10,000,000 requests, <10ms each. That works out to less than 27.8 hours of CPU time per month. And that's assuming near-perfect utilization of that 10ms window and ignoring upfront cost of Pro plan, which this is an add-on to.

Compare that to Linode/Hetzner/OVH/etc. where you get half-CPU for that money (i.e. 360 hours CPU time per month).

And yeah, sure. Not apples-to-apples. FaaS, infinite scalability, yadda, yadda. But computing http responses is still computing http responses. Is this FaaS magic dust really worth 1400+% premium?

[1] [https://www.cloudflare.com/products/cloudflare- workers/](https://www.cloudflare.com/products/cloudflare-workers/)

<comment><USER2> Another reason why this is not an apples-to-apples comparison is that most people don't run their VMs at 100% utilization. In fact, I'd wager the vast majority sit at single-digit percentages on average. Linode will still charge you for the full CPU, of course.

<comment><USER63> Well, CF always charges you for full 10,000,000 requests/mo too.

Also, it is super-common (especially on low end) to offer burstable CPU VMs [1,2]. So you are _not_ getting charged for full CPU, unless you specifically ask for it.

[1] [https://www.hetzner.com/cloud?country=us](https://www.hetzner.com/cloud?country=us) (bottom of the page, toggle between "default" and "dedicated CPU")

[2] [https://aws.amazon.com/ec2/instance- types/t3/](https://aws.amazon.com/ec2/instance-types/t3/) (product details, "Baseline Performance/vCPU" column)

<comment><USER58> You aren't paying for Workers for the CPU time IMO, you're paying to be in 155 locations around the world so that your code runs closer to your user. You couldn't split a hetzner/ec2 box across locations like that. A lot can be accomplished in 10ms on Workers in my experience since they don't count waiting on network requests as part of that 10ms.

If requests only require <10ms of CPU anyway, $5 per 10 million requests is pretty reasonable to me.

</comment></comment></comment></comment><comment><USER64> Does the fact that a worker can run in one of the many data-centers of Cloudflare guarantee some sort of multi-regional redundancy/high-availability in case they have a problem with a region?

<comment><AUTHOR> Yes. One of our goals with this, not yet mentioned, is to get rid of the idea of availability zones or regions. Every worker runs in every data center. Any data center can be taken offline and traffic will be seemlessly rerouted at the BGP level.

<comment><USER64> This is great news! In my opinion, you should emphasize a bit more on it in your writings. It's one of the most important factors. it was for us the central discussion point when were designing a platform for our webapp. We may reevaluate Cloudflare for the next iterations if you can provide this multiple-regions high-availability for your k/v store.

</comment></comment></comment><comment><USER65> This is awesome. Would be even better if the cpu time could be increased. Right now it's 5ms for smaller accounts, 50ms for business accounts ( ~$200/mo ), or custom for large customers.

<comment><USER58> What kinds of things are you wanting to do with more CPU time?

<comment><USER65> Database and third party api access were the use cases that initially came to mind.

<comment><USER51> Do you mean total runtime or actual CPU time? Total runtime would be affected by the use cases you mention; CPU time would not (or would not be affected nearly as much, at least). A function waiting on an HTTP response is not burning CPU.

<comment><USER65> Interesting, I thought they were measuring runtime when they said cpu time. AWS Lambda is priced on runtime so I figured it would work the same. Thanks for pointing this out.

I re-read the article and it is indeed cpu time not runtime for Cloudflare Workers. Sweet!

The part of the article that clarifies this:

> This is not meant to be a referendum on AWS billing, but it's worth a quick > mention as the economics are interesting. Lambdas are billed based on how > long they run for. That billing is rounded up to the nearest 100 > milliseconds, meaning people are overpaying for an average of 50 > milliseconds every execution. Worse, they bill you for the entire time the > Lambda is running, even if it's just waiting for an external request to > complete. As external requests can take hundreds or thousands of ms, you can > end up paying ridiculous amounts at scale.

> Isolates have such a small memory footprint that we, at least, can afford to > only bill you while your code is actually executing.

> In our case, due to the lower overhead, Workers end up being around 3x > cheaper per CPU-cycle. A Worker offering 50 milliseconds of CPU is $0.50 per > million requests, the equivalent Lambda is $1.84 per million. I believe > lowering costs by 3x is a strong enough motivator that it alone will > motivate companies to make the switch to Isolate-based providers.

<comment><USER66> Yep: 50ms CPU time is a lot. Network calls aren't meaningful CPU time, which is why you can use Workers to call to third party APIs. You may want to be mindful of doing that during a user request as it now adds a dependency & latency, but it's certainly possible to call out to a translation API or mapping API & cache the results...

<comment><USER65> > Network calls aren't meaningful CPU time

I understand how async io works. I'm used to AWS Lambda charging for request start to end time regardless of cpu usage.

</comment></comment></comment></comment></comment></comment></comment><comment><USER67> Yes, "The Network is the Computer" (SUN's motto) and it's best implementation I know is Plan9 one. Which means _me_ (user) at the center with _my_ control on _my_ system.

Having anything on someone else computer it's not "The Network is the Computer" it's simply someone else computer. Also it can't scale, no matter how much you work on it, no matter what wonderful tech you create/integrate. Many now talk about edge computing because of that, and I fear it can succeed for a certain amount of time but still it can't scale.

We are people, not puppet, we need to be autonomous and social, not a herd of sheep with very few shepherds.

</comment><comment><USER68> Containers were always a crap. Everyone is bragging about speed and security. That's all bullshit, it's like jails for BSD. There are tons of exploits, same goes to speed. There is NOTHING comprared to bare metal, have you ever did any benchmark on applications cause my team did and find disturbing results enough to write an article and be king for one day. Docker is made for rock star developers, not rational system engineers.

<comment><USER66> That is completely untrue. Containers (distinct from the Docker /daemon/) provide significant security gains.

Try breaking [https://contained.af/](https://contained.af/)

<comment><USER68> I know it's kinda old but think about how many exploits are out there in the jungle.

[https://www.twistlock.com/labs-blog/escaping-docker- containe...](https://www.twistlock.com/labs-blog/escaping-docker-container- using-waitid-cve-2017-5123/)

</comment></comment></comment><comment><USER42> This is cool. But why should I run stuff in a Cloud worker, when it can be run in the Browser's service worker !?

<comment><USER66> Different use-cases. You can do crypto operations in a hosted worker (sign/validate requests, auth clients), make caching decisions that don't require you to consume (precious) client bandwidth, and make routing decisions based on both client properties (geo-location, auth state, etc) and server properties (backend uptime, latency, etc).

A good example is HTTP middleware in your web framework of choice: there are things it does that can't be done safely or correctly on the client, but that you may want to do at the edge before it hits your backend entirely.

</comment></comment><comment><USER69> I would love to check this out... locally in my own computer ...for evaluation

<comment><USER70> This is what we do at fly.io: [https://github.com/superfly/fly](https://github.com/superfly/fly)

It's based on node.js right now. It's a bit clunky, but we have many success stories of customers running it locally, on their CI and deploying to infrastructure.

Currently the open source version is not the same as the production version (due to the distributed nature of our platform.) We're working on fixing that very soon and going all-in open source.

<comment><USER69> And now you have my attention.

</comment></comment></comment><comment><USER71> What, BSD jails all over again?</comment>