#1 2021-03-18 14:17:12

fabiovip2019
Member
Registered: 2019-03-14
Posts: 76

Domain events with persistence

Hello everyone,
I am using the structure of mormot Master / slave replication to work on the persistence of domino events via websocket and to ensure that all event subscribers receive the event.
In fact, using this structure works very well. However recently I implemented a change followed by @tbo in the following post: https://synopse.info/forum/viewtopic.php?id=5788 where I decouple the RestServerDb from SQLHttpServer using a TSQLRestServerFullMemory as an intermediary. Well, this way my old structure of domino events with websocket does not work, because the master / slave replication needs to expose the Restserverdb in the TSQLHttpServer of websocket. Is there a way to work on this master / slave replication using this decoupled structure? Has anyone implemented this?

Offline

#2 2021-03-21 13:58:21

uian2000
Member
Registered: 2014-05-06
Posts: 68

Re: Domain events with persistence

In my opinion, master/slave replication function is used for database maintainer, not for regular user.

So, maybe you can implement master/slave replication with the old fasion.
And implement regular function with interface-orinted fasion.

Offline

#3 2021-03-21 16:35:46

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,238
Website

Re: Domain events with persistence

I don't see why you shouldn't be able to duplicate the several RestServerDB using websockets.
Just publish the proper IServiceRecordVersionCallback interface for a given DB.
Then use the low-level TRestServer.RecordVersionSynchronizeSubscribeMaster method.

Offline

#4 2021-03-22 12:33:45

fabiovip2019
Member
Registered: 2019-03-14
Posts: 76

Re: Domain events with persistence

Hi uian2000, is that I'm actually using master / slave replication as a way to work on persistent domain events, something that is recommended by Ab himself.


Hi Ab,
yes i can use replication via websocket with the proper infrastructure, however for that i would need to expose my RestServerDB in a TSQLHttpServer for this is not it? Wasn't the purpose of the post I indicated in the link just to isolate the RestServerDB and not expose them directly to TSQLHttpServer?

Offline

Board footer

Powered by FluxBB