HN user

aptxkid

225 karma

https://blog.the-pans.com/

Software Engineer at FB working on distributed systems.

Posts39
Comments26
View on HN
twitter.com 4y ago

I think DeWitt Clause is good for the users

aptxkid
1pts0
blog.the-pans.com 4y ago

Fix Flickering Relay Switch caused by Nest Learning Thermostat

aptxkid
1pts0
twitter.com 4y ago

Another reason why C++'s horrifying – initialization

aptxkid
2pts1
blog.the-pans.com 4y ago

C++ memory model as a distributed system

aptxkid
1pts0
blog.the-pans.com 4y ago

DNS – The First Distributed Database

aptxkid
3pts1
blog.the-pans.com 4y ago

There’s nothing 100% in computer science

aptxkid
3pts0
twitter.com 5y ago

How FoundationDB works and why it works

aptxkid
5pts0
blog.the-pans.com 5y ago

Notes on the FoundationDB Paper with Additional Proof of Correctness

aptxkid
4pts0
blog.the-pans.com 5y ago

Paxos vs. Quorum-Based Consistency

aptxkid
2pts0
blog.the-pans.com 5y ago

Building Folly:Coro with GCC

aptxkid
1pts0
blog.the-pans.com 5y ago

You don't need virtual base dtor with smart pointers

aptxkid
1pts0
blog.the-pans.com 5y ago

How `Auto_increment` Works on MySQL

aptxkid
3pts0
blog.the-pans.com 5y ago

MyRocks' repeatable read isolation is actually snapshot isolation

aptxkid
2pts0
blog.the-pans.com 5y ago

C++ Map Lookup Memoization

aptxkid
2pts0
blog.the-pans.com 5y ago

Type Erasure in C++ Explained

aptxkid
43pts51
blog.the-pans.com 5y ago

Paxos Commit with Constraints

aptxkid
2pts0
blog.the-pans.com 5y ago

How C++ typeid operator works

aptxkid
2pts0
twitter.com 5y ago

RUM Conjecture for Caching

aptxkid
1pts0
blog.the-pans.com 5y ago

std:: Atomic from Bottom Up

aptxkid
1pts0
blog.the-pans.com 6y ago

Linear scalable read-write lock

aptxkid
1pts0
blog.the-pans.com 6y ago

Global Data Locality – Why and How

aptxkid
11pts0
www.youtube.com 6y ago

Morse Code Telegraph on a Breadboard

aptxkid
1pts0
blog.the-pans.com 6y ago

2 plus 2 can be 22

aptxkid
1pts0
blog.the-pans.com 6y ago

API for Assigning Timestamp

aptxkid
2pts0
blog.the-pans.com 6y ago

Notes on the Google Spanner Paper

aptxkid
2pts0
blog.the-pans.com 6y ago

Understanding Paxos as a Read-Modify-Write Transaction

aptxkid
2pts0
blog.the-pans.com 6y ago

Debugging Stack Overflow

aptxkid
1pts0
blog.the-pans.com 6y ago

Re-Entrant vs. Thread-Safe

aptxkid
3pts0
blog.the-pans.com 7y ago

Discover Paxos via 2pc

aptxkid
1pts0
blog.the-pans.com 7y ago

How to compare small versions that wrap around

aptxkid
1pts0

Personally I think it’s a great response and very well written. I didn’t jump on the congrats-Databricks wagon when the result first came out because of the weird front page comparison against snowflake. Both companies are doing great work. Focusing on building a better product for your customer is much more meaningful than making your competitor look bad.

It does, which one can argue it’s an implementation detail. The differences I mentioned above eg sharding, transaction boundary, secondary indices, etc. should be generally applicable to a non-relational db and not unique to TAO. I could be wrong though; as I know little about other graph dbs.

It would probably be more productive to compare RDB and Graph with certain workload examples (OLTP, OLAP, joins, scans, etc.).

This is a great topic. I have been working on TAO for many years. I am not very familiar with other graph databases; I assume fundamentally they are more or less the same. Here are some differences between RDB and a graph db IMHO, 1. sharding and transaction boundary 2. Secondary index support 3. How “join” works (eg. give me a list of my friends who follows Justin Bieber)

You’re right that graph db is very easy to use a lot of the times.

The tweet is certainly loaded, hence the point of this HN post lol.

First of all there's std::function, which uses Type Erasure https://blog.the-pans.com/type-erasure/. It means std::function<void(int)> can be the type of anything callable that takes an int and returns void (lambda, function pointer, object with operator() overload, etc.). Notice they are of different types! Hence Type Erasure.

How std::function manages its memory is poorly specified. But the standard at least states that if it's initialized from a function pointer (free, no capture), it's guaranteed that it won't allocate. https://en.cppreference.com/w/cpp/utility/functional/functio...

When the target is a function pointer or a std::reference_wrapper, small object optimization is guaranteed, that is, these targets are always directly stored inside the std::function object, no dynamic allocation takes place.

In this case, std::function is trivially copyable. However, there's no way to know this at compile time, exactly because the type is erased in std::function.

The answer is yes. And you can verify this by

checking std::is_trivially_copyable<FnPtrType>::value

using FnPtrType = int (*)(int) // for example

Well if this is an improvement or not depends on the use case. E.g. std::function does exactly this.

What it achieves is exactly erasing the type (conforming to an affordance). The cost is definitely there. You pay vtable lookup when using std::function.

However the Type Erasure described here doesn't need to know T even when you use it. E.g. it enables things like

for (auto x : vec) { x.foo(); }

The hard thing to do, which Bezos does very well, is to stay focused, patient and stay invested. Now it’s even easier to be even more patient as amazon has a very deep pocket.

If you read it closely, this is very similar to RAMP transaction. Both has pretty significant write amplification for storing transaction metadata and multiple versions of each key. By storing txn metadata and multiple versions, it provides many nice attributes like non-blocking, concurrent transactions, etc.

The difference between Abadi's proposal and RAMP is that it moves the "second phase" to the worker, which performs the remote read, to figure out the txn decision.

I think this proposal should be better compared to RAMP instead of 2pc. And even in RAMP paper, it states that this doesn't solve all the problems. E.g. how would you do the traditional read-modify-writes?