Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jordic
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
jordic
6y ago
That's the thing, you need to explicitly run on a transaction.atomic, with sqlalchemy, that's something that just works..
32.
▲
by
jordic
6y ago
Or just the all orm thing.. why I can't use a using(field) when I need to query a Django dB? How many applications are poor modeled because the orm?
33.
▲
by
jordic
6y ago
And then (with elastic) why you will use a synchronous web framework ;)
34.
▲
by
jordic
6y ago
No I'm saying that if you mutate related models and didn't wrap them on a transaction it can leave you (if something fails) on an inconsistent dB state.. this is something it can't happen on sqla
35.
▲
by
jordic
6y ago
Also agree, sql it's like javascript, it's almost on all projects I worked last 20 years.. (Django it's just another tool, and implementation detail).
36.
▲
by
jordic
6y ago
Mmm, sorry, if this is how you see it, what I'm trying to express it's that the dB by itself, it's the source of truth (and the state) of your application, Django it's just an implementation detail that you can swap when
37.
▲
by
jordic
6y ago
That's because you are not using the power of postgresql.. (if you can test and run locally with sqlite).. are you using transactions, no? Because Django doesn't enforce them O_O
38.
▲
by
jordic
6y ago
Learn sql, it's like javascript, it's everywhere.. and will open you expertise from a we framework to a lot of other places..
39.
▲
by
jordic
6y ago
That's really a so bad practice, a big code smell.. how you test all the dB logic, with a different dB? Constraints, indexes, tsvs..
40.
▲
by
jordic
6y ago
That's the nice thing around sqlalchemy, it's a lib, a toolkit.. you can start using it on whatever postgresql schema you found.. Django can't only work if things are done like it wants... You will also use Django for an old
41.
▲
by
jordic
6y ago
That's the trade-off if you decouple the dB from the web framework you have to take care of both.. :) anyway, I prefer to trust the dB (real data on it) that a bunch of complicated things on the Django side.. (I suspect that happened s
42.
▲
by
jordic
6y ago
Look at what will happen to channels on the next releases when Django will be async... To have a websocked popping info from a redis pubsub doesn't make any sense all of this crazy abstractions.. it's just an async view reading fr
43.
▲
by
jordic
6y ago
The problem sounds like merging things that are not green on CI, not related to migrations with python Vs sql). Think on it, you can just use Django on python, but you can use sql everywhere there is a dB.
44.
▲
by
jordic
6y ago
For me it's too much easy to write them with sql or plpgsql.. and later I can use them from node, rust, go.. or whatever.. for me the dB (the model) it's the source of thruth that will lasts.. independent of the language that inte
45.
▲
by
jordic
6y ago
Another thing important that the author doesn't mention is that if you try to keep your sql model on the postgres side.. you will be able to introduce other languages (for example to optimize hot paths) I agree 100% with the author, if
46.
▲
by
jordic
6y ago
That's not the intention on the code, I thought he is talking around writing a migration and a test that ensures the data migration is correctly applied
47.
▲
by
jordic
6y ago
On k8s, for example running multiple parallel jobs that need to initialize only once, It used to work for me the redis redlock (it's around with multiple implementations). The first job takes the lock while initializing, the rest just
48.
▲
by
jordic
6y ago
There's also another benefit around using of as a queue, you can just publish your messages from within the same transaction you are using on the request, and that's nice, all or nothing.. I will dig on your elixir queue, just bui
49.
▲
by
jordic
6y ago
There is still no replacement tooling on the web, the way you can manage movie clips (as instances), attach animations, control the timeline.. (compose them)... That was really a joy.. Also was awesome the feedback loop within the ide (jus
50.
▲
by
jordic
6y ago
We started evaluating clickhouse, after saying that sentry it's using it
51.
▲
by
jordic
6y ago
For example I have a plumber rule where I link issue/123 with GitHub. When right mouse clicking the text the browser opens the issue page.
52.
▲
by
jordic
6y ago
Vim is keyboard centric, acme is mostly mouse centric (just taste) I prefer the mouse :)
53.
▲
by
jordic
6y ago
Can't
54.
▲
by
jordic
6y ago
I'm using it as my day to day tui (with an scratch buffer). I have a index file where I store "shortcuts" to lot of fs places. Also I store action logs of whatever related to shell. For example, a file rabbit.md, it starts wi
55.
▲
by
jordic
6y ago
Minio also does this... Haha https://docs.min.io/docs/minio-select-api-quickstart-guide.h...
56.
▲
by
jordic
6y ago
It's so amazing to see them on HN, I learned a ton about python, pyramid, sqlalchemy and elastic on it's repos. So happy to see traction on open source projects! Thank you!
57.
▲
by
jordic
6y ago
The benchmark will be better with something like this https://news.ycombinator.com/item?id=12227507 On the asyncio side :) Old stories that come again and again
58.
▲
by
jordic
6y ago
Absolutely agree, sum to this the quality of the driver aiopg vs asyncpg...
59.
▲
by
jordic
6y ago
Hiding awaitables from the language, sounds like against the zen (explicit better than implicit) For example, when someone access a descriptor in Django.. this could end being a query to the db (transparent) but dangerous. With asyncio you
60.
▲
by
jordic
6y ago
there is also another issue on the benchmarck (not pretty sure how it's handled with aiopg. The pool size. With asyncpg, if you want to handle more req/s you need to increase the pool to at least 15-20 connections, but... this is
More ›