I strongly disagree – as a person who's eaten vegan for over a year, tried all the fancy meat alternatives, and has gone back because a good grass-fed steak is just 10x more delicious.
341 karma · joined June 29, 2012
https://twitter.com/wojcikstefan https://github.com/wojcikstefan
I strongly disagree – as a person who's eaten vegan for over a year, tried all the fancy meat alternatives, and has gone back because a good grass-fed steak is just 10x more delicious.
https://www.postgresql.org/docs/current/ddl-partitioning.htm...
I haven't yet used it in production, but I would've expected that a system which evolved out of Uber's Cadence [0] (and which I believe is used at Uber extensively) would've scaled very well.
> Is this behaviour new?
Don't think so. Even the docs for SQLA v1.3 ([0]) mention it:
> native_enum – Use the database’s native ENUM type when available. Defaults to True. When False, uses VARCHAR + check constraint for all backends. The VARCHAR length can be controlled with Enum.length
[0]: https://docs.sqlalchemy.org/en/13/core/type_basics.html#sqla...
--
> Or is it that alembic still doesn't pick up changes to the enum to recreate the constraint?
Off the top of my head, I believe Alembic doesn't pick it up automatically. We make a lot of manual tweaks to our auto-generated Alembic migrations and I believe adding / modifying the CHECK constrains is part of it.
> It's such an outrageously naive idea that I'm sure most people here were attracted to the title thinking it's about algebraic types or some other similar misunderstanding.
Just to share how we at Close got into this discussion (which I personally don't find as "outrageous" as you), SQLAlchemy – which we use in our Python code – uses `native_enum=True` as the default value for its `Enum` type [0], which then translates to using types in PostgreSQL:
> native_enum – Use the database’s native ENUM type when available. Defaults to True. When False, uses VARCHAR + check constraint for all backends.
[0]: https://docs.sqlalchemy.org/en/20/core/type_basics.html#sqla...
Does this approach ensure data consistency? Or could you accidentally insert a number value into your table which is not represented by any of the enum values?
Right?
What I'm more surprised by is: 1. GitHub operating so independently from Microsoft at large that they have their own layoffs (not included in the 10k people that Microsoft announced they'll be parting ways with). 2. GitHub operating SO INDEPENDENTLY that they can decide to go remote-first.
2. I’m very skeptical of a small group of people reading a bunch of online comments and deciding what is “toxic” and “non-toxic”, even more so when it’s done with no clear definitions/guidelines. As their GitHub repo [0] says:
> Rather than operating under a strict definition of toxicity, we asked our team to identify comments that they personally found toxic.
Note that using the "X-" prefix has been deprecated since 2012: https://datatracker.ietf.org/doc/html/rfc6648
They do solve this problem as documented: https://github.com/socketio/engine.io/blob/64d57545116c7a7d9...
I do wish we didn't all have to reinvent this wheel though…
https://socket.io/docs/v4/how-it-works/#disconnection-detect... says:
> At a given interval (the `pingInterval` value sent in the handshake) the server sends a PING packet and the client has a few seconds (the `pingTimeout` value) to send a PONG packet back. If the server does not receive a PONG packet back, it will consider that the connection is closed.
So far this describes what we've already been doing prior to the fix mentioned in the blog post. However, this next sentence is where Socket.io's solution diverts from ours:
> Conversely, if the client does not receive a PING packet within `pingInterval + pingTimeout`, it will consider that the connection is closed.
Indeed looks like a solid way to solve the client-side recognition of a broken connection!
--
That said, I'm a little confused because I cannot find any mention of `pingTimeout` in their JS client [0], and `pingInterval` is only mentioned in an implementation of a test server [1]. I wonder if I'm looking at the wrong thing.
[0]: https://github.com/socketio/socket.io-client/search?q=pingti...
[1]: https://github.com/socketio/socket.io-client/search?q=pingin...