Two flow instances with shared data?


New project, new questions :wink:

The subject of this topic is the essential fact of my question.
I have two flow instances running (on same server of course).
One of them produces data which should be in parts accessible by the other one - in read only mode.
Is there a “clean” way to solve this by flow itself?

At least I can do it by database triggers - but that’s not “clean” imho…

What do you think?

Stupid question: Why do’nt you implement an api in one of the instances that the other one consumes?

We had a similar problem in a customer project and ended up just moving to a single Flow instance, sharing the model.

Good morning!
@mficzel: one instance is a “stupid” data collector which receives data from several clients all over the net. These data must not exposed to “the world”. That is why an API isn’t possible.

@beheist: hmm, that the answer I have feared about. But seems to be the best solution anyway.

An API doesn’t mean that the data is exposed to the world.
If service1 communicates with service2 it’s per definition via some sort of API and it’s a matter of implementation whether that is just secured via some authentication or if it runs in a protected environment (i.e. DMZ).

In general I’d suggest: Try to avoid synchronous communication between to services as that will slow down your app and (more importantly) make it less stable (if one of the services can’t be reached, your app is down).

Maybe you can share what exactly your usecase is, then we might be able to share some experiences/tips

Hi Bastian!

Yes, of course you are right. An API is not necessarily visible and/or accessable to everyone.
But in such cases I’m conservative: only an nonexistent API is not assailable/vulnerable. :wink:

I’m not really a friend of these two instances at all - this decision is mde earlier.
Finally my aim is to put in one instance too.

You could roll your own secondary db connection and repositories. I have done that before and it is possible.