Más contenido relacionado La actualidad más candente (19) Similar a Plone server (20) Más de Ramon Navarro (12) Plone server23. we need it at work
(intranetum.com)
Performance problems
on write operations and async
integration, lots of docker containers
25. Why don’t use all the GOOD parts and
ADAPT them
to create a REST CMS API FWT
for a SIMPLER PLONE
backend ?
Simploneity
29. An async app server that
offers a traversable REST
API with a ZODB
31. Headless CMS
• NOT included : The view part!
• Included : Strong flexible API
• Included : DB/Persistance
• Included : CRUD and Management ?
32. Content Type
• NO CMF
• zope.container and dx
• 1 content rule them all: container (Item)
33. Definition of content type
• Definition of Generic Content types global
• Content type defined in code with directives:
• catalog/index
• read/write
• primary
34. Definition of content type
class IDocument(IItem):
catalog(title='text')
title = schema.TextLine(
title=_('Títle'),
required=False)
<plone:contenttype
portal_type="Todo"
schema=".todo.ITodo"
class=".todo.Todo"
behaviors=".todo.IDublinCore"
/>
40. Mount DB / Sites
• /DB/SITE/FOLDER/OBJ
• ZEO / ZODB
"databases": [
{
"plone": {
"storage": "ZODB",
"folder": "data"
},
"zeo1": {
"storage": "ZEO",
"address": "127.0.0.1",
"port": 8090
}
}
],
41. Traversal
• Get the resource
• User abstraction
• Language negotiation
• Check Access permission
• View lookup
• Traverse view
• View security checker
• Render lookup / content type
negotiation
• Transaction View execution
• Render execution / Framing
• CORS checks/headers
46. • Process configuration (APP configuration) in
Root Object throw config JSON file (may REST
API)
• Registry configuration and local components
(SITE configuration) throw REST API
• Installation addons (old install.py)
AddOns and config
47. Delegate to External
• Define the interfaces and allow to have different
implementations to get:
• Users DB
• Catalog
50. Permissions
• plone.AccessContent
• plone.ModifyContent
• plone.DeleteContent
• plone.AddContent
• plone.ViewContent
• plone.AccessPreflight
• plone.SeePermissions
• plone.ChangePermissions
• plone.ReindexContent
• plone.AddPortal
• plone.GetPortals
• plone.DeletePortals
• plone.MountDatabase
• plone.GetDatabases
• plone.UmountDatabase
• plone.WriteConfiguration
• plone.ReadConfiguration
• plone.RegisterConfigurations
• plone.ManageAddons
51. Packages
• from 93 to 10 plone*
• Lines of code (py):
• Plone 5 : 881070
• plone* 129185
• P.S. : 222447
• plone* 13955
• plone.server
• plone.dexterity
• plone.registry
• plone.supermodel
• plone.uuid
• plone.behavior
• plone.alterego
• plone.rfc822
• plone.jsonserializer
• plone.i18n
56. How transactions work?
• 1 connection x thread
• locking 1 transaction x request object
• for each request cache updated
59. AioHTTP
• FAST
• SSL support
• Custom router
• Websockets support
HTTP client/server for asyncio
60. Gunicorn compatible
• WSGI
• Workers: gunicorn my_app_module:my_web_app
--bind localhost:8080 --worker-class
aiohttp.worker.GunicornWebWorker --workers
6
• UVLoop: gunicorn my_app_module:my_web_app
--bind localhost:8080 --worker-class
aiohttp.worker.GunicornUVLoopWebWorker --
workers 6
62. Testing
• py.test + layers (gocept.pytestlayer)
• coverage
• Functional to API
• WS and API wrappers / helpers
63. Some addons
• users : pserver.oauth
• catalog : pserver.elasticsearch
• field : pserver.gcloudstorage
• cms : pserver.cms
69. TODOS
• Tests and integration of forked packages (9)
• Lots of security audits
• Blobs (ZODB implementation)
• caching - memoize
• Offline Migration
• aiohttp.web -> aiohttp.server
• user DB / catalog (ZODB implementation)
• Join jsonserializer + restapi
• plone.api
• Workflow
• Throw The API customization
72. We are a community!
We can have fun!
We should be proud!