Avatar of je111ena
Software Engineer
Needs advice
on
PythonPython
vs
TornadoTornado

Investigating Tortoise ORM and GINO ORM...

I need to introduce some async ORM with the current stack: Tornado with asyncio loop, AIOHTTP, with PostgreSQL and MSSQL. This project revolves heavily around realtime and due to the realtime requirements, blocking during database access is not acceptable.

Considering that these ORMs are both young projects, I wondered if anybody had some experience with similar stack and these async ORMs?

READ LESS
5 upvotes25.3K views
Replies (8)
Avatar of michaelmota
CEO & Founder at AlterEstate
Recommends
DjangoDjango

I honestly don't know if this could help but, I'll speak from my similar experience with Django. I had to do for a client a dynamic map in real time so that users can select their seats for a specific event. In the first MVP tickets sold in less then 10 minutes, over 400 users at the same time online trying to buy the seats. (I mention this to get in the context of why I used it).

We achieved this with Django, Socket.IO, PostgreSQL and for the frontend React. With the power of Socket IO we manage to achieve a real time connection with the database with a reaaally low response time.

The drawbacks of Django are that everyone knows that Django is not really good for real-time activities but in combination with Socket.IO this can be achieve really good.

I hope that in some way I helped. 馃憤馃徏

READ MORE
6 upvotes7.7K views
Avatar of freeqaz
CTO at Refinery Labs
Recommends
asyncioasyncio

I asked a friend who's a 10x Python engineer for some help getting you an answer here. He recommends:

I don't think there are any robust ORMs for asyncio. There's Gino but I haven't evaluated it. I would honestly use an asyncio SQL connector, manually write the request, and implement a mapping layer myself.

Asyncio is still a bit weird a lot of libraries hack compatibility layers onto it. It's probably better to use aiohttp alone instead of putting Tornado on top of it.

ORMs can be painful and newly created ones on new platforms are even more painful.

Hope that helps!

READ MORE
6 upvotes31 views
View all (8)
Avatar of Jelena Dedovic

Jelena Dedovic

Software Engineer