SILF
School Internet Laboratory of Physics
Jacek Bzdak
Silf is a remote laboratory,but also a framework for yourremote laboratory.
Example experiment
Promieniowanie Gamma
- When gamma radiation is high-energy photons created by nuclear reactions
- When passing through matter gamma radiation is attenuated
- This attenuation is governed by differential equation:
dI=mdx
- Probability of absorbtion of quanta for each part of path is dependent only on material type
- After integration we get:
I=Io*exp(mx)
Example results
Results in SILF

LIVE EXAMPLE
Introduction
- This is our second Remote Lab
- We had insights on what we can do better
ILF
- Our old project
- Still working!
- Client is based on Java software
- Java was then only way to run it on multiple platforms
ILF Architecture

SILF ARCHITECTURE

Another LOOK
Client
Client software
Java disadvantages
- Java must be installed
- Now is unsecure and it's instalation is discouraged on client machines
- Client weights about 3MB (could be smaller)
- Despite being stable, we had bunch of backwards incompatible changes in Java
- Each experiment has it's own client
- Despite plugabbility it still takes time
- Not only programming but deployment!
NEW CLIENT
- Use HTML5
- also AngularJS and Coffeescript
- Better yet: have single client for all experiments
Metadata driven Lab
- Experiment sends GUI description to users
- GUI is built on the fly
Metadata DRIVEN LAB
Advantages:
- There is one single client
- Existing experiments "get features" as we develop the client.
- Easy (for example) to build Android client.
Metadata DRIVEN LAB
(more on this when we discuss protocol)
SERVER
SILF ARCHITECTURE

SerVER
- We use stock XMPP server
- With some minor adjustments
- It's fast (way faster than we'll ever need)
- No work for us!
Reservation enforcement
- Reservations are enforced using XMPP moderation tools
- Each experiment has associated chatroom
- By default users can only read messages from chatroom
- Experiments always can send messages
- During reservation user temporarily gets voice
- This is implemented by the athena bot
Athena bot
- Takes part in enforcing reservations
- Interfaces with WWW via the REST API
- Creates and manages experiment XMPP rooms
- Will store experiment results for later retrival
- Will enable observer users
- Written in Python
WWW Page
- Manages existing experiments
- Manages reservations
- Written in Python/Django
Experiment
- Experiment is a normal XMPP client
- After connecting it joins a particular XMPP room
- Everything that speaks our dialect of XMPP is an experiment
-
Protocol is documented!
Experiment
- Experiment is concerned only with
performing the experiment. - It is not aware of:
- chatrooms
- reservations
- data storage
- who is using the experiment
(user or a bot)
Our implementation of experiment
- Every device has the same API
- Every device is isolated in it's own process
- This enables us to wotrk with third-party drivers that are less-than stable.
- Operations on device are asynchroneous for speed
- Sometimes drivers require us to wait
- This may be changed --- as asynchroneous code is hard to write
SILF BACKEND COMMONS

Protocol
- A dialect of XMPP
- 100% XMPP Compiliant!
- Uses XMPP groupchat messages
- Each of them contains a <labdata>
tag
Labdata
Labdata tag:
- Namespace defines action
- type
- query
- done
- result
- error
- Content depending on type
and namespace
LABDATA CONTENT
- Labdata content is in JSON language
- It is very flexible, has basic types
- Also parsing of json is free in browser,
and easy everywhere
Example conversation
- Not complete
- Feel free to ask
- Or refer to the doc
Example Conversation

EXPERIMENT METADATA
{
"experimentId": "urn:uuid:a12e6562-5feb-4046-b98f-d8c40ca1609c",
"mode": "aluminium",
"settings": {
"acquisition_time": {
"live": false, "metadata": {
"label": "Czas pomiaru dla jednej grubo\u015bci materia\u0142u"},
"name": "acquisition_time", "validations": {"min_value": 5.0, "max_value": 600.0}, "type": "interval",
"sort" : "1"},
"light": {"live": false, "metadata": {"label": "O\u015bwietlenie", "style": "light_control"}, "name": "light", "type": "boolean", "sort" : "1"}
},
"resultDescription": {
"time_left": {"name": ["tile_left"], "type": "array", "class": "interval-indicator", "settings": {}, "metadata": {"label": "Czas pozosta\u0142y do ko\u0144ca bierz\u0105cego punktu"}},
"chart": {"name": ["chart"], "type": "array", "class": "chart", "settings": {}, "metadata": {"chart.axis.y.label": "Liczba zlicze\u0144 zarejestrowana przez licznik", "chart.axis.x.label": "Grubo\u015b\u0107 przes\u0142ony [mm]"}
}
}
Example settings
<labdata xmlns="silf:series:start" type="query">
{
"acquisition_time": {"value": 150, "current": false},
"light": {"value": false, "current": false}
}
</labdata>
Experiment bot
- Bot that performs experiment
is quite easy to create
- It just needs to send proper messages
to an XMPP room - Or maybe do some data analysis on
to highlight interesting parts
REMOTE Experiments
- Integrating remote experiments is easy
- If these experiments would not need to change our client
- Very minor adjustments to out stack would be required
- Remote experiment would just need to connect to our XMPP server
- We'd just need to configure chatroom for it.
Conclusion
Successes
- Software developement costs per experiment
are very low (really negligible); - Existing infrastructure gets "free lunches"
--- exisiting experiments are enchanced for free;
Challenges
- Keeping experiments running
requires either large up-front costs and/or
constant maintenance.
- We try to increase reliablilty.
- eg. whenever there is error in WWW page,
or on my experiment I get an e-mail.
- Changing SILF to be deployed on a
nationwide scale would require
mass-production of electronics.
Open-source
- Whole framework is being open-sourced
- Core is already open-source
- Refer to the documentation for details.
- See also our repositories.
E-Textbook
- Source files are in DITA format
- DITA is XML based
- DITA stands for Darwin Information
Typing Architecture - DITA allows for easy content
re-arrangement
E-TEXTBOOK
- DITA Open Toolkit is used to generate
XML and PDF output formats
- You can see HTML version here.
Opportunities For cooperation
Opportunities
- You can "just" use our open-source software
- However it would be easier to have consultants who created the Infrastructure
- We can provide working remote laboratory experiments
- Infrastructure could be provided by us
- or by You
- We could cooperate in creating similar infrastructure in your institute
- We could create multimedia content
Multimedia
- Movies
- Animations/Virtual Experiments
- In Java FX
- In Javascript
- In LabView
- Flash
- We have people that worked on CERN Master-Class programme
Thank you for attention
silf-jinr
By Jacek Bzdak
silf-jinr
- 2,263