Once the event is triggered by any of the users,
it is fired automatically by the listener function to be
saved in the Events collection in Firestore. This en-
sures achieving step 1 and 2 (Listening to the stream
of events and Saving events). However, the applica-
tion needs to make sure that all workspaces are syn-
chronized with the required state of awareness.
3.2.1 Real-time Updates
This section discusses the etailed steps to achieve
the required synchronization. As shown in the re-
altimeEvents() function below, we need to fetch
the document, convert the event field from String
to JSON then back to a Blockly event. This
event can then be applied to other workspaces using
blockly event.run(true) command. Cloud Firestore
was used for to keep the data synchronized accross
the client applications through the realtime listeners.
The onSnapshot() method is executed whenever
there is a change in the data.
To explain the process with an example, if two
users are working collaboratively and user1 created a
block, the event is detected by Blockly’s event listener
and is saved to Firestore by adding a new document
of the new event to the Events collection. A docu-
ment has been added to the collection and a change
is now detected by the realtime updates, thus the on-
Snapshot() function is subsequently executed and the
event is now applied to other users.
f u n c t i o n r e a l t i m e E v e n t s ( ) {
l e t m a i n Wo rk s pa ce = B l o c k l y . g e tM a in W or k spa ce ( ) ;
f i r e b a s e . f i r e s t o r e ( )
. c o l l e c t i o n ( ’ e v e n t s ’ + S t r i n g ( number ) )
. o rd e r B y ( ” t i m e s t a m p ” , ” as c ” )
. o n Sn a ps h ot ( f u n c t i o n ( q u e r y S n a p s h o t ) {
q u e r y S n a p s h o t . d ocCh ange s ( )
. f o r E a c h ( f u n c t i o n ( ch a ng e ) {
l e t wo rk sp ac e = c h a n ge . doc . d a t a ( ) . w o rk sp ac e ;
i f ( wo rk sp ac e !== ma i nW o rk sp a ce . i d ) {
B l o c k l y . E v e n t s . d i s a b l e ( )
l e t e v e n t = JSON . p a r s e ( c h a n ge . doc . d a t a ( ) . e v e n t ) ;
c o n s t b l o c k l y e v e n t = B l o c k l y . E v e n t s .
f r o m J s on ( e v en t , ma i n Wo r ks pa c e )
t r y {
b l o c k l y e v e n t . r u n ( t r u e ) ;
} c a t c h ( e r r o r ) { c o n s o l e . l o g ( e r r o r ) ; }
B l o c k l y . E v e n t s . e n a b l e ( )
} } ) } )}
4 EXPERIMENTAL DESIGN
This section describes in more details the experi-
ment,its design and results. The main purpose was
to test the effect of real-time collaboration. In other
words, the aim was to test whether it enhances the
process, makes it easier, faster, more efficient, more
interesting with a less mental demand or not.
4.1 Participants
The experiment was conducted on 10 participants, 7
males and 3 females. Their ages ranged from 9 to
14. All of the participants were children who have
previous knowledge and were familiar with block-
based programming applications such as Scratch, or
have previously been programming the EV3 using the
Lego Mindstorms EV3 Home edition. None of them
had a history of any health problem.
4.2 Procedure
All of the participants had their experiment on the
same conditions and surroundings to be able to eval-
uate correctly only for the effect of one aspect that is
collaboration. They were all given the same set of al-
gorithm to solve written in pseudo-code in which they
are required to implement using our block-based ap-
plication. Some of them were asked to perform the
task completely on their own (individually). Others,
on the other hand, were asked to finish the task to-
gether using the real-time collaboration feature. The
participants were then asked to fill a post-experiment
survey with their feedback and experience. The sur-
vey is divided into three parts; System Usability
Scale (SUS) (Brooke, 1996), User Engagement Sur-
vey (Pearce et al., 2005; O’Brien et al., 2018; O’Brien
and Toms, 2010), and NASA Task Load Index (TLX)
workload survey (Hart and Staveland, 1988).
4.3 Statistical Results
Data collected from the post-experience questionnaire
of all participants were analysed to calculate the re-
sults.
Starting with the first section of the survey, the
System usability score provides a useful measure for
the usability of a product (Bangor et al., 2008). Final
scores for the SUS range from 0 to 100. Higher scores
indicate better usabilities.
The mean SUS score of all participants was calcu-
lated to be 89.25.
The total workload scores were analysed as well.
Final scores for the Nasa TLX workload survey can
CSEDU 2021 - 13th International Conference on Computer Supported Education
154