Am 28/08/2015 um 11:54 schrieb Ingo Weinhold:
But on second thought, and for the time being, since the port is
retrieved via the launch_daemon anyway, and the GetLaunchData()
reply will wait for the team to be launched now, it could now also
just return the actual port within the team.
Not sure I can follow you. I assume the print server would be
declared to be started "on demand". I can't find anything in your
blog post or the wiki page what that means exactly. I assume the
launch is triggered by some API call (GetLaunchData()? -- can't find
it)? In that case it is really irrelevant, as the application can
simply be started at that point. I suppose that's what you're
saying.
If the respective application is started by a simple procedure --
create its app port, call load_image(), transfer the port, resume
main thread -- messages can be sent to the port right after it has
been transferred, i.e. long before the application has *really* been
started. I would find trying to enable even earlier message sending
a rather unnecessary optimization.
If your idea of "on demand" launching is, that the application is
started when the first message is sent to it, then this obviously
cannot work with the current transfer by area mechanism (one could
start the application when a messenger targeting it is requested,
though).
And it also cannot work in cases where applications use find_port()
and get_port_info() to get the target team ID.
In both situations actually creating the (minimal/placeholder) team
up front is indeed the only option. I wonder however for what servers
this actually applies and if they aren't started on boot anyway.
Also, another idea was to keep the team available even if itNeither in case of Tracker nor the authentication manager this seems
crashed; ie. the team could be relaunched, and no messages would
have been lost in the mean time -- at least for some things this
would make a difference without further effort (like Tracker, the
authentication manager, ...).
to be particularly useful to me.
It might even be detrimental, if
(e.g. application internal) messages depend on the application
state, which may not be the same after restarting.