Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
kroolik
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
91.
▲
by
kroolik
5y ago
The title explicitly mentions excluding Facebook
92.
▲
by
kroolik
5y ago
I agree linked lists might be suboptimal for a stack implementation, but for a different reason: data locality. You can have O(1) stack with both implementations. Slice-based will be easier to follow, and will bust the cache less often (les
93.
▲
by
kroolik
5y ago
@lallysingh, sorry, can't reply directly. All I'm saying is that I don't think we need a full Turing-complete cannonball to hit the (relatively) small fly of no-downtime migrations. Is it a silver-bullet? It's Turing-com
94.
▲
by
kroolik
5y ago
Looking forward to your future blog posts! The rename thing got me really interested.
95.
▲
by
kroolik
5y ago
But I doubt unleashing the full expressive power of SQL is the point here. It would easily turn a moderately complicated "remove column" migration a real maintenance hell. In the simplest form, when you add a column to some schema
96.
▲
by
kroolik
5y ago
Yes, this is a very important insight! I think the author proposes this approach as replacement for regular schema migrations, whilst both approaches complement one another. You can use views to make migrations that were previously tricky z
97.
▲
by
kroolik
5y ago
Adding a column, changing column's nullability and adding/changing constraints is already zero-downtime in PG. Not sure about default value change, but I would also say its zero-downtime as adding a column with default is zero-dow
98.
▲
by
kroolik
5y ago
But what happens when schema Xn adds a column N, and schema Xn+1 removes it? The base schema, the source for all the views will contain all the columns Xn... from all the migrations until purged. That purging is what has a lot of operationa
99.
▲
by
kroolik
5y ago
But in order to support the "add column" migration you have to add it to the base schema, right? It has to be materialized somewhere. Now, when you remove a column, you just create a new view without it being available. But the co
100.
▲
by
kroolik
5y ago
Interesting approach, with a pretty dark side-effect: the tech debt silently creeping in and saying forever. Apart from that, you can use any abstraction over the base schema, depending on the use-case. Renaming a column can be as simple as
101.
▲
by
kroolik
6y ago
The book looks very interesting! In the section about logging, Logrus is unfortunately in maintenance mode now. We've used it at my place, now we have switched to Zap.
102.
▲
by
kroolik
6y ago
Also one of the only ways to get sequences in joins in Redshift. Unfortunately, only Redshift master nodes support 'generate_series'. If your query contains join that are spread across multiple worker nodes, Redshift will report a
103.
▲
by
kroolik
6y ago
I think this is called denormalization, right? What you could try is to instead of modifying the domain for this specific use-case, create a read model instead (if you don't want to pollute your domain) . Sometimes its very easy to wri
104.
▲
by
kroolik
6y ago
I think it's good to note in the article that the second query is slow because the RDBMS doesn't use indexes (and which ones). Currently, the text is hand waving the problem and moves on. If the article had, instead, listed indexe
105.
▲
by
kroolik
6y ago
Completely nothing is wrong with it! That's not what I'm arguing with. I'm challenging the statement in the Conclusion section: > Arriving at query #2 to get the combined results was the intuitive way of thinking through t
106.
▲
by
kroolik
6y ago
This depends on the rdbms engine. Even if it might make sense, the planned could go with nested loops because of statistics and cost estimation. In the article, the devil is in how the second explodes in size. We are suddenly cross-joining
107.
▲
by
kroolik
6y ago
The author didn't mention the reason the query is slow. I dare to challenge that the non-optimal query is something that a person with advanced SQL skills would do. A seasoned engineer knows that by joining two tables, you are looking
108.
▲
by
kroolik
6y ago
I think the crucial part are the retries, which havent been mentioned. In general, you cant assume your code will always read the new checksum before entering the critical section, unless you synchronize it. That is, when leaving the critic
109.
▲
by
kroolik
6y ago
I think its not entirely optimistic locking, because the condition is based on checksum value, which is expensive to compute. I don't recall the article mentioning it, but if you don't compute the actual checksum under the lock th
110.
▲
by
kroolik
6y ago
> We made a change to compute these replica checksums prior to taking the lock. By precomputing the checksums, we’ve been able to reduce the lock to under 1 second, allowing more write operations to succeed immediatelly. Isnt this change
111.
▲
by
kroolik
6y ago
I think I might simply be biased based on my experience. Haven't changed jobs often enough to use any of my friend's referrals. But none of them were my dream job, either. Might, in fact, change my PoV when an opportunity comes.
112.
▲
by
kroolik
6y ago
I've always been afraid of having to lower the hiring bar due to diversity quotas. Thankfully, I have always had the chance to focus on the particular skill set, instead. The ideas about ensuring big enough sampling from diverse source
113.
▲
by
kroolik
6y ago
Your post contains two distinctive arguments: paying premium for managed services instead of learning a thing or two, and paying AWS for their services. Re first argument: I don't know how to implement DDoS protection, neither is my co
114.
▲
by
kroolik
6y ago
You would rather have a team of specialists for every piece of technology you have. I'd rather have my team members not focus on nuissances of database replication, and instead solve our customers' problems. Looks like both of us
115.
▲
by
kroolik
6y ago
I'm glad you've taught yourself infra things as you needed. But, you see, this is an anecdotal proof (like the whole article, anyway). Learning infra is not the case all the time. Some companies choose AWS (or any other) for speed
116.
▲
by
kroolik
6y ago
You and people posting similar answers miss a very important point. You've mentioned you have over 10 years of experience managing rack servers. That's super great! This means a company that hires you does not need to use AWS for
117.
▲
by
kroolik
6y ago
I wonder what made the authors of the language make the pattern matching statement keyword `mat`. Like... they were 2 characters away from a perfectly readable name, yet they've settled up on something that's confusing (took me a
118.
▲
by
kroolik
6y ago
I call this property "an accidental complexity" - when changing one piece of code causes failures in other, seemingly unrelated parts of the system. The property causes fear of introducing changes, and is usually a sign of tight c
119.
▲
by
kroolik
6y ago
There are dynamos you put into the front wheel. I think they are more efficient than the ones you are Talking about (exterior). https://hollandbikeshop.com/en-gb/bicycle-wheels/front-hub/d...
120.
▲
by
kroolik
6y ago
Thanks, missed that :-(
More ›