| 1 |
apache |
1.2 |
#en
|
| 2 |
|
|
This specification defines an API that allows Web application authors to
|
| 3 |
|
|
spawn background workers running scripts in parallel to their main page.
|
| 4 |
|
|
This allows for thread-like operation with message-passing as the
|
| 5 |
|
|
coordination mechanism.
|
| 6 |
|
|
#ja
|
| 7 |
|
|
この仕様書は、 Web アプリケーションで主たる頁と並列に背景労働者スクリプトを動作させることを可能とする
|
| 8 |
|
|
API を定義します。
|
| 9 |
|
|
これによって、メッセージ・パッシングによるスレッド的操作を協調機構として利用できるようになります。
|
| 10 |
|
|
|
| 11 |
|
|
#en
|
| 12 |
|
|
The current focus is in developing a first draft proposal.
|
| 13 |
|
|
#ja
|
| 14 |
|
|
現在の焦点は、第1案の開発です。
|
| 15 |
|
|
|
| 16 |
|
|
#pattern
|
| 17 |
apache |
1.4 |
<span class=secno>* </span>Requirements
|
| 18 |
|
|
#ja
|
| 19 |
|
|
<span class=secno>$1 </span>要件
|
| 20 |
|
|
|
| 21 |
|
|
#en
|
| 22 |
|
|
This specification aims to address the following use cases and
|
| 23 |
|
|
requirements:
|
| 24 |
|
|
#ja
|
| 25 |
|
|
この仕様書は、次に示す利用事例と要件に取り組むことを目指します。
|
| 26 |
|
|
|
| 27 |
|
|
#en
|
| 28 |
|
|
Background workers: A Web application needs to keep its data
|
| 29 |
|
|
synchronised with the server, both sending updates to the server and
|
| 30 |
|
|
receiving updates from the server, including handling buffering of
|
| 31 |
|
|
updates for when the application goes offline. The code to do this would
|
| 32 |
|
|
ideally be independent of the UI code.
|
| 33 |
|
|
#ja
|
| 34 |
|
|
背景労働者: Web アプリケーションは、そのデータを鯖と同期しておく必要があります。
|
| 35 |
|
|
これは、鯖への更新の送信と鯖からの更新の両方を含み、
|
| 36 |
|
|
アプリケーションがオフラインとなった時の更新のバッファリングの取扱いも含みます。
|
| 37 |
|
|
そのための符号は利用者界面の符号とは独立しているのが理想でしょう。
|
| 38 |
|
|
|
| 39 |
|
|
#en
|
| 40 |
|
|
URLs: Workers should be spawned from URLs, not from strings, since
|
| 41 |
|
|
script rarely has access to its own source.
|
| 42 |
|
|
#ja
|
| 43 |
|
|
URL: 労働者は、文字列からではなく、 URL から生み出される[[SHOULD:べきです]]。
|
| 44 |
|
|
スクリプトはその出典へのアクセスを滅多に有しないからです。
|
| 45 |
|
|
|
| 46 |
|
|
#en
|
| 47 |
|
|
Message queuing: Messages sent to a worker before the worker has
|
| 48 |
|
|
initialised should not be lost.
|
| 49 |
|
|
#ja
|
| 50 |
|
|
メッセージ・キューイング: 労働者が初期化される前に送信されたメッセージが失われるべきでは[[SHOULD NOT:ありません]]。
|
| 51 |
|
|
|
| 52 |
|
|
#en
|
| 53 |
|
|
Workers should have access to timers.
|
| 54 |
|
|
#ja
|
| 55 |
|
|
労働者はタイマーへのアクセスを有する[[SHOULD:べきです]]。
|
| 56 |
|
|
|
| 57 |
|
|
#en
|
| 58 |
|
|
Workers should have access to the network.
|
| 59 |
|
|
#ja
|
| 60 |
|
|
労働者はネットワークへのアクセスを有する[[SHOULD:べきです]]。
|
| 61 |
|
|
|
| 62 |
|
|
#en
|
| 63 |
|
|
Workers should be able to use libraries.
|
| 64 |
|
|
#ja
|
| 65 |
|
|
労働者はライブラリを使える[[SHOULD:べきです]]。
|
| 66 |
|
|
|
| 67 |
|
|
#en
|
| 68 |
|
|
Implementations should not have to expose <code>Node</code> or
|
| 69 |
|
|
<code>Document</code> objects to workers.
|
| 70 |
|
|
#ja
|
| 71 |
|
|
実装は労働者に <code>Node</code> オブジェクトや
|
| 72 |
|
|
<code>Document</code> オブジェクトを晒さなければならない[[SHOULD NOT:べきではありません]]。
|
| 73 |
|
|
|
| 74 |
|
|
#en
|
| 75 |
|
|
Workers should not share anything with the outside world. The objects
|
| 76 |
|
|
representing the worker in the worker itself and in the context that
|
| 77 |
|
|
created the worker should be different, for instance.
|
| 78 |
|
|
#ja
|
| 79 |
|
|
労働者は外界と何も共有する[[SHOULD NOT:べきではありません]]。
|
| 80 |
|
|
例えば、労働者自体の中で労働者を現すオブジェクトと労働者を作成した文脈で労働者を表すオブジェクトは異なる[[SHOULD:べきです]]。
|
| 81 |
|
|
|
| 82 |
|
|
#en
|
| 83 |
|
|
Shared workers: Multiple instances of the same Web application would
|
| 84 |
|
|
want to keep just one connection back to the server.
|
| 85 |
|
|
#ja
|
| 86 |
|
|
共有労働者: 同じ Web アプリケーションの複数の実現値は鯖に対する接続を1つだけ維持したいでしょう。
|
| 87 |
|
|
|
| 88 |
|
|
#en
|
| 89 |
|
|
Capabilities granting: It should be possible for code running in one
|
| 90 |
|
|
iframe to negotiate a connection to another iframe, with that connection
|
| 91 |
|
|
granting certain rights (e.g. adding to an address book but not reading
|
| 92 |
|
|
from it).
|
| 93 |
|
|
#ja
|
| 94 |
|
|
能力保証: ある iframe で動作している符号が他の iframe と何らかの権限 (例えば、
|
| 95 |
|
|
住所録へは追加するが読まない) を保証する接続を折衝することが可能である[[SHOULD:べきです]]。
|
| 96 |
|
|
|
| 97 |
|
|
#en
|
| 98 |
|
|
Delegation: It should be possible for one worker to spawn another
|
| 99 |
|
|
worker and efficiently delagate a request to that worker, without the
|
| 100 |
|
|
caller being aware of the delagate and without the original worker having
|
| 101 |
|
|
to proxy all the messages.
|
| 102 |
|
|
#ja
|
| 103 |
|
|
委譲: ある労働者が別の労働者を生み出し、呼び出し元が委譲に気づかず、
|
| 104 |
|
|
かつ元の労働者がすべてのメッセージを仲介せずに、
|
| 105 |
|
|
当該労働者に対する要求を効率的に委譲できる[[SHOULD:べきです]]。
|