<p>I have a system with 5 source data stores (mostly PostgreSQL databases) from which, I want to connect them all to containers running on OpenShift: A library of react applications who's components make AJAX requests for data feeds from a thin server instance that is also running on OpenShift.</p>

<p>So far I have created the following:</p>

<ul>
<li>A test server (Flask with <code>flask_restful</code> and <code>sqlalchemy</code>) that has a direct connection to one of the data stores and can returns REST JSON responses of any of the tables in the database being requested</li>
<li>A node.js app consisting of two react components (D3.js visual and data table) which on mount/update, consume JSON response of one of the database's tables</li>
</ul>

<p>In the production system, my plan is to add in:</p>

<ul>
<li><a href="https://graphql.org/" rel="nofollow noreferrer">graphQL</a> to avoid the over-fetching that I'm currently doing </li>
<li>Connect up my server with a redis data cache to reduce demand on the data stores</li>
</ul>

<p><strong>My Question:</strong></p>

<p>As some of the data coming from the data stores can be large (>1M records), what would be the optimal way to do this?</p>

<ul>
<li>Should I rewrite my server with node.js (my thinking being that javascript is 'native' to JSON and so faster processing?)</li>
<li>I have been looking into BSON and <a href="https://msgpack.org/index.html" rel="nofollow noreferrer">msgpck</a> but I'm unclear if these would play nicely with react components?</li>
<li>Is there a scenario where I could optionally pass data between the OpenShift applications rather than sending large JSON response objects?</li>
</ul>

CC BY-SA 4.0
2019-12-23T10:13:59.883Z
Could you indicate whether you solved the issue?
030
CC BY-SA 4.0
2019-12-23T14:52:58.740Z
@030 unfortunately not!
Bendy
CC BY-SA 4.0
2019-12-23T15:01:13.173Z
Could you indicate when a response is fast and when slow? E.g. X<100ms?
030
<node.js><openshift><flask><json>
How to make fast JSON responses (or equivalent) between server app and front-end apps all running on OpenShift?
Bendy
# How to make fast JSON responses (or equivalent) between server app and front-end apps all running on OpenShift?

(Asked by: username_0 on 2018-04-25)

I have a system with 5 source data stores (mostly PostgreSQL databases) from which, I want to connect them all to containers running on OpenShift: A library of react applications who's components make AJAX requests for data feeds from a thin server instance that is also running on OpenShift.

So far I have created the following:

* A test server (Flask with `flask_restful` and `sqlalchemy`) that has a direct connection to one of the data stores and can returns REST JSON responses of any of the tables in the database being requested
* A node.js app consisting of two react components (D3.js visual and data table) which on mount/update, consume JSON response of one of the database's tables

In the production system, my plan is to add in:

* [graphQL](https://graphql.org/) to avoid the over-fetching that I'm currently doing
* Connect up my server with a redis data cache to reduce demand on the data stores

**My Question:**

As some of the data coming from the data stores can be large (>1M records), what would be the optimal way to do this?

* Should I rewrite my server with node.js (my thinking being that javascript is 'native' to JSON and so faster processing?)
* I have been looking into BSON and [msgpck](https://msgpack.org/index.html) but I'm unclear if these would play nicely with react components?
* Is there a scenario where I could optionally pass data between the OpenShift applications rather than sending large JSON response objects?

**Tags:** node.js, openshift, flask, json

> **Comments:**
> **username_1**: Could you indicate whether you solved the issue?  
> **username_0**: @username_1 unfortunately not!  
> **username_1**: Could you indicate when a response is fast and when slow? E.g. X<100ms?  

---

## 0 answers

