Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 135 lines (105 sloc) 5.554 kB
afbdd78 @runyaga What makes Ptah unique
runyaga authored
1 What Makes Ptah Unique
2 ======================
3
f10eb05 @runyaga modernize and remove features which have been removed from public API…
runyaga authored
4 What it ain't
5 -------------
6
7 Ptah is not an application. You build software. You do not *extend it*.
8 It's quite high level and should get you where you are going quickly. But
9 it will not do your job (building an application) for you.
10
afbdd78 @runyaga What makes Ptah unique
runyaga authored
11 Pyramid
12 -------
13
14 Since Ptah is built on top of Pyramid you should familiarize yourself
25eeac2 @WouterVH fix some typos, and rst-syntax
WouterVH authored
15 with what makes `Pyramid Unique <https://docs.pylonsproject.org/projects/pyramid/1.2/narr/introduction.html#what-makes-pyramid-unique>`_
afbdd78 @runyaga What makes Ptah unique
runyaga authored
16
17 Eat What You Pay For
18 --------------------
19
f10eb05 @runyaga modernize and remove features which have been removed from public API…
runyaga authored
20 Many frameworks are not known for their "eat what you pay for". Ptah was
21 designed so you can use most of the features without having to agree to
25eeac2 @WouterVH fix some typos, and rst-syntax
WouterVH authored
22 all of the choices. You can pick what you like and use only what you like.
afbdd78 @runyaga What makes Ptah unique
runyaga authored
23
24 Performance
25 -----------
26
25eeac2 @WouterVH fix some typos, and rst-syntax
WouterVH authored
27 Since Ptah uses a RDBMS (via SqlAlchemY) Ptah is much much slower than your
28 traditional "hello world" benchmarks. While Pyramid may get 3000+ req/second
29 serving a response, there simply is no comparable benchmark for web
afbdd78 @runyaga What makes Ptah unique
runyaga authored
30 applications/content frameworks. We aim to stay between 110-130 request/second
239c9ca macbook pro gives 230-240 req/sec. remember no caching and its using …
alan runyan authored
31 (per single threaded python process). Today on 2010 macbook pro we get 230-240
32 requests/second. Remember we are applying security and doing heavily lifting.
25eeac2 @WouterVH fix some typos, and rst-syntax
WouterVH authored
33 Python, on a whole, is reasonably fast. Pypy should make us go between
239c9ca macbook pro gives 230-240 req/sec. remember no caching and its using …
alan runyan authored
34 1.5x and 3x faster.
afbdd78 @runyaga What makes Ptah unique
runyaga authored
35
36 Evolution not Revolution
37 ------------------------
38
39 You can plug-in Ptah into your web application after it has been
40 deployed. You should not have to alter your web application to
41 stitch in Ptah. For instance, you have a web application which
42 has already been built (you have a lot of routes, for example) - you
43 can decide where you want the CMS to participate.
44
45 Data model
46 ----------
47
48 Ptah specifies a relational data model which varies with degrees of
15d799d @fafhrd91 move top level packages to submodules
fafhrd91 authored
49 features (ptah is simpler than ptah.cms which, in turn, is simpler
50 that ptah.cmsapp). We chose a dirt-simple relational data model that
afbdd78 @runyaga What makes Ptah unique
runyaga authored
51 emphasizes pragmatism over purity. It should be approachable by
25eeac2 @WouterVH fix some typos, and rst-syntax
WouterVH authored
52 anyone who has previous database experience.
afbdd78 @runyaga What makes Ptah unique
runyaga authored
53
54 - ptah_cms_nodes
55
56 - ptah_cms_content
57
58 Security
59 --------
60 The most difficult aspect of complex web frameworks is consistenty enforcing
25eeac2 @WouterVH fix some typos, and rst-syntax
WouterVH authored
61 authorization policies. This is a critical aspect when there is a large
62 aftermarket of add-ons and a vibrant community of developers contributing
63 and re-using software.
64
afbdd78 @runyaga What makes Ptah unique
runyaga authored
65 A security story::
25eeac2 @WouterVH fix some typos, and rst-syntax
WouterVH authored
66
afbdd78 @runyaga What makes Ptah unique
runyaga authored
67 Bob Dobbs creates a Poll component which has a number of features
68 you would like to re-use. You install it and configure it to
69 show up in /polls. To view a poll you GET /polls/$id and to
70 vote you POST /polls/$id. The only integration with Ptah is that
71 he wanted it to be accessible through the auto-generated REST API.
72 So Polls have a entry in ptah_cms_nodes (for its URI feature).
25eeac2 @WouterVH fix some typos, and rst-syntax
WouterVH authored
73
afbdd78 @runyaga What makes Ptah unique
runyaga authored
74 After you have used the Poll for some time you find yourself with
75 the requirement, "Some Polls need to be displayed on a particular
76 page in your website, unfortunately, the section on the website
77 has security restrictions preventing only "Internal Staff" or a similar
78 role to see content in this section. You have never needed security
79 on any Polls. Fortunately since this Poll add-on participates with
80 the ptah_cms_nodes table, you can simply set the `parent` attribute
81 (which would have been null on Polls until this date) to the Page
25eeac2 @WouterVH fix some typos, and rst-syntax
WouterVH authored
82 where you will be showing the Poll.
83
afbdd78 @runyaga What makes Ptah unique
runyaga authored
84 After doing that anyone who attempts to goto /polls/$secure_pollid
85 but they do not have the correct roles will get a Forbidden error.
86 Also the REST api for that poll will also be protected without any
87 future work from you.
88
89 Flat is Better than Nested
90 --------------------------
91 While you can treat the content in the Ptah CMS as "heirarchical", in reality,
25eeac2 @WouterVH fix some typos, and rst-syntax
WouterVH authored
92 it is flat. We have 2 attributes we use for mapping on to hierarchies:
afbdd78 @runyaga What makes Ptah unique
runyaga authored
93 ptah_cms_nodes.parent_uri and the ptah_cms_content.path columns. The path
25eeac2 @WouterVH fix some typos, and rst-syntax
WouterVH authored
94 attribute is how we efficiently do fast look ups. Walking parent/children
afbdd78 @runyaga What makes Ptah unique
runyaga authored
95 relationships in a RDBMS is inefficient, say, compared to graph databases such
f2a7c6f @jayd3e Doc fixes.
jayd3e authored
96 as ZODB or Neo4J. RDBMS aren't graphs. The REST API is another example of this
091076d update with exclusion over inclusion
alan runyan authored
97 mantra.
afbdd78 @runyaga What makes Ptah unique
runyaga authored
98
99 REST as First Class Citizen
100 ---------------------------
101
25eeac2 @WouterVH fix some typos, and rst-syntax
WouterVH authored
102 By participating in the basic ptah.cms.content datamodel; your content can be
afbdd78 @runyaga What makes Ptah unique
runyaga authored
103 READ/UPDATED/DELETED via a REST URL without any work from you. And security
104 will be applied to your models. Install Ptah and curl
25eeac2 @WouterVH fix some typos, and rst-syntax
WouterVH authored
105 http://localhost:8080/__rest__/cms/ - we believe you won't be disappointed.
afbdd78 @runyaga What makes Ptah unique
runyaga authored
106
107 URIs Everywhere
108 ---------------
109
25eeac2 @WouterVH fix some typos, and rst-syntax
WouterVH authored
110 A core feature of this system is data sources will be integrated gratuitiously.
111 One thing that Plone has taught us is that if there is a service/persistence
112 engine; people will want to integrate into it (and expect it to participate
113 in all of the CMS services). URI are the token which represents a record,
114 be that a user record or a content record.
afbdd78 @runyaga What makes Ptah unique
runyaga authored
115
116 Easy to Fork
117 ------------
118
119 A goal to keep the software small is to encourage people to fork Ptah and
120 use it with different storages. Until we are convinced otherwise the Ptah
121 project will use a relational database. Please fork Ptah and replace
091076d update with exclusion over inclusion
alan runyan authored
122 RDBMS with Mongo or some other persistence system and tell us.
afbdd78 @runyaga What makes Ptah unique
runyaga authored
123
091076d update with exclusion over inclusion
alan runyan authored
124 Readability
afbdd78 @runyaga What makes Ptah unique
runyaga authored
125 -----------
126
127 When there is a decision to be made between legiblity of source code and
091076d update with exclusion over inclusion
alan runyan authored
128 performance we will opt for the readibility avenue. Follow pep8 guidelines and
129 consistent naming.
afbdd78 @runyaga What makes Ptah unique
runyaga authored
130
131 Future Proof
132 ------------
133
134 Ptah aims to be the first comprehensive CMS framework which will work with
25eeac2 @WouterVH fix some typos, and rst-syntax
WouterVH authored
135 Python 3.
Something went wrong with that request. Please try again.