Note that there are some explanatory texts on larger screens.

plurals
  1. POIntegrate application with external service
    text
    copied!<p>So basically I want Your opinion about the architecture of project I'm working on:</p> <p>Everything is written in Python using Flask framework. Application provides Restful API that is being used by mobile applications. And now the main issue:</p> <p>Since there are many really complex queries that are being made to MySql server and we want to store data that comes from users for further analysis (e.g which url he visited, what he searched for etc.) I came up with a solution that there will be another web application delivering API (running on top of tornado and MongoDB using async Pymongo driver called Motor), which we will call from within main app. </p> <p>Seems really confusing but the main idea may be presented as:</p> <pre><code>USER -&gt; ACTION, API CALL -&gt; &lt;-&gt; RECEIVE DATA FROM MYSQL FLASK/Server RESPONSE &lt;- DO_STH_WITH_DATA&lt;- -&gt; EXTERNAL API CALL -&gt; TORNADO -&gt; MONGODB </code></pre> <p>I know it looks awful but I'm not good at drawing either :p.</p> <p>Why another application ? First, we want to have separate access to data collected from users that's why we need another Restful API delivering certain resources. My concern is the performance of such a solution and some recommendations (maybe it would be better to integrate everything into one web application, which is not what we want exaclty ?). Have in mind that post calls from our main app will be handled by eventually somehow handled by async calls to mongodb via motor which should have positive impact on performance.</p> <p>EDIT:</p> <p>I shall mention that external api calls will be using celery (that is what we are planning for now anyway).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload