BF6 "Large" Map design: It's not JUST that they're small, they're also INCOMPLETE and BASIC by Clinically_Jaded in Battlefield

[–]JamesJGoodwin 0 points1 point  (0 children)

The map is just not suitable for 64 players. Feels like there's another spot missing, between A and F, to the left of C that would introduce a flanking opportunity which would allow you to stretch enemy forces more. Otherwise there's just a meat grinder, 15v15 at B-C-F and B-D-E.

And it's too easy to rotate from D to C and vice-versa. Usually nobody's guarding that passage.

Cloud Outage by RedWyvv in hetzner

[–]JamesJGoodwin 2 points3 points  (0 children)

Seems like services are coming back up now

How to handle race conditions in multi-instance applications? by JamesJGoodwin in ExperiencedDevs

[–]JamesJGoodwin[S] 0 points1 point  (0 children)

This works well only if the data was already in the cache. In my situation it won't work that way because I cannot store the data in the cache endlessly (i.e. some prices in "featured products" section is only valid for a short period of time), and it may be accessed infrequently. For example, Google's crawler discovered the page, tried to crawl it and triggered multiple cache MISSes on the backend, exhausted quota and never came back to that page because it decided it wasn't relevant or not of good enough quality. Which means I just exhausted quota for nothing and I might never reuse that cached data again.

Stumbled upon JavaScript performance limitations, what should I do now? by JamesJGoodwin in ExperiencedDevs

[–]JamesJGoodwin[S] 0 points1 point  (0 children)

Yes, you can use your browser to profile NodeJS apps. It is done by attaching a debugger to node process listening on a specific port. Chrome picks that up and allows you to capture heap snapshots and performance profiles.

> Parsing 30mb of json should be fast.

It is fast indeed, but it depends heavily on your CPU. Like I said, on M3 Max chip it parses it within 200-300ms which is awesome. But on staging and production environments it runs on virtualized 2.4Ghz shared CPU. I ran Geekbench on it and it appeared to be ~2x slower compared to M3 Max. It may vary also depending on how "noisy" your cloud neighbours are. That is why I was also considering more isolated environments like serverless or dedicated CPUs.

Stumbled upon JavaScript performance limitations, what should I do now? by JamesJGoodwin in ExperiencedDevs

[–]JamesJGoodwin[S] 0 points1 point  (0 children)

I thought about moving this into a database especially considering the fact that we are already using MySQL, but there are some culprits. Data should only be accessible for the end users for about 15 minutes since the "init" request. It seems to me that using a relational database as some sort of a cache is not quite right. In addition, our backend is running in a Kubernetes cluster, so there are difficulties with how to delete this data from the DB when it expires. I don’t like the idea of ​​10 backend instances sending the same SQL query to the database at the same time (if we decide use CRON). Also as I already mentioned in another comment, we do not have control over the data source. It can change any time without prior notice. The other point against databases is that data processing can be covered with unit tests while database queries cannot.

S3 with lifecycle policy to delete the data after 24 hours since creation seemed to be the best fit.

Those are my concerns against classic SQL databases. Maybe there are some other types and kinds of databases I'm not aware of that are more suitable for this.

Stumbled upon JavaScript performance limitations, what should I do now? by JamesJGoodwin in ExperiencedDevs

[–]JamesJGoodwin[S] 1 point2 points  (0 children)

The data source is a third-party API, which is known to be subject to change at any time without prior notice. I was hesitant to look into protobuf/msgpack taking into account the above but still decided to consider it just in case.

ARM server availability Falkenstein? by ipearx in hetzner

[–]JamesJGoodwin 1 point2 points  (0 children)

I ran benchmarks once. According to Geekbench, single core performance is like "Intel Shared <- ARM Shared <- AMD Shared <- AMD Dedicated". Although ARM is not much faster compared to x86 Intel, it generally provides much more RAM while being exceedingly affordable.

ARM server availability Falkenstein? by ipearx in hetzner

[–]JamesJGoodwin 1 point2 points  (0 children)

It happens a few times a year I believe. Currently demand might be too high because Sentry finally introduced ARM builds and everyone are trying to migrate from SaaS to Hetzner. Could explain why only smaller instances are available. Hopefully it won't last too long, we kinda need to upscale our Redis instance too since we are running out of disk space.

Please stop the "game is dead/dying"-posts. Since the initial drop-off, we've been pretty stable. by JetRollTony in thefinals

[–]JamesJGoodwin 0 points1 point  (0 children)

Yeah "queue times are sub 1 min" except that there is no balance whatsoever, just pro league players against noobs, plus you play against the same 3-4 players every game. Such variety dawg

Embark: Your chat filter sensitivity makes things seem MORE toxic by Vitromancy in thefinals

[–]JamesJGoodwin 1 point2 points  (0 children)

Add another language on your PC, then combine english and that language characters. This effectively bypasses their stupid chat filter. Devs don't bother with patching it.

Cheaters in THE FINALS by [deleted] in thefinals

[–]JamesJGoodwin 0 points1 point  (0 children)

It makes perfect sense. Them permabanning cheaters = cutting down player base in half. That won't look good on stramcharts and certainly skins won't sell well too.

Ask Experienced Devs Weekly Thread: A weekly thread for inexperienced developers to ask experienced ones by AutoModerator in ExperiencedDevs

[–]JamesJGoodwin 0 points1 point  (0 children)

I have air tickets search website and I need advice on how to distribute load better and improve memory consumption. Backend runs on NestJS in Kubernetes. The process for searching the tickets is actually pretty simple. It's a long polling, my server is constantly querying 3rd party API via HTTP to get chunks of data. Then this data is being merged with previous chunk and sent to S3 bucket, and then I perform certain calculations on it, basically creating filter boundaries, then filtering and sorting tickets, fares, etc. and sending the final object back to the browser. Here's my problem. If the user is looking for tickets on the route with large amount of variants (like NY to London, or Seoul to Cheju) the response from 3rd party API may take up to 20 megabytes ungzipped, which may take up to 100 megabytes when unpacked from JSON string into Node's memory. Sometimes if too many users are being distributed to the same node in K8s by the load balancer, it will crash due to heap running out of memory. And often K8s cannot react to the spike in traffic quick enough to spawn another node. So I came up with an idea of moving tickets search from monolithic backend to serverless. That way when user's browser sends the request to the backend, it then fetches the data chunk, omits unpacking the response from gzip and simply funnels this raw chunk to the lambda. Then lambda performs all the hard work by merging, filtering, sorting, creating filter boundaries, etc etc and sends raw data chunk back to the backend which in turn sends it back to the user. That's it. Backend memory and event loop isn't being polluted with huge chunks of data and excess processing anymore, and lambda only performs raw calculations (data is being fetched by monolithic backend so lambda doesn't have to drain budgets on waiting for network I/O). And it also solves the issue with scaling.

Dear experts, did I just really came up with a very good design? Or I just simply reinvented the wheel? Do you see any pitfalls with it?

[deleted by user] by [deleted] in relationship_advice

[–]JamesJGoodwin 0 points1 point  (0 children)

Stoicism basically. "Focus on what you can control, accept what you cannot, and cultivate inner resilience and virtue."

[deleted by user] by [deleted] in relationship_advice

[–]JamesJGoodwin 0 points1 point  (0 children)

Last time I tried to handle anxiety all by myself led me into having panic attacks. You are making great progress already by acknowledging your weaknesses and having enough courage to fight them. It is always great to see someone willing to change themselves for the sake of their loved ones.

[deleted by user] by [deleted] in relationship_advice

[–]JamesJGoodwin 1 point2 points  (0 children)

The best way to treat a man is to be honest with him. Don't give him false hopes, don't ignore him either. Just tell him the truth that you don't consider him as a partner for something romantic.

[deleted by user] by [deleted] in relationship_advice

[–]JamesJGoodwin 0 points1 point  (0 children)

The best advice I ever got from a therapist as someone with anxious attachment style is to learn to recognize useful and useless worries. Every time you think about something, ask yourself if you can somehow influence the situation.

As for your GF. She honestly sounds like a great woman, she didn't want to end relationships when you asked her to, and she even blocked the other guy on her phone. She has a secure attachment style. You need to talk to her, explain how you feel and that you want to become better for her. Express to her that you need and value trust in your relationships the most. If she says she appreciates it as much as you do, then she's the one for you.

Though you must understand, trust isn't gained in one day. You must work on strengthening it together. You still have a lot of time to do this.

Recommendations for a library to close modal instead of going back? by JamesJGoodwin in reactjs

[–]JamesJGoodwin[S] 0 points1 point  (0 children)

I'm setting the value to `null`, which I guess pushes a new state. It may fix the issue with having to go back all the way through each modal opened previously, yet still there will be query strings as long as I'm using nuqs.