JP4394725B2 - Embedded device, request distribution method, and request distribution program - Google Patents

Embedded device, request distribution method, and request distribution program Download PDF

Info

Publication number
JP4394725B2
JP4394725B2 JP2008005971A JP2008005971A JP4394725B2 JP 4394725 B2 JP4394725 B2 JP 4394725B2 JP 2008005971 A JP2008005971 A JP 2008005971A JP 2008005971 A JP2008005971 A JP 2008005971A JP 4394725 B2 JP4394725 B2 JP 4394725B2
Authority
JP
Japan
Prior art keywords
request
url
web
web page
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2008005971A
Other languages
Japanese (ja)
Other versions
JP2008176789A (en
Inventor
竜平 出野
学 中村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2008005971A priority Critical patent/JP4394725B2/en
Publication of JP2008176789A publication Critical patent/JP2008176789A/en
Application granted granted Critical
Publication of JP4394725B2 publication Critical patent/JP4394725B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Facsimiles In General (AREA)
  • Information Transfer Between Computers (AREA)

Description

本発明はWWWサーバ機能を有する画像形成装置等の組み込み機器、HTTPリクエスト振り分け方法、HTTPリクエスト振り分けプログラム、および、Webシステムに関する。   The present invention relates to an embedded device such as an image forming apparatus having a WWW server function, an HTTP request distribution method, an HTTP request distribution program, and a Web system.

一般のWWWサーバではWebページはファイルで実現されており、URLの管理はファイル単位で行われる。CGIに関しても同様にファイル単位で管理されており、動的な値はファイルにパラメータを渡すことによって処理される。   In a general WWW server, a Web page is realized by a file, and URL management is performed in file units. Similarly, CGI is managed in file units, and dynamic values are processed by passing parameters to the file.

しかし、画像形成装置等の組み込み機器(PC、サーバ等の情報処理装置以外にOS、アプリケーションを組み込んだ機器)上で動作するWWWサーバにあっては、リソースの節約を目的に、Webページをファイルとしてではなく処理関数として実現しているのが一般的である。そのため、HTTPクライアント(ブラウザ)から送られてくるHTTPリクエストに含まれるURLと処理関数とをサーバプログラム内で対応付けて管理する必要がある。   However, in the case of a WWW server operating on an embedded device such as an image forming device (a device in which an OS or an application is installed in addition to an information processing device such as a PC or server), a Web page is filed to save resources. It is generally implemented as a processing function rather than as Therefore, it is necessary to manage the URL and the processing function included in the HTTP request sent from the HTTP client (browser) in association with each other in the server program.

一方、組み込み機器上にWWWサーバを実現したものとして、外部のパーソナルコンピュータ等からブラウザを介して指示を与えることによりファクシミリ送信機能を動作させることが可能なファクシミリ装置が開示されている(例えば、特許文献1参照。)。
特開平10−173890号公報
On the other hand, a facsimile apparatus capable of operating a facsimile transmission function by giving an instruction from an external personal computer or the like via a browser as an implementation of a WWW server on an embedded device is disclosed (for example, a patent) Reference 1).
Japanese Patent Laid-Open No. 10-173890

上述したように、画像形成装置等の組み込み機器上で動作するWWWサーバにあっては、サーバプログラム内でURLと処理関数とを対応付けて管理する必要があったため、WWWサーバで全ての対応付けを管理するとなるとWWWサーバに与える負担が大きくなり、パフォーマンスが低下するという問題がある。   As described above, in a WWW server operating on an embedded device such as an image forming apparatus, it is necessary to manage URLs and processing functions in association with each other in the server program. However, there is a problem that the burden on the WWW server increases and the performance decreases.

一方、一般のWWWサーバのようにURLがファイル単位で管理されている場合は、URLだけがWebページを決定する際の判断基準となる。しかし、画像形成装置等の組み込み機器上で動作するWWWサーバにあっては、最終的に処理関数によってWebページの表示処理が行われるため、URL以外の情報に基づいて多様な制御を行える余地がある。例えば、HTTPS(SSLをベースとしてセキュリティ機能を付加したHTTP)での要求時はWebページを表示するがHTTPでの要求時は表示しないといった、URL以外の情報に基づいてWebページのアクセス制限を設けることが想定される。しかしながら、これらを行うためのメカニズムは考え出されていなかった。   On the other hand, when a URL is managed in file units as in a general WWW server, only the URL is a criterion for determining a Web page. However, in a WWW server that operates on an embedded device such as an image forming apparatus, Web page display processing is finally performed by a processing function, so there is room for various controls based on information other than the URL. is there. For example, Web page access restrictions are set based on information other than URL, such as displaying a Web page when requesting with HTTPS (HTTP with security function added based on SSL) but not displaying when requesting with HTTP. It is assumed that However, no mechanism has been devised for doing this.

なお、上述した特許文献1においては、これらの課題および解決手法についての記載はない。   In Patent Document 1 described above, there is no description about these problems and solution techniques.

本発明は上記の従来の問題点に鑑み提案されたものであり、その目的とするところは、URLと処理関数との対応付けによるサーバプログラムへの負担を減少させてパフォーマンスの低下を防止することにある。併せて、URL以外の情報に基づいて多様な制御を行えるようにすることも目的としている。   The present invention has been proposed in view of the above-mentioned conventional problems, and the object of the present invention is to reduce the burden on the server program by associating URLs with processing functions to prevent performance degradation. It is in. In addition, another object is to enable various controls based on information other than the URL.

上記の課題を解決するため、本発明は、請求項1に記載されるように、Webページを提供するWWWサーバ機能を有する組み込み機器であって、URLに対応するWebページを返す処理関数とURLに対応するWebページが不在であるときにページ不在応答を返すnotFoundハンドラとを有するWebアプリケーションと、クライアントからネットワークを介しリクエストを受信し、受信した当該リクエストにポート識別子を付与し、当該リクエストにおいて要求されるURLのアプリケーションパスの記述に対応する前記Webアプリケーションを呼び出すHTTPデーモンとを有し、前記Webアプリケーションは、前記リクエストにおいて要求されるURLに対応するWebページが存在するか否かにかかわらず前記ポート識別子の下で利用可能でない場合には前記notFoundハンドラを実行させ、前記リクエストにおいて要求されるURLに対応するWebページが存在し、かつ前記ポート識別子の下で利用可能である場合には対応する前記処理関数を実行させ、前記HTTPデーモンを介し前記クライアントに実行結果を返信するようにしている。
In order to solve the above-described problem, the present invention is an embedded device having a WWW server function for providing a Web page, and a processing function for returning a Web page corresponding to a URL . A web application having a notFound handler that returns a page absence response when the web page corresponding to the URL is absent, and a request is received from the client via the network, and a port identifier is assigned to the received request. An HTTP daemon that calls the Web application corresponding to the description of the application path of the requested URL, the Web application regardless of whether there is a Web page corresponding to the URL requested in the request Said po If not available under the port identifier, the notFound handler is executed, and if there is a Web page corresponding to the URL requested in the request and available under the port identifier The processing function is executed, and the execution result is returned to the client via the HTTP daemon.

また、請求項2に記載されるように、請求項1に記載の組み込み機器において、前記Webアプリケーションは複数設けられ、前記HTTPデーモンは、前記リクエストに基づいて前記Webアプリケーションのいずれかに処理を振り分けるようにすることができる。Further, as described in claim 2, in the embedded device according to claim 1, a plurality of the Web applications are provided, and the HTTP daemon distributes the process to any of the Web applications based on the request. Can be.

また、請求項に記載されるように、リクエスト振り分け方法として構成することができる。
Further, as described in claim 3 , it can be configured as a request distribution method.

また、請求項に記載されるように、リクエスト振り分けプログラムとして構成することができる。 Further, as described in claim 4 , it can be configured as a request distribution program.

本発明によれば、URLと処理関数との対応付けによるサーバプログラムへの負担を減少させてパフォーマンスの低下を防止することができると共に、URL以外の情報に基づいて多様な制御を行うことができる。   According to the present invention, it is possible to reduce the load on the server program by associating the URL with the processing function to prevent performance degradation, and to perform various controls based on information other than the URL. .

以下、本発明の実施の形態を図面に基づいて説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、組み込み機器としてプリンタ、コピー、ファクシミリ、スキャナ等の各装置の機能を一つの筐体内に収納した複合機あるいは融合機と呼ばれる画像形成装置を用いて構成した、本発明の一実施形態にかかる画像処理システムの構成例を示す図である。   FIG. 1 shows an embodiment of the present invention configured by using an image forming apparatus called a multifunction peripheral or a multifunction peripheral in which functions of apparatuses such as a printer, a copy machine, a facsimile machine, and a scanner are housed in a single housing as an embedded device. It is a figure which shows the structural example of the image processing system concerning.

図1において、画像処理システムは、画像形成装置1に対し、複数のHTTPクライアント9等がLAN(Local Area Network)、イントラネット、又はインターネット等のネットワーク10を介して接続されている。   In FIG. 1, in the image processing system, a plurality of HTTP clients 9 and the like are connected to an image forming apparatus 1 via a network 10 such as a LAN (Local Area Network), an intranet, or the Internet.

画像形成装置1は、HTTPクライアント9からの要求に応じて文書データの印刷や、ファックス送信などの処理を実行する。また、画像形成装置1は、HTTPクライアント9からのHTTPリクエストに応じて、当該HTTPリクエストにおいて要求された情報を表示するWebページをHTTPクライアント9に対して送信する。例えば、HTTPクライアント9のユーザがWebブラウザから画像形成装置1のステータス情報を要求した場合は、画像形成装置1は、ステータス情報を格納したHTML(HyperText Markup Language)データをHTTPクライアント9に送信する。なお、HTTPクライアント9は、ユーザが直接利用するPC(Personal Computer)、PDA(Personal Digital(Data) Assistants)、または携帯電話等の端末であり、画像形成装置1から送信されるWebページを表示するWebブラウザを備えている。   The image forming apparatus 1 executes processing such as printing of document data and fax transmission in response to a request from the HTTP client 9. Further, in response to the HTTP request from the HTTP client 9, the image forming apparatus 1 transmits a Web page that displays information requested in the HTTP request to the HTTP client 9. For example, when the user of the HTTP client 9 requests status information of the image forming apparatus 1 from the Web browser, the image forming apparatus 1 transmits HTML (HyperText Markup Language) data storing the status information to the HTTP client 9. The HTTP client 9 is a terminal such as a PC (Personal Computer), a PDA (Personal Digital (Data) Assistants), or a mobile phone that is directly used by the user, and displays a Web page transmitted from the image forming apparatus 1. A web browser is provided.

図2は、本発明の一実施形態にかかる画像形成装置の機能構成図である。   FIG. 2 is a functional configuration diagram of the image forming apparatus according to the embodiment of the present invention.

図2において、画像形成装置1は、アプリケーション層2とプラットフォーム層4とエンジン部8とを含む。インタフェース3はアプリケーション層2に対するプラットフォーム層4の提供するインタフェース(API)であり、インタフェース7はプラットフォーム層4とエンジン部8との間のインタフェース(エンジンI/F)である。   In FIG. 2, the image forming apparatus 1 includes an application layer 2, a platform layer 4, and an engine unit 8. The interface 3 is an interface (API) provided by the platform layer 4 to the application layer 2, and the interface 7 is an interface (engine I / F) between the platform layer 4 and the engine unit 8.

アプリケーション層2は画像形成装置1における個別の処理を行うソフトウェア群であり、コピー用のアプリケーションであるコピーアプリケーション2aと、ファックス用のアプリケーションであるファックスアプリケーション2bと、プリンタ用のアプリケーションであるプリンタアプリケーション2cと、ネットワークを介してファイルのやりとりを行うネットファイル用のアプリケーションであるネットファイルアプリケーション2dとを含む。また、Webアプリケーション20はHTTPプロトコルによるWebサービスを行うアプリケーション群であり、ブラウザを使って機器の状態を見たり、機器のネットワーク設定等をすることができるWebアプリケーション(websys)20aと、ネットファイルアプリケーション2dの機能を使い、ブラウザを使って文書の引き取りおよび文書管理を行うWebアプリケーション(webdocbox)20bと、プリンタのジョブ履歴(スプールの状態)等を表示するWebアプリケーション(GPS−web)20cと、ファックスの初期設定やファックスの通信管理レポート(通信履歴)を表形式で見ることのできるWebアプリケーション(Fax−web)20dとを含む。   The application layer 2 is a software group that performs individual processing in the image forming apparatus 1, and includes a copy application 2a that is a copy application, a fax application 2b that is a fax application, and a printer application 2c that is a printer application. And a net file application 2d, which is a net file application for exchanging files via the network. The web application 20 is a group of applications that perform web services based on the HTTP protocol. The web application 20 can be used to view the state of the device using the browser and to set the device network, and the net file application. Web application (webdocbox) 20b that uses 2d functions to retrieve and manage documents using a browser, web application (GPS-web) 20c that displays printer job history (spool status), and fax And a web application (Fax-web) 20d that can view a fax communication management report (communication history) in a tabular format.

一方、プラットフォーム層4はアプリケーション層2のアプリケーションに対してインタフェース3を介して共通的なサービス機能を提供するソフトウェア群であり、サービス層5とOS層6に分かれる。サービス層5には、アプリケーション管理、操作部制御、システム画面表示、LED表示、リソース管理、および割り込み制御等の複数の機能を有するSCS5aと、ファックス機能のAPIを提供するFCS5bと、エンジン部の制御を行うECS5cと、メモリ制御を行うMCS5dと、オペレータ(操作者)とのインタフェースとなる操作部(オペレーションパネル)の制御を行うOCS5eと、ネットワーク入出力を必要とするアプリケーションに対して共通に利用できるサービスを提供するNCS5fとが含まれる。OS層6にはOS(LPUX)61が含まれる。   On the other hand, the platform layer 4 is a software group that provides a common service function to the application of the application layer 2 via the interface 3, and is divided into a service layer 5 and an OS layer 6. The service layer 5 includes an SCS 5a having a plurality of functions such as application management, operation unit control, system screen display, LED display, resource management, and interrupt control, an FCS 5b that provides an API for a fax function, and engine unit control Can be used in common for applications that require network I / O, ECS 5c for performing memory control, MCS 5d for performing memory control, OCS 5e for controlling an operation unit (operation panel) serving as an interface with an operator (operator) NCS 5f providing the service is included. The OS layer 6 includes an OS (LPUX) 61.

一方、エンジン部8には、プロッタ81、スキャナ82、その他ハードウェアリソース83等のエンジンと、これらのエンジンを制御するエンジン制御ボード84とが含まれる。   On the other hand, the engine unit 8 includes engines such as a plotter 81, a scanner 82, and other hardware resources 83, and an engine control board 84 that controls these engines.

図3は図2に示す画像形成装置のハードウェア構成を示すブロック図である。   FIG. 3 is a block diagram showing a hardware configuration of the image forming apparatus shown in FIG.

図3において、画像形成装置1は、画像形成装置における主たる制御動作を行うコントローラ101にオペレーションパネル113とファックスコントロールユニット114とプロッタ81とスキャナ82とその他ハードウェアリソース83とが接続されて構成されている。   In FIG. 3, the image forming apparatus 1 is configured by connecting an operation panel 113, a fax control unit 114, a plotter 81, a scanner 82, and other hardware resources 83 to a controller 101 that performs a main control operation in the image forming apparatus. Yes.

コントローラ101は、画像処理用途向けのICであるASIC102にブリッジとしてのNB105を介して一般制御用のICであるCPU106が接続され、NB105のバス(PCI BUS)に、周辺デバイス等との接続を行うブリッジであるSB108と、ネットワーク通信を制御するNIC109と、USBインタフェースを提供するUSB110と、IEEE1394インタフェースを提供するIEEE1394111と、セントロニクスインタフェースを提供するセントロニクス112とが接続され、ASIC102に記憶装置としてのMEM−C103とHDD104が接続され、NB105に記憶装置としてのMEM−P107が接続されて構成されている。   In the controller 101, a CPU 106, which is a general control IC, is connected to an ASIC 102, which is an IC for image processing applications, via an NB 105 as a bridge, and a peripheral device or the like is connected to the bus (PCI BUS) of the NB 105. The SB 108 serving as a bridge, the NIC 109 that controls network communication, the USB 110 that provides a USB interface, the IEEE 1394 111 that provides an IEEE 1394 interface, and the Centronics 112 that provides a Centronics interface are connected to the ASIC 102 as a memory device MEM- The C 103 and the HDD 104 are connected, and the NB 105 is configured by connecting a MEM-P 107 as a storage device.

図4はWebアプリケーションのモジュール構成図を示したものである。   FIG. 4 shows a module configuration diagram of the Web application.

図4において、Webアプリケーション21は、ブラウザ等のHTTPクライアント9からネットワーク10を介して受け付けたHTTPリクエストの振り分けおよびWebアプリケーションでの処理結果(HTML,XML,TEXT)の返送を行うHTTPデーモン51(図2のNCS5fの機能の一部)に接続されており、内部には、各種の共通機能を提供するWebアプリケーション開発用のフレームワークであるWebアプリライブラリ22およびWebページライブラリ23と、Webページの操作を行うWebページハンドラ24と、Webページの表示に関する具体的処理を行うWebページファンクション25とを含んでいる。ここで、Webページハンドラ24およびWebページファンクション25はWebページを実現する処理関数を構成するものである。また、Webページファンクション25は処理の実行に際し、インタフェース3を介してSCS5a、NCS5f、UCS5g等と通信を行うようになっている。   In FIG. 4, a Web application 21 distributes HTTP requests received from an HTTP client 9 such as a browser via the network 10 and returns processing results (HTML, XML, TEXT) in the Web application (FIG. 4). 2 of the NCS5f), and inside the Web application library 22 and the Web page library 23, which are Web application development frameworks that provide various common functions, and the operation of the Web page A web page handler 24 that performs the above and a web page function 25 that performs specific processing related to the display of the web page. Here, the web page handler 24 and the web page function 25 constitute a processing function for realizing a web page. Further, the Web page function 25 communicates with the SCS 5a, NCS 5f, UCS 5g, etc. via the interface 3 when executing the processing.

図5はHTTPデーモンおよびWebアプリケーションにおける処理の振り分けにかかる機能構成図を示したものである。   FIG. 5 is a functional configuration diagram relating to the distribution of processing in the HTTP daemon and the Web application.

図5において、HTTPデーモン51には、HTTPクライアント9から与えられるHTTPリクエストに含まれるアプリケーションパスに基づいて対応するWebアプリケーションに処理を振り分けると共に、利用するサービス(HTTP,HTTPS,・・)を示すポート識別子を生成するリクエスト処理部52が設けられている。ここで、「アプリケーションパス」とは、図6に示すように、HTTPリクエストを例えば「http://xxx.xxx.xxx.xxx/web/user/ja/websys/webArch/mainFrame.cgi」とした場合、ホスト「xxx.xxx.xxx.xxx」に続く1階層分の「web」部分を意味するものとする。また、後述する「URLパス」はアプリケーションパスを含む「web/user/ja/websys/webArch/mainFrame.cgi」部分を意味するものとする。   In FIG. 5, the HTTP daemon 51 distributes the processing to the corresponding Web application based on the application path included in the HTTP request given from the HTTP client 9 and also indicates a service (HTTP, HTTPS,...) To be used. A request processing unit 52 for generating an identifier is provided. Here, as shown in FIG. 6, the “application path” is an HTTP request, for example, “http://xxx.xxx.xxx.xxx/web/user/ja/websys/webArch/mainFrame.cgi”. In this case, it means the “web” portion for one layer following the host “xxx.xxx.xxx.xxx”. Further, “URL path” described later means a “web / user / ja / websys / webArch / mainFrame.cgi” portion including an application path.

一方、Webアプリケーション21のWebアプリライブラリ22には、HTTPクライアント9から与えられるHTTPリクエストのメソッド(GET,POST,・・)に応じて処理を振り分けるメソッドディストリビュータ221と、HTTPデーモン51により生成されたポート識別子に基づき、利用するサービス(HTTP,HTTPS,・・)に応じて処理を振り分けるサービスディストリビュータ222と、HTTPリクエストのURLパスに応じて処理を振り分けるURLディストリビュータ223とが設けられている。   On the other hand, the web application library 22 of the web application 21 includes a method distributor 221 that distributes processing according to HTTP request methods (GET, POST,...) Given from the HTTP client 9, and a port generated by the HTTP daemon 51. Based on the identifier, a service distributor 222 that distributes processing according to the service (HTTP, HTTPS,...) To be used and a URL distributor 223 that distributes processing according to the URL path of the HTTP request are provided.

また、メソッドディストリビュータ221、サービスディストリビュータ222、URLディストリビュータ223等に対して初期化処理(テーブル作成等)を行う初期化関数26が設けられている。その他は図4に示したものと同様である。また、他のWebアプリケーションについても同様な構成となっている。   In addition, an initialization function 26 for performing initialization processing (table creation or the like) for the method distributor 221, the service distributor 222, the URL distributor 223, and the like is provided. Others are the same as those shown in FIG. The other web applications have the same configuration.

図7は図5におけるWebアプリケーションの詳細を示す機能構成図である。   FIG. 7 is a functional configuration diagram showing details of the Web application in FIG.

図7において、Webアプリライブラリ22のメソッドディストリビュータ221には、HTTPリクエストのメソッドと振り分けるサービスディストリビュータとを対応付けたメソッドテーブルT1が設けられている。また、サービスディストリビュータ222には、利用するサービスと振り分けるURLディストリビュータとを対応付けたサービステーブルT2が設けられている。サービス毎に設けられた他のサービスディストリビュータについても同様である。更に、URLディストリビュータ223には、URLパスと振り分けるWebページハンドラ24とを対応付けたURLテーブルT3が設けられている。サービスおよびURLパス毎に設けられた他のURLディストリビュータについても同様である。   In FIG. 7, the method distributor 221 of the Web application library 22 is provided with a method table T1 in which an HTTP request method is associated with a distribution service distributor. In addition, the service distributor 222 is provided with a service table T2 in which a service to be used and a URL distributor to be distributed are associated with each other. The same applies to other service distributors provided for each service. Further, the URL distributor 223 is provided with a URL table T3 in which the URL path is associated with the Web page handler 24 that distributes the URL path. The same applies to other URL distributors provided for each service and URL path.

一方、該当するページが存在しない旨(notFound)の表示情報を返送するためのnotFoundハンドラ224が設けられている。その他は図5に示したものと同様である。   On the other hand, a notFound handler 224 is provided for returning display information indicating that the corresponding page does not exist (notFound). Others are the same as those shown in FIG.

図8はHTTPデーモンにおけるポート識別子の取得にかかる機能構成図を示したものである。   FIG. 8 shows a functional block diagram for obtaining a port identifier in the HTTP daemon.

図8において、HTTPデーモン51には、アプリIDとアプリケーションパスとを対応付けたアプリID/アプリケーションパス対応テーブル53と、アプリIDとポート識別子とを対応付けたアプリID/ポート識別子対応テーブル54とが設けられ、リクエスト処理部52はポート識別子とポート番号とを対応付けたポート識別子/ポート番号対応テーブルT0からポート識別子を得ると共に、アプリID/アプリケーションパス対応テーブル53およびアプリID/ポート識別子対応テーブル54から得たポート識別子と照合が行えるようになっている。そして、リクエスト処理部52は取得(生成)したポート識別子をHTTPリクエストに付与して振り分け対象のWebアプリケーションに渡すようになっている。   In FIG. 8, the HTTP daemon 51 includes an application ID / application path correspondence table 53 that associates application IDs with application paths, and an application ID / port identifier correspondence table 54 that associates application IDs with port identifiers. The request processing unit 52 obtains a port identifier from a port identifier / port number correspondence table T0 in which a port identifier and a port number are associated with each other, and also includes an application ID / application path correspondence table 53 and an application ID / port identifier correspondence table 54. The port identifier obtained from can be verified. The request processing unit 52 assigns the acquired (generated) port identifier to the HTTP request and passes it to the Web application to be distributed.

次に、上記の実施形態の動作について説明する。   Next, the operation of the above embodiment will be described.

図9はHTTPデーモンおよびWebアプリケーションにおける処理の振り分けの動作を示すフローチャートであり、図10は図9に対応するシーケンス図である。   FIG. 9 is a flowchart showing an operation of distributing processes in the HTTP daemon and the Web application, and FIG. 10 is a sequence diagram corresponding to FIG.

図9および図10において、HTTPクライアント9からHTTPリクエストを受け付けたHTTPデーモン(httpd)51は、HTTPリクエストに含まれるURLの一部であるアプリケーションパスに対応するWebアプリケーションを登録テーブルから検索する(ステップS1)。   9 and 10, the HTTP daemon (httpd) 51 that has received the HTTP request from the HTTP client 9 searches the registration table for a Web application corresponding to the application path that is a part of the URL included in the HTTP request (step). S1).

ここで、対応するWebアプリケーションが登録されていない場合(ステップS2のNo)、notFoundハンドラ224を起動し、HTTPクライアント9にエラー応答(NotFound)を返信し(ステップS3)、処理を終了する。   If the corresponding Web application is not registered (No in step S2), the notFound handler 224 is activated, an error response (NotFound) is returned to the HTTP client 9 (step S3), and the process is terminated.

一方、対応するWebアプリケーションが登録されている場合(ステップS2のYes)、取得したWebアプリケーション21にHTTPリクエストを渡して処理を委譲する(ステップS4)。これがHTTPデーモン51による第一の振り分けとなる。   On the other hand, when the corresponding Web application is registered (Yes in Step S2), the HTTP request is transferred to the acquired Web application 21 and the process is transferred (Step S4). This is the first distribution by the HTTP daemon 51.

次いで、処理を委譲されたWebアプリケーション21(App)は、URLパスに対応する処理関数(Webページハンドラ)を登録テーブルから検索する(ステップS5)。   Next, the Web application 21 (App) to which the process has been delegated searches the registration table for a processing function (Web page handler) corresponding to the URL path (step S5).

対応する処理関数が登録されていない場合(ステップS6のNo)、notFoundハンドラ224を起動し、HTTPクライアント9にエラー応答(NotFound)を返信し(ステップS7)、処理を終了する。   If the corresponding processing function is not registered (No in step S6), the notFound handler 224 is activated, an error response (NotFound) is returned to the HTTP client 9 (step S7), and the process is terminated.

次いで、対応する処理関数が登録されている場合(ステップS6のYes)、その処理関数を実行し(ステップS8)、処理を終了する。これがWebアプリケーションによる第二の振り分けとなる。   Next, when the corresponding processing function is registered (Yes in step S6), the processing function is executed (step S8), and the processing is terminated. This is the second distribution by the Web application.

このように、HTTPデーモン51では対応するWebアプリケーションへ第一段階として振り分けるだけでよいものとし、処理関数への第二の振り分けはWebアプリケーション内で行うようにしているため、URLと処理関数との対応付けのためにサーバプログラムであるHTTPデーモン51の処理負担が重くなってパフォーマンスが低下するという問題を防止できるものである。   As described above, the HTTP daemon 51 only needs to be distributed to the corresponding Web application as the first step, and the second distribution to the processing function is performed within the Web application. It is possible to prevent the problem that the processing load of the HTTP daemon 51, which is a server program, becomes heavy due to the association and the performance is lowered.

図11はWebアプリケーションにおける処理の振り分け(第二の振り分け)の動作をより詳細に示したフローチャートであり、図12は図11に対応するシーケンス図である。   FIG. 11 is a flowchart showing in more detail the operation of the process distribution (second distribution) in the Web application, and FIG. 12 is a sequence diagram corresponding to FIG.

図11および図12において、メソッドディストリビュータ221は受け付けたHTTPリクエストのHTTPヘッダから取得したHTTPメソッドに対応するサービスディストリビュータ222を取得し起動する(ステップS11)。すなわち、メソッドテーブルT1(図7)からメソッドをキーにサービスディストリビュータを取得して起動する。   11 and 12, the method distributor 221 acquires and activates the service distributor 222 corresponding to the HTTP method acquired from the HTTP header of the received HTTP request (step S11). That is, the service distributor is acquired from the method table T1 (FIG. 7) using the method as a key and activated.

起動されたサービスディストリビュータ222はリクエスト情報のサービス(ポート識別子の示すサービス)を基に、対応するURLディストリビュータを検索する(ステップS12)。すなわち、サービステーブルT2(図7)からサービス(ポート識別子)をキーにURLディストリビュータを検索する。   The activated service distributor 222 searches for the corresponding URL distributor based on the request information service (the service indicated by the port identifier) (step S12). That is, the URL distributor is searched from the service table T2 (FIG. 7) using the service (port identifier) as a key.

対応するURLディストリビュータが登録されていない場合(ステップS13のNo)は、notFoundハンドラ224を起動し、エラー応答をHTTPクライアント9に返信し(ステップS14)、処理を終了する。   If the corresponding URL distributor is not registered (No in step S13), the notFound handler 224 is activated, an error response is returned to the HTTP client 9 (step S14), and the process is terminated.

一方、対応するURLディストリビュータが登録されている場合(ステップS13のYes)は、取得したURLディストリビュータ223を起動する(ステップS15)。   On the other hand, if the corresponding URL distributor is registered (Yes in step S13), the acquired URL distributor 223 is activated (step S15).

起動されたURLディストリビュータ223はリクエスト情報のURLパスを基に対応するWebページハンドラ(処理関数)を検索する(ステップS16)。すなわち、URLテーブルT3(図7)からURLパスをキーにWebページハンドラを検索する。   The activated URL distributor 223 searches for a corresponding Web page handler (processing function) based on the URL path of the request information (step S16). That is, the Web page handler is searched from the URL table T3 (FIG. 7) using the URL path as a key.

対応するWebページハンドラが登録されていない場合(ステップS17のNo)は、notFoundハンドラ224を起動し、エラー応答をHTTPクライアント9に返信し(ステップS18)、処理を終了する。   If the corresponding Web page handler is not registered (No in step S17), the notFound handler 224 is activated, an error response is returned to the HTTP client 9 (step S18), and the process is terminated.

対応するWebページハンドラが登録されている場合(ステップS17のYes)は、取得したWebページハンドラ24を起動し(ステップS19)、処理を終了する。   If the corresponding web page handler is registered (Yes in step S17), the acquired web page handler 24 is activated (step S19), and the process ends.

このように、Webアプリケーション21においてメソッド、サービス(ポート識別子)、URLパスに基づいて処理関数(Webページハンドラ)を第二段階として振り分けているため、組み込み機器上のWWWサーバにおけるURLと処理関数との対応付けが適切に行えると共に、多様なページアクセスの制御を行うことができる。例えば、HTTPSでの要求時はページを表示するが、HTTPでの要求時は表示しないといったことを容易に行うことができる。   As described above, since the processing function (Web page handler) is distributed as the second stage based on the method, service (port identifier), and URL path in the Web application 21, the URL and processing function in the WWW server on the embedded device Can be properly associated, and various page access can be controlled. For example, it is possible to easily display a page when requested by HTTPS but not display when requested by HTTP.

なお、上記の実施形態ではメソッド、サービス(ポート識別子)、URLパスを振り分けの指標に用いたが、その他にコンテンツタイプ、言語、ユーザーエージェント等を用いることもできる。   In the above embodiment, a method, a service (port identifier), and a URL path are used as distribution indexes. However, a content type, a language, a user agent, and the like can also be used.

次に、システムの起動時等に行われる振り分け情報の初期化処理について説明する。   Next, the distribution information initialization process performed when the system is started will be described.

図13は初期化関数の動作を示すシーケンス図である。なお、ここではHTTPSとHTTPとを登録サービスの対象としている。   FIG. 13 is a sequence diagram showing the operation of the initialization function. Here, HTTPS and HTTP are targets of the registration service.

図13において、Webアプリケーション21の初期化関数26は初期化処理が開始されると、HTTPS用のURLテーブルT3を作成し(ステップS21)、HTTPS要求時に表示を行うWebページのURLパスと対応する処理関数(Webページハンドラ)を対応付けて登録する(ステップS22、ステップS23)。   In FIG. 13, the initialization function 26 of the Web application 21 creates an HTTPS URL table T3 when the initialization process is started (step S21), and corresponds to the URL path of the Web page that is displayed when an HTTPS request is made. A processing function (Web page handler) is associated and registered (step S22, step S23).

同様にHTTP用のURLテーブルT3を作成し(ステップS24)、HTTP要求時に表示を行うWebページのURLパスと対応する処理関数(Webページハンドラ)を対応付けて登録する(ステップS25、ステップS26)。   Similarly, a URL table T3 for HTTP is created (step S24), and the URL path of the web page to be displayed at the time of HTTP request is registered in association with the corresponding processing function (web page handler) (step S25, step S26). .

次いで、サービステーブルT2を作成し(ステップS27)、サービスとURLディストリビュータとを対応付けて登録する(ステップS28、ステップS29)。   Next, a service table T2 is created (step S27), and the service and URL distributor are registered in association with each other (step S28, step S29).

次いで、メソッドテーブルT1を作成し、メソッドとサービスディストリビュータとを対応付けて登録する(ステップS30)。なお、メソッドテーブルT1およびメソッドディストリビュータ221は通信制御を司るシステム(HTTPコネクションマネージャ)の管理下にある。   Next, a method table T1 is created, and a method and a service distributor are associated and registered (step S30). The method table T1 and the method distributor 221 are under the management of a system (HTTP connection manager) that controls communication.

このように、起動時等の初期化処理において振り分けのためのメソッドテーブルT1、サービステーブルT2、URLテーブルT3が生成されるため、その時点で利用不能な処理関数が登録されることがなくなる。   As described above, since the method table T1, the service table T2, and the URL table T3 for distribution are generated in the initialization process at the time of startup or the like, processing functions that cannot be used at that time are not registered.

本発明の一実施形態にかかる画像処理システムの構成例を示す図である。1 is a diagram illustrating a configuration example of an image processing system according to an embodiment of the present invention. 本発明の一実施形態にかかる画像形成装置の機能構成図である。1 is a functional configuration diagram of an image forming apparatus according to an embodiment of the present invention. 画像形成装置のハードウェア構成図である。2 is a hardware configuration diagram of an image forming apparatus. FIG. Webアプリケーションのモジュール構成図である。It is a module block diagram of a Web application. HTTPデーモンおよびWebアプリケーションにおける処理の振り分けにかかる機能構成図である。It is a function block diagram concerning distribution of the process in an HTTP daemon and a Web application. アプリケーションパスおよびURLパスの説明図Illustration of application path and URL path 図5におけるWebアプリケーションの詳細を示す機能構成図である。FIG. 6 is a functional configuration diagram illustrating details of the Web application in FIG. 5. HTTPデーモンにおけるポート識別子の取得にかかる機能構成図である。It is a functional block diagram concerning acquisition of the port identifier in an HTTP daemon. HTTPデーモンおよびWebアプリケーションにおける処理の振り分けの動作を示すフローチャートである。It is a flowchart which shows the operation | movement of distribution of the process in an HTTP daemon and a Web application. 図9に対応するシーケンス図である。FIG. 10 is a sequence diagram corresponding to FIG. 9. Webアプリケーションにおける処理の振り分けの動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the distribution of a process in a Web application. 図11に対応するシーケンス図である。FIG. 12 is a sequence diagram corresponding to FIG. 11. 初期化関数の動作を示すシーケンス図である。It is a sequence diagram which shows operation | movement of an initialization function.

符号の説明Explanation of symbols

1 画像形成装置
2 アプリケーション層
21 Webアプリケーション
22 Webアプリライブラリ
221 メソッドディストリビュータ
222 サービスディストリビュータ
223 URLディストリビュータ
224 notFoundハンドラ
T1 メソッドテーブル
T2 サービステーブル
T3 URLテーブル
23 Webページライブラリ
24 Webページハンドラ
25 Webページファンクション
26 初期化関数
3 インタフェース
4 プラットフォーム層
5 サービス層
51 HTTPデーモン
52 リクエスト処理部
53 アプリID/アプリケーションパス対応テーブル
54 アプリID/ポート識別子対応テーブル
T0 ポート識別子/ポート番号対応テーブル
7 インタフェース
8 エンジン部
9 HTTPクライアント
10 ネットワーク
DESCRIPTION OF SYMBOLS 1 Image forming apparatus 2 Application layer 21 Web application 22 Web application library 221 Method distributor 222 Service distributor 223 URL distributor 224 NotFound handler T1 Method table T2 Service table T3 URL table 23 Web page library 24 Web page handler 25 Web page function 26 Initialization Function 3 Interface 4 Platform layer 5 Service layer 51 HTTP daemon 52 Request processing unit 53 Application ID / application path correspondence table 54 Application ID / port identifier correspondence table T0 Port identifier / port number correspondence table 7 Interface 8 Engine unit 9 HTTP client 10 The network

Claims (4)

Webページを提供するWWWサーバ機能を有する組み込み機器であって、
URLに対応するWebページを返す処理関数とURLに対応するWebページが不在であるときにページ不在応答を返すnotFoundハンドラとを有するWebアプリケーションと、
クライアントからネットワークを介しリクエストを受信し、受信した当該リクエストにポート識別子を付与し、当該リクエストにおいて要求されるURLのアプリケーションパスの記述に対応する前記Webアプリケーションを呼び出すHTTPデーモンと
を有し、
前記Webアプリケーションは、前記リクエストにおいて要求されるURLに対応するWebページが存在するか否かにかかわらず前記ポート識別子の下で利用可能でない場合には前記notFoundハンドラを実行させ、前記リクエストにおいて要求されるURLに対応するWebページが存在し、かつ前記ポート識別子の下で利用可能である場合には対応する前記処理関数を実行させ、前記HTTPデーモンを介し前記クライアントに実行結果を返信する
ことを特徴とする組み込み機器。
An embedded device having a WWW server function for providing a Web page,
A web application having a processing function that returns a web page corresponding to the URL, and a notFound handler that returns a page absence response when the web page corresponding to the URL is absent;
An HTTP daemon that receives a request from a client via a network, assigns a port identifier to the received request, and calls the Web application corresponding to a description of an application path of a URL requested in the request ;
If the web application is not available under the port identifier regardless of whether there is a web page corresponding to the URL requested in the request, the web application executes the notFound handler and is requested in the request. When the Web page corresponding to the URL exists and is available under the port identifier, the corresponding processing function is executed, and the execution result is returned to the client via the HTTP daemon. Embedded equipment.
請求項1に記載の組み込み機器において、
前記Webアプリケーションは複数設けられ、
前記HTTPデーモンは、前記リクエストに基づいて前記Webアプリケーションのいずれかに処理を振り分ける
ことを特徴とする組み込み機器。
The embedded device according to claim 1,
A plurality of the web applications are provided,
An embedded device, wherein the HTTP daemon distributes processing to one of the Web applications based on the request.
Webページを提供するWWWサーバ機能を有する組み込み機器の制御方法であって、
HTTPデーモンにより、クライアントからネットワークを介しリクエストを受信し、受信した当該リクエストにポート識別子を付与し、当該リクエストにおいて要求されるURLのアプリケーションパスの記述に対応するWebアプリケーションを呼び出すステップと、
呼び出されたWebアプリケーションにおいて、当該Webアプリケーションに設けられた、URLに対応するWebページを返す処理関数とURLに対応するWebページが不在であるときにページ不在応答を返すnotFoundハンドラとにより、前記リクエストにおいて要求されるURLに対応するWebページが存在するか否かにかかわらず前記ポート識別子の下で利用可能でない場合には前記notFoundハンドラを実行させ、前記リクエストにおいて要求されるURLに対応するWebページが存在し、かつ前記ポート識別子の下で利用可能である場合には対応する前記処理関数を実行させ、前記HTTPデーモンを介し前記クライアントに実行結果を返信するステップと
を備えたことを特徴とするリクエスト振り分け方法。
A method for controlling an embedded device having a WWW server function for providing a Web page,
A step of receiving a request from a client via a network by an HTTP daemon, adding a port identifier to the received request, and calling a Web application corresponding to a description of an application path of a URL requested in the request ;
In the called web application, the processing function provided in the web application that returns a web page corresponding to the URL, and a notFound handler that returns a page absence response when the web page corresponding to the URL is absent. If the web page corresponding to the URL requested in the request is not available under the port identifier, the notFound handler is executed and the web corresponding to the URL requested in the request is executed. When the page exists and is available under the port identifier, the corresponding processing function is executed, and the execution result is returned to the client via the HTTP daemon. Request distribution Method.
Webページを提供するWWWサーバ機能を有する組み込み機器の制御プログラムであって、
当該組み込み機器を構成するコンピュータを、
HTTPデーモンにより、クライアントからネットワークを介しリクエストを受信し、受信した当該リクエストにポート識別子を付与し、当該リクエストにおいて要求されるURLのアプリケーションパスの記述に対応するWebアプリケーションを呼び出す手段、
呼び出されたWebアプリケーションにおいて、当該Webアプリケーションに設けられた、URLに対応するWebページを返す処理関数とURLに対応するWebページが不在であるときにページ不在応答を返すnotFoundハンドラとにより、前記リクエストにおいて要求されるURLに対応するWebページが存在するか否かにかかわらず前記ポート識別子の下で利用可能でない場合には前記notFoundハンドラを実行させ、前記リクエストにおいて要求されるURLに対応するWebページが存在し、かつ前記ポート識別子の下で利用可能である場合には対応する前記処理関数を実行させ、前記HTTPデーモンを介し前記クライアントに実行結果を返信する手段
として機能させる
リクエスト振り分けプログラム。
A control program for an embedded device having a WWW server function for providing a Web page,
The computer that constitutes the embedded device is
Means for receiving a request from a client via a network by an HTTP daemon, assigning a port identifier to the received request, and calling a Web application corresponding to a description of an application path of a URL requested in the request ;
In the called web application, the processing function provided in the web application that returns a web page corresponding to the URL, and a notFound handler that returns a page absence response when the web page corresponding to the URL is absent. If the web page corresponding to the URL requested in the request is not available under the port identifier, the notFound handler is executed and the web corresponding to the URL requested in the request is executed. A request distribution program that, when a page exists and is available under the port identifier, causes the corresponding processing function to be executed and functions as means for returning an execution result to the client via the HTTP daemon.
JP2008005971A 2008-01-15 2008-01-15 Embedded device, request distribution method, and request distribution program Expired - Fee Related JP4394725B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008005971A JP4394725B2 (en) 2008-01-15 2008-01-15 Embedded device, request distribution method, and request distribution program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008005971A JP4394725B2 (en) 2008-01-15 2008-01-15 Embedded device, request distribution method, and request distribution program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2003329078A Division JP4097584B2 (en) 2003-09-19 2003-09-19 Embedded device having WWW server function, web page providing method, and web page providing control program

Publications (2)

Publication Number Publication Date
JP2008176789A JP2008176789A (en) 2008-07-31
JP4394725B2 true JP4394725B2 (en) 2010-01-06

Family

ID=39703722

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008005971A Expired - Fee Related JP4394725B2 (en) 2008-01-15 2008-01-15 Embedded device, request distribution method, and request distribution program

Country Status (1)

Country Link
JP (1) JP4394725B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5123800B2 (en) 2008-09-16 2013-01-23 株式会社リコー Information processing apparatus, information processing method, and program
JP2010143111A (en) 2008-12-19 2010-07-01 Ricoh Co Ltd Image processing apparatus, data setting device, data setting method of image processing apparatus, and program
JP6039446B2 (en) 2013-01-28 2016-12-07 キヤノン株式会社 Web server device, control method, and program thereof.
JP7400484B2 (en) * 2020-01-15 2023-12-19 ブラザー工業株式会社 Server, function execution device, computer program for server, and computer program for function execution device

Also Published As

Publication number Publication date
JP2008176789A (en) 2008-07-31

Similar Documents

Publication Publication Date Title
US9374288B2 (en) Information processing system of limiting usage amount, information processing apparatus, and information processing method
US7490139B2 (en) Embedded business apparatus including web server function
US9398084B2 (en) Information processing system
JP2005242994A (en) Device, method and program for providing service, device, method and program for processing information, and recording medium
US20110252117A1 (en) Devices and Methods for Redirecting a Browser to Access Computer Resource Behind a Network Firewall
JP2006221612A (en) Information processing apparatus, information processing method, program, and storage medium
JP5200639B2 (en) Image forming apparatus, information processing method, and program
US11036819B2 (en) Information processing apparatus, method for controlling the same, and storage medium
JP4394725B2 (en) Embedded device, request distribution method, and request distribution program
JP4097584B2 (en) Embedded device having WWW server function, web page providing method, and web page providing control program
US20090300478A1 (en) Image forming apparatus, information processing method and program
JP4291856B2 (en) Image forming apparatus having Web service function
JP5870490B2 (en) Information processing system, image forming apparatus, information processing method, and program
JP4141209B2 (en) Image forming apparatus having Web service function
JP2009033731A (en) Image forming apparatus, document management method, and program
JP2005071040A (en) Equipment, and device and method for authenticating user
US20130258406A1 (en) User terminal apparatus, method of controlling user terminal apparatus, image forming apparatus, and method of controlling image forming apparatus
JP4190991B2 (en) Information processing apparatus having net service function and net service providing method
JP2004005348A (en) Image forming device having web service function
US20240045915A1 (en) Web browsing system, communication terminal, image generation server
JP4458799B2 (en) Information processing apparatus having net service function and net service providing method
JP4602707B2 (en) Embedded device having WWW server function, port information sharing method, port information sharing program, and Web system
JP2006020341A (en) Image forming apparatus including web service functions
JP4141210B2 (en) Image forming apparatus having Web service function
JP2007129766A (en) Image forming apparatus including web service functions

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090224

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090417

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20091013

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091015

R150 Certificate of patent or registration of utility model

Ref document number: 4394725

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121023

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131023

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees