Vishal
#!/bin/sh Inَactive
null
Anonymous
Can you help me in Django Seed
Anonymous
Trying to create dockerized microservices which will decomposed and interact between each other. Can we facilitate this communication through celery, instead of http?
Rohan
Rohan
Given all services are on same network as celery
William
Rohan
They can reach celery using it’s service name defined in compose
Anonymous
Rohan
If they run on different Ec2 instances ?
Then make sure your celery is reachable to outside world or your services but obviously scaling won’t work on that and this is not gonna be good on a production environment
Rohan
In fact compose is not for production environment
Anonymous
Okay, in that case to achieve scalability and smooth communication between the microservices what can be used? Our aim is to first run the docker images in 2-3 servers in a distributed manner, as it scales we keep adding more servers. All in production
Rohan
Rohan
REST APIs?
Rohan
Or your focus is on speed?
Rohan
Rohan
It’s like a trade off between speed and development speed
Rohan
You can use gRPC with django but then you’ll also have to maintain a client that exposes those rpc methods
Rohan
And I’ve never seen someone use celery to make services contact between themselves
Rohan
It’s so fragile and complicated that I’d rather use a redis cache to serve requests than do that.
Anonymous
Understood, thanks for the suggestions... Can you suggest any resources which describes architecture of such highly scalable system in Django, including dockerized microservices and efficient communication
Rohan
Rohan
For dockerization, that’s a simple process to isolate a service
Rohan
Migrate to ECS instead of running bare EC2s if you already use dockers
Rohan
And if you have money to put in your production environment, try Fargate serverless.
Anonymous
Noted, will do some digging and find out the tradeoff. Thanks a lot for the recommendations
.
.
Vishal
Show your code
All the details are mentioned in the issue. Please tell me you need something in specific.
.
Celery is message broker
.
Rohan
.
Anonymous
Rohan
I dont use this shit
Then don’t provide insights on it to someone who’s already struggling with it.
.
Rohan
It’s more about interaction of microservices.
.
.
Ik
Rohan
And how does queues plug in into that equation?
.
hgkr
Hi, On a new Django website, I can enter the site with http: // DomainName, I cannot enter when entering www.domainname, how can I solve this problem?
Anonymous
Anonymous
how to run this django project in my pc
AV
Hi, i need a help) I have the code:
get_tasks_coro = sync_to_async(TaskManagerTasks.objects.all, thread_sensitive=False)
tasks = await get_tasks_coro()
but I will get the “SynchronousOnlyOperation” exception, i don’t understand what is wrong … My python version 3.6.9, thanks in advance!
Sai
AV
Might be python version
I think so. And there is one interesting moment, the loop.run_in_executor method creates a separated daemon thread for any synchronous code executing, but there will be the same exception as SynchronousOnlyOperations. I have to use threading.Thread in the loop.run_in_executor explicitly.
FirMass
Hello guys
Anonymous
Any project ideas to do in django
FirMass
firme@firme ~/Projects/Django/django $ django-admin startproject mysite
FirMass
bash: django-admin: command not found
Anonymous
FirMass
I'm not able to create a new project, I guess it's only using python 2.7 instead of 3
Anonymous
pip install virtualenv
python3 -m venv env
env\scripts\activate
pip install django
django-admin startproject mysite
Try these commands
which version of python are you using
FirMass
Sai
Sai
Anonymous
Could any body suggest me what topics required in python for django
AV
What are you trying to do
I have a necessity to work with a database asynchronously. My dbms is postgresql with the psycopg adapter. I wrote an asynchronous server with the asyncio and multiprocessing, it works in the dedicated process on the dedicated core of the CPU.
Pavel
hey guys, according to black formatter codestyle we should use double quotes (“”), while django auto-generated code uses ordinary quotes(‘’). what is a true way to use to resolve this problem in codestyle ambiguity?
Doragonsureiyā
cj
Mirco
.
.
u can set black -S
.
or use another formatter, like autopep8, yapf
.
or both
ㅤ
I was revising django , I came across Session , I know how to set,get, delete session , set expiry and flush,clear the session , is there anything extra which I do need to know right now, I am a student and looking to intern very soon.
s@123
i facing problem in forms where i filter selection of manytomany field according to user but sometime it show this error and some time save but selected items of m2m field not saved any developer can help me
s@123
here is code https://dpaste.org/hYUx