name: inverse layout: true class: center, middle, inverse
---
# Architecture 03 - Galaxy Architecture Principles
John Chilton
last_modification
Updated:
text-document
Plain-text slides
|
Tip:
press
P
to view the presenter notes |
arrow-keys
Use arrow keys to move between slides
??? Presenter notes contain extra information which might be useful if you intend to use these slides for teaching. Press `P` again to switch presenter notes off Press `C` to create a new window where the same presentation will be displayed. This window is linked to the main window. Changing slides on one will cause the slide to change on the other. Useful when presenting. --- ### <i class="far fa-question-circle" aria-hidden="true"></i><span class="visually-hidden">question</span> Questions - What are the guiding principles of Galaxy architecture? - Why is the frontend opinionated but the backend plugin-driven? - Who are the target audiences for each component? --- ### <i class="fas fa-bullseye" aria-hidden="true"></i><span class="visually-hidden">objectives</span> Objectives - Understand the contrasting philosophies of frontend vs backend - Learn why Galaxy is designed for flexibility - Identify the target users for each layer --- layout: introduction_slides topic_name: Galaxy Architecture # Architecture 03 - Galaxy Architecture Principles *The guiding principles of the core code architecture.* --- layout: true name: left-aligned class: left, middle --- layout: true class: center, middle --- ### Aspirational Principles of Galaxy Architecture Whereas the architecture of the frontend (Web UI) aims for consistency and is highly opinionated, the backend (Python server) is guided by flexibility and is meant to be driven by plugins whenever possible. ??? Though an imperfect abstraction... maybe it is beneficial to think of the organizational principles that guide frontend and backend development of Galaxy as diametrically opposite. The frontend architecture is guided by the principle that the end user experience should be as simple and consistent as possible. The backend has been deployed at so many different sites and targeting so many different technologies - that flexibility is paramount. --- ### An Opinionated Frontend - The target audience is a *bench scientist* - no knowledge of programming, paths, or command lines should be assumed. - Consistent colors, fonts, themes, etc... - Reusable components for presenting common widgets - from the generic (forms and grids) to the specific (tools and histories). - Tied to specific technologies: - Implemented in TypeScript - Built with [webpack](https://webpack.js.org/) - [Vue.js](https://vuejs.org/) for component definitions --- ### A Plugin Driven Backend Galaxy's backend is in many ways driven by *pluggable interfaces* and can be adapted to many different technologies. - SQLAlchemy allows using SQLite, PostgreSQL, or MySQL (sort of) for your database. - Many different cluster backends or job managers are supported. - Different frontend proxies (e.g. nginx) are supported as well as web application containers (e.g. uvicorn, gunicorn). - Different storage strategies and technologies are supported (e.g. S3, iRODS). - Tool definitions, job metrics, stat middleware, tool dependency resolution, workflow modules, datatype definitions are all plugin driven. ??? If the chief architectural principle guiding the frontend is a fast and accessible experience for the bench scientist, perhaps for the backend it is allowing deployment on many different platforms and a different scales. --- ### A Plugin Driven Backend but... Galaxy has long been guided by the principle that cloning it and calling the `run.sh` should "just work" and should work quickly. So by default Galaxy does not require: - Compilation - it fetches *binary wheels* for your platform. - A job manager - Galaxy can act as one. - An external database server - Galaxy can use an sqlite database. - A web proxy or external Python web server. --- class: enlarge200 ### In other words... The Galaxy frontend is architected with the bench scientist in mind first and foremost, the Galaxy backend is architected with Galaxy administrators in mind first and foremost. ??? TODO: slide connecting architecture to people here .footnote[Previous: [Galaxy Project Management and Contribution](/training-material/topics/dev/tutorials/architecture-project-management/slides.html) | Next: [Galaxy Files and Directory Structure](/training-material/topics/dev/tutorials/architecture-files/slides.html)] --- ### <i class="fas fa-key" aria-hidden="true"></i><span class="visually-hidden">keypoints</span> Key points - Frontend: opinionated, consistent, for bench scientists - Backend: plugin-driven, flexible, for administrators - Galaxy runs out of the box with minimal dependencies - Architecture balances simplicity and extensibility --- ## Thank You! This material is the result of a collaborative work. Thanks to the [Galaxy Training Network](https://training.galaxyproject.org) and all the contributors!
John Chilton
Tutorial Content is licensed under
Creative Commons Attribution 4.0 International License
.