visionforge/demo/muon-monitor/README.md

35 lines
1.4 KiB
Markdown
Raw Normal View History

2020-05-07 16:52:57 +03:00
### Muon Monitor Visualization
2020-08-05 22:03:47 +03:00
This directory contains a full-stack application example built with `visionforge`.
2020-05-08 00:42:10 +03:00
It is visualizing the
[Muon Monitor](http://npm.mipt.ru/projects/physics.html#mounMonitor) experiment set-up,
including experiment's geometry and events (particle tracks).
2020-05-07 16:52:57 +03:00
2020-05-08 00:42:10 +03:00
#### Reusing code and going Full-Stack with Kotlin Multiplatform
The application includes both server back-end generating events, as well as client
visualization front-end.
As is common for Kotlin multiplatform projects, the code base of this simple application
is put in the following main directories:
* `commonMain` - common code, used by both JS client and JVM server. For example, the `Monitor`
object describes general geometry definitions needed in all parts of the application.
* `jsMain` - JavaScript client code. It performs visualization and reads events from the server.
* `jvmMain` - JVM server code. It runs `ktor` HTTP server, responding with event data when
client requests them.
Note that in a more traditional approach when client and server are developed separately
2020-08-08 13:51:23 +03:00
and possibly using different languages, there would be no common code and benefits associated
with it.
2020-05-07 16:52:57 +03:00
##### Building project
2020-05-08 00:42:10 +03:00
To run full-stack Muon Monitor Visualization application (both JVM server and Web browser front-end),
run `demo/muon-monitor/application/run` task.
2020-05-07 16:52:57 +03:00
##### Example view:
![](../../doc/resources/muon-monitor.png)