Mercurial > hg > Papers > 2021 > riono-sigos
annotate Paper/riono-sigos.tex @ 9:c5abec609e35
add StartHelloWorld
author | riono <e165729@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 04 May 2021 15:46:58 +0900 |
parents | 48c1f1d9fc65 |
children | 78129eaf8770 |
rev | line source |
---|---|
5 | 1 %% |
2 %% 研究報告用スイッチ | |
3 %% [techrep] | |
4 %% | |
5 %% 欧文表記無しのスイッチ(etitle,eabstractは任意) | |
6 %% [noauthor] | |
7 %% | |
8 | |
9 %\documentclass[submit,techrep]{ipsj} | |
10 \documentclass[submit,techrep,noauthor]{ipsj} | |
11 | |
12 | |
13 | |
14 \usepackage[dvips]{graphicx} | |
15 \usepackage{latexsym} | |
16 \usepackage{url} | |
17 \usepackage{listings} | |
18 \usepackage{caption} | |
19 | |
20 \def\Underline{\setbox0\hbox\bgroup\let\\\endUnderline} | |
21 \def\endUnderline{\vphantom{y}\egroup\smash{\underline{\box0}}\\} | |
22 \def\|{\verb|} | |
23 % | |
24 | |
25 %\setcounter{巻数}{59}%vol59=2018 | |
26 %\setcounter{号数}{10} | |
27 %\setcounter{page}{1} | |
28 | |
8
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
29 \lstset{ |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
30 language=java, |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
31 tabsize=2, |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
32 numbers=left, |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
33 frame=single, |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
34 basicstyle={\ttfamily\footnotesize}, % |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
35 identifierstyle={\footnotesize}, % |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
36 commentstyle={\footnotesize\itshape}, % |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
37 keywordstyle={\footnotesize\bfseries}, % |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
38 ndkeywordstyle={\footnotesize}, % |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
39 stringstyle={\footnotesize\ttfamily}, |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
40 breaklines=true, |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
41 captionpos=t, |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
42 columns=[l]{fullflexible}, % |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
43 xrightmargin=0zw, % |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
44 xleftmargin=1zw, % |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
45 aboveskip=1zw, |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
46 numberstyle={\scriptsize}, % |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
47 stepnumber=1, |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
48 numbersep=0.5zw, % |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
49 lineskip=-0.5ex, |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
50 } |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
51 |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
52 \renewcommand{\lstlistingname}{Code} |
5 | 53 |
54 \begin{document} | |
55 | |
56 | |
57 \title{継続を使用する並列分散フレームワークのUnity実装} | |
58 | |
59 %\etitle{How to Prepare Your Paper for IPSJ SIG Technical Report \\ (version 2018/10/29)} | |
60 | |
61 | |
62 \affiliate{KIE}{琉球大学大学院理工学研究科情報工学専攻} | |
63 \affiliate{IE}{琉球大学工学部工学科知能情報コース} | |
64 | |
65 \author{安田 亮}{Ryo Yasuda}{KIE}[riono210@cr.ie.u-ryukyu.ac.jp] | |
66 \author{河野 真治}{Shinji Kono}{IE}[kono@ie.u-ryukyu.ac.jp] | |
67 | |
68 \begin{abstract} | |
69 FPSやMMORPGなどのゲームにおける通信方式には、クライアントサーバ方式とp2p方式の2つが考えられる。しかし、クライアントの負荷軽減やチート対策などを理由にクライアントサーバ方式が主流である。データの同期にはサーバを経由するため低速である。 | |
70 そこで本研究室で開発している分散フレームワークChristieを用いることで、高速かつ、安全に、データの同期を行いたいと考えた。 | |
71 本研究ではChrisiteをゲームエンジンUnityに対応するため、C\#への書き換えを行う。 | |
72 \end{abstract} | |
73 | |
74 | |
75 % | |
76 %\begin{jkeyword} | |
77 %情報処理学会論文誌ジャーナル,\LaTeX,スタイルファイル,べからず集 | |
78 %\end{jkeyword} | |
79 % | |
80 %\begin{eabstract} | |
81 %This document is a guide to prepare a draft for submitting to IPSJ | |
82 %Journal, and the final camera-ready manuscript of a paper to appear in | |
83 %IPSJ Journal, using {\LaTeX} and special style files. Since this | |
84 %document itself is produced with the style files, it will help you to | |
85 %refer its source file which is distributed with the style files. | |
86 %\end{eabstract} | |
87 % | |
88 %\begin{ekeyword} | |
89 %IPSJ Journal, \LaTeX, style files, ``Dos and Dont's'' list | |
90 %\end{ekeyword} | |
91 | |
92 \maketitle | |
93 | |
94 | |
95 \section{オンラインゲームにおけるデータ通信} | |
96 | |
97 \section{Christieの基礎概念} | |
7 | 98 Chrisiteは当研究室で開発している分散通信フレームワークである。同じく当研究室で開発している GearsOSのファイルシステムに組み込まれる予定があるため、GearsOSを構成する言語 Continuation based Cと似た概念を持っている。 Chrisiteに存在する概念として以下のようなものがある。 |
99 | |
100 \begin{itemize} %箇条書き | |
101 \item CodeGear | |
102 \item DataGear | |
103 \item CodeGearManager | |
104 \item DataGearManager | |
105 \end{itemize} | |
106 | |
107 以下はjava版のChrisiteについて解説を行う。 | |
108 CodeGearはクラスやスレッドに相当する。 | |
8
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
109 DataGearは変数データに相当し、CodeGear内でannotationを用いて変数データを取得する。CodeGear内に記述した全てのDataGearの中にデータが格納された際に、初めてそのCodeGearが実行されるという仕組みになっている。 |
7 | 110 CodeGearManagerはノードであり、CodeGear、DataGear、DataGearManagerを管理する。 |
111 DataGearManagerはDataGearを管理するものであり、putという操作により変数データ、つまりDataGearを格納できる。DataGearManagerのput操作を行う際にはLocalとRemoteのどちらかを選び、変数のkeyとデータを引数として渡す。 | |
112 Localであれば、LocalのCodeGearManagerが管理しているDataGearManagerに対しDataGearを格納していく。Remoteであれば、接続したRemote先のCodeGearManagerが管理しているDataGearManagerにDataGearを格納できる。 | |
8
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
113 put操作を行った後は、対象のDataGearManagerの中にqueueとして保管される。DataGearを取り出す際には、CodeGearm内で宣言した変数データにannotationをつける。DataGearのannotationにはTake、Peek、TakeFrom、PeekFromの4つがある。 |
7 | 114 |
115 | |
8
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
116 \begin{description} |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
117 \item[Take] 先頭のDataGear を読み込み、そのDataGear を削除する。DataGearが複数ある場合、この動作を用いる |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
118 \item[Peek] 先頭のDataGear を読み込むが、DataGear が削除されない。そのため、特に操作をしない場合は同じデータを参照し続ける。 |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
119 \item[TakeFrom (Remote DGM name)] Take と似ているが、Remote DGM nameを指定することで、その接続先(Remote) のDataGearManager からTake 操作を行える。 |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
120 \item[PeekFrom (Remote DGM name)] Peek と似ているが、Remote DGM name を指定することで、その接続先(Remote) のDataGearManager からPeek 操作を行える。 |
9 | 121 \end{description} |
8
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
122 |
9 | 123 \section{プログラムの例} |
124 Code \ref{code:javaSHW} はChrisite の機能を使用してhello world を出力する例題である。 | |
125 | |
126 | |
127 | |
128 \lstinputlisting[caption=StartHelloWorld, label=code:javaSHW]{src/StartHelloWorld.java} | |
129 | |
5 | 130 |
131 \section{Unity} | |
132 | |
8
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
133 \section{annotation の書き換え} |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
134 java 版ではDataGear を取得する際に、annotation という java の機能を用いて行った。C\#には annotation はなく、代わりにattribute を利用して DataGear の取得を行っている。 |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
135 以下のCode \ref{code:javaTake}、Code \ref{code:csTake}はjava とC\# におけるTakeの実装である。 |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
136 |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
137 \lstinputlisting[caption=java における Take annotation, label=code:javaTake]{src/Take.java} |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
138 |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
139 \lstinputlisting[caption=C\# における Take attribute, label=code:csTake]{src/Take.cs} |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
140 |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
141 java でannotation を自作する際には、 @interfacs で宣言する。また、Code \ref{code:javaTake} の8行目ではannotation情報をどの段階まで保持するかを指定しており、Take の場合 JVMによって保存され、ランタイム環境で使用できる。9行目ではannotationの適用可能箇所を指定しており、フィールド変数に対して適応可能となっている。 |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
142 |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
143 C\# でattribute を作成する際には、 System.Attributeを継承する必要がある。attribute の適用可能箇所については、Code \ref{code:csTake} の4行目でフィールド変数を指定している。 |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
144 |
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
145 \section{MessagePackの相違点} |
9 | 146 Christie ではデータを送信する際に、MessagePack を使用してデータを圧縮し、送信している。 |
147 | |
148 | |
149 | |
150 \section{C\#への書き換え後のプログラムの例} | |
151 | |
152 \section{Unityでの動作} | |
8
48c1f1d9fc65
add src and update chapter attribute vs annotation
riono <e165729@ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
153 |
5 | 154 |
155 \section{チート対策について} | |
156 | |
9 | 157 \section{実装の現状} |
5 | 158 |
159 | |
160 \nocite{*} | |
161 \bibliographystyle{ipsjunsrt} | |
162 \bibliography{riono-sigos} | |
163 | |
164 | |
165 | |
166 \end{document} |