Internet DRAFT - draft-efimchick-remotelaboratorycontrolprotocol

draft-efimchick-remotelaboratorycontrolprotocol



 



INTERNET-DRAFT                           Evgeny Efimchick, Andrey Lyamin
Intended Status: Proposed Standard  (NRU ITMO, Saint-Petersburg, Russia)
Expires: July 18, 2013                                    March 18, 2013


                  Remote Laboratory Control Protocol 
           draft-efimchick-remotelaboratorycontrolprotocol-00

Status of this Memo

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups. Note that other
   groups may also distribute working documents as Internet-Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/1id-abstracts.html

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Copyright (c) 2013 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

   This document specifies an Internet standards track protocol for the
   Internet community, and requests discussion and suggestions for
   improvements.  Please refer to the current edition of the "Internet
   Official Protocol Standards" (STD 1) for the standardization state
   and status of this protocol.  Distribution of this memo is unlimited.


 


Efimchick, Evgeny        Expires July 18, 2013                  [Page 1]

INTERNET DRAFT     Remote Laboratory Control Protocol     March 18, 2013


Copyright and License Notice

   Copyright (c) 2013 IETF Trust, Evgeny Efimchick, Andrey Lyamin. All
   rights reserved.

Abstract

   This protocol is intended to provide the interaction between servers
   of virtual or remote laboratories and educational information systems
   that use virtual or remote laboratories in educational process.

Table of Contents

   1  Introduction  . . . . . . . . . . . . . . . . . . . . . . . . .  3
   2 RLCP-compatible VL . . . . . . . . . . . . . . . . . . . . . . .  3
     2.1 RLCP-VL Structure  . . . . . . . . . . . . . . . . . . . . .  3
     2.2 RLCP-VL workflow . . . . . . . . . . . . . . . . . . . . . .  4
   3 RLCP description . . . . . . . . . . . . . . . . . . . . . . . .  6
     3.1 RLCP request header  . . . . . . . . . . . . . . . . . . . .  6
     3.2 RLCP response header . . . . . . . . . . . . . . . . . . . .  7
     3.3 RLCP request body  . . . . . . . . . . . . . . . . . . . . .  8
     3.4 RLCP response body . . . . . . . . . . . . . . . . . . . . . 10
     3.5  RLCP url  . . . . . . . . . . . . . . . . . . . . . . . . . 11
     3.6  RLCP request/response header fields . . . . . . . . . . . . 11
   4  Security Considerations . . . . . . . . . . . . . . . . . . . . 11
   5  IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 12
   6  References  . . . . . . . . . . . . . . . . . . . . . . . . . . 12
   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 12




















 


Efimchick, Evgeny        Expires July 18, 2013                  [Page 2]

INTERNET DRAFT     Remote Laboratory Control Protocol     March 18, 2013


1  Introduction

   This protocol is intended to provide the interaction between servers
   of virtual or remote laboratories and educational information systems
   that use virtual or remote laboratories in educational process.

   The Virtual Laboratory (VL) is an electronic environment that allows
   to create and investigate models of real phenomena. VL can be a
   useful tool in the distance learning technologies. It is difficult to
   develop VLs, but they provide numerous opportunities for education,
   especially in technical and natural science.

   Remote laboratories provides interaction with real laboratory plant
   but VL is actually kind of remote laboratories where real laboratory
   plant is replaced by its virtual model. Remote Laboratory Control
   Protocol describes rules of interaction of both remote and virtual
   laboratories.

   The Remote Laboratory Control Protocol (RLCP) was proposed in Saint-
   Petersburg National Research University of Information Technologies,
   Mechanics and Optics (NRU ITMO) to simplify the development and use
   of VLs. RLCP, its implementation and examples of RLCP-compatible VLs
   are described in scientific journals. [1], [2], [3]

2 RLCP-compatible VL

2.1 RLCP-VL Structure

   The RLCP-compatible VLs (RLCP-VL) have a strictly defined structure
   as shown in Fig. 1.
    _______________       _______________       _______________     
   |               |     |               |     |               |     
   |   HTML-page   |     |               |     |               |     
   |               |-----|  RLCP client  |-----|   Data base   |
   | of task frame |     |               |     |               |
   |_______ _______|     |_______ _______|     |_______________|
           |                     |
           |                     |
           |                     |
    _______|_______       _______|_______ 
   |               |     |               |     
   |   Virtual     |     |               |
   |  laboratory   |     |  RLCP server  |
   |    plant      |     |               |
   |_______________|     |_______________|


                      Figure 1 RLCP-VL structure 
 


Efimchick, Evgeny        Expires July 18, 2013                  [Page 3]

INTERNET DRAFT     Remote Laboratory Control Protocol     March 18, 2013


2.2 RLCP-VL workflow

   An assessment process with RLCP-VL may vary depending on RLCP client,
   but its general principles can be described. RLCP-VL workflow is
   presented on Fig. 2. 

   When a user starts an assessment using VL, RLCP client sends to the
   user a page that contains task description and interactive element -
   an applet that represents the VL plant. This page is called task
   frame. The task frame can be selected from a task bank by RLCP client
   or constructed by using RLCP server. In the latter case, the client
   creates an RLCP request to RLCP server of VL, which specifies
   instructions for the formation of  tasks.

   RLCP server sends back data required to construct the task frame.

   While solving problem a user can send one or more requests for the
   intermediate calculations if such behavior is allowed by concrete VL.
   In this case after each inspection the task frame will be modified in
   accordance with inspection results.

   In general, user's answer is treated as a description of a system
   with sets of inputs and outputs. This system is constructed in
   accordance with the task by means of the VL plant. Knowledge of the
   correct answer can be represented as pairs of test sets of input and
   output data. It is necessary to get reaction of the described system
   on the given set of input data and to compare it with the
   corresponding set of output data in order to assess  the answer. The
   correct answer is indicated when system reaction meets expected set
   of output data.

   A user sends the response with control elements of the task frame to
   RLCP client. RLCP client prepares the RLCP request that consists of
   user's response, validation data sets and other parameters for
   checking, and sends it to RLCP server. RLCP server checks user's
   response using given parameters, and returns the result to RLCP
   client. After receiving the response RLCP client can save
   assessment's result and make it available to the user.

   When user starts assignment using VL, RLCP client sends the user to a
   page that contains the job description and an interactive element -
   an applet that represents a virtual plant. This page is called a task
   frame. The task frame can be selected from a task bank  by RLCP
   client or constructed using RLCP server. In the latter case, the
   client creates RLCP request to RLCP server of VL, which specifies
   instructions for the formation of task. RLCP server sends back data
   required to construct task.

 


Efimchick, Evgeny        Expires July 18, 2013                  [Page 4]

INTERNET DRAFT     Remote Laboratory Control Protocol     March 18, 2013


          User                RLCP client          RLCP-VL server
            |                      |                      |    
            |                      |                      |    
            _                      _                      _    
           | |                    | |                    | |     
           | |   Request for      | |                    | |  
           | | laboratory task    | |                    | |  
           | |------------------->| | Request for variant| |  
           | |                    | |   (RLCP request)   | |     
           | |                    | |------------------->| |  
           | |                    | |                    | |  
           | |                    | |    Variant data    | |  
           | |                    | |   (RLCP response)  | |     
           | |    Task frame      | |<-------------------| |  
           | |<-------------------| |                    | |  
           | |                    | |                    | |  
    _______|_|____________________|_|____________________|_|______ 
   |      || |                    | |                    | |      |
   | loop || |    Request for     | |                    | |      |  
   |_____/ | |   intermediate     | |                    | |      |  
   |       | |    inspection      | |    Request for     | |      |  
   |       | |------------------->| |   intermediate     | |      |  
   |       | |                    | |    inspection      | |      |  
   |       | |                    | |   (RLCP request)   | |      |
   |       | |                    | |------------------->| |      |  
   |       | |                    | |                    | |      |  
   |       | |                    | |     Result of      | |      |  
   |       | |                    | |    intermediate    | |      |  
   |       | |                    | |     inspection     | |      |  
   |       | |                    | |   (RLCP response)  | |      |
   |       | | Modified task frame| |<-------------------| |      |  
   |       | |<-------------------| |                    | |      |  
   |_______|_|____________________|_|____________________|_|______| 
           | |                    | |                    | |  
           | |      Solution      | |    Request for     | |  
           | |------------------->| |  solution checking | |  
           | |                    | |   (RLCP request)   | |     
           | |                    | |------------------->| |  
           | |                    | |                    | |  
           | |                    | |     Result of      | |  
           | |                    | |  solution checking | |  
           | |                    | |   (RLCP response)  | |     
           | |                    | |<-------------------| |  
           | |                    | |                    | |  
           |_|                    |_|                    |_|   
            |                      |                      |    

                       Figure 2 RLCP-VL workflow
 


Efimchick, Evgeny        Expires July 18, 2013                  [Page 5]

INTERNET DRAFT     Remote Laboratory Control Protocol     March 18, 2013


   In general, the user answer is treated as description of system with
   a set of inputs and outputs. This system is constructed in accordance
   with the task of the objects and relations of the domain by means of
   virtual plant . Knowledge of the correct answer can be represented as
   pairs of test sets of input and output data. We need to get a
   reaction of described system in a given set of input data and compare
   it with the corresponding set of output data due to assess the
   correctness of the answer . The coincidence of the system reaction
   with an expected set of output data will indicate the correct answer.

   User sends a response with the controls of task frame to RLCP client.
   RLCP client prepares RLCP request consists of the user's response,
   the validation data sets and other parameters for checking, and sends
   it to RLCP server. RLCP server checks the user's response, based on
   the given parameters, and returns the result to RLCP client. After
   receiving a response RLCP client can save the check results and make
   them available to the user.

3 RLCP description

   RLCP provides a connection between RLCP server and RLCP client. RLCP
   client can request data to construct the task frame, checking results
   of user's answer or results of the intermediate calculations from
   RLCP server. For each type of the request and its corresponding
   response a format of RLCP requests and responses exists. This format
   is called RLCP method. RLCP has the following methods:

      - Generate, intended to transmit data for the construction of the
      task frame;
      - Calculate, which is designed to transfer results of the
      intermediate calculations;
      - Check, designed to transmit results of the checking based on the
      test sets of input and output data.

   RLCP is based on TCP. Stages of RLCP interaction between RLCP client
   and RLCP-VL server are given below:
      - RLCP Client establishes TCP connection with RLCP-VL server,
      - RLCP Client sends RLCP request to RLCP-VL server through this
      connection,
      - RLCP Client receives response from RLCP-VL server,
      - RLCP Client closes connection.

   All requests and responses contain a header and body. Header and body
   is divided by empty line.

3.1 RLCP request header

   The request header contains the name of a request method in capital
 


Efimchick, Evgeny        Expires July 18, 2013                  [Page 6]

INTERNET DRAFT     Remote Laboratory Control Protocol     March 18, 2013


   letters and a set of service fields. There are two required service
   fields that are listed in table 1. Optional service fields might be
   added to the request due to particular VL needs. 

   Table 1. Required header service fields
    __________ ____________________________________________________
   |          |                           |                        |
   |  Name    |       Description         |        Example         |
   |__________|___________________________|________________________|
   |          |                           |                        |
   |   url    |    Contains an URL of     | url:rlcp://test:test@  |
   |          |      RLCP-VL server       |     127.0.0.1:3000     |
   |__________|___________________________|________________________|
   |          |                           |                        |
   | content- |   Contains a size of      |  content-length:12345  |
   |  length  |  RLCP request in bytes    |                        |
   |__________|___________________________|________________________|

   Example of RLCP request is given below:

   CHECK
   url:rlcp://test:test@127.0.0.1:3000
   content-length:12345

3.2 RLCP response header

   RLCP response header consists of a response status and a set of
   service fields. 

   Response status is a numeric code. Response codes are listed in table
   2.

   There is only required service field in response header: content-
   length. It contains size of RLCP response in bytes. In addition, one
   optional service field is defined. It is called 'url' and contains
   url of the RLCP server when response code is 300. Optional service
   fields might be added to the response due to particular VL needs.

   Example of RLCP response header is given below:

   200
   content-length:12345






 


Efimchick, Evgeny        Expires July 18, 2013                  [Page 7]

INTERNET DRAFT     Remote Laboratory Control Protocol     March 18, 2013


   Table 2. Response codes
    __________ ___________________________________________________
   |          |                                                   |
   |  Code    |       Description                                 |
   |__________|___________________________________________________|
   |          |                                                   |
   |   100    | The request is still processing                   |
   |__________|___________________________________________________|
   |          |                                                   |
   |   200    | The request is successfully processed             |
   |          | and response contains results                     |
   |__________|___________________________________________________|
   |          |                                                   |
   |   300    | The requested resource is temporary moved         |
   |__________|___________________________________________________|
   |          |                                                   |
   |   400    | Incorrect request                                 |
   |__________|___________________________________________________|
   |          |                                                   |
   |   401    | Incorrect input data sets                         |
   |__________|___________________________________________________|
   |          |                                                   |
   |   402    |  Authentication error                             |
   |__________|___________________________________________________|
   |          |                                                   |
   |   403    |  Unsupported method                               |
   |__________|___________________________________________________|
   |          |                                                   |
   |   404    |  Required service field was not found             |
   |__________|___________________________________________________|
   |          |                                                   |
   |   405    |  Required service field value was not found       |
   |__________|___________________________________________________|
   |          |                                                   |
   |   500    |  The requested resource is temporary unavailable  |
   |__________|___________________________________________________|
   |          |                                                   |
   |   501    |  Request method is supported by protocol          |
   |          | but it is not supported by this particular server |
   |__________|___________________________________________________|


3.3 RLCP request body 

   The body of RLCP request is presented as an XML-document and its
   structure depends on RLCP method. Common to all methods DTD-
   description of the request body  is given below:

 


Efimchick, Evgeny        Expires July 18, 2013                  [Page 8]

INTERNET DRAFT     Remote Laboratory Control Protocol     March 18, 2013


   <!ELEMENT Request (Conditions, Instructions?, PreGenerated?)>
   <!ELEMENT Conditions (ConditionForCalculating | ConditionForChecking
   + | ConditionForGenerating)>
   <!ELEMENT ConditionForChecking (Input, Output)>
   <!ATTLIST ConditionForChecking
   	id CDATA # REQUIRED
   	Time CDATA # REQUIRED
   >
   <!ELEMENT ConditionForCalculating (Input)>
   <!ELEMENT ConditionForGenerating (Input)>
   <!ELEMENT PreGenerated (Text, Code, Instructions)>
   <!ELEMENT Instructions (# PCDATA)>
   <!ELEMENT Output (# PCDATA)>
   <!ELEMENT Input (# PCDATA)>
   <!ELEMENT Text (# PCDATA)>
   <!ELEMENT Code (# PCDATA)>

   Description of RLCP request elements.

   Request
      The root element of the message.

   Request/Conditions 
      The element that contains conditions for processing the request.
      It may contain one or more elements, depending on the request
      method.

   Request/Conditions/ConditionForCalculating
      The element that contains conditions to perform the intermediate
      calculations. The element is allowed in the request of the
      Calculate method. The condition itself enclosed in the nested
      comment of the child element called Input.

   Request/Conditions/ConditionForGenerating 
      The element that contains conditions for the generating data to
      construct the task frame online. The element is allowed in the
      request of the Generate method. The condition itself lies in the
      nested comment of the child element called Input.

   Request/Conditions/ConditionForChecking
      The element that contains conditions to validate user's solution
      in the form of a pair of input and output data. There may be
      several such elements. The element is allowed in the request of
      the Check method, contains a set of input data in the nested
      comment of the child element Input, a corresponding set of output
      data in the nested comment of child element Output and an
      identifier and a time limit (in milliseconds) to perform checks in
      the id and Time attributes respectively.
 


Efimchick, Evgeny        Expires July 18, 2013                  [Page 9]

INTERNET DRAFT     Remote Laboratory Control Protocol     March 18, 2013


   Request/Instructions
      The user's answer that is received from the VL plant. The element
      is allowed in the requests of the Check and Calculate methods.

   Request/PreGenerated
      Data for the construction of the task frame that is previously
      obtained by using the request of the Generate method. The element
      contains data to display to a user in the nested comment of the
      child element called Text, data intended to substitute as the
      applet parameter of the VL plant in the nested comment of the
      child element called Code, additional instructions for checking
      that are intended only for RLCP server in the nested comment of
      the child element called Instructions. The element is allowed in
      the requests of the Check and Calculate methods.

3.4 RLCP response body

   The body of RLCP response is presented as an XML-document and its
   structure depends on RLCP method. Common to all the methods DTD of
   the response body and its description is given below:

   <!ELEMENT Response (CalculatingResult | CheckingResult+ |
   GeneratingResult)>
   <!ELEMENT CheckingResult (#PCDATA)>
   <!ATTLIST   CheckingResult
   	id CDATA #REQUIRED
   	Time CDATA #REQUIRED
   	Result CDATA #REQUIRED
   >
   <!ELEMENT CalculatingResult (Text,Code)>
   <!ELEMENT GeneratingResult (Text,Code,Instructions)>
   <!ELEMENT Text (#PCDATA)>
   <!ELEMENT Code (#PCDATA)>
   <!ELEMENT Instructions (#PCDATA)>

   Description of RLCP response elements.

   Response
      The root element of the message.

   Response/CheckingResult
      The container element for the checking result of the single
      checking condition that contains the pair of the test sets of
      validation input and output data. The element contains the literal
      output data in the nested comment, checking result (a number in
      the interval (0, 1)) in the attribute called Result, identifier of
      the pair of input and output data in the attribute called id,
      elapsed time (in milliseconds) in the attribute called Time. The
 


Efimchick, Evgeny        Expires July 18, 2013                 [Page 10]

INTERNET DRAFT     Remote Laboratory Control Protocol     March 18, 2013


      element is allowed in the response of the Check method.

   Response/CalculatingResult
      The container element for the results of the intermediate
      calculations. It contains the data intended to display to a user
      in the nested comment of the child element called Text, data
      intended to substitute as the applet parameter of the VL plant in
      the nested comment of the child element called Code. The element
      is allowed in the response of the Calculate method.

   Response/GeneratingResult
      The container element for data to construct the task frame. It
      contains the data  that is should be displayed to a user in the
      nested comment of the child element called Text, data that should
      be substituted as an parameter of the applet of the VL plant in
      the nested comment of the child element called Code, additional
      checking instructions for RLCP server in the nested comment of the
      child element called Instructions. The element is allowed in the
      response of the Generate method.

3.5  RLCP url

   RLCP url format is:

   rlcp://[login:password@](Server_IP-address|Server_domain_name):Port

   Elements in square brackets are optional. Elements in round brackets
   separated by vertical bar are mutually exclusive. Login and password
   must contain only characters from A-z and 0-9 ranges. RLCP url length
   is limited to 255 characters.

3.6  RLCP request/response header fields

   Header fields format is:

   field_name:field_value

   Each field occupies one line. Header fields may be listed in any
   order, but must be used no more than once. Field names are not case
   sensitive.

4  Security Considerations

   Security is not generally a problem in normal operation, however,
   only authenticated requests should be processed by RLCP-VL server, if
   particular server does not support anonymous connections. Malformed
   requests should not be processed, instead response with 4xx status
   code should be returned. If content-type field value and actual
 


Efimchick, Evgeny        Expires July 18, 2013                 [Page 11]

INTERNET DRAFT     Remote Laboratory Control Protocol     March 18, 2013


   message size does not match the lesser amount of bytes should read.

   No encryption considerations is represented in this memo.


5  IANA Considerations

   No assignments by the IANA are required.

6  References

   [1] Lyamin A.V., Vashenkov O.E. VIRTUAL LABORATORY: MULTI-STYLE CODE
   EDITOR // 23rd ICDE World Conference on Open Learning and Distance
   Education including the 2009 EADTU Annual Conference. -
   Maastricht,The Netherlands, on 7-10 June 2009. - URL:
   http://www.ou.nl/icde2009.

   [2] Lyamin A.V., Vashenkov O.E. Virtual environment and instruments
   for student olympiad on cybernetics // Proceedings of 8th IFAC
   Symposium on Advances in Control Education. - Kumamoto, JAPAN, 2009.

   [3] Efimchik E.A., Lyamin A.V. RLCP-Compatible Vitual Laboratories //
   The International Conference on E-Learning and E-Technologies in
   Education (ICEEE 2012) Technical University of Lodz, Poland Sept. 24-
   26, 2012 Proceedings. - Lodz, Poland, 2012.

Authors' Addresses

   Evgeny Efimchick, Andrey Lyamin

   197101, Russia, Saint Petersburg, 
   Kronverkskiy pr., 49, 
   National Research University
   of Information Technologies, Mechanics and Optics,
   Distance Learning Center

   EMail: efimchick@cde.ifmo.ru














Efimchick, Evgeny        Expires July 18, 2013                 [Page 12]