Skip to content

Commit

Permalink
Adjust docs section headers #13
Browse files Browse the repository at this point in the history
  • Loading branch information
numberoverzero committed Jul 3, 2016
1 parent 01e12ea commit e4aafce
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 7 deletions.
41 changes: 37 additions & 4 deletions docs/dev/internals.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
Internals
=========
^^^^^^^^^

Loading
-------
=======

A bit of cleverness is required to load instances of different models, since
the blobs that are returned have no way to be associated with the objects whose
keys were used to fetch them. A double index allows O(1) lookups. The second
hash key takes O(K) to build, where K is the number of keys for the object
(either 1 for a hash-only table, or 2 for a hash + range key).

Wire Format
-----------

Objects are sent in a dict that looks like:

.. code-block:: python
Expand Down Expand Up @@ -49,6 +52,9 @@ And returned in a similar dict:
...
}
O(1) Lookup
-----------

To associate returned values with input objects without an O(N) scan per
object, we create indexes for each object (table name -> key values -> obj)
and for each table (table name -> key names). Then the lookup is as follows:
Expand Down Expand Up @@ -110,12 +116,39 @@ construct the object index:
Which finally, can be used to look up the object in indexed_objects.
Multi-model tables
------------------
TODO Loading the same table row for two models
Tracking
--------
========
Synchronized
------------
TODO
Binding
Snapshots
---------
TODO
Marking
-------
TODO
Binding
=======
Model Declaration
-----------------
TODO
Engine Binding
--------------
TODO
2 changes: 1 addition & 1 deletion docs/user/custom_types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ need to implement ``_load``, ``_dump``, and ``_register``.
In rare cases, you may want to implement ``bind`` to provide engine-specific pairs of ``_load``/``_dump`` functions.


Quick example
Quick Example
=============

Here's a trivial type that prepends a string with its length. So ``"hello world"`` is stored as ``"11:hello world"``:
Expand Down
4 changes: 2 additions & 2 deletions docs/user/debugging.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Sample Calls
============
Debugging
=========

TODO

0 comments on commit e4aafce

Please sign in to comment.