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

Python and Java do not have any similar constructs


That only works with "G" brand gaming devices. Their entire MX line does not allow you to store customizations in onboard memory.


This is so nuts. It’s literally a multi device mouse - supports 3 bluetooth connections in memory, but I need to install the options app on every single pc/mac I want to use it on. Nuts!


I have a "G" series 512 keyboard. And it seemingly can't save anything into the memory (on windows I had to use the logitech's bloatware). And the absolute worst part is that it is set to RGB colors moving around by default, so I've been running openrgb every OS boot to set the lights to a neutral, non-flashing, much much less intensive color. Happy to see alternatives to that.


Logitech mice and keyboards have extra features that the OS would consider non-standard; you can customize a lot of behaviors as well as map extra buttons to specific actions. For some reason, Logitech decided not to store customization settings on-device so there is a background daemon that must run on the host. Also inexplicably, it is an electron app with a 600MB install footprint requiring online connectivity (apparently there's also an offline version, weighing in at 1.2GB). Also not available on Linux.


> Also inexplicably, it is an electron app

No need to be modest! You can explain it!


> If you have a connection pooler in your application, and the DB is only used for this application, you don't need an external pool like PgBouncer.

But this is only true if you have no more than a few running instances of your application. So it feels like the cases where you must have Postgres (over an alternative like SQLite) but can't justify PgBouncer are very narrow.


Not everything is a SaaS application. There's a lot of software where you only run one or two application servers.


Every single connection to Postgres is a new process, which requires a fork and new memory allocation (at least 10MB plus whatever you need for your query).

PgBouncer opens a pool of connections and then reuses them each time a client asks for a connection. This reduces latency (no more fork) and overhead (reuse memory).


If it's designed well, your application also opens a pool of connections and re-uses them each time the code needs a DB connection.


The issue is language ecosystems that don't use client side connection pooling because they're single threaded (node, Python). So scaling up the number of web server threads means scaling the number of Postgres processes, which are expensive.


Python has threads and connection pools work fine on async workers as well.


Yes but they can’t be shared. If you size your pool to hold 10 connections (because asyncio can handle that and more), then deploy with uvicorn —-workers 4 (which should match the number of cores on your app server), and then deploy to 3 app servers (for redundancy) then you’ve now got 120 open connections to Postgres. Run anything more than a trivial query and you’re easily at gigabytes of ram.


120 connections is likely fine. If it's not, you could do only 5 connections per worker. This is more of a problem if you have uneven load on the workers though.


I’m not claiming it’s not fine, but it is a surprising consideration for a relatively small deployment. You have to start planning around Postgres’ architecture for anything larger, hence the solution in PgBouncer.


This is more app instances than 99% of deployments. Most apps and websites run a single server.


This solves the latency but not the overhead--you'll end up with a full pool of connections for each running instance of your application.


How many running instances do you need though? e.g. Scala web frameworks should be able to do thousands of RPS on a single core without the application developer really trying to optimize anything, and I always hear that even Ruby, Python, etc. are also fast enough to be IO bound so you should just need 2 copies for redundancy, right? Then give each like 8-16 connections.


If I'm implementing my own connection pool, I'll certainly make the number of connections configurable.


That's fine but doesn't address the issue that PgBouncer does. Your application connection pool can multiplex all the connections needed in one application. PgBouncer can multiplex the connections across all applications (whether different apps or many instances of the same app).


The author is pretty unsympathetic towards those who give their lives to “Workism” in exchange for money, no?


Maybe so. Yet a "career" is not charity. I think it's important for engineers to remember a career in software is still (as it long has been) a luxury.


I think you’ve made an extreme leap in your interpretation of the comment you’re replying to…


No, ‘high/low-trust culture’ has lately been co-opted as a racist dog whistle.


This isn't true at all in general online discourse. Maybe on X, in which case I'd recommend getting off of X.

It's overwhelmingly brought up when talking about Japan (and sometimes Korea) in comparison to the US (or EU). With Japan (or Korea) being the high-trust culture in that comparison, and the US/EU being the low-trust one.

I guarantee you can do a search across mentions of high/low-trust culture across online platforms in the last 12 months and the large majority will be these contexts, i.e. Western countries described low-trust, not high-trust.


I've definitely seen it used both ways, comparing Japan to other countries as well as India/Africa.

I wouldn't necessarily call it a "racist dog whistle" myself, though - there is a very real pattern that's being pointed out but the reason I made the GP comment is that from my experience I would assume that Chinese culture is about as trustworthy as the West.


> Maybe on X, in which case I'd recommend getting off of X.

Agreed, get off X anyway.

> This isn't true at all in general online discourse.

Maybe, but is this relevant? Was the grandparent comment "general online discourse" or was it specific online discourse coming from a place that does in fact use such language in that way.


When One Nation here in Aus is yapping about “high trust societies” and talking about Japan etc. to me it is absolutely a racist dog whistle.


Huh, TIL. Thanks for pointing it out.


I feel like it used to be an effective dog whistle, but has ceased to be since Trump and company came around.


It hasn't. People are talking about specific events here.

With your logic, every fact you dislike that makes your side of the argument look bad, can be dogwhitlse.


Airlines have kept tabs on Bluetooth and WiFi hotspots as early as the Samsung Galaxy Note 7 incidents (2016)


You'd think they would do this before taking off..


Perhaps it was turned on by being jostled during take off.


I can’t tell if you’re making a joke about the current state of AI and GPUs or refuting the purpose of this driver


Wasn’t this the same argument for .jar files?


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

Search: