mirror of
https://github.com/mii443/mozc.git
synced 2025-08-28 19:09:24 +00:00
This CL renames doc to docs/ on GitHub, just in case in future we want to expose web pages on GitHub Pages [1]. [1]: https://github.com/blog/2228-simpler-github-pages-publishing BUG= TEST= REF_BUG= REF_CL=130706872 REF_TIME=2016-08-18T18:22:05-07:00 REF_TIME_RAW=1471569725 -0700
35 lines
1.4 KiB
Markdown
35 lines
1.4 KiB
Markdown
# Mozc IPC
|
|
|
|
## Abstract
|
|
|
|
This document describes why IPC is necessary to run Mozc, and how each
|
|
implementation should be.
|
|
|
|
## Background
|
|
|
|
Mozc is an input method product and it consits with multiple processes
|
|
to achieve text input. We have "converter" process to maintain
|
|
conversions and "renderer" process to render the candidates of input.
|
|
|
|
## Implementation requirements
|
|
|
|
Mozc IPC call happens for EVERY key events. Thus we need to care the
|
|
privacy/security. Currently we adopt following policy:
|
|
|
|
* the IPC name has to be private to the user: processes which run with another user's auth must not access to the IPC.
|
|
* the IPC name has to be safe to squatters. For example, using random IPC name will reduce the danger of squatters.
|
|
|
|
In addition, Mozc IPC call is "one-shot". It doesn't require any
|
|
"connections". When a key event arrives to Mozc, it creates an
|
|
IPCClient instance, calls Call() method to send the command to the
|
|
server, gets its response, and then destroy IPCClient object.
|
|
|
|
So you don't need to care the maintenance of connections, but you need
|
|
to care the performance a bit. If one of a step during this is very
|
|
slow, it will damage the performance of Mozc.
|
|
|
|
Note that IPC calls happen only when a user presses a key or clicks
|
|
mouses. So if performance of an implementation is not the best, it
|
|
might not be a problem. Please think about the balance of
|
|
implementation and security.
|