Communications Using a Client - Server Model in an Online Auction System

12
1 Communications Using a Client - Server Model in an Online Auction System 法法法法 法法法法法法法法法法法法法法 法法 法法 00k0013 法法法法法法法法法法法法法

description

Communications Using a Client - Server Model in an Online Auction System. 法政大学情報科学部卒業研究. 法政大学・情報科学部コンピュータ科学科 坂口 恒児  00k0013. 1. 本研究の目的. インターネットの普及. Traditional Auction. Common internet Auction. Ex. Sotheby, Christie, etc. Ex. yahoo, bidders, etc. - PowerPoint PPT Presentation

Transcript of Communications Using a Client - Server Model in an Online Auction System

Page 1: Communications Using a Client - Server Model  in an Online Auction System

1

Communications Using a Client - Server Model

in an Online Auction System

法政大学・情報科学部コンピュータ科学科

坂口 恒児  00k0013

法政大学情報科学部卒業研究

Page 2: Communications Using a Client - Server Model  in an Online Auction System

2

1. 本研究の目的

Traditional Auction

Ex. Sotheby, Christie, etc..

Common internet Auction

Ex. yahoo, bidders, etc..

インターネットの普及

しかし、オークションの醍醐味であるその場で他人と競り合っている感覚を得る事が難しくなった。

利用者の負担も大きい。

チャットの様なインターフェイスとエージェントを利用した新しいオークションシステム

Page 3: Communications Using a Client - Server Model  in an Online Auction System

3

ユーザ認証

オークションルーム

< 入室の流れ >

2. システム アウトライン

TOPページ

Page 4: Communications Using a Client - Server Model  in an Online Auction System

4

3. サーバ・クライアント間

サーバ・クライアント間の通信には Servlet を利用

Servlet の仕組み

Servlet API

ユーザWEB

ブラウザ

WEB

サーバServlet

Servlet コンテナ

Page 5: Communications Using a Client - Server Model  in an Online Auction System

5

Servlet 利用によるメリット

・メモリ上に展開されてからはCGIに比べて高速。

・マルチスレッドで動作する事ができる。

・ JAVA のメリットをそのまま享受できる。

最も普及していると思われるCGIと比較して…

アーキテクチャ非依存 “ Write once, run anywhere”

将来的にオークションをパソコンからだけでなく、携帯等の端末への移植も比較的容易に検討する事ができるようになる。

Page 6: Communications Using a Client - Server Model  in an Online Auction System

6

3.1. ユーザ認証システム

login page databaseservlet

ユーザ情報 (ID,pass,etc…)

ID,password

参照( JDBC )

特定のページ

比較

アクセス許可

Page 7: Communications Using a Client - Server Model  in an Online Auction System

7

3.2. オークションルーム

ユーザ認証で作られたセッション情報はサーブレットに保持される。ユーザ認証で行ったセッション情報をそのまま引き継ぐ。データベースには発言内容や、入札履歴等を保存しておけるようにする。

現在の価格を表示可能にしたチャットルームの様なインターフェイス

その場にいる感覚を出したい。

Page 8: Communications Using a Client - Server Model  in an Online Auction System

8

4. 実装

Java: j2sdk1.4.1_03

Servlet: Tomcat4.1

Database: Mysql4.0

OS: windows2000/XP

実装環境

Page 9: Communications Using a Client - Server Model  in an Online Auction System

9

4.1. データベースとの連携

JDBC の利用

JDBC ドライバをロードしてデータベースへ接続する。

~Class.forName("org.gjt.mm.mysql.Driver");Connection db=DriverManager.getConnection("jdbc:mysql://localhost/auction");

~Statement objSql=db.createStatement();ResultSet rs=objSql.executeQuery("SELECT auth_role.uid, auth_role.role, auth_user.passwd FROM auth_role, auth_user WHERE auth_role.uid = auth_user.uid");

SQL 文の実行。

・ユーザ情報の追加 /削除 /更新

・会話システムにおける発言

Page 10: Communications Using a Client - Server Model  in an Online Auction System

10

4.2. ユーザ認証

・ユーザ認証におけるデータベース照合

Realm の利用

<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99" driverName="org.gjt.mm.mysql.Driver"connectionURL="jdbc:mysql://localhost/auction"connectionName="root" connectionPassword=""userTable="auth_user" userNameCol="uid" userCredCol="passwd" userRoleTable="auth_role" roleNameCol="role" />

<server.xml>

login pagedatabaseservlet

ユーザ情報 (ID,pass,etc…)

ID,password

参照( JDBC )

比較

Page 11: Communications Using a Client - Server Model  in an Online Auction System

11

4.3. セッションの管理

・ユーザ管理

・取引情報

・オークションルーム情報

session の利用

~HttpSession session=request.getSession();

~session.setAttribute("frmNam",request.getParameter("frmNam"));session.setAttribute("nam",request.getParameter("nam"));session.setAttribute("face",request.getParameter("face"));session.setAttribute("rTime",request.getParameter("rTime"));

セッションの開始と値のセット

Page 12: Communications Using a Client - Server Model  in an Online Auction System

12

5. まとめと展望

JAVA を用いたリアルタイムオークション

・既存のインターネットオークションシステムとは違う、新しいオークションシステムの提案と実装

・インターネットオークションシステムにおけるコミュニュケーションの研究

今後の展望・・・