<commit_before>Architecture
==============

Nautilus uses an event-based (also referred to as "event-sourced") architure
that relies on a central messaging system through which all service communicate.

Motivation
-----------

What's Wrong With HTTP For Inter-Service Communication?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nothing. However, When one tries to apply it to a large, distributed application
as is common today a few issues start to surface concerning its directed
semantics. To Illustrate this, imagine that we had two services behind our
API gateway:

.. image:: layout.png

Now, if a client wants to send a request to the API in order to delete
a particular user record, they would tradditionally send a ``DELETE`` (or the
equivalent graphql query) to a specific url

.. image:: http_request.png

This request is then routed to a separate backend service which is responsible
for handling the actual logic to be performed.

.. image:: http_internal.png<commit_msg>minor arch docs touchup<commit_after>Architecture
==============

Nautilus uses an event-based (also referred to as "event-sourced") architure
that relies on a central messaging system through which all service communicate.
This includes mutations of their various internal states as well as data-retrieval
by the API gateway.


What's Wrong With HTTP For Inter-Service Communication?
--------------------------------------------------------

Nothing. However, When one tries to apply it to a large, distributed application
as is common today a few issues start to surface concerning its directed
semantics. To Illustrate this, imagine that we had two services behind our
API gateway:

.. image:: layout.png

Now, if a client wants to send a request to the API in order to delete
a particular user record, they would tradditionally send a ``DELETE`` (or the
equivalent graphql query) to a specific url

.. image:: http_request.png

This request is then routed to a separate backend service which is responsible
for handling the actual logic to be performed.

.. image:: http_internal.png
{'fraction_non_alphanumeric': 0.11473835813730197, 'fraction_numerical': 0.0, 'mean_word_length': 4.058252427184466, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '650231', 'n_tokens_mistral': 510, 'n_tokens_neox': 473, 'n_words': 283}