It might be helpful to back up your perspective with data, or better frame your argument. As it stands, your comment doesn’t add much to the conversation.
A few things in particular:
- Crime is a problem in India. The Wikipedia article has a decent overview (https://en.m.wikipedia.org/wiki/Crime_in_India). But so is police and government corruption. (https://en.m.wikipedia.org/wiki/Corruption_in_India)
- To call a criminal organization a shadow government is hyperbolic. Similarly calling the romanticizing of crime — a common entertainment trope — a conspiracy, seems a bit much.
- The actor you use as an example was convicted for acquiring weapons from people involved with the Bombay Bombings. He was never accused of being involved in the bombings himself (https://en.m.wikipedia.org/wiki/Sanjay_Dutt). I’m not sure I follow the accusation of serving the mafia by acting as a criminal in a movie.
Yes, primarily by the mafia and drug cartels, run by the middle east.
> But so is police and government corruption.
One of the reasons (among others) is the mafia which corrupts the police.
> To call a criminal organization a shadow government is hyperbolic.
What does that even mean? The Indian mafia has been killing businessmen, politicians and police... and uses threats, violence and bribes to run things their way in goverment and the police force. That is exactly what shadow government is.
> He was never accused of being involved in the bombings himself
Wealthsimple | Backend Engineers (amongst other roles) | Remote or Onsite Canada (we're a remote first company) | Full-time
Our mission at Wealthsimple is to help people achieve financial freedom. Today, we're focused on Canada and we've been growing quickly, and will continue to do so this year. More here: https://www.wealthsimple.com/en-ca/about/work-with-us.
I'm on a platform team that's working on some of the foundational services required to build and grow financial/fintech products (we use Kotlin, Ruby, Postgres, Kafka, and Flink), and we're looking for people to join the team.
I am happy to answer questions (see my profile for my personal email address or email me at ndsouza@wealthsimple.com).
That’s correct. It’s an image from “The Runaway Bunny”. The story has the baby rabbit changing shape to get away from the mother, and the mother changing shape to attract/get the baby rabbit. It sounds a bit violent in description, but it’s not when you read it.
So for example the baby turns to a fish, and the mother starts fishing; or —- and this captures the spirit better —- the baby to a climber and the mother to a mountain.
My favorite pages were when the baby turned to a bird to fly away, and the parent became the tree the bird comes home to, and when the baby became a sailboat, and the parent became the wind that blows the boat where it needs to go. Not violent at all!
Guys, sorry for the typos. The original title was too long. I needed to replace "First" to "1st" (HN switch back automatically, lol) and try to abbreviate.
Why would they type it manually at all? My understanding is that they copypasted the title, was prompted it was too long, tried to short First to 1st which HN automatically expanded upon which they removed some words instead. So how did algorithm become "algorithn"?
This is not some random nitpicking. This is a great mystery worthy of its own detective TV show so I don't appreciate the downvotes. All my friends are extremely puzzled by this whole situation.
"Bad for performance as primary keys" -> "Bad for performance as primary keys in MySQL". This isn't an issue in PostgreSQL and perhaps the lesson here is that as you scale, you need to understand more about the internals of the DB system you've chosen. This isn't limited to RDBMS as it's pretty easy to show trade-offs in choosing a NoSQL as well.
You are right, the internals are important. When I tested this, a long time ago [1] [2], I found that randomly distributed keys on PostgreSQL were indeed faster than e.g. on MySQL. Which surprised me! I still don't quite understand why. But, even with PostgreSQL, sequential (or nearly sequential) are much faster.
> Which surprised me! I still don't quite understand why.
Because MySQL (specifically innodb) will cluster by the PK by default, while Posgres will not.
Meaning in MySQL, by default, the table will be stored in PK order, so when you insert an UUID at a random location any record which sorts after it has to be moved to make room, for nothing since UUID ordering is not really relevant (at least for the current standard UUIDs).
In pg, clustering is not a property (at least for now) it's an explicit point operation, which is not performed by default. So when you insert a row whether UUID or INTEGER-keyed, it's just tacked on wherever there's free space. The UUID still has to be inserted at the right place in the index' btree which can lead to a lot of cascading changes, and it's more expensive to compute, store, and load than a simple integer (especially 32b), but it doesn't induce an arbitrarily high amount of shuffling in the storage layer of the table itself.
While the problem on the article is less of an issue in Postgres (the indexing cache locality is still there), they are still slower than the serial ones.
I don't know if you save enough problems by using them as alternative keys in Postgres for it to be faster, my guess is that just using them as primary key would be faster than a serial primary key and an UUID alternative one. Still, UUIDs are much more useful as client-facing data than as a pure database value, so I would also do that (and standardize my PK format), probably paying a performance penalty.
"Slower" is a matter of context. Like with most things, there are trade offs to allow for more concurrency. UUIDs are intended to avoid serialization with ID generation, which makes sense in a federated system. Yes, they take up more space and aren't all neatly ordered, but the trade off works out well for the right kind of systems (FlakeIDs are a better trade off for more contexts). The problem this article is describing is you're getting the worst of both worlds, because you're still serializing in the MySQL database...
this is what i do, any public facing id - url, or js/html that would show an id would be a uuid and then the backend queries are done with primary keys / integers.
Yeah. The main problem is people using them as primary keys in naïve systems like relational databases. You can't just expect a relational database to magically become a distributed system just by using UUIDs. There is a bit more work to do than that.
People use UUIDs for more reasons than just making things distributed. You can generate them client side if that's advantageous, you prevent leaking information about how many records there are in the system and prevent guessing of other potential PKs and potential unauthorized access, and there's some optimization strategies that benefit from not relying on a serial PK.
If you're obfuscating, then you should be using a DHT to map surrogate keys to internal keys that are more convenient for use in a MySQL index... or just stop using MySQL.
I've had occasional uses for it in systems that aren't distributed at all. It's a handy property of UUIDs, if UUIDs are useful for a particular use case, I'm going to use them, what they're 'supposed' to be for is irrelevant.
Somebody thought RabbitMQ did load balancing because it had three redundant nodes. Pretty much ruined the company. Definitely caused all of us to lose our equity.
Calling relational databases (HN’s preferred storage system) naive probably sounds like trolling to most people. There are also plenty of distributed relational databases. People downvote comments that sounds like trolling or flamebait.
I use UUIDs but I don’t know why they would magically make my Postgres a distributed system. I like them because the client can generate them offline.
What? Really? Naïve in this context means a general purpose solution that doesn't "know" about your use case. Have people never heard of a naïve algorithm or solution?
Distributed relational databases aren't naïve in this context. MySQL is.
> Have people never heard of a naïve algorithm or solution?
I have a fairly recent PhD in algorithms and I haven't heard naïve used this way. When I hear naïve, it usually just means "does the immediately obvious thing".
For what you're trying to say, the term I'm familiar with is "oblivious", e.g. "oblivious routing" or "oblivious local search", occasionally with modifiers such as "cache-oblivious".
I actually think if you squint testing is part of observability, except it gives you signal during the development phase. And observability as a concept is fundamental to a reliable system.
I define observability as the tools I use to check on the behavior of my system in ad-how ways in production. This is quite different from tests, which are designed to exercise specific behavior in a fixed environment. Both are used towards the goal of software quality, but they’re different.
I dunno. Working on projects with no tests for me always feels like a complete crapshoot. Any change could have broken some implicit assumption in some module you didn't know depended on it. Even worse is if it's a dynamic language and you don't even have a compiler to do the basic checks.
For things like reproducing bugs, in particular, functional tests plus a debugger have been indispensable in seeing how the code actually behaves.
Sure, production monitoring is nice. But it really only tells you about high level problems, and there are entire classes of bugs, eg. silently corrupted data, which you'll never see there.
You’re arguing against a more extreme version of the point I’m making. I’m not arguing for no tests, I’m arguing that uncle bob over states their capabilities by a lot.
> "As has been well documented, I smoked pot as a kid, and I view it as a bad habit and a vice, not very different from the cigarettes that I smoked as a young person up through a big chunk of my adult life," Mr Obama said.
>But he added that in terms of its impact on the individual consumer "I don't think it is more dangerous than alcohol".