Some events questions

(DonaldShimoda) #1

I have some questions, there some beahviour still cant correct.

A client connect to the server gte a session GUID, and register for an event.

The server close.

The server open.

How can i make the client reutilice the old GUI painless?

Other scenario. Client close without unregister from the event. What happen with that? Will the server try to send every event to that client app or will auto clean?

All using standard HTTP channels.

Best regards.

(EvgenyK) #2

in standard HTTP channel, client asks server for available events so they are stored on server-side.

You can use DB based SessionManager & EventRepository like Olympia-based. in this case, client will receive all his events after server’s restart.

SessionManager has SessionTimeout. When session is expired, events won’t be caught for this session anymore.

(DonaldShimoda) #3

Ok, so the client while connected ask the server for events. If server is down, raise some exception? Or ignore the problem in silence?

I save sessions i deb, The problem is the server after restart seems not to load previous sessions, and the customer raises an exception saying the session guid dont exist on the server.

The only requiremente is to load session ids on the sessionmanager at start? Thats all? Im doing something wrong then.

“client will receive all his events after server’s restart.” -> dont get that. How the server saves in db events? Anyway i dont like this. I prefer to the server only send the actual events, getting. a lot of previous events have no sense in my business model.

Great. Thanks.

(EvgenyK) #4

it depends on you: you can process exception in OnPollException event of TROEventReceiver otherwise it will be ignored silently.

what exactly SessionManager are you using? DB SessionManagers should work w/o any problem after restarting server. runtime SessionManagers like InMemory, etc of course will be empty after restarting of server.

DB EventRepositories store data that should be sent to client in DB, so client can receive it in any time while session is valid

(DonaldShimoda) #5

That code is very old, from the time there no dbsession manager component, adaptd from a sample from Alessandro (figure it!)

Will work in aggiornate.


P.S. : How to remove the infame unable to connect to remote server message?

(EvgenyK) #6

put a code that connects to server in try/except ?

(DonaldShimoda) #7

Do you mean in every single DataSet.Active := True?

AFAIK HTTP connect when needed.Im wrong?

(EvgenyK) #8

You can assign to Application.OnException your own handler of unhandled exceptions if you don’t want to control it in thousand places

I’d suggest to connect to server in Login method. in ROChannelException you can add some handling of such exception too like control state (connected/disconnected), etc.

(DonaldShimoda) #10

Can please share the recomended code for solve that problem? Again i have a lot of unable to connect to remote servers after a few days the server running. I have anothe rserver processor working fine, so the problems seems to be the Ro component server only. I try both Indy and Synape servers. Delphi tokyo 10.2.3 and latest DA beta.

(EvgenyK) #11

can you create a simple testcase that demonstrates this issue, pls?
I think, solution will be quite trivial because you could miss something obvious
you can attach it here or send directly to support@

(DonaldShimoda) #12

With all my respect. How can i miss something obvious and acccept incoming connections and then suddenly stop accepting connections?

A sample test case implies have it running 5 or 10 days waiting to see if the situations happens again.

Again, why dont give me a sample case to monitor the code where the problems can get detected? Will be aeasier IMHO.

Best regards.

(EvgenyK) #13


see example that demonstrate usage of Application.OnException.
just launch this Relativity client w/o Relativity server. (56.3 KB)

I can’t understand your problem fully. Your testcase could demonstrate it …

you can catch exception at opening each dataset in Application.OnException

(DonaldShimoda) #14

The problem is not at cliente side. When that happens you cant contact the server from any computer (simple testing http://serverip:portofserver/bin returns cannot connect to server)

So, how can i debug that problem at server side? What can cause an indy http server to stop alone?

Best regards.

(EvgenyK) #15

hmm, try to launch server under debugger and wait for case when doesn’t respond to http://serverip:portofserver/bin
it could be a problem in native indy http server.

(DonaldShimoda) #16

It will takes days.

Anyway, indy is the only server enabled for delphi linux rigth? Synapse no compile. Theres any opther options?

(DonaldShimoda) #17

I remeber a amazing server for debuging you guys release. is dead? or can get the exe and use?

best regards.

(EvgenyK) #18


we had DebugServer, it is dead for 10 years and it worked only for Windows.

I heard that EMBT will remove ARC for linux platform for their next version of Delphi

so it could be a solution for you because it could be an issue with delphi memory management itself…

(DonaldShimoda) #19

Dont have an old exe? Really works perfect.

I dont read any about that but are great news!

Add some debug log on the events for the Indy servers to check if the problem is there or help to find the problem.

Best regards

(EvgenyK) #20

we have old DebugServer exe.
if you have old license from 2006 year, it should work.

(DonaldShimoda) #21

Where can i download the file?

Best regards.