architecture.rst 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. Lakesuperior Architecture
  2. =========================
  3. Lakesuperior is written in Python and `Cython
  4. <http://cython.readthedocs.io/>`__; the latter for lower-level components that
  5. interface with C basic data structures for maximum efficiency.
  6. Aside from an optional dependency on a message queue server, Lakesuperior aims
  7. at being self-contained. All persistence is done on an embedded database. This
  8. allows a minimum memory and CPU footprint, and a high degree of scalability,
  9. from :doc:`single-board computers <rpi>` to multi-core, high-load servers.
  10. Inefficient applications "get the job done" by burning through CPU cycles,
  11. memory, storage and electricity, and spew out great amounts of carbon and
  12. digits on cloud provider bills. Lakesuperior strives to be mindful of that.
  13. Multi-Modal Access
  14. ------------------
  15. Lakesuperior services and data are accessible in multiple ways:
  16. - Via HTTP. This is the canonical way to interact with LDP resources
  17. and conforms quite closely to the Fedora specs (currently v4).
  18. - Via command line. This method includes long-running admin tasks which
  19. are not available via HTTP.
  20. - Via a Python API. This method allows to use Python scripts to access
  21. the same methods available to the two methods above in a programmatic
  22. way. It is possible to write Python plugins or even to embed
  23. Lakesuperior in a Python application, even without running a web
  24. server. Also, only this way it is possible to access some of the lower-level
  25. application layers that allow to skirt much heavy-handed data processing.
  26. Architecture Overview
  27. ---------------------
  28. .. figure:: assets/lakesuperior_arch.png
  29. :alt: Lakesuperior Architecture
  30. Lakesuperior Architecture
  31. The Lakesuperior REST API provides access to the underlying Python API.
  32. All REST and CLI operations can be replicated by a Python program
  33. accessing this API.
  34. The main advantage of the Python API is that it makes it very easy to
  35. maipulate graph and binary data without the need to serialize or
  36. deserialize native data structures. This matters when handling large ETL
  37. jobs for example.
  38. The Python API is divided in three main areas:
  39. - Resource API: this API in charge of all the resource CRUD operations and
  40. implements the majority of the Fedora specs.
  41. - Admin API: exposes utility methods, mostly long-running maintenance jobs.
  42. - Query API: provides several facilities for querying repository data.
  43. See :doc:`API documentation<api>` for more details.