zlacker

[parent] [thread] 7 comments
1. zozbot+(OP)[view] [source] 2023-09-25 09:14:47
> If I want to use NOTIFY in postgres?

The nice thing about "boring" tech like Postgres is that it has great documentation. So just peruse https://www.postgresql.org/docs/current/sql-notify.html . No need for google-fu.

replies(1): >>ritzac+u3
2. ritzac+u3[view] [source] 2023-09-25 09:51:55
>>zozbot+(OP)
Python, Flask, SQLAlchemy, and Postgres all have great documentation individually, but if I am building an application at the intersection often a guide on exactly how to join them all up is much faster than using each individually and trying to figure out the interactions in four places.

AWS white papers and engineering blogs tend to give me everything I need in one place, and I don't think there are any for apps built with NOTIFY.

replies(3): >>random+7f >>sgarla+Bf >>sppras+He2
◧◩
3. random+7f[view] [source] [discussion] 2023-09-25 11:33:16
>>ritzac+u3
If SQLAlchemy’s documentation doesn’t explain its use with LISTEN/NOTIFY, perhaps it’s the wrong tool for the job? You are presumably not going to use it with Redis or SQS queues, so why are you so hung up on it here?
◧◩
4. sgarla+Bf[view] [source] [discussion] 2023-09-25 11:38:02
>>ritzac+u3
IMHO - and this probably why I’ll never launch a product - you should understand each piece of your infra. Not necessarily to the metal on each, but I don’t think it’s unreasonable to be able to explain why each piece is necessary, what it’s doing, and how to troubleshoot it when it breaks.

With your mentioned list, three of them are Python, so that significantly reduces the breadth.

◧◩
5. sppras+He2[view] [source] [discussion] 2023-09-25 20:05:52
>>ritzac+u3
SQLAlchemy is an extra abstraction blocking your path here. While you probably should still use an ORM for your regular relation queries, you are not gaining anything significant by trying to use SQLAlchemy for implementing a queue backend. You can write raw SQL with psycopg2 (which is already a dependency in your project thanks to SQLAlchemy), and wrap these raw queue management SQL in a nice little Python module which you can later reuse for other applications as well.
replies(1): >>mixmas+KE2
◧◩◪
6. mixmas+KE2[view] [source] [discussion] 2023-09-25 22:12:53
>>sppras+He2
You can write raw SQL with SA, while keeping the other nice features it has.
replies(1): >>hmhmhm+xQ2
◧◩◪◨
7. hmhmhm+xQ2[view] [source] [discussion] 2023-09-25 23:25:45
>>mixmas+KE2
Without being rude, what are the nice features? I've worked with it a bit and constantly found myself wishing it was just SQL whenever I've bumped into it
replies(1): >>mixmas+k53
◧◩◪◨⬒
8. mixmas+k53[view] [source] [discussion] 2023-09-26 01:16:05
>>hmhmhm+xQ2
API/engine/connection/pooling abstraction, serialization, type checking, etc.

Look up the features of Core if interested. No ORM needed, as it says in the docs.

[go to top]