Earlier quoted context omitted.
What Andy giveth, Bill taketh away.[0] I'm more than a little annoyed that so much data engineering is still done in Scala Spark or PySpark. Both suffer from pretty high memory overhead, which leads to suboptimal resource utilization. I've worked with a few different systems that compile their queries into C/C++ (which is transparent to the developer). Those tend to be significantly faster or can use fewer nodes to p…
Abstractions almost always end up leaky. Spark SQL, for example, does whole-stage codegen which collapses multiple project/filter stages into a single compiled stage, but your underlying data format still needs to be memory friendly (i.e. linear accesses, low branching, etc.). The codegen is very naive and the JVM JIT can only do so much. What I've seen is that you need people who deeply understand the system (e.g. S…
My £4 a month server can handle 4.2M requests a day
301–310 of 479 posts
Re: My £4 a month server can handle 4.2M requests a day
#302Re: My £4 a month server can handle 4.2M requests a day
#303When I launched my former bitcoin casino in 2011 (it's gone, but it was a casino where all games, even roulette tables were multiplayer, on a platform built from scratch starting in '08), I handled all web requests through a server in Costa Rica that cost about $6/mo. Where I had a shell corporation for $250/year. Once the front end -- the bullet containing the entire casino code, about 250kb -- loaded, from Costa Ri…
You're a fricking genius.
I'm surprised by HN sometimes.
Re: My £4 a month server can handle 4.2M requests a day
#304Earlier quoted context omitted.
Your pattern is quite powerful: get data from several sources and do the rearranging on the client (which might be a web server), instead of multiple interactions for each data item. For SQL you can also do a stored procedure. Sometimes that works well if you are good at your DBMS's procedure language and the schema is good.
Though stored procs will always execute on the server that is probably already the system bottleneck.
With either technique you are still pulling all the data you need from the DB but with multiple queries instead of a stored procedure you are usually pulling more data than you need with each query and then dropping any rows or fields you’re not interested in. Together with multiple calls over the network to the DB server and (often) multiple SQL connection setups this is much worse for performance on both the web and database servers
Re: My £4 a month server can handle 4.2M requests a day
#305What's the point of this post? OP is serving a file at 50req/sec. There is not even mention of a dB query. How is that able to relate to any kind of normal app? I guess that the post was written as an answer to the mangadex post [1]. Mangadex was handling 3k req/sec involving dB queries. It was not just a cached Html page. 50req/sec for a Html file is super low which shows that a $4 month server cant do much actually…
> What's the point of this post? OP is serving a file at 50req/sec. I'd guess a response to the mangadex thread? https://news.ycombinator.com/item?id=28440742
Re: My £4 a month server can handle 4.2M requests a day
#306Earlier quoted context omitted.
That particular example seems like something that's probably a lot cheaper than you'd initially think. The OS has to constantly take mouse input anyway to move the pointer and dispatch events to userspace. It also needs to record the current and new position of the mouse pointer to dispatch the events. Detecting whether the mouse is being "shaken" can be done with a ring buffer of mouse velocities over the last secon…
Why not use an exponential filter that only uses a single variable?
Re: My £4 a month server can handle 4.2M requests a day
#307Earlier quoted context omitted.
What's behind the mouse cursor while you're doing it? Could it be the UX/UI layer keeping state up-to-date? Other possibility, do you have a gaming mouse with 1000Hz polling rate configured?
Yeah, it's a high quality mouse. But the only excuse for this is it's slightly cheaper to make everything USB. PS/2 worked much better. It was limited to 200Hz but needed no polling. Motherboards just stopped providing the port.
Re: My £4 a month server can handle 4.2M requests a day
#308Re: My £4 a month server can handle 4.2M requests a day
#309Earlier quoted context omitted.
You're a fricking genius.
He's a frickin genius because he found ways to break the law with impunity for his own profit ? I'm surprised by HN sometimes.
His solution was a clever hack because he worked around the law without apparently breaking it directly - clever.
That said gambling systems are specifically one class of software I refuse to work on.
Re: My £4 a month server can handle 4.2M requests a day
#310Earlier quoted context omitted.
You're a fricking genius.
He's a frickin genius because he found ways to break the law with impunity for his own profit ? I'm surprised by HN sometimes.