Earlier quoted context omitted.
> It'd be great if there were better benchmarks for common use cases of various languages Somebody should make those. (People may have different ideas about which use cases are common).
There are some: https://www.techempower.com/benchmarks/ As you can see, erlang is far from the top there.
Why we switched from Python to Go
361–370 of 406 posts
Re: Why we switched from Python to Go
#362Earlier quoted context omitted.
Really? How does it work?
Google mypy for an introduction. Pycharm has good support for it if you want IDE integration. The stdlib is globally well annoted now. However, most 3rd party libs are not.
Re: Why we switched from Python to Go
#363Earlier quoted context omitted.
There are some: https://www.techempower.com/benchmarks/ As you can see, erlang is far from the top there.
I don't see Erlang listed at-all on that "Fortunes" page ?
Re: Why we switched from Python to Go
#364Earlier quoted context omitted.
I'm talking about API calls where you make a few database queries, not local or batched. Java/Go with pretty much any database can manage about 50,000 individual queries+REST calls a second.
Ah I see. I still think if you're measuring that way, there's no reason languages like Python et al. can't accomplish similar too. And if they can't, well, there's always adding more machines. Horizontal scaling tends to occur no matter what you're using, so is the argument just that with less productive (probably a matter of taste for many at this point) languages you'll have to scale out later? That's a tradeoff to…
And you can make Python or even PHP fast if you try hard enough.
My argument is that the engineer overhead for Go and new breeds of Java frameworks are small enough that it makes no sense to use anything else if you're planning on scaling for real.
If you start with something else the cost of making a slow language fast and the multiples of extra machines you need costs far more than just using the faster language to start with
For the benchmark you posted, take a good look at the "realistic" vs "stripped" implementations and whether the test used an ORM. You'll quickly see that the realistic test applications with any kind of ORM are exclusively C#, Java, Go, and C++
Re: Why we switched from Python to Go
#365Earlier quoted context omitted.
And most of those other companies like Facebook are writing endless hacks, VM's, or entire languages to fix the slow runtime :)
Sorry, I have no interest in getting into a religious flamewar. I will only say that I find it weird that you think that there aren't endless hacks and VMs in [insert here the languages you like].
Arguments about what language is better are pretty flamey but it's hard to argue that performance is not an advantage of Go/Java
Re: Why we switched from Python to Go
#366Earlier quoted context omitted.
I wonder the opposite. Hardly any system needs to process 500k response per second. But nearly all of them benefit from the developer productivity that Python/Rails offer. My current company has 15 Java & React engineers where 2 or 3 Rails would suffice. Load tops out at maybe a dozen requests/second. Feature development is super-slow. System complexity is off the charts.
> Feature development is super-slow. System complexity is off the charts. That probably has little to do with language/stack and everything to do with constantly changing requirements/system growth. To your required engineers comment, Spring Boot + jOOQ is easily one of the most productive backend stacks I've ever used. A single engineer could easily build a large API leveraging the stack.
If you're only using them for a REST API they offer similar features. Spring Boot supports loads of other stuff you probably don't need for something API driven
Re: Why we switched from Python to Go
#367Why does anyone write web apps in Python? PHP? Ruby? Modern Java and Go are so much faster than the alternatives that it's stupid to consider anything else if performance is important. Golang and Java can manage over a half million HTTP responses a second. Node is pretty fast but why bother when Java is many times more mature in features, tooling, and and supports concurrency... And uses less ram and is usually faste…
> All the big companies are using Java and Go almost exclusively for high volume endpoints Please cite “all the big companies.” Also exclusively? No seriously, that is a bold claim. Google isn’t one of them because most of those hotepots are still written in C++. I don’t know how you can claim this. Based on some occaion company blog posts, changing just one or two endpoints out of say 100? What about Rust? I also kn…
Re: Why we switched from Python to Go
#368Earlier quoted context omitted.
> All the big companies are using Java and Go almost exclusively for high volume endpoints Please cite “all the big companies.” Also exclusively? No seriously, that is a bold claim. Google isn’t one of them because most of those hotepots are still written in C++. I don’t know how you can claim this. Based on some occaion company blog posts, changing just one or two endpoints out of say 100? What about Rust? I also kn…
Pick the Fortune 500 list, take out the SV darlings, the majority of their backend stacks will be a mix of Java and .NET deployments. Easy to find out just by looking at their open job positions.
Microsoft is an exception because they built C# which is basically a more modern but less popular variant of Java. There was even a project for a long time that let you use Java code in C# projects by converting the bytecode, they're that similar.
The notable exception is Facebook. They were stuck in PHP hell for so long that they redesigned the language to make it work.
Re: Why we switched from Python to Go
#369Why does anyone write web apps in Python? PHP? Ruby? Modern Java and Go are so much faster than the alternatives that it's stupid to consider anything else if performance is important. Golang and Java can manage over a half million HTTP responses a second. Node is pretty fast but why bother when Java is many times more mature in features, tooling, and and supports concurrency... And uses less ram and is usually faste…
High quality Java and Go developers are more expensive than Ruby and JS webdevs, partly because there are just so many of the latter.
This leads to a lot of "first languages" being the latter and a perpetual glut of recent grads that know nothing else so will do those jobs for less
Re: Why we switched from Python to Go
#370Earlier quoted context omitted.
How much of a framework do you want? These days, i write most of my applications using the JDK's built-in web server. They're intended for internal use by single-digit numbers of people, and it works fine. It doesn't give you anything except the ability to serve HTTP, though. Before that, i was writing apps using Spring Boot, which is a framework covering pretty much everything. It's easy to get started with, and req…
I want an orm, a template engine, form validation, sessions and some authentication mechanism. I'm currently doing a system for a robotics competition - team registration, match results entry and point calculations, rankings and so on. Doing it in Python and Pyramid is quite easy, though sometimes I have to fight with the framework to do things the way I want to. One especially useful feature in Pyramid (and some oth…
Really though, you should invest some time in learning typescript and react. These days most apps are just API calls on the back end and you deal with templating, forms, and other bs in the frontend.
Because most apps are built this way now, you won't find any "modern" Java frameworks that support what you want, and you're pretty much gonna be stuck with the older clunkier stuff.
The learning curve for new SPA frontend stuff is high but I've found it much more productive now that I'm into it. With HTML generated on the server it's too damn hard to get pages to do what you want