Combien Integration, technical details

This page describes approaches to integrate the Combien combinatorics exercise system with the ActiveMath learning environment platform.

The general idea

We are going to treat each “machine” in Combien System as one kind of exercise in ActiveMath System. We make a one-one mapping from “machine” to “exercise” in ActiveMath. Using parameter, we should be able to call Combien system directly starting with a machine. Certainly, we need to know how far are we able to parameterise the calling of Combien System, so that we can specify the “exercise” in Activemath System, for example, are we able to set “difficulty” of the exercise, and set the “type” etc. In the following we first give a use case scenario, describing how a user will use combine system via ActiveMath System. And then, we describe the design and implementation plans in details about front-end, back-end and user-action report of our integration.

Use Case Scenario

After the User has opend the Web-browser and logged into ActiveMath System, the user can use “course generator” to generate an adaptive user-book or browse the collection of all learning object by opening prerecorded books. We now assume that the user has opened a book, which contains the content for training competency for “Poisson Distribution”. The user could get a summary of exercises, in which there is also the exercise from Combien System.

By course generation, the ActiveMath system (Course Generator) will search for the suitable exericses for the user according to his mastery level of learning content. In the Back-end, the Mediator componenent will retrieval the integrated repositories to find all available exercise with the given restrication (like “only dificult” or “only simple”). By retrieve, the mediator will use various of wrapper to retrieval different kind of remote repositories. The Default and most used and most efficient repository is the “mbase” repository, which is edited by activeMath Authors. Mediator can also run XML-RPC calls, Web-Service calls or SQL-Database calls using different wrapper, which is developed on both side of integration. After the content is retrievaled, the user will get a summary of exercises, in which the exercise corresponding to the “machine” in Combien system might be also there.

We assume the user click on the URL-link on the Combien System exercise. In the front-end, then the system will lunch the combien System either by running a server installation of combien and using a document-based approach, or by downloading the combien System to the user local file system and extract the zip, run the executable file and start the Combien System for the user locally. By the second approach, the system will run the controller on the web-server to start a “Jelly” Application which help to download the zip file and extract it, and then run the “java-web-start” application to find the extracted executable file in the local file system of the user. After that, the downloaded java codes will be executed to start the combien system locally.

After the user has used Combien System to do the exercise, by exiting the system, the user-action reports will be automatically generated in XML format and be sent to the ActiveMath System using XML-RPC, or Web-Service. On the side of ActiveMath, the report is received and parsed, it will be sent as Event to the Event listeners, or directly sent to User model to be analysed and stored in the User Model. Besides, the reports could be stored also in the User Action History separately from the User Model.

Exchanging/Interaction between Combien System and ActiveMath System.
There are front-end and back-end of integration: Service involving part of Combien GUI (front-end) and content searching part(back-end). And furthermore, there are an optional task for importing, parsing and storing the user action report from Combien System.

  • Service Involving (Front-end)
  • How to run Combien Graphical Interface from ActiveMath System? There are two approaches to achieve the task: “document-based application” and “automated installation and run”.
    • Document-based application
    • We try to separate the executable system and the documents storing the information of running. We could store the information in e.g. excel and read the information by starting the system. But it seems that combien system doesn’t have document for running. That is, there’s no separate document storing the running information. All are hard coded in smalltalk. So, we can’t get GUI from them by this approach. Which means, we need to implement a GUI for showing the exercise steps, which Combien seems to have invested a big amount of time to have it developed. Or the combien system is able to show the content on a web-browser and then, we just need a remote call using XML-RPC or Web-Service. Anyway, for this approach we need to do the following:
      1. Define the format of document. For example with three lines:
        1. The exercise number
        2. The URL to send events to ActiveMath
        3. The user-name
      2. Define the way to load and store the document.
      3. Define the way we preinstall the combien System.
      4. Implement the parser API for parsing the document
      5. Implement the installation of combien System within the ActiveMath
      6. Implement the GUI for Combine.
      7. Implement the lunching of combien by reading the document.
      8. ……
    • Automated installation and run
    • We try to load the Combien System to end user in the local system and run it. How to do it?
      Combien has an executable file. The “.bat” file which calls the executable file in windows. And in Linux System, they are going to offer us a way to start combien. The Combien System is developed in Smalltalk. By starting the Combien System, it first lunch the virtuell machine of small talk and then run the application.
      We need to do the following:
      1. Download the combien system completely as a “zip” file into the user local file system automatically.
      2. Extract the “zip” file to local file system.
      3. Lunch the smalltalk virtuell machine
      4. Start the Combien System WITH PARAMETER!
      We are going to use Java-Web-Start to complete the tasks automatically and we need to implement the following:
      1. Define and implement the parameters used for starting “machine” of Combien appropriated.
      2. Implement a “.vm” velocity for showing the Exercise Item within the book in ActiveMath. This should include introduction in different languages for combien Exercise and also a URL-link/or marco link (more complex but better) for starting the controller with parameters.
      3. Implement a controler on the Webapps/ part of ActiveMath to controll the starting of the java package for Combien.
      4. Implement java package to run Java-Web-Start to download, extract the zip file into the local file system.
      5. Implement java package to lunch the smalltalk VM and start the suitable executable file depending on the local OS system.

  • Importing, parsing and storing Combien Report for User Action
  • Combien System ask the user to export the report of user actions into file system, after the user has finished the exercise within Combien. In fact, for activemath, we’d like to have the report automatically, with no human interaction. Anyway, the report is stored in different plain text file now in the file system. We need to use the file to analyse the user behaviour and import the behaviour into the User-Model and also store the user actions in user action history for later usage. For this task, we need to do the following:

    1. Make the export of the report on user actions “automatic”, without asking the user and into a predefined folder.
    2. Translate the exported report into XML format in order to parse. We could write Java-API, or Small-talk API to do this.
    3. Write the Servelet to receive the report in XML format using Web Service or XML-RPC.
    4. Write the Java API to parse the recieved XML file and send the useful information as Event to ActiveMath Event System. Or send the useful information directly into UserModel using UserModel API.
    5. Write the Java API to store the complete user Action in the user history.

  • Content searching (Back-end integration)
  • How can ActiveMath know that there’s content (“exercise”) from Combien system, and how does the content suit with other content within ActiveMath system, which should be shown to the user rationally?
    The ActiveMath system as a storage mechanism using “mbase”. This is an XML-Data base with efficient indexing. Either we use a mediator plug (with a combien-storage-server) or we use simple export. For both approach, we need to do the following:

    1. Try to map each “machine” in Combien System to an “exercise” in ActiveMath.
    2. Define the subset of metadatas we can use for Combien System within “exercise”.
    3. Encode the metadata of the Combien System content somewhere(see below).

    After that we can take a look at both approaches:

    • Import(Encode) the combien “machine” into “mbase” as Exercise
    • Just like ICMap system, we can map the different “machine” from Combien System to “exercise” in ActiveMath System, and encode the different types of exercise within the “mbase” using “OMDOC” language. The encoding is similar to the one we used by ICMap. After the encoding, we are able to retrieval the content in very efficient way (no web traffic). So the major work for this approach would be encoding the exercise in ActiveMath system.
      For this approach, one has to get familiar with Exercise System encoding in ActiveMath and understand the structure of Combien’s “Machines”. We we need to do is encoding the “exercise” according to different machines in Mbase.
    • Using Web-Service or XML-RPC to call the remote database to retrieval the content
    • Just like KELWICE for HTW-Saarland, we can set up a database on the side of combien and use web-service to remotely retrieval the content from Combien. This is modern but not efficient (involving web traffic) and not robust (due to web problem, like firewall). But this offers Combien an opportunity to offer the content on the Web. For this approach, the major work would be define and choose a suitable database at the Combien side, make sure the network connection and firewall’s problem is solved, and writing wrapper for web-service involvement (for this, we have example and standalone client codes).
      For this approach, one has to get familiar with web-application and web-service and do the following:
      1. Write the Ontology of the metadata structure
      2. Write the Ontology mapping from ontology above to the ontology used in ActiveMath Course Generator (OIO)
      3. Set up a database on Combien Side. This database contains the metadatas of the “machines”.
      4. Define the query language and API for accessing the Database.
      5. Provide this database as Web-Service by implementing a web-service wrapper.
      6. Run the retrieval test and keep firewall loosed to let the connection always available.
      7. Expose a web server place (using URL) for the Web-Service of Database and keep the connection to it reliable.

    Personally, I suggest to use the first approach.


Workflow suggestion

My personal suggestion for the working process could be (including the work should be done both of the sides.I’m not sure who’s going to take which part, in the bracket I give the intensive working hours I need to use, if I have to do that.):

  1. Design: Define the metadata by Combien. We have deliverable for content which might help on that. We need to define the machines and map them to exercise types. And see how far we can specify the metadata. The more specified we describe, the more adaptive we are to choosing exercise from Combien System for the user. (30)
  2. Implementation: See above for details in Front-end back-end and user-action report. (60-90)
  3. Run the tests, debug and evaluation. (30)
  4. Discussion and documentation (30)

So, please have a look and check what’s missing or what’s wrong and state the suggestions here.

Trackback URL for this post:

http://eds.activemath.org/en/trackback/184

Good start

Good start Tianxiang.

I would use “back-end integration” and “front-end integration”.

You haven’t spoken about the possibility of document based opening.

Also, please make sure to put a point to the ActiveMath metadata document (among our publications).

You can remove this comment when you’ve dealt wit the suggestions.

paul

yes. Thanks, I’ve added

yes. Thanks, I’ve added the points to the first document. And furthermore, please have a look at our current working plan.

Following are the working plan

Following are the working plan

Issures by ActiveMathEU meeting for Combien integration 26/10/07



Project WP

  • Content encoding (used here)
  • Integration (discuss here)



Workflow of the Combien Exercie within ActiveMath

  1. DFKI: Format of Exercise in mbase (find, modify and send to Paris)
  2. Paris:Understand the format, metadata, do the mapping from machines and parameters in combien to metadata in mbase
  3. Paris:Encode mbase exercises for combien
  4. DFKI: integrate the encoded exercise into mbase (make sure the mediator can find them and know from ID, that which is combien,which is not.
  5. DFKI: Define the format of Script, which should be shown to the user and copied by him to combien system
  6. DFKI: Implement the render to show the exercise item within a book
  7. DFKI: Implement the controller to call the render based on ID
  8. Paris: Download link for combien system.
  9. DFKI: Encode the general exerice Item for Combien Exercise using different languages.
  10. Paris: Implement new GUI for combien for starting the exercises with copy paste the script
  11. DFKI: find and modify and send the userlog format example to combien
  12. Paris: Transform the report from “Tag” to XML format, compliant to ActiveMath user Log
  13. DFKI: Documentation and guide for using XML-RPC of report recieving on ActiveMath
  14. Paris: implement the API to send the log to activeMath Event listener using XML-rpc or easier way
  15. DFKI: Implement the reciever/listerner to combien report in ActiveMath and send it to User Model




First test/demo working process

  1. DFKI: Format of Exercise in mbase (find, modify and send to Paris)
  2. Paris:Understand the format, metadata, do the mapping from machines and parameters in combien to metadata in mbase
  3. Paris:Encode 1 mbase exercise for combien
  4. DFKI: integrate the encoded exercise into mbase (make sure the mediator can find them and know from ID, that which is combien,which is not.
  5. DFKI: Define the format of Script, which should be shown to the user and copied by him to combien system
  6. DFKI: Implement the render to show the exercise item within a book
  7. DFKI: Implement the controller to call the render based on ID
  8. DFKI: Encode the general exerice Item for Combien Exercise using simple sentence as introduction in English.
  9. DFKI: find and modify and send the userlog format example to combien
  10. Paris: Transform the report from “Tag” to XML format, compliant to ActiveMath user Log
  11. DFKI: Documentation and guide for using XML-RPC of report recieving on ActiveMath
  12. Paris: implement the API to send the log to activeMath Event listener using XML-rpc or easier way
  13. DFKI: Implement the reciever/listerner to combien report in ActiveMath and send it to User Model

Deadline

  1. For first test soft: End of November
  2. For first test hard deadline: End of December
  3. For total soft deadline: End of January
  4. For total hard deadline: February