all AI news
Writing a chat application in Django 4.2 using async StreamingHttpResponse, Server-Sent Events and PostgreSQL LISTEN/NOTIFY
May 19, 2023, 3:42 p.m. |
Simon Willison's Weblog simonwillison.net
Excellent tutorial by Víðir Valberg Guðmundsson on implementing chat with server-sent events using the newly async-capable StreamingHttpResponse from Django 4.2x.
He uses PostgreSQL'a LISTEN/NOTIFY mechanism which can be used asynchronously in psycopg3 - at the cost of a separate connection per user of the chat.
The article also covers how to use the Last-Event-ID header to implement reconnections in server-sent events, transmitting any events that …
application asgi async chat django events postgresql server tutorial writing
More from simonwillison.net / Simon Willison's Weblog
timpaul/form-extractor-prototype
1 day, 5 hours ago |
simonwillison.net
Options for accessing Llama 3 from the terminal using LLM
1 day, 13 hours ago |
simonwillison.net
Jobs in AI, ML, Big Data
Lead GNSS Data Scientist
@ Lurra Systems | Melbourne
Senior Machine Learning Engineer (MLOps)
@ Promaton | Remote, Europe
IT Data Engineer
@ Procter & Gamble | BUCHAREST OFFICE
Data Engineer (w/m/d)
@ IONOS | Deutschland - Remote
Staff Data Science Engineer, SMAI
@ Micron Technology | Hyderabad - Phoenix Aquila, India
Academically & Intellectually Gifted Teacher (AIG - Elementary)
@ Wake County Public School System | Cary, NC, United States