My team works on standalone console-based applications in Python. Until now, we bundled our software and provided it to our customers. Now we got a request for a new component to be integrated within an existing web application.
Background on the server:
- client-side: React
- back-end: Java home-made server
- DB: Postgresql
In a high level, the component to be developed should do the following:
- get JSON data
- process the data (Business logic)
- return JSON data.
It also needs to manage its own tables in the DB.
The requests for the data can be multiple and simultaneous.
There no direct interaction between the Python app and the UI.
The question is what is the best way to integrate between the server and the Python app in a way that is scalable, can be separately tested, and efficient.
Possible integrations on the table:
-
Bundle the Python app to exe, then the server will need to initiate a process and call the exe per request.
-
Run the Python app as microservice alongside with the main server - run the app from a lightweight python server like Flask and provide API's that the main server will use to get the data.
-
Run the Python app as an OS service - basically, the same as 2.
Aucun commentaire:
Enregistrer un commentaire