Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mstdmstd's avatar

How to share some data between 2 apps ?

I have “Application A”, which has a lot of data(Products, Orders, transactions, Product cards) and I need to make “Application B”, which needs to search and read only some data (Product cards) from “Application A”.

“Application A” already uses Algolia for quick search with scout plugin.

When “Application A” founds data on Algolia side it also search this data in its database.

So I can not in “Application B” to search on Algolia side, untill I have Product cards (with all related data) in “Application B”. Tha is how Algolia works.

I have not ever worked with typesense or Meilisearch. Do they work in the same way ?

Which tools can I use in this case? I would like some common server like Algolia, but with full access to any other app.

0 likes
5 replies
mstdmstd's avatar

After some searching in net looks like database replication could be a decision, with “Application A” as master and “Application B” sa slave, but it seems tricky, as “Application A” sends data on Algolia side immediately, but how to update data on “Application B” at the same time? If you have any ideas/expierence, please share

sub1ms's avatar

If you need two separate database instances (servers) and can't share the DB connection between two apps then yes replication will work. You won't notice any delays or issues between the services.

krisi_gjika's avatar

why not just make application B "ask" application A for the data?

krisi_gjika's avatar

@mstdmstd for example via an API endpoint. Where application B authenticates against application A and requests the filtered data it needs via the API. This way you don't replicate the logic of searching in two applications.

1 like

Please or to participate in this conversation.