Hacker Newsnew | past | comments | ask | show | jobs | submit | more BiteCode_dev's commentslogin

I'm sure leaving a fertile land 100 000 years ago, crossing the desert on foot, having most people die in the process, not knowing if they was an end to that sand, felt the same.

Why would you do that?

Two centuries in the future, the benefit of going to mars will be obvious, because we will have progressed and gain things we don't know about now.

That's how humanity works. We try crazy stuff. And a lot of it is stupid, expensive and dangerous. Plus the result is disappointing.

But eventually something pays of big time.

And everybody says of course we should have done it retrospectively.

It's like people asking why we are still making purely theoretical math research. Surely it's no use, and it's expensive.

I have no doubt many people opposed to the moon landing as well on those grounds.

I expect fully the comments to answer "but this time it's not the same because...". But it's never the same.

It's always a different situation. That's the point.

That's what discovery is about.


> Why would you do that?

Because there was fertile land on the other side.

Moving to Mars is the opposite: it is crossing the desert to go move into a frozen hellscape of radioactive desert.

> I'm sure leaving a fertile land 100 000 years ago, crossing the desert on foot

Actually, this kind of thing basically never happened, for some values of never.

Humans didn't leave Africa by crossing the Sahara desert. When we left Africa, the Sahara wasn't a desert.

Similarly, Aboriginal Australians didn't swim or canoe to the mainland, they walked there at a time when sea levels were lower and there was a land bridge to PNG.

Until very recently, nobody did crazy long crossings over uninhabitable lands or waters. Expansion happened incrementally, over habitable areas to other habitable areas.

> But eventually something pays of big time.

There is no reason to think that there is anything of value on Mars. No oil, no arable land, no liquid water, no unique unobtanium like in the movies. Just the same eighty or so elements, in roughly the same distribution. Just colder, drier, and impossibly far from everything you care about.


Sometimes being outside easy nuclear strike capabilities of the superpowers is a good on its own. Plus lot less annoying environmentalists and I imagine plentiful fissile material.


If literally every nuclear bomb ever made was detonated in a world war, the fallout from that would be a significantly smaller problem than the steady-state radiation is on Mars right now.

The fallout will eventually decay, but Mars will stay an irradiated hellscape forever.


With a couple fairly simple genetic modifications humans could thrive in place with high background radiation, in a place where nobody can throw nukes at you for doing simple genetic modifications.


If rockets with people can get to Mars, then rockets with nuclear warheads can get to Mars.


But you have a long time to see them coming.


People didn't know there was a fertile land of the other side. Just like we don't know if there is a good thing that will come out of mars. We just know the constraints.

It's not about what you know is there. It's the potential.

There is no point for Usain Bolt to run that fast. There is not point in building the tallest tower in the world once again.

Meanwhile, the mars goal already managed to bring us spaceships that land and divide the cost of putting satellites in orbit by 10.

No other path lead to it because there was nothing to motivate it enough.


This comment is really poorly reasoned imo. To continue your metaphor, ancient peoples did not sail across the Pacific *, they sailed to the next nearest island and started colonies there (if viable). You could apply your logic to argue for colonising Uranus, or even the Sun.

> Two centuries in the future, the benefit of going to mars will be obvious IF the colonisation of Mars is successful (however you define that), the benefits of it MIGHT be obvious. Those are 2 huge conditionals; it may not be possible to colonise Mars, and if it is possible, we may still not be seeing any benefits in 200 years time.

*Of course, some did, but very much by exception. And it rarely ended well for these people, or their tribes, or humanity at large.


Do you target big projects with heterogeneoud team ?

Is that the problem it's trying to solve?


Both big projects and small projects are targeted. It doesn't sacrifice functionality while provides speed up.


Managed services still require engineering efforts. I have never seen a transition to a cloud service that actually didn't end up requiring a new hire.

It's the dirty little secret of our industry.


This is the biggest nasty secret about cloud (and SaaS for things you don't build in-house).

When my last company transitioned to cloud, all of the on-prem folks had to additionally take on that responsibility. We then had to hire a bunch of new folks to ease the transition and manage the cloud pieces. And then there are new teams spun up for permissions and security. Your headcount requirements are not going to go down because of cloud.

As for those that like to call DIY systems "weirdware": homegrown systems are expensive to engineer, but cheap to run. We 10x'd our cost going to 3rd party visibility and feature flagging versus the thinly staffed [1] homegrown systems. And those 3rd party systems also required a ton of engineering to support, the migrations weren't clean, and they missed a lot of key features that we had to upstream to the third parties!

When SignalFx got bought out by Splunk, I've never seen an annual plan get re-wired so hastily. Top priority was moving to a new vendor, and that impacted every single team in the company.

The only real tangible benefit to cloud that I've seen is that a team can instantly provision hardware, database, etc. resources without much planning. That's it. And is that worth it? (I don't really think so.)

[1] Once built, half an engineering headcount per quarter to accommodate new features. Oncall rotation for one team that owned the systems. Our stuff was high resiliency and barely paged at all. No SEV1 or worse outages ever.


I love the term "weirdware": I've seen systems like that built (and used!) first-hand multiple times in my career.

They can sometimes be very odd force multipliers in unexpected ways.

My favorite example is a home-rolled payroll applications specifically for sales people from over a decade ago. When I first arrived at the org I thought they were absolutely insane to have created such a thing. But its killer feature was that it allowed our org to pay out commissions rapidly (same day) and also allowed negotiating on a per-account residual commission basis as well as giving management the option to buy-out residuals. Off-the-shelf solutions at that time kinda-sorta did this but required either massive upfront $$$ and a ton of integration work. A plucky startup couldn't afford it. This was built, tested, and rolled-out in 45 days by 2 engineers and basically allowed them to poach top sales people because they knew they could get paid faster and had more flexibility on residuals.


That's the tradeoff everyone makes when they say something isn't in their "core competency" - they give up any real competitive advantage that area of expertise could bring them. That often makes total sense like with accounting or HR, but most companies take it way too far in engineering and internal support software.

Engineers make the same mistake all the time too: we love to say that "premature optimization is the root of all evil", ignoring that the full quote is "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. _Yet we should not pass up our opportunities in that critical 3%_"


Ha I built an internal app just like that for field sales at a mid sized company. One of the best projects I ever worked on.


> The only real tangible benefit to cloud that I've seen is that a team can instantly provision hardware, database, etc. resources without much planning. That's it. And is that worth it? (I don't really think so.)

Yes! Maybe not for you or me, but it’s definitely worth it to tons of organizations where everyone including engineering was beholden to old school IT departments that take months to spin up a VM after pages of bureaucratic back and forth. The cloud moves it from an IT issue to department budgeting.

The other advantage of cloud was moving capex to opex which the finance people liked because *hand wave* something about amortization. Those are the two reasons most established companies moved to the cloud. It had little to do with the actual cost but how it was spent and who was in charge of doing it.


Having seen the results of everyone being able to spin up a VM (or an EMR cluster, or an EKS cluster) I can say a little more bureaucracy is probably a good thing.

You end up wasting huge amounts of money on resources that are just sitting around idle (no your fancy automation to shut them down won't work because maybe that dev cluster is actually needed at 2am on Sunday. It's an org problem, not a technical problem).

But more importantly you give the cloud providers an excuse to destroy another square mile of pristine forest and build a giant 4 story grey box that wastes enormous amounts of already limited water and energy.


  where everyone including engineering was beholden to old school IT departments that take months to spin up a VM after pages of bureaucratic back and forth. The cloud moves it from an IT issue to department budgeting.
My F500 company put a stop to that. There is new paperwork in place to requisition cloud resources. The bureaucracy will not be replaced.


Even the startup I worked at in my last job didn't let people just spin up whatever resources they felt like in AWS. Changes had to go through architecture/security review, and I might have been the only SDE who was allowed to log into AWS at all. We were subject to SOC 2, but I imagine it's relatively common for SaaS companies to have some kind of compliance framework assuming they want F500s as customers?


> old school IT departments that take months to spin up a VM after pages of bureaucratic back and forth.

Virtual machines were the bureaucracy shortcut. People sounded exactly like you. In fact, you can go back about 30 or 40 years and each decade people said the same type of thing. E.g.:

"What's great about a mainframe logical partition is that we don't have to do a year of paperwork to get our own mainframe."

"What's great about Intel servers is that we don't have to beg IT for a mainframe LPAR."

"What's great about virtual machines is we don't have to... "

"What's great about the cloud is we don't..."

"What's great about SaaS is..." <- You are here.

PS: There's products starting appear in the market that "firewall" SaaS products to stop people like you. Not the hackers. You!

The bureaucracy will not be side-stepped.


> This is the biggest nasty secret about cloud (and SaaS for things you don't build in-house).

Yep. Huge amounts of marketing funds are spent tricking decision-makers into thinking that off-the-shelf, plug-and-play solutions exist for their idiosyncratic business problems and schemas.

Sometimes such products exist, but they are so bloated with features to support the other 99% of customers. So you absolutely need at least one expert to unwind the complexity.

It's known that "greenfield" software development is much easier than "brownfield"/migrations. It should also be widely known that brownfield SaaS integrations are troublesome, because it involves enormous software+data work to link the existing in-house interfaces to the third-party interfaces. As a rule of thumb, there is no such thing as "off-the-shelf". You WILL have to hire and build and deeply understand your business processes.


This is what people tell themselves, but 99% of the time, what your business does and the scale it operates at aren't special.


Special in the sense of scale does not equate to special in the sense of adapting to your business' needs/culture/sensemaking


They don’t have to be special to be bespoke.

And almost all business integrations are highly bespoke.


> Your headcount requirements are not going to go down because of cloud.

Depends on how big you are. I'm one person and I do a lot of things with the cloud that I could not do if I had to rack servers (or even order dedicateds).

Same goes for small 5-10 person teams that are good with Terraform. I've seen some orgs punching waaaay above their weight given their size. Not possible without classic IaaS.


> do a lot of things with the cloud that I could not do if I had to rack servers

It's not a binary choice between cloud and physical racks in a data center. There is a wide range of options. Companies like Hetzner enables you to click a button and get a dedicated instance, while Digitalocean can provide you with a VM. Both options are cheap and doesn't require much time.

If you do this often, you probably also have an ansible setup to install the base software (like k8s or a simpler stack), you are ready to go within minutes. Just like you would have a terraform config for your cloud


Being able to put everything into (good) source with all the lessons we have about how to manage source code over time puts incredible power into teams that can handle it.


That sort of thing is much easier to do with a standard k8s/ansible/whatever stack than having to juggle proprietary cloud provider stacks.


"Cloud" is an accounting trick that moves CapEx to OpEx. That's it. It has no technical reason to exist.


Virtual Machines becoming sufficiently performant is a technical reason for it to exist. It's far less viable if we didn't get vmx and related extensions to the x86 command set.


Having done both cloud and on prem. It’s soo much more than that. Pace of innovation increases with cloud as you no longer have product beholden to the infra team jira hell.


"Infra team jira hell" exists precisely because of accounting CapEx trickery. There are no technical reasons for it to exist.


What a short-sighted outlook

1) "homegrown systems are expensive to engineer, but cheap to run" misses the most important part - how much does it cost to maintain, and how much of a RISK is it?

Homegrown probably means you're depending on tribal knowledge from a few core people who if they leave you're hosed. That's a risk. You also have to train EVERYONE you hire to learn the homegrown systems, instead of hiring people with externally transferrable skills that can come in and hit the ground running.

2) all of the on-prem folks had to additionally take on that responsibility

Most transitions/migrations always end up with a period where you have both systems running. It's not surprising that at first everyone has additional responsibilities. It sounds like the "on-prem folks" either didn't have the skills to work in the cloud or refused to learn, and needed external hires. Well, that's one way to put themselves out of a job, and that would be the next step once the homegrown system is deprecated.

Obviously there's a reason why "not invented here" syndrome exists. There's a reason "build vs buy" is a complex discussion because of more than just buy costs. People always prefer the home-grown thing, DIY. Engineers especially. On this site, particularly. And, also, plenty of successful businesses exist by cutting out layers and going on a shallower stack ("your margin is my opportunity").

But at the end of the day, for the vast majority of businesses, companies, and software shops, managing their own in-house infrastructure is a worse decision than paying a cloud vendor.


> Homegrown probably means you're depending on tribal knowledge from a few core people who if they leave you're hosed.

there's so much complexity and tribal knowledge with cloud deployments that if tomorrow our cloud experts leave we're also very definitely hosed too, despite everything being documented thoroughly. I'm involved in a product that leverages a cloud-based metaverse system (Mozilla Hubs) that recently had organisational changes requiring us to change our hosting approach, and it's taking the better part of a year of work to understand its logic, for something that would have been a non-issue if homegrown & self-hosted.


I see both points but I have to agree with this one, especially if we’re talking small companies. A startup should outsource everything that is outside their core product (but not more than that), so they can focus on making their product top class.


It depends on your scale.

As a solo dev just being able to point my apps to firebase and not worry about it saves a ridiculous amount of time.

At Uber's scale they probably have to tweak Dynamo and other services so much they might as well bring em in house.

I'm a bit surprised we haven't seen a new AWS, something like Walmart Web Services.


On the other hand as a solo dev `sudo apt-get install postgresql` plus a short tweak of your pg_hba.conf and a quick script to run pg_dump every night is about as much work as setting up a cloud service.

Managed databases provide a lot of useful features, especially if shit hits the fan. I'm not saying you shouldn't use them. But the work you put into reasonable self-hosted services and reasonable managed services often scale at a surprisingly similar pace.


Alright, what about Auth or other features Firebase has built in ?

I still have to host it somewhere.


Auth is included in your stack, e.g: django comes with it.

Plus you own the accounts, so you are not locked in.

Sync is the firebase kill feature, but most apps can live without it.


For a side project it's not that serious.

Firebase is ready to go without me thinking of the details.

If I'm using Flutter or React, I already have a nice client side sdk to use.

The 12th of never when I need to scale it I can switch to a different stack. Firebase functions allows me to do some server side data manipulation.

That said, if I was at work and needed to propose something I'd probably spend more time thinking of this. But for all my side projects firebase is my goto.

Let's just say we're having a competition to see who can crank out a basic crud app first. You're not beating me with Flutter and Firebase.


Then if you are successful one day you can cry on social media about your large surprise bills.


That is a big “IF” . 99.99% side projects are not successful, you should not be planning architecture expecting to win the lottery .

Even if you did, on premise self-hosting does not save from scaling costs or problems .

If you are successful with firebase , all you get is the bill, firebase will definitely scale without sweat or intervention, for most businesses (side or small) that is better tradeoff .

If you are successful with a self hosted solution , you are likely to be down when the peak traffic or hug of death hits that is when you need it most to work, the app will fail.

This is even assuming intimate expertise on how to scale quickly and having many done it many times before with no mis steps and no researching on what to do.

A professionally managed service at firebase level which is shared infra has already both the capacity and code tuned to scale for any one tenant without effort or lag .

Self hosted infra is optimized for cost and usage pattern of one small tenant, no matter how good your scale out skills and autoscaling code is , there is going be a lag between you and something like firebase which will never notice your spike and issues around it.

This is the crux of success behind multi-tenant IaaS and PaaS, the reason Amazon opened up their infra to the world originally.

All the way even to Amazon.com scale of SRE skills and budgets, hosting on AWS will always be better and cheaper for them than using isolated infra only for them given their load pattern fluctuates pretty heavily .

Amazon.com would still run AWS even if was losing money a bit ,because it would make them more resilient and their infra costs cheaper .

The best analogy I have heard is it similar to insurance, works better with more and more users with diverse usage and risk patterns


For me the answer is much simpler.

I find coding backends to be very boring. It's just not something I want to do during my spare time.

Managed infra is almost always easier to get going.


Coding CRUD and repeating patterns tends to be boring, however writing interesting logic in backend tends to be interesting.

Generated CRUD interfaces with basics like authentication etc is pretty much easy these days, whether Supabase, Hasura, PostgREST style self hostable stacks or just Firebase, even collaborative data structure basics for CRDTs don't need to be built each time and are available out of the box.

Frontend can get repetitive too, a lot of components keep getting built and redone differently, interesting stuff which makes the tech be core part of the product differentiator such as say how WASM is used at Figma is the real interesting part in frontend.


> I'm a bit surprised we haven't seen a new AWS, something like Walmart Web Services.

Don’t know if you have heard but there are these brand new services called Google cloud and Microsoft azure. Not to mention all the legacy saas providers e.g. oracle that existed prior to aws.


Both of those are tech companies, AWS if the official story is to be believed originated as an internal tool of an e-commerce website.


Why wouldn’t it be believed?


For one it's neither the official story, nor true.


You wish! In my experience they just load all the cloud work on to developers. Like, I’m setting up virtual networks, private endpoints, firewalls and what not, because if I don’t there won’t be horrible (I basically knew nothing about networking before I did it and I still don’t know if anything we do is correct in any manner) security but no security.

It’ll bite the company in the ass eventually, or maybe it won’t, but it is what it is.


I don't think it's a secret, I think the idea is it will allow you to be more resilient then a custom solution. Why? If the person(s) who made the custom solution leave, you can't as easily hire a replacement. What's more, hiring immediately effective folks becomes harder, even if those folks who made it don't leave.

It's a tradeoff, but I don't think folks are keeping secrets around it.


Not true. The hiring pool for developers that know Postgres is maybe a thousand times larger than those that know DynamoDB.


Bingo. You still need your whole Ops and tooling teams. They just become Cloud Ops and Cloud Tooling.


Eh, sure but it's not the same person. There are far more people who can "do cloud" than those who genuinely understand distributed systems well enough to build and operate a homegrown data infrastructure.


True, but anyone who's a cheaper hire because they can "do cloud" but not homegrown also represents a sacrifice in terms of what's you get. In terms of your operational capabilities, you'll likely be paying for that with a crisis first where everyone yells at your team because of a problem in your managed provider you can't fix, and you can't get someone from the provider on the line and helpful in a way that gets you out of it faster. So then you'll tack on add a massive yearly support retainer for a response time SLA that's still bad for your business bottom line and support that's not incentivized to prioritize you. I have stories from name-brand PaaS/IaaS companies.

It's like outsourcing (I don't mean offshore, I mean any kind). It can be a reasonable thing to do if you don't pretend you're getting the same thing for less money and really actually plan around that. But people often do pretend it's the same, and the results aren't immediately apparent. And when they're finally blatantly apparent, either the guilty party has cashed out and left, or people don't have enough perspective to point to the real root cause.

I'm not saying building your own infra is generally a good idea of course. It's just that beyond a certain size, for more businesses than you'd think, reliability has to be a core competency you invest in. And homegrown is a lot easier than it used to be because the offerings in terms of tooling and platforms are way better such that you can strategically craft your level of managedness for optimum cost/benefit on multiple criteria.


Cloud costs more but gives you data enter as a service. Software defined everything.


What about after the transition is complete? Surely managing a… managed service… is less costly?


Everytime I mess up a password, I click the "eye" button to reveal it if I'm alone, so it will likely go into the screenshot.

I type totp code that will be valid for 2 minutes, and they are clear.

I have emails, account numbers and emails.

I have contacts of my network, sites I visits regularly and nick names I use. Sometimes I paste sensitive content in encrypted chats, but hey, now they are in the screenshot.

Then there are nude pics of partners, intimate journaling notes, porn activity, how much I have in the bank, contracts with clients under nda, legal and illegal drugs I order, political alliances, and all the stupid stuff I may do...

All that conveniently centralized and searchable.


You can only grant something you have the rights to, so basically, they are asking you to do something you can't.

I don't have the rights of my client's product.

I want to see how it plays in court.


If I'm signing a contract to sell you something I don't have, e.g., the Brooklyn Bridge, then I'm liable.

If you sign a contract to license something to Adobe that you don't have the rights to, you're now at fault.

Either get a good liability insurance, or avoid using Adobe.


> Either get a good liability insurance, or avoid using Adobe

Or get the client to direct you to use Adobe even with this clause.

Easiest solution is to get the client and Adobe to agree to what rights each of them get.


THIS. And the moment that the client expresses reservations about this strategy (which your approach to the subject was trying to elicit), you start talking about the alternatives to continued use of Adobe.


You granting someone rights to material you don’t have makes you liable twice right? If your friend lent you his car and you lent it to someone else, you become liable twice not zero times.


You don't have the right to upload your client's product, yet you use software that uploads your client's product.

You're correct that the two conflict, but I think the courts would have a problem with you for using a product that breaches the employment contract you signed rather than rule that Adobe is at fault here.


I think so, you have to pull in the customer and let them know you planning on using the adobe product and since adobe demands they have full access to the customer’s proprietary media they will have to agree to that as well. How that happens I’m not sure? Have them buy an adobe license for you to use? I guess at that point you need lawyers or their full permission to hand over their ideas to Adobe, otherwise you’re gonna be libel if it leaks/gets copied/etc


Having them buy a license would probably work. You could also have this stuff specified in your contract with your employer.

Realistically, businesses will either shrug and be fine with you using Adobe stuff, or they'll find someone else (who still uses Photoshop, but doesn't know or warn about this stuff). I doubt the person hiring artists knows or cares about this stuff until an actual leak takes place.


Everyone should edit some copyrighted works in private. If Adobe goes on to publish them publicly, they will be seen in court pronto.

Poison the well?


and holding your data hostage until you do agree


While trying to figure out why VSCode was hogging my file watchers, I came around this nice inotify explorer

You do need to compile it but it was easy enough, and it helped with figuring out my issue when my bash-fu failed me.


Honestly now with chatgpt, matplotlib terrible API is less of a problem.


This is a great example of why the age of truly terrible software is going to be ushered in as LLMS get better.

When the cost of complexity of interacting with an API is paid by the LLM, optimizing this particular part of software design (also one of the hardest to get right) will be less fashionable.


That's true, but still, there are things you just can't do in matplotlib that you can do better in other GPT-aware packages like plotly.


React was a blessing for the few creating apps that needed more than jquery, and that AngularJS 1 couldn't handle for perfs reason.

That was actually a very small parts of the projects in the world at the time, and in fact, a very small part of the number of projects that adopted react at the time.

I remember above all that:

- React was hyped to the roof by facebook. They had a fantastic marketing machinery for that.

- React sucked for years, with a terrible doc, a crippling webpack experience and breaking compact all the time.

- The JS community was moving from koolaid to koolaid, never assessing the new tech for their cost. They solely inflicted on the world slow and brittle preprocessors left and right, thousands of stuff you had to integrate manually because "libs > frameworks", and jumped on react, redux, graphql, docker, spa, microservices.

So I would say it was a loooot of hype for react, just like it was for graphql.

I'm going to feel like spamming at this point, but, remember when XML was the future?

https://www.bitecode.dev/p/hype-cycles


> React was a blessing for the few creating apps that needed more than jquery, and that AngularJS 1 couldn't handle for perfs reason.

performance was the least attractive reason for adopting React. React introduced composition as the default way of thinking about UIs to the web. You created components and used them to build more complex components. Data was immutable and flowed in one direction (parent component -> child component).

Comparing the above to ng with its dependency injection, MVC style approach to UIs, that used HTML based annotations and tags to sprinkle in functionality (`ng-if` baby) -- it was a much more simple way to build web applications.

React's style of building UIs has largely won. Vue, etc. all follow this component with composition view of the world.

> React sucked for years, with a terrible doc, a crippling webpack experience and breaking compact all the time.

Webpack has nothing to do with React. React has always had good documentation. The reason the documentation was good in the beginning was because the API surface area was tiny compared to Backbone, Ember, ng, etc..

I'm not going to go point by point here. You sound like you have a very superficial understanding of the space.

I'm going to hard pass on clicking a marketing link to your blog.


The simple fact you say

> React has always had good documentation

Tells me you rewrite the entire history.

In fact, for years, react didn't even tell in the doc you could use it without a transpiler so people had to learn a whole build chain before even getting to the hello world.

At this stage it's not "superficial understanding of the space" this kind of comment is guilty of, it's total denial.

And by the way, we have been doing components for UI way before react was a thing. jQuery could do components. Backend frameworks could do components.

As for immutable data, I've seen more small projects die from the small cuts of trying to maintain that purity that I've seen those exploiting the benefits like free time travel.

I assume you've been living HN bubble for too long.


You know you can just check before making these claims. It helps with credibility.

> In fact, for years, react didn't even tell in the doc you could use it without a transpiler so people had to learn a whole build chain before even getting to the hello world.

React's original documentation site from June of 2013 (when React was first introduced):

https://web.archive.org/web/20130607085014/http://facebook.g...

> JSX is a JavaScript XML syntax transform recommended (but not required) for use with React.

It goes on to explain exactly what JSX is and how it converts to JS functions. Feel free to click around that original documentation site.

Here's the README.md from the commit at the same time:

https://github.com/facebook/react/tree/a41aa76ef36471ba07b29...

> You'll notice that we used an XML-like syntax; we call it JSX. JSX is not required to use React, but it makes code more readable, and writing it feels like writing HTML. A simple transform is included with React that allows converting JSX into native JavaScript for browsers to digest.

At this point I would kindly ask you to go away.


I stand corrected, I'm the one with a distorted memory of the doc.


XML was genuinely better than fix-width data formats (COBOL) or character-separated fields (CSV, HL7) for most APIs. Hierarchical deeply nested trees of data were the future. Everyone uses JSON or a more industrial format like protobuf/avro/BSON to represent such data now, but it wasn't necessarily wrong to point at XML and say it was an improvement.


The problem with XML is precisely that it is so much more than simple hierarchical, nested trees of data. The fact that in a casual conversation XML is reduced to hierarchical trees of data pretending the rest of XML does not exist more than proves OP's point.


I'm not pretending anything and I hate XML. I would still rather use it than HL7, because it's a hierarchical tree of data and HL7 is not. OP's point is that almost nobody wants to use XML anymore; my point is that almost nobody wants a Ford Model T as their daily driver anymore either, and yet it was still the future, in a certain sense.


https://en.wikipedia.org/wiki/Billion_laughs_attack https://en.wikipedia.org/wiki/XML_external_entity_attack

XML is so much more than hierarchical data serialization format. In a typical conversation XML generally means "JSON-compatible subset of XML" as if the other parts do not even exist. Like in the meme "Javascript vs Javascript the good parts".

XML never really took off, only the parts that make up "different flavor of JSON".


Do you think FHIR is acceptable?

It feels like a cross between JSON and HL7 to me.


I quite like FHIR. My experience with using it has been that everyone seems to implement it slightly differently, but it does a better job at being human-readable. It was much easier for us and our partners to work with than regular HL7.

Some things were a bit weird. From memory it had big lists of records all mixed together as the implementation of references.


> React sucked for years, with a terrible doc, a crippling webpack experience and breaking compact all the time.

Webpack wasn't how it started, remember gulp?

Also don't forget the switch from class components to functions, then inventing "hook" functions to reintroduce functionality that already existed in the class components.

For the past few years I've been on a team that handles a legacy system from long before React existed (internal) that just renders HTML directly, a client website that uses Backbone, and a newer client website that uses modern React. The old internal one that doesn't use any frontend frameworks has been by far the nicest to work with, and Backbone the worst.

I think that's some missing context as well - React+Redux was much better than what came immediately before it, for complex web apps. But when you're not building something like that, yeah, both are worse. It just doesn't seem like the Backbone era encouraged people to use it for everything, unlike React.


> React was a blessing for the few creating apps that needed more than jquery, and that AngularJS 1 couldn't handle for perfs reason.

React solved a very specific issue that was a pain in Angular, which is making it easy to write small, self-contained components and attach them to a mostly static site. That people decided to use it to make entire SPAs further illustrates how much easier they found it than other solutions.

I can't think of a case where JQuery code is ever simpler than React code, even for small things. If you need to worry about the order of rendered items or moving them into different categories on a page based on input, it's much simpler in React.


No, GraphQL makes sense at facebook because at their scale, dealing with the consequence of allowing all possible queries was less work that having to create dedicated enpoints for all the possible client queries.

People completely missed the point of GraphQL, which is you TRADE flexibility for the client for added cost on the server.

Which in a app and team as huge as facebooks' made sense, especially since they have the so-called facebook apps that could do... anything.


Yep, GQL can make sense if you have tons of clients.


> People completely missed the point of GraphQL, which is you TRADE flexibility for the client for added cost on the server.

I mean, isn't this THE selling point of GraphQL? How was it missed so badly? I think every elementary resource about the technology covers this in the pros and cons section...


The problem is you delegate a lot of the query building to the client, hoping that it will not suddenly change your performance profile by being creative and that you will have not missed an obviously expensive use case coming.

That's a huge bet, especially given that GraphQL is expensive in the first place, and given that the more you grow the API in size, the less you can actually map the cartesian product of all request params.


I'm not sure this is any more or less of a problem for REST APIs. What if your engineers change $client/$server and the new version makes really expensive queries? Well, ask them not to do that, then when some of them inevitably ignore you, start to review their code, terminate long-running queries, batch or pool fanouts so they don't take anything down, monitor new releases and roll back if anything breaks, etc.

If you're providing an external API like GitHub does, then that's a different story and I agree.


If you have separation between front and back end, then the back end team can elect to serve REST APIs which only permit selecting, filtering, grouping and pagination that they know they can support within defined latency bounds for a given traffic level.

Thing get more problematic when there's vertical ownership for a feature, where the UI needs just a few extra things and you end up with a REST response which is fatter and fatter, in the interest of avoiding round trips and client-side joins.

The problem with killing correct queries that take too long is that it shows up as intermittent failure that's dependent on server load and data cardinality. You might not find it in testing and it ships a bad experience to the customer before bugs are found. Whereas APIs which can't be so easily misused make it much harder to ship bugs.


> the back end team can select to serve REST APIs which only permit selecting, filtering, grouping and pagination that they know they can support within defined latency bounds for a given traffic level.

Why do you think that they can't do that with GraphQL? GraphQL isn't open ended. Its a highly restricted syntax for calling nested resources. If a resource is expensive simply don't nest it and make it a top level field and it is the same as REST?

Lots of nested resources are by default efficiently served by GraphQL because they are mostly returning single object foreign keys. Something that would take extra calls with REST.

GraphQL can have the same restrictions and performance guarantees as REST but the later is not necessarily true because in REST there is no standard way to define nested resource access.


I think the point here is, if you have to involve a backend team to add restrictions to the graphql endpoints and try to make good educated guesses where those might be, then the idea of frontend not needing backend engineers to query whatever they need becomes less of an advantage. So is the complexity of setting up graphql and then having your backend team try and make sure no frontend engineers can do terrible queries better for the software than custom rest APIs where needed and standard resource APIs everywhere else. Obviously it depends on the project. But I find the complexity of setting up and managing graphql often isn’t worth the pain, especially with schema first resource api designs and tooling like Google’s AIP linter.


> if you have to involve a backend team to add restrictions to the graphql endpoints and try to make good educated guesses where those might be, then the idea of frontend not needing backend engineers

No because if you dont do that you have to involve more engineers anyways to build the REST endpoints and keep modifying the rest endpoints.

GraphQL is also default restrictive (i.e. exposes nothing). You don't need to add engineers to make it restrictive.

In Startups typically:

  -> Frontend changes most frequently
  -> Backend "utility functions " changes less
  -> Data model changes the least
Without Graphql your "backend" ends up needing to have a lot of work and changes because it is constantly needing to be updated to the needs of the most frequent changes happening on the frontend.

With GraphQL the only time you need to update the backend is when those "utility" functions change (i.e. 3rd party api calls, etc) or the data model changes.

So you end up needing substantially less backend engineers.


But you actually don't need to keep modifying the REST endpoints for most projects, that's what everybody is saying.

The vast majority of projects don't gain anything from this flexibility, because you don't have suddenly a 1000 of farmvilles copy cat that need their own little queries. You just have bob that need an order by.


> With GraphQL the only time you need to update the backend is when those "utility" functions change (i.e. 3rd party api calls, etc) or the data model changes.

This is akin to saying that "directly exposing the database is easier, you only have to change things if the data changes".

And yes this is true, but when the data changes, or the environment changes, the paradigm falls apart a bit, no? Which is what the backend code was for, insulation from that.

> In Startups typically:

Yes, so for a short lived, non-scaled application its far easier to do it one way, and maybe that's fine for most small apps (that will never scale far). I suspect a lot of the push back comes from larger, less nimble, more backwards-compat focused organizations/apps.


> This is akin to saying that "directly exposing the database is easier

Far from it actually. I am saying that in practice the data and queries that you perform on your Database actually tend to stabilize and you add less and less as time goes on.

By Allowing the frontend to select what combination of these pre-approved queries that you already approved it can use, you have to do less and less backend work when compared to REST where you have to do backend work for every query combination you want to serve.

> maybe that's fine for most small apps (that will never scale far).

I mean saying GQL doesn't scale for big apps is over looking one of the largest Corporate Software Orgs (FB) created and use it in production purposefully for managing large software APIs.


> By Allowing the frontend to select what combination of these pre-approved queries that you already approved it can use

Sure, so you are just filtering raw database access then. That doesn't make it any different - and, you still need to approve and filter these queries, so what exactly have you saved? I.e. either the front end engineers can change these filters, or not, so it amounts to the same thing in the case they can.

> I mean saying GQL doesn't scale for big apps is over looking one of the largest Corporate Software Orgs (FB) created and use it in production purposefully for managing large software APIs.

That's not a great argument, though, saying a large company with many resources is capable of supporting something does not make it a sustainable technical decision. They likely also have a very specific work structure they use to make it for them.

In fact thats a strong reason not to use it, if it requires enterprise level resources to use it effectively. There is a big difference between technologies that scale to enterprise and technologies that require enterprise...

It still comes down to, if you can achieve 99% of the same thing with autogenerated REST apis and a couple page specific apis, what, exactly, is worth the considerable increase in complexity for that remaining 1%? Making things regularly more complex is a hallmark of failed, bad technologies, and I suspect GraphQL will see the dustbin like SOAP did...


You are bouncing back between it is ony for startups and it requires enterprise level maintenance. It can be used easily for both.

> It still comes down to, if you can achieve 99% of the same thing with autogenerated REST apis and a couple page specific apis

Because you can get 100% by autogenerating GQL APIs and 0 page specific apis.


>You are bouncing back between it is ony for startups and it requires enterprise level maintenance. It can be used easily for both.

No, I never said that. You are the one that brought FB into the equation.

Just because it can be used for something does not mean that it should.

I said that that approach doesn't scale well, especially for frequent data/model changes. For small apps, where as you say, you have few data changes, by all means embed your database as closely as possible to you end user code.

Sqlite inside a c app or electron, e.g. No need for any API at all! Just raw query access.

Its nice GQL to generate stuff for small non-changing web apps, I'm sure. But once you get into more performance oriented, data-migration-style stuff, if there's not good support for changing the data and reacting to the environment, then adding complexity (GQL) to an already complex situation is a Bad Idea.

You never said what this 1% was, autogeneration is not a bonus when you already have to manually filter and route things. The simpler solution gets you there as well, with less fuss.

You think you don't have page specific apis, but if you are doing the manual filtering, then you still have them, you are just "hiding" them inside another language, that doesn't have a clear benefit? At least you can't say what it is, without going in circles, another sign GQL is probably ultimately a garbage technology...


There's a lot of relevant differences between REST & GraphQL. It is possible to construct a REST endpoint that simply can't do any of those things, and such construction is a mid-level developer task at best. For instance, pagination of "all posts ever" is not uncommon, and clients won't be shocked to deal with it. GraphQL is enough harder to characterize the performance of that it definitely qualifies as a change in quantity that is itself a change in quality. Hypothetically, both approaches are vulnerable to all the same issues, but GraphQL is far more vulnerable.


This is Wrong.

GraphQL only exposes what you ask it to. There are plenty of pagination plugins for GraphQL frameworks just as there are plugins to REST framework.

GraphQL can be restrictive as REST if you want it to be.

The point is GraphQL can be "as restrictive" as REST, but if you want to enable more efficient queries by knowing all the data that the frontend is requesting, you can. But the opposite isn't true of REST. With REST if you want more advanced functionality like that you have to define your own specification.


But then what's the point of using it if it's to get the limitation of REST?

You get something more complex, more expensive to maintain, consuming more resources, and configure it to basically be REST with extra steps.


> more complex, more expensive to maintain, consuming more resources,

Idk. Strawberry GQL and most GQL libraries are maybe equally as complex as the REST libraries for the same language. Strawberry and FastAPI I would say are equal in complexity and configuration.

It would be hard for me to say GQL is more expensive or consumes more resources. Opposite of the purpose and most uses of GQL.


In stawberry you make a method per field you want to retrieve, I would say it is indeed more complex and costly.


What? Its a method per collection you want to return. or else it is a type annotation. Exactly as complex as FastAPI or any other typed system.


Sorry, what? The original suggestion was that a developer would change things and it would cause performance problems. That same developer can change either a REST system or a GraphQL system and introduce the same performance issues in the same way, probably by adding a horrible N+1 query, or unbounded parallelism, or unbounded anything else.

Yeah, the client can't change the query if you don't let it specify a query, this is trivially true, but the developer can go break an API endpoint with the exact same result while trying to achieve the exact same business outcome.


The much more constrained input of the REST query means that the effect of changes on the API are much more comprehensible. Performance testing a particular REST endpoint is generally practical, and if a dev doesn't do it, the responsibility is reasonably placed on them. GraphQL means that you may do something you think is completely innocent like changing some index but for some query you didn't anticipate it trashes the performance. The range of things the dev of a GraphQL endpoint must be keeping track of is much larger than a REST endpoint, arguably exponentially so (though generally with a low power factor in practice, the possible queries are still exponentially complicated), and taking on any form of exponential responsibility is generally something that you should do only as a last resort, even if you do think your powers will stay low.


Obviously depends on the API but a REST API that maps relatively cleanly to database queries is going to make it very clear on both the client and the server when it’s not scaling well.

If, at page load, I’m making 100 HTTP requests to fetch 100 assets then as a client side developer I’m going to know that’s bad practise and that we really ought to have some kind of multi-get endpoint. With GraphQL that gets muddy, from the client side I’m not really sure if what I’m writing is going to be a massive performance drag or not.


> What if your engineers change $client/$server and the new version makes really expensive queries?

Yes, so the cost benefit here is not in favor of GraphQL. If both technologies ultimately suffer from the same issues (what to do about unpredictable clients), but one is far more complex to implement and use (GraphQL), then there's a clear winner. Spoiler, its not GraphQL.

Page specific endpoints, I would argue, can do 99% of what GraphQL was trying to do. If you want to use it as some sort of template language for constructing page specific endpoints, that could be useful (the same way xml schema is useful for specifying complex xml documents).

But you can optimize a page specific endpoint, and do it with REST-style endpoint to boot.

Having a bunch of "simple" calls and optimizing for the "complex" ones that you need using metrics/analysis is what you should be doing, not creating a complex API that is far harder to break down into "simple" cases.


When you build a GraphQL server, you’re creating a system that outputs page-specific endpoints. They can be generated just-in-time (the default) or at build time (the general recommendation).

The engineering work involved shifts from building individual endpoints to building the endpoint factory. This shift may or may not be worth the trade off, but there are definite advantages, especially from the perspective of whomever is building the client. And once you factor in the ease at which you can introduce partial streaming with defer and streamable (granted they’re still WIP spec-wise), the experience can be pretty sublime.


https://graphql.org/blog/2020-12-08-defer-stream/

This? Yeah, that seems neat, for command/batch queuing.

I'd be curious how it compares to e.g. rest apis returning refs to e.g. webrtc streams or tcp/udp ones for non-browser. I presume the main advantage would be client side.


Even a SQL query can suffer the same fate. Ever tried writing a SQL query against a distributed database that isn’t optimized for that read path?

I think that’s what’s really pointing out the root cause issues here, it’s not purely GraphQL’s problem, it’s the problems inherent to distributed systems.


I haven't done much more than toy projects in GraphQL. Is there no way to limit the query complexity/cost? Such as a statement timeout in postgres?


Ah but that's the beauty of GraphQL, a query can actually fetch data from several systems: the db, the cache, the search engine, etc. It's all abstracted away.

But let's say you have a timeout, and they have a retry, then suddenly, your server is now spammed by all the clients retry again and again a query that worked a week ago, but today is too heavy because of a tiny change nobody noticed.

And even if it's not the case, you can now break the client at any time because they decide to use a feature you gave them, but that you actually can't deal with right now.


To be clear, the main thing that's abstracted away are server round-trips and client-side joins. REST APIs can fetch data from different systems too.


Sure but queries are crafted in the client, that may know nothing about this, while a rest api, the requests are restricted and the queries are more likely under control of the server, which mean the backend will likely decide what fetches what and when.

It takes a lot of work to actually ensure all possible combinations of graphql params hit exactly what you want in the backend, and it's easy to mess with it in the frontend.


I'm not that much into GraphQL but I vaguely remember libraries that provide some kind of atteibutes you apply to entities/loaders and then pre-execution an estimated cost is calculated (and aborted if over a specified threshold).


API Platform for PHP is one of those graphql implementations that has a query cost limiter built in (it's binary, it just rejects queries that go over your configured complexity threshold). Shopify's graphql api is even fancier, where every query costs X amount of a limited number of "credits". The structure of gql itself makes costs easier to estimate (you have as many joins as you have bracket pairs, more or less), and some servers can recognize a directive in the schema to declare the "real" cost.


That's sort of my expectation too -- it would be nuts to provide a user facing system without bounds of some sort.


There’s a free query depth. There’s ways to do query cost but federating that then becomes really annoying. Coming from the security side, there’s always a long curve of explaining and an even longer curve of mitigating.

I always am happy when I get an elegant query working. Often however I just find I wasted time looking for a clean 1 query solution when iteration by caller was the only solution.


When the client’s data requirements change, isn’t there always a risk that the data loading performance profile will change?

Surely that is always the case, if the client is composing multiple REST requests, or if there’s one RPC method per client page, or with any other conceivable data loading scheme.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: