News for hackers. Stuff that matters.
Re:A lot of complex “scalable” systems can be done with a si... by ummonk on Sunday December 29, 2019 @05:12PM (#21908922)
Yes, I’m always shocked by just how much performance overhead most languages have compared to C and similar lower level languages. It is a price worth paying for better language ergonomics, but I do wonder whether Rust might be able to give us the best of both worlds here.
Re:A lot of complex “scalable” systems can be done with a si... by twic on Sunday December 29, 2019 @05:46PM (#21909137)
I semi-seriously think the entire modern shape of the cloud is a result of Ruby being really slow.

Back when people were writing their backend business apps in C++, COBOL, Java, etc, if there was ever a performance problem, you could usually just get a slightly bigger machine and grow your thread pools a bit. But once the web took off and Ruby exploded onto it, you couldn't do that, because it's an order of magnitude slower, and doesn't really do multithreading. But, as long as you follow twelve-factor discipline, it scales horizontally like a champ. So, we took to horizontal scaling over multiple VMs (and caching things in Redis instead of local memory or Hazelcast or whatever), and that's been the unquestioned way to do scaling ever since.

Re:A lot of complex “scalable” systems can be done with a si... by ww520 on Sunday December 29, 2019 @08:12PM (#21909921)
The push for the need of scaling out started with Ruby and Python's lack of performance. The reason being pushed at the time was, "developer time was more expensive than hardware." Well, that didn't count the amortization of developer time over the lifetime of the product once the product was developed.
Re:A lot of complex “scalable” systems can be done with a si... by shrimpx on Monday December 30, 2019 @03:52AM (#21911845)
It's mostly a fallacy that a demanded product becomes "developed". Maybe a game that gains cult status and therefore a long tail end of life. But popular web services are in constant churn and in that space it's valid to trade hardware for programmer productivity.
Re:A lot of complex “scalable” systems can be done with a si... by ww520 on Monday December 30, 2019 @05:09AM (#21912294)
Backend web development doesn't change much once developed. How many ways can one do CRUD on the backend?
Re:A lot of complex “scalable” systems can be done with a si... by filleokus on Monday December 30, 2019 @08:43AM (#21913264)
In my experience this is only true iff the system never gets any more user facing features.

Every new non-insignificant feature requires a new REST-API route, or database table or modification of the GraphQL schema. And depending on how you designed the backend, even small redesigns of the frontend might require changes on the backend. Consider a simple app showing car rentals, where you initially have something like /car/[id], then the frontend guys realise that we need to show cars rented by each customer and it's necessary to have /customer/[id]/rentals.

(Of course it's possible to design a system without any schemas or normalisations, which would make your statement truer, but that's rarely attractive for other reasons.)

Re:A lot of complex “scalable” systems can be done with a si... by ww520 on Monday December 30, 2019 @11:58AM (#21914745)
But all those are just extensions using the established frameworks and development practices for that backend application. Once those are developed, it’s pretty easy to add new features. I would argue using Ruby and Python like script languages brings no significant benefit in development time. In fact they make it worse when working on an existing app, with the extra unit tests, difficulty in refactoring, and extra performance work.
Re:A lot of complex “scalable” systems can be done with a si... by drinfinity on Monday December 30, 2019 @09:36AM (#21913558)
Try it. It might surprise you.
Re:A lot of complex “scalable” systems can be done with a si... by filleduchaos on Monday December 30, 2019 @07:29AM (#21912881)
Out of curiosity, have you ever actually been employed as a backend web developer?
Re:A lot of complex “scalable” systems can be done with a si... by ww520 on Monday December 30, 2019 @11:50AM (#21914666)
Not specifically just backend but full stack projects that included backend.
Re:A lot of complex “scalable” systems can be done with a si... by golergka on Monday December 30, 2019 @05:07AM (#21912287)
> Well, that didn't count the amortization of developer time over the lifetime of the product once the product was developed.

I'll bite. I think it actually counts not only that, but also the probability that the product will actually get to be developed, and not need to significantly pivot, therefore throwing all developer time spent on perfomance to garbage.

Re:A lot of complex “scalable” systems can be done with a si... by Silhouette on Sunday December 29, 2019 @10:23PM (#21910565)
If hardware speeds and capacities had continued to increase as rapidly as they used to, there might have been some truth in that. Buying a computer with a faster CPU or a bigger disk or more RAM was a relatively cheap solution to a lot of performance problems for a long time, in no small part because it typically required zero changes to the software itself. However, once you're talking about qualitatively different hardware architecture (scaling out instead of up) and therefore also qualitatively different software architecture, it's far from obvious that the premise still holds or that we should even expect it to.
Re:A lot of complex “scalable” systems can be done with a si... by celticmusic on Sunday December 29, 2019 @06:31PM (#21909403)
I don't necessarily think you're right here, but I do know the number of horror stories that have come out of Heroku over the years certainly validates the opinion.

I remember reading about their routing debacle and realizing just how much work went into trying to get ruby to scale.

Re:A lot of complex “scalable” systems can be done with a si... by watt on Monday December 30, 2019 @05:30AM (#21912391)
Your points are all valid, but I don't think it's the "unquestioned" way. It simply happens to be great way to scale, and also to isolate complexity etc. You can scale to monster loads this way, they way that in-process caches don't.
Re:A lot of complex “scalable” systems can be done with a si... by trimbo on Sunday December 29, 2019 @10:23PM (#21910561)
Never forget "It's boring to scale with Ruby on Rails" (2005)

http://web.archive.org/web/20111108170021/http://david.heine...

Re:A lot of complex “scalable” systems can be done with a si... by lmm on Sunday December 29, 2019 @09:40PM (#21910348)
The idea that GCed languages in general have Python-like performance is a dangerous myth. Languages that are managed but not interpreted (e.g. Java, OCaml, Haskell, C#, Swift) have performance characteristics that are much closer to C than to Python.
Re:A lot of complex “scalable” systems can be done with a si... by Const-me on Sunday December 29, 2019 @11:42PM (#21910871)
This.

Modern C# in net-core 3 can even match C++ at manually vectorized numeric code: https://github.com/dotnet/coreclr/issues/27909#issuecomment-...

Re:A lot of complex “scalable” systems can be done with a si... by pkolaczk on Monday December 30, 2019 @02:54AM (#21911588)
While I agree they can sometimes compete in numerically heavy tasks, the place where they fall behind is memory management. Systems like databases need very careful memory management and GC is not always your friend there. I'm still hoping some day we'll be allowed both GC and Rust-like manual memory management in a single language, although I'm not sure it is at all possible.
Re:A lot of complex “scalable” systems can be done with a si... by Const-me on Monday December 30, 2019 @04:09AM (#21911960)
> the place where they fall behind is memory management

It's sometimes possible to design C# code in a way that doesn't stress GC too much, so the majority of bandwidth bypasses the GC.

For instance, here's my old .NET project which plays streaming media for hours without interrupts, with a hard limit of 15MB RAM for the whole process: https://github.com/Const-me/SkyFM

Doing so became easier in modern .NET, with these value tuples and spans.

> still hoping some day we'll be allowed both GC and Rust-like manual memory management in a single language

Microsoft tried, managed C++, then C++/CLI. The CLI is still supported if you want to try, but IMO they both were way too complex: 2 types of pointers, two runtimes with weird interaction between them, worst of both sides on safely and ease of use.

AFAIK most people only used these languages for a thin layer of glue to integrate native C++ with C#. And even for that limited use case, COM interop or C interop often worked better. Even MS switched to COM interop in the next iteration, C++/CX.

Re:A lot of complex “scalable” systems can be done with a si... by Too on Monday December 30, 2019 @04:38AM (#21912150)
Rc/shared_ptr comes pretty close to GC from usability point of view?
Re:A lot of complex “scalable” systems can be done with a si... by ospider on Monday December 30, 2019 @03:53AM (#21911853)
Actually, Python is compiled to its bytecode and then interpreted by the Python VM, which is also how Java works. Python is slow because the lack of funds and people's focus, just take look at how fast JavaScript(V8) is nowadays.
Re:A lot of complex “scalable” systems can be done with a si... by Too on Monday December 30, 2019 @04:32AM (#21912118)
No, Python bytecode is still interpreted at runtime. Java, JS and .NET is first compiled into bytecode but then they are also JIT-compiled into machine code which Python is not.

You can JIT Python also using https://www.pypy.org/ but it's not the default and it's not 100% official and compatible.

Re:A lot of complex “scalable” systems can be done with a si... by armitron on Monday December 30, 2019 @11:04AM (#21914227)
It's also nowhere near as fast as other language JITs. I'm talking orders of magnitude slower than JVM, .NET and LuaJIT. End result being a - relatively - dead project, since the incentives for people to use it over stock Python and pay extra compatibility costs are not there.
Re:A lot of complex “scalable” systems can be done with a si... by terminaljunkid on Tuesday December 31, 2019 @08:12AM (#21920757)
I think you entirely ignored the performance cost of dynamism (not having types known, not having value types, dynamic binding of methods etc..) that is handy 1% of the time but imposes type safety & performance cost other 99% of the time..
Re:A lot of complex “scalable” systems can be done with a si... by commandlinefan on Monday December 30, 2019 @09:51AM (#21913642)
> It is a price worth paying for better language ergonomics

Back around 2001 or so, I was hired at an online travel agency to assist in porting their entire system from C++ to Java. Management at the time was frustrated at how long it took to add new features in the C++ codebase - it could take months to get something working in some cases, and they blamed the programming language. Once we got everything working in Java, we found that we could, in fact, turn around feature requests much faster than they could in C++. The trade-off was performance problems: they (we) found that in the old C++ codebase, if you fucked something up, the whole thing crashed, and you had to fix it before you could get it to run. In Java, programmers could paper over their fuck-ups pretty easily so that they wouldn’t be noticed until they had created a snowball effect that caused everything to slow down. Since management was pushing for more features faster, they were incentivizing developers to do as little testing as possible and kick the can down the road. For the most part, management was OK with this: they just bought more, and more, and more servers to make up for the performance problems we were having from the quick-turnaround features they wanted.

Re:A lot of complex “scalable” systems can be done with a si... by _bxg1 on Sunday December 29, 2019 @05:15PM (#21908951)
He did say that Java/C# are also up there, and Go is in that family, so it probably remains the best balance for lots of cases. I do think there's also territory to be explored writing hot paths in Rust and interoping from Python/JS.