A High Level Overview of Building the iSAT MakeCode Activity Logging Platform
Sachin Rathod is a Software Engineer working on full-stack development of iSAT’s AI Partners with the Institute-wide team. He is also a graduate student pursuing a master’s degree in computer science at ¶¶ÒõÂÃÐÐÉä Boulder. His interests and expertise are in Machine Learning, Distributed Systems, and Cloud Computing.
The iSAT MakeCode Activity Logging Platform provides a robust system for tracking and analyzing user coding activity in the Microsoft MakeCode environment. It is an expanded version of the Microsoft MakeCode blocks/JavaScript code editor for the micro:bit, designed to log and track user coding activity.
We leverage AWS services to ensure that every user coding action is logged efficiently and can be used for both real-time analysis and future learning. Whether users are looking to monitor coding sessions or integrate this data into machine learning models, this platform offers an extensible solution to track and store all the necessary data.
In this blog post, we provide the technical architecture for the iSAT MakeCode and how it has been implemented.
The iSAT MakeCode Activity Logging Platform provides a deeper insight into how users interact with the micro:bit block-based editor, logging every code edit into a NoSQL database AWS DynamoDB for future analysis enabling both real-time monitoring and post-session review of coding activities.
The platform is built around two key components: the Extended Web-Based Micro:bit Block Editor and the Back-End Data Logging API Server. The web-based editor serves as the main interface, allowing users to interact with a blocks/JavaScript editor. We started with the open source Micro:bit Block Editor code base and enhanced it to track and log coding activities, including block additions, deletions, and code modifications.
The back-end server is responsible for logging each coding activity to a database, allowing developers and researchers to analyze user behavior and feed the data into machine learning pipelines. The server operates in the AWS cloud and receives logging messages sent by the user’s browser as they interact with the block code editor. Each edit version is logged to the database in MakeCode’s JavaScript format along with a timestamp and the action performed on the block (create, delete, modify), providing a transcript of the progression from the start to finish of their coding session. Each JavaScript version can be analyzed, and researchers can paste the JavaScript back into the block code editor to see a visual representation of the code blocks at the given time in the user’s coding session.
iSAT uses a variety of key technologies to support these functionalities including:
- Microsoft MakeCode for Micro:bit: Used as the base platform for coding in blocks and JavaScript.
- AWS DynamoDB: Stores all the coding activities.
- AWS ECS (Elastic Container Service): Hosts both the frontend and backend services.
- AWS Fargate: Provides the infrastructure for running containers and services.
- Node.js: Used for backend server logic and communication with DynamoDB.
How It Works
The MakeCode Activity Logging Platform is built to be scalable and efficient, leveraging cloud-native technologies on AWS. The below points cover typical user actions and data flow within the system.
- User Action Flow:
- When a user requests for iSAT MakeCode Activity Logging Platform (front-end application), an API Gateway (shown in the top left of Fig 2. Architecture diagram) manages and routes the request to application load balancer. The load balancer then routes the request to the next available AWS Fargate tasks (containers) that serve the front-end application.
- Upon successful response, a user logs into the MakeCode system and joins a study session by entering their Study ID and Session Code.
- The user proceeds to work on coding tasks within the MakeCode editor, usually provided as tutorials.
- All actions, such as block additions, deletions, and modifications, are sent across to the Back-End Data Logging API Server deployed on AWS ESC (shown in the top right of Fig 2. Architecture diagram). The backend-server logs these actions to AWS DynamoDB (shown in the bottom right of Fig 2. Architecture diagram) in real-time.
- Logging System:
- Each code modification is stored in its MakeCode JavaScript format, meaning you can both analyze the logs and re-input them into the MakeCode editor to visualize the user’s coding process step by step.
- All events are timestamped, making it easy to track the coding session's progression.
- Deployment:
- The frontend and backend services are deployed on AWS ECS clusters. AWS Fargate containers for both services are managed using ECS, ensuring high availability and ease of scaling.
- An API Gateway manages and routes incoming requests to the appropriate service, whether it’s a frontend action or a backend log storage.
- AWS Auto Scaling Groups and Application Load Balancers ensure that the system can handle varying loads, ensuring both scalability and reliability.
Installation and Setup
To use this platform, developers need:
- An AWS Cloud Account to set up and deploy the services.
- GitHub to access the platform’s code and deploy it onto AWS ECS.
- Basic knowledge of AWS services (like DynamoDB, and ECS, and Fargate) and the Microsoft MakeCode editor.
Please contact our team at Info.AI-Institute@Colorado.edu for more information and to schedule a consultation.