HNHacker News
TopNewBestAskShowJobs

marco_craveiro

119 karma · joined August 30, 2011

submissionscomments
marco_craveiro··on Rawdrawandroid: Build Android apps in C
Very interesting! On this topic, there is also Boden [1] - though it has been a little bit quiet of late...

[1] https://github.com/AshampooSystems/boden

marco_craveiro··on When an SQL Database Makes a Great Pub/Sub
As I said, I haven't given a lot of thought about this so please take my opinion with a grain of salt - but I believe that once you split the log out of PostgreSQL, a lot of functionality of this ilk could start to be considered. When/if added, I think it would make for a stronger PostgreSQL in the end. However, I do understand this is an insanely hard amount of work. In a way, it bears some similarities to splitting GTK out of GIMP, for instance; extremely difficult thing to do but ultimately it turned out to be a massive win for both projects. This would be even harder, but ultimately, greatly advantageous.
marco_craveiro··on When an SQL Database Makes a Great Pub/Sub
Before I proceed, let me just state that I have no particular knowledge of either RDBMS' internals or Kafka, so this is nothing but my own amateur musings on the subject.

Now, I wholeheartedly agree that Kafka is more scalable, but I think the key point here is that there is no particular law of nature as to why that is the case. It may just be an historical accident of how RDBMS - and PosgreSQL in particular - have evolved. Further: many of the properties of Kafka are in fact also desirable properties for the PostgreSQL transaction log.

My take on the inopinatus observation, together with the Samza article [1] mentioned on this discussion, are as follows. You can think of Postgres as two "products" (bounded contexts, if you like):

- a stream-based, possibly replicated, transaction log;

- a projection of that transaction log into relational calculus, plus all of the associated machinery.

Thus far we never had the need to think of these as clearly separate "products", but Kafka makes it obvious that they are. In truth, the amount of tools processing WAL outside of PostgreSQL were already hinting in this direction; Kafka just made it obvious.

From this perspective, it seems a tad expensive to take the original transaction log, convert it to a RDBMS representation, then convert it to events and, in some cases, then store it as an event stream in Kafka. It would be much more efficient to simply use the original transaction log directly - and this is why, to me, even Debezium [2] / Bottled Water [3] appear to be one layer too many. To the best of my understanding, this line of reasoning is also line with the observations in the Samza article [1]. Where I believe I differ from the article is in thinking that the RDBMS representation also adds a lot of value to applications - I see both having a role (e.g. streaming vs batch processing sort of thing). I think this would derail the present discussion too much, so I won't go in to it.

In conclusion: to the untrained eye, it seems that the right thing to do is to extract the transaction log out of PostgreSQL and make it as scalable as Kafka. Then, allow for it to log "things" which are not necessarily "projectable" into the relational plane. PostgreSQL then becomes just a client of the transaction log, together with other "kinds" of clients. I suspect that this is what will ultimately happen, but the engineering work required will probably span a decade or more.

My 2 Angolan Kwanzas, at any rate.

[1] https://www.confluent.io/blog/turning-the-database-inside-ou...

[2] https://debezium.io/

[3] https://github.com/confluentinc/bottledwater-pg

marco_craveiro··on When an SQL Database Makes a Great Pub/Sub
Indeed, I've also puzzled over this a fair bit. Its almost as if we are lacking a lower-level interface to the transaction log that enables one to push events without going via the higher-level representation of tables etc. However, the implementation details are somewhat beyond me :-) Postgres' Bottled Water [1] was what made me think about this. I mean, why bother with exporting to Kafka at all, and instead just use the Postgres transaction log directly?

[1] https://github.com/confluentinc/bottledwater-pg

marco_craveiro··on When an SQL Database Makes a Great Pub/Sub
MessageDB was doing the rounds in reddit the other day [1]. Looks interesting for simple use cases...

[1] https://www.reddit.com/r/PostgreSQL/comments/ebu6nh/message_...

marco_craveiro··on Firefox Replay
I've been using Linux on the desktop for 20 years now (Debian mainly) and I think things have never been as good as they are now. Its not important (to me) that there are only ~2% desktop users, just that FOSS continues to evolve at the same pace as it has...
marco_craveiro··on Show HN: Cascadia Code, a Font for Windows Terminal and VSCode
This font looks great on Emacs, going to move away from Inconsolata!
marco_craveiro··on Ask HN: What Hacker News comments have you bookmarked?
@jasonm23's comment:

"Emacs is basically a text centric computing platform, built with a flavor of Lisp."

https://news.ycombinator.com/item?id=19650942

marco_craveiro··on The C++ Build Process Explained
Bit of a side-question, but somewhat related. Is anyone working on "whole program compilation"? I don't mean whole program optimisation, I mean an attempt to read all files for a given target in memory at the same time and then generate all translation units in one go (all in memory? and maybe linking them in memory too?). Clearly, there would be caveats (strange header inclusion techniques relying on macros to modify text of include files would break, gigantic use of memory and so forth), but for those willing to take the risk, presumably this should result in faster builds right?

In fact, ideally you'd even generate all binaries for a project in one go but that may be taking it a step too far :-)

At any rate, I searched google scholar for any experience reports on this and found nothing. It must have a more technical name I guess...

← PreviousPage 3 of 3