Submit your research to the International Journal "Notes on Intuitionistic Fuzzy Sets". Contact us at nifs.journal@gmail.com

Call for Papers for the 27th International Conference on Intuitionistic Fuzzy Sets is now open!
Conference: 5–6 July 2024, Burgas, Bulgaria • EXTENDED DEADLINE for submissions: 15 APRIL 2024.

GNTicker Trace Protocol: Difference between revisions

From Ifigenia, the wiki for intuitionistic fuzzy sets and generalized nets
Jump to navigation Jump to search
(New page: <div style="float:right; margin-left: .5em">__TOC__</div> '''GNTicker Trace Protocol''' (GNTP) is designed to allow two-way communication between the GNTicker server (TS) and its clien...)
 
Line 56: Line 56:
== Headers ==
== Headers ==
=== Content-Length ===
=== Content-Length ===
; Syntax
: <code>Content-Length: <decimal-number></code>
; Description
: Specifies the size of the message body in bytes. This header SHOULD be used in requests and responses every time, when the message body is nonempty.
; Example
: <code>Content-Length: 173</code>
=== Content-Type ===
=== Content-Type ===
; Syntax
: <code>Content-Type: <media-type></code>
; Description
: Specifies the media type (MIME type) of the message body. This header is optional, if not specified "text/xml" type is presumed by default.
: Note: only XML messages are supported up to now.
; Example
: <code>Content-Type: text/xml</code>


== Methods ==
== Methods ==

Revision as of 20:31, 26 April 2009

GNTicker Trace Protocol (GNTP) is designed to allow two-way communication between the GNTicker server (TS) and its clients. The main tasks which can be accomplished using GNTP are:

  • Sending a generalized net definition to the TS
  • Receiving events for token movement, entrance, leaving or merging from the TS
  • Performing a number of steps of the GN execution
  • Executing the GN until a specific event occurs, with an upper bound of the number of steps
  • Providing client-initiated (active) input in the form of a token, which can be placed in a fixed input place of the GN
  • Providing server-initiated (passive) input in the form of a string or double value with a query string
  • Client or server initiated halting of the execution
  • Error reporting from the TS on all requests

General principles

GNTP uses the design of the Hypertext Transfer Protocol for the presentation layer and XML for the application layer. GNTP messages are requests (issued by the client) and responses (issued by the server). Each message consists of the message preamble (protocol version and method name or response code), optional message headers and message body. The message body, if non-empty, is usually an XML document. The namespace used by the XML documents is the GN definitions namespace: http://www.clbme.bas.bg/GN, which is defined in the following XML schema.

A request to the TS should be formed according to the following template:

<GNTP-request> ::=	GNTP/<protocol-version>\r\n
			<method-name> <method-parameters>\r\n
			(<header>\r\n)*
			\r\n
			<request-body>

<protocol-version> ::=	<decimal-digit>.<decimal-digit>

<method-name> ::=	<capital-latin-letter> | 
			<capital-latin-letter><method-name>

<method-parameters> ::=	<decimal-number> |
			<decimal-number> <method-parameters>

<header> ::=		<header-name>: <header-value>

The GNTP headers will be presented in Headers. The method syntax will be presented in Methods. A response from the TS should be formed according to the following template:

<GNTP-response> ::= 
			GNTP/<protocol-version>\r\n
			<response-code> <response-details>\r\n
			(<header>\r\n)*
			\r\n
			<response-body>

<response-code> ::=
			<response-class><response-type>

<response-class> ::=	<decimal-digit>

<response-type> ::=	<decimal-digit><decimal-digit>

<response-details> ::=	<ANSI-string>

The response codes and details will be presented in Response codes.

Headers

Content-Length

Syntax
Content-Length: <decimal-number>
Description
Specifies the size of the message body in bytes. This header SHOULD be used in requests and responses every time, when the message body is nonempty.
Example
Content-Length: 173

Content-Type

Syntax
Content-Type: <media-type>
Description
Specifies the media type (MIME type) of the message body. This header is optional, if not specified "text/xml" type is presumed by default.
Note: only XML messages are supported up to now.
Example
Content-Type: text/xml

Methods

INIT

HALT

STEP

STEPUNTIL

TOKENS

INPUT

SAVE

Response codes

Class 1 - Invalid request

Class 2 - Successfully completed request

Class 3 - More information needed

Class 4 - Message body errors

Class 5 - GNTicker interpreter errors

References