Understanding of GIL

52 views
Skip to first unread message

onlinejudge95

unread,
Dec 19, 2019, 9:12:28 AM12/19/19
to django...@googlegroups.com, Python ML
Hi Devs,

I am currently writing some custom Django commands for data updation, my workflow is like

Fetch data from PostgreSQL.
Call Elasticsearch for searching based on the data fetched from PostgreSQL.
Query PostgreSQL and do an upsert behavior.
I am using pandas data frame to hold my data during processing.

The host we are using to run this jobs has a CPython interpreter as given by

`platform.python_implementation()`

I want to confirm whether multithreading would be a better choice here, given the fact that GIL is the biggest blocker(I agree it has to be there) for the same in CPython interpreters.

In case further information is required do let me know.

Thanks
onlinejudge95

Dvs Khamele

unread,
Jan 15, 2020, 12:33:14 PM1/15/20
to django...@googlegroups.com, online...@gmail.com, Python ML
Hi, Hope you are doing well,
We are Pythonmate, We are world-first community focussed exclusively on Python, Django, Flask and Js based applications, ERPs, etc for the latest versions and versions since the start of Python.
If any requirements you have please let us know. We may provide good commissions for you if you are looking for a longterm network.
Thanks & Regards

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAD%3DM5eRWh9-EB180f2OzvnPLHh969vgaCzFyniFRSFa1-CwUHA%40mail.gmail.com.

John McClain

unread,
Jan 15, 2020, 1:11:04 PM1/15/20
to django...@googlegroups.com
What does your django or flask stacks look like generally



--
John McClain

Cell: 085-1977-823
Skype: jmcclain0129

Dvs Khamele

unread,
Jan 16, 2020, 3:37:35 AM1/16/20
to django...@googlegroups.com, John McClain
Sure John McClain,
Thanks for providing this valuable time. 
For our general structure, The following is Github repo of one of our sample Django project UserDose:- 
I am also attaching  a google drive link for code folder which contains code, named as

userdose

it contains a readme file,

README.rst 

This file has details regarding the project and its setup,
If any trouble while running, any improvement regarding code/documentation/explanation or any feedback please feel free to correct and let me know.
Many Thanks,
Divyesh Khamele

Amitesh Sahay

unread,
Jan 16, 2020, 4:44:21 AM1/16/20
to django...@googlegroups.com, Python ML
Hi,

You should also undertand that Python uses GIL for Threading purpose. Yes, if you have functiosn that needs simulataneous execution you should use Threading approach. As well as if Huge data is involved then also use multi-processing concept as well


--
Reply all
Reply to author
Forward
0 new messages