I am thinking of creating two applications, one of which (App 1) will be in Django (DRF) and other (App 2)might be Django but might be another more lightweight framework (maybe Flask or plain Django or maybe different language altoghether depending of how efficient will be the script in Python). Anyway the idea is that the App 2 needs to be standalone.
I am thinking of creating a connection between them that would be working in both directions.
App 1 (Main Django app) would send request to the App 2 to start calculation (which would take quite long time). Response for this request would be some information that App 2 received request and now is doing calculation in background, so that App 1 would not be waiting for this request to finish. Then when App 2 finishes it would then send request to App 1 to inform App 1 that it(App 2) had finished calculating and updated database (which is shared). After that App 1 sends information to the FrontEnd that everything is ready (updated database, App 2 finished calculations).
What would be best way to enable this back and forth communications?
I read about celery-redis, but should I implent this in App 1 or in App 2 in this case? As far as I understand I could create task queue in App 1 and when App 1 sends first request to App 2 (like calling external api), the request is moved to the task queue and the response will be later delivered when App 2 finishes calculation, is that the "go to" approach?
I also started reading into websockets (django channels) and Im wondering if they would be better fit for this ase.