Event sinks on multiple services


(estebanp) #1

Hi guys,

Latest RO. Delphi Tokyo. Olympia Server and Event Repository.

We have multiple services (for not calling them microservices) and all of them need to go through a login method via one of the services (authorization service). This one is the only service in charge of creating adding sessions and events to Olympia.

All the services share the same applicationId, and all the services on this family have designated an olympia service and repository internally so they can send out event sinks via an event writer.

Only this Authorization service performs logouts or destroys sessions. One of the methods of this authorization service is a RegisterSink (Subscribe) which basically does some db operations and at the end executes RegisterClient(aSessionid, anEventSinkId) from a TRORemoteDataModule as usually you will do to announce to the Olympia Event Repository to keep an eye on this session.

So if a service wants to subscribe to receive events he will call

AuthorizationService.Subscribe(currentSessionGUID, EID_Something) which does the proper call to RegisterClient from a TRORemoteDataModule with an Olympia event repository and session manager associated.

Our issue is that it doesnt work, only way we are getting events is if after calling the AuthorizationService.Subscribe we also call from the RemoteModule from the original service RegisterClient.

We dont understand why because the RegisterClient method signature simply requires a sessionID (GUID) and the Event sink Id and then calls the proper method on the event repository which all the services supposedly are sharing.

Is there something else that is initiated locally on each service that we are missing and its communicated along to Olympia?

Does Olympia uses in some way the separate message client id used to communicate to it?

also do we need a different message (BinMessage in this case) to communicate to olympia or a single one for the entire service/server is fine? is it better to have them separated?

Thank you in advance.

(EvgenyK) #2


What event’s mode you are using - non LegacyEvents ?
Can you create a simple testcase that reproduces this issue, pls?

also do we need a different message (BinMessage in this case) to communicate to olympia or a single one for the entire service/server is fine?

Olympia session manager uses internal BinMessage for communicating with Olympia

(estebanp) #3

Thank you for replying. Yes we use non legacy and supertcp for everything.

Regarding Olympia internal binmessage…

Currently we have on each service.

One BinMessage (BIN1)
One SuperTCPServer (dispatcher) plugged to BIN1.

One separate SuperTcpChannel (SUPER2) pointing to the Olympia Server.
One separate BinMessage(BIN2) used by the SuperTcpChannel(SUPER2).

One OlympiaSessionManager plugged to a separate SuperTCP (lets call it SUPER2) channel.
One OlympiaEventRepository plugged to a separate BinMessage (lets call it BIN2).

Those are the required components, the question will be, do we need to use the BIN2? or can we just reuse BIN1? I tried using BIN1 and it worked, but dont know if that will cause concurrency issues.

Regarding the test case, I will try to remove all the wrappers we have and pass you a sample, if if you are asking for it, it seems it should work as i described it so is worth doing some extra research and not giving up. :slight_smile:

(EvgenyK) #4

You can use only one message, because cloned message is used for incoming requests by server and for sending events.