# Galaxy Architecture Principles *The guiding principles of the core code architecture.* --- ### Learning 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? --- ### Learning Objectives - Understand the contrasting philosophies of frontend vs backend - Learn why Galaxy is designed for flexibility - Identify the target users for each layer --- ### 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 ({% link topics/dev/tutorials/architecture-4-files/slides.html %})]
Use arrow keys to navigate • P for presenter mode • F for fullscreen