Kernel prepatch 4.0-rc4
Kernel prepatch 4.0-rc4
Posted Mar 18, 2015 14:31 UTC (Wed) by JGR (subscriber, #93631)In reply to: Kernel prepatch 4.0-rc4 by sorokin
Parent article: Kernel prepatch 4.0-rc4
One could equally implement synchronous calls using standard socket and serialisation libraries, which would lead to problems 1-3 in much the same way. As I read it, your post is more about synchronous vs asynchronous RPC/messaging, than DCOM vs a custom RPC using sockets.
That said, problems 1-2 can be avoided whilst still using synchronous RPC if the thread making the outbound request does not have it's own event loop which is run during the request. One way to implement that would be to have the event loop dispatch (a subset of) events to a thread pool, though that is not fantastically efficient.
For something like a logger, a fire-and-forget message should be adequate, as there's no point blocking yourself waiting for an acknowledgement which doesn't really tell you anything.
> This is absolutely insane. It means that it is not possible to use any DCOM calls in UI thread.
How is this insane? Any kind of synchronous non-local network IO in a UI thread is a non-starter. Even synchronous local network or disk IO is potentially problematic.
Posted Mar 18, 2015 18:00 UTC (Wed)
by sorokin (guest, #88478)
[Link] (1 responses)
Absolutely.
> That said, problems 1-2 can be avoided whilst still using synchronous RPC if the thread making the outbound request does not have it's own event loop which is run during the request. One way to implement that would be to have the event loop dispatch (a subset of) events to a thread pool, though that is not fantastically efficient.
This is what we have implemented. DCOM supports asynchronous calls, but I don't remember why they we not used.
> For something like a logger, a fire-and-forget message should be adequate, as there's no point blocking yourself waiting for an acknowledgement which doesn't really tell you anything.
Agree. This is why I think CORBA-like oneway calls are sound.
> Any kind of synchronous non-local network IO in a UI thread is a non-starter. Even synchronous local network or disk IO is potentially problematic.
I was not an original author of the program. When I started working on it, it was already ridden with synchronous calls to other services. And this was sealed deep into program logic. Also sometimes it was difficult to track what call can be synchronous because the same interface could be implemented by local object or by remote one.
Posted Mar 18, 2015 18:11 UTC (Wed)
by Cyberax (✭ supporter ✭, #52523)
[Link]
Kernel prepatch 4.0-rc4
Kernel prepatch 4.0-rc4
AFAIR, it was supported first in WinXP and were never really popular.