Readit News logoReadit News
mjarrett commented on Building Observability with ClickHouse   cmtops.dev/posts/building... · Posted by u/valyala
BiteCode_dev · a year ago
Interestingly, I recently interviewed Samuel Colvin, Pydantic's author, and he said when designing his observability Saas called LogFire, he tried multiple backends, including ClickHouse.

But it didn't work out.

One of the reasons is LogFire allows the users to fetch the service data with arbitrary SQL queries.

So they had to build their own backend in rust, on top of DataFusion.

I used ClickHouse myself and it's been nice, but it's easy when you get to decide what schema you need yourself. For small to medium needs, this plus Grafana works well.

But I must admit that the plug and play aspect of great services like Sentry or LogFire make it so easy to setup it's tempting to skip the whole self hosting. They are not that expensive (unlike datadog), and maintaining your observability code is not free.

mjarrett · a year ago
What kinds of SQL queries could ClickHouse not handle? Were the limitations about expressivity of queries, performance, or something else? I'm considering using CH for storing observability (particularly tracing) data, so I'm curious about any footguns or other reasons it wouldn't be a good fit.
mjarrett commented on Jujutsu (jj), a Git compatible VCS   tonyfinn.com/blog/jj/... · Posted by u/todsacerdoti
MarceColl · a year ago
And what are the steps when you work on 3 things at the same time (you are working on PR #2 + fixing issues in PR#1 + a hotfix needs to be deployed for an issue)? Or when you need to continue fixing things on the PR?

On the absolute happy path what you do above is the same I do, where jj shines is when you het out of the happy path.

mjarrett · a year ago
Isn't git-worktree designed for this kind of situation, where you could open each PR or branch in its own directory and switch your editor / other tooling between workspaces without losing state between them?
mjarrett commented on Types as Interfaces   two-wrongs.com/types-as-i... · Posted by u/todsacerdoti
posix_monad · 2 years ago
MLs require a lot of ceremony modelling simple record types.

What we want to express here is an object with a map of properties (name to type):

    string Type map
For the OOP minded:

    Map<string, Type>
And also compose those:

    type Foo = { "_foo", int }

    type Bar = { "_bar", string }

    type FooBar = mergeMaps Foo Bar
But at compile-time, of course.

Have any languages achieved this? I know TypeScript can do some of these things, but it's clunky.

mjarrett · 2 years ago
Hence, Objective Caml! This can be modeled in OCaml as an object type,

  type foo_bar = < _foo : int; _bar : string >
For a family of types matching any object with those methods, I think you can write something like

  type 'a has_foo_bar = < _foo : int; _bar : string; .. > as 'a

mjarrett commented on Currying   wiki.haskell.org/Currying... · Posted by u/peter_d_sherman
boxed · 2 years ago
Currying makes positional only parameters look cooler and fancier. It's a trap. Labeled arguments is the way to go for 99% of all parameters. Accidental currying is horrible.
mjarrett · 2 years ago
One of my favorite features in OCaml is labeled arguments. You get a similar flavor of partial application, but without the strict argument order requirement (most of the time -- higher order functions are strict about labeled-function arguments).
mjarrett commented on Keep the monolith, but split the workloads   incident.io/blog/monolith... · Posted by u/kiyanwang
mjarrett · 3 years ago
> No complex dev setup required, or RPC framework needed, it’s the same old monolith, just operated differently.

It seems to me like "operated differently" is doing a lot of heavy lifting that often involves those same frameworks or dev/testing environments. If a monolith used to communicate between workloads in-process, now there needs to be some way for those workloads to communicate between processes, and it has to continue to work in dev. The example in the article mentions roundtripping through something like Redis or Postgres, but now doesn't your dev environment need to spin up a database? What if the communication pattern isn't a shared cache, but instead a direct function call that, say, spins up a new goroutine to process some work asynchronously? Now you need to operate and maintain either an RPC protocol or an event queue, and make sure those things can be started up and discoverable during testing and local development.

u/mjarrett

KarmaCake day4December 26, 2022View Original