75
Plone Server Experimental ? Fun !

Plone server

Embed Size (px)

Citation preview

Page 1: Plone server

Plone ServerExperimental ? Fun !

Page 2: Plone server

Ramon Navarro Bosch

CATALAN we do things because we don’t know it

was impossible

CTO iskra.cat CTO intranetum.com

FWT plone.org

Page 3: Plone server

No FWT opinion

Page 4: Plone server

so why ?

Page 5: Plone server
Page 6: Plone server

Great talks

Page 7: Plone server

Plone 2020

Page 8: Plone server

Martin DX et al.Really great component design

Page 9: Plone server

Timo QualityPlone Rest API

Page 10: Plone server

Asko HeroAsync + Low level

Page 11: Plone server

Nathan 4WDElastic Search - Front End NG2

Page 12: Plone server

Eric FrontFront End NG 2

Page 13: Plone server

Barcelona SPRINT 201615 DEVS on BACK + API + FRONT

Page 14: Plone server
Page 15: Plone server

THEMING

PAS

JS/CSS

CATALOG DX GENERIC SETUP

MULTI LINGUAL

LINK INTEGRITY

ZOPE2 AC

CMF ACQUISIT.

ZODB

VERSION LOCKING BEHAVIOR

Z3CFORM FORMLIB ZPT

ZTK

CONTENT RULES

VIEWLETS PORTLETS

WORK FLOWS

QUERY STRING

REGISTRY

TTW RESTRICT PYTHON

UPGRADE

DISCUSS CONTENT TYPES UUID

ITERATE OPENID

CACHING

PLONE

Page 16: Plone server

THEMING

PAS

JS/CSS

CATALOG DX GENERIC SETUP

MULTI LINGUAL

LINK INTEGRITY

ZOPE2 AC

CMF ACQUISIT.

ZODB

VERSION LOCKING BEHAVIOR

Z3CFORM FORMLIB ZPT

ZTK

CONTENT RULES

VIEWLETS PORTLETS

WORK FLOWS

QUERY STRING

REGISTRY

TTW RESTRICT PYTHON

UPGRADE

DISCUSS CONTENT TYPES UUID

ITERATE OPENID

CACHING

PLONE

Page 17: Plone server

THEMING

PAS API

JS/CSS

CATALOG API DX GENERIC

SETUP

MULTI LINGUAL

LINK INTEGRITY

ZOPE2 AC

CMF ACQUISIT.

ZODB

VERSION LOCKING BEHAVIOR

Z3CFORM FORMLIB ZPT

ZTK

CONTENT RULES

VIEWLETS PORTLETS

WORK FLOWS

QUERY STRING

REGISTRY

TTW RESTRICT PYTHON

UPGRADE

DISCUSS CONTENT TYPES

UUID

ITERATE OPENID

CACHING

TILES MOSAIC

REST API

PAS PLUGINS

CATALOG IMPLEMEN

FW API

FW API

SERVER

greatest common divisor CORE

frontend

PloneCMS TILES

Page 18: Plone server

THEMING

PAS API

JS/CSS

CATALOG API DX GENERIC

SETUP

MULTI LINGUAL

LINK INTEGRITY

ZOPE2 AC

CMF ACQUISIT.

ZODB

VERSION LOCKING BEHAVIOR

Z3CFORM FORMLIB ZPT

ZTK

CONTENT RULES

VIEWLETS PORTLETS

WORK FLOWS

QUERY STRING

REGISTRY

TTW RESTRICT PYTHON

UPGRADE

DISCUSS CONTENT TYPES

UUID

ITERATE OPENID

CACHING

TILES MOSAIC

REST API

PAS PLUGINS

CATALOG IMPLEMEN

FW API

FW API

SERVER

greatest common divisor CORE

frontend

PloneCMS TILES

Page 19: Plone server

THEMING

PAS API

JS/CSS

CATALOG API DX GENERIC

SETUP

MULTI LINGUAL

LINK INTEGRITY

ZOPE2 AC

CMF ACQUISIT.

ZODB

VERSION LOCKING BEHAVIOR

Z3CFORM FORMLIB ZPT

ZTK

CONTENT RULES

VIEWLETS PORTLETS

WORK FLOWS

QUERY STRING

REGISTRY

TTW RESTRICT PYTHON

UPGRADE

DISCUSS CONTENT TYPES

UUID

ITERATE OPENID

CACHING

TILES MOSAIC

REST API

PAS PLUGINS

CATALOG IMPLEMEN

FW API

FW API

SERVER

greatest common divisor CORE

frontend

PloneCMS TILES

Page 20: Plone server

THEMING

PAS API

JS/CSS

CATALOG API DX GENERIC

SETUP

MULTI LINGUAL

LINK INTEGRITY

ZOPE2 AC

CMF ACQUISIT.

ZODB

VERSION LOCKING BEHAVIOR

Z3CFORM FORMLIB ZPT

ZTK

CONTENT RULES

VIEWLETS PORTLETS

WORK FLOWS

QUERY STRING

REGISTRY

TTW RESTRICT PYTHON

UPGRADE

DISCUSS CONTENT TYPES

UUID

ITERATE OPENID

CACHING

TILES MOSAIC

REST API

PAS PLUGINS

CATALOG IMPLEMEN

FW API

FW API

SERVER

greatest common divisor CORE

frontend

PloneCMS TILES

Page 21: Plone server

THEMING

PAS API

JS/CSS

CATALOG API DX GENERIC

SETUP

MULTI LINGUAL

LINK INTEGRITY

ZOPE2 AC

CMF ACQUISIT.

ZODB

VERSION LOCKING BEHAVIOR

Z3CFORM FORMLIB ZPT

ZTK

CONTENT RULES

VIEWLETS PORTLETS

WORK FLOWS

QUERY STRING

REGISTRY

TTW RESTRICT PYTHON

UPGRADE

DISCUSS CONTENT TYPES

UUID

ITERATE OPENID

CACHING

TILES MOSAIC

REST API

PAS PLUGINS

CATALOG IMPLEMEN

FW API

FW API

SERVER

greatest common divisor CORE

frontend

PloneCMS TILES

Page 22: Plone server

Plone 5

Plone 6 XREST

APIJS

FRONT

POSSIBLE FUTURE

Page 23: Plone server

we need it at work (intranetum.com)

Performance problems on write operations and async

integration, lots of docker containers

Page 24: Plone server

Collecting all ideas, opinions of paining

zope/plone “features” and simplify

Page 25: Plone server

Why don’t use all the GOOD parts and ADAPT them

to create a REST CMS API FWT for a SIMPLER PLONE

backend ?

Simploneity

Page 26: Plone server

one way to do something

Page 27: Plone server

Non Opinionated

Page 28: Plone server

ZODB 5 ZEO asyncio

ZTK

Page 29: Plone server

An async app server that offers a traversable REST

API with a ZODB

Page 30: Plone server

And we can build a CMS on top of it

Page 31: Plone server

Headless CMS

• NOT included : The view part!

• Included : Strong flexible API

• Included : DB/Persistance

• Included : CRUD and Management ?

Page 32: Plone server

Content Type

• NO CMF

• zope.container and dx

• 1 content rule them all: container (Item)

Page 33: Plone server

Definition of content type

• Definition of Generic Content types global

• Content type defined in code with directives:

• catalog/index

• read/write

• primary

Page 34: Plone server

Definition of content typeclass 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" />

Page 35: Plone server

plone.jsonserializer

• Used on plone.app.mosaic

• Need to merge with plone.restapi

• Serializes and deserializes DX content and types to JSON

Page 36: Plone server

plone.registry

• Main/unique configuration place

• All persistent info in one place

Page 37: Plone server

API DEFINITION

• TRAVERSAL -> JSON

• FRAMING

• Websocket API

• PLONE REST API (BASE on plone.server)

Page 38: Plone server

API DEFINITION "plone.server.interfaces.IPloneSite": { "endpoints": { "@registry": { "GET": { "factory": "plone.server.api.registry.Read", "permission": "plone.ReadConfiguration" }, "PATCH": {

… "DELETE": { "factory": "plone.server.api.portal.DefaultDELETE", "permission": "plone.DeletePortals" }

Page 39: Plone server

CORS

• Defined by site on registry

• One configuration for all the site

Page 40: Plone server

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 } } ],

Page 41: Plone server

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

Page 42: Plone server

Traversal

• READ CALLS

• GET

• HEAD

• OPTIONS

• WRITE CALLS

• POST

• PATCH

• PUT

• DELETE

Page 43: Plone server

Request

• site_components (globalSiteManager)

• site_settings (plone.registry)

• app (rootApp)

• site (plone site)

• security (authenticated users)

• resource (main object)

• tail (queue of traversing after main object)

• _db_id (id of db)

• _site_id (id of site)

Page 44: Plone server

Helpers

• subrequest : do a real request to API

• do_traverse : do a traversal with security

Page 45: Plone server

Upload/Download

• External BlobStorage with async (buffer and resumable) for upload and download

• TUS support for client resumable upload

Page 46: Plone server

• 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

Page 47: Plone server

Delegate to External

• Define the interfaces and allow to have different implementations to get:

• Users DB

• Catalog

Page 48: Plone server

No Acquisition

No Attribute Traverse• portal[‘folder1’][‘folder2’][‘item’]

NO Generic Setup

NO z3cform

Page 49: Plone server

Roles• plone.Owner

• plone.Editor

• plone.Reader

• plone.Anonymous

• plone.SiteAdmin

• plone.SiteDeleter

Page 50: Plone server

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

Page 51: Plone server

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

Page 52: Plone server

plone.app.openid

plone.app.iterateplone.app.dexterity

plone.app.caching

Products.CMFPlacefulWorkflow

Products.Archetypes

zope.testing

Products.ATContentTypes

plone.app.upgrade

ZODB3Zope2

Products.CMFPlone

zope.sitezope.publisherzope.processlifetimezope.interface

zope.componentzope.traversing

zope.taleszope.talzope.structuredtextzope.pagetemplate

zope.locationzope.i18nmessageidzope.i18nzope.eventzope.dottedname

zope.deprecation

zope.deferredimport

zope.container

zope.cachedescriptors

zope.app.localesz3c.autoincludetransaction

plonetheme.barceloneta

plone.themeplone.sessionplone.schemaplone.registry

plone.protectplone.portlets

plone.portlet.staticplone.portlet.collection

plone.outputfiltersplone.memoize

plone.lockingplone.intelligenttext

plone.indexer

plone.i18n

plone.contentrulesplone.browserlayerplone.batching

plone.app.workflowplone.app.vocabulariesplone.app.viewletmanagerplone.app.uuid

plone.app.usersplone.app.themingplone.app.registryplone.app.redirector

plone.app.portletsplone.app.localesplone.app.linkintegrityplone.app.layout

plone.app.multilingualplone.app.i18nplone.app.folderplone.app.discussionplone.app.customerize

plone.app.controlpanel

plone.app.contenttypes

plone.app.contentrulesplone.app.contentmenu

plone.app.contentlistingplone.app.content

plone.api

mockup

five.ptfive.localsitemanager

five.customerize

borg.localrole

Products.statusmessagesProducts.contentmigrationProducts.ResourceRegistriesProducts.PortalTransformsProducts.PluginRegistry

Products.PluggableAuthServiceProducts.PlonePAS

Products.PlacelessTranslationServiceProducts.PasswordResetToolProducts.MimetypesRegistry

Products.MimetypesRegistryProducts.GenericSetupProducts.ExternalEditorProducts.ExtendedPathIndexProducts.DCWorkflow

Products.CMFUidProducts.CMFQuickInstallerToolProducts.CMFEditionsProducts.CMFDynamicViewFTIProducts.CMFDiffToolProducts.CMFCoreExtensionClassDateTimeAcquisition

zdaemon

ZConfig

zc.lockfile

Products.StandardCacheManagersProducts.PythonScriptsProducts.MIMEToolsProducts.MailHostProducts.ExternalMethodProducts.BTreeFolder2zope.viewlet

zope.testbrowserzope.sizezope.sequencesort

zope.sendmailzope.securityzope.schemazope.ptresourcezope.proxyzope.lifecycleeventzope.exceptionszope.contenttypezope.contentproviderzope.configurationzope.browserresourcezope.browserpagezope.browsermenuzope.browserzLOGzExceptionstempstorage

pytzinitgroupsdocutilsZopeUndoRestrictedPythonRecordProducts.ZCTextIndex

Products.ZCatalogProducts.OFSPPersistenceMultiMapping

Missing

DocumentTemplateAccessControlProducts.SecureMailHostProducts.CMFFormControllerzope.ramcachezope.ramcacheplone.openidzope.annotation

z3c.formplone.z3cformplone.supermodelplone.autoformplone.app.z3cform

lxmlplone.schemaeditor

plone.rfc822plone.namedfileplone.formwidget.namedfileplone.dexterityplone.behaviorplone.app.textfieldz3c.zcmlhook

plone.cachepurgingplone.caching

Products.validationplone.app.widgets

plone.app.collection

plone.app.blobplone.uuid

plone.folderProducts.ZSQLMethodszope.datetimezope.brokenzope.filerepresentationplone.keyringcollective.monkeypatcher

five.globalrequestrepoze.xmliterplone.transformchainsixUnidecodezope.componentvocabulary

zope.formlibplone.app.imagingplone.app.querystringromanplone.subrequest

plone.resourceeditorplone.resource

diazoplone.app.relationfieldplone.app.intid

z3c.relationfieldarchetypes.multilingual

plone.app.lockingbehavior

plone.app.versioningbehavior

plone.app.eventplone.stringinterpzope.globalrequest

Chameleonz3c.ptProducts.ZopeVersionControl

zope.copyzope.app.publicationplone.scaleplone.synchronize

plone.alteregoarchetypes.schemaextenderfive.intidzope.intidzc.relationz3c.objpathplone.formwidget.recurrence

plone.eventProducts.DateRecurringIndexcollective.elephantvocabulary

zope.errorzope.authenticationzope.keyreference

Page 53: Plone server

plone.app.openid

plone.app.iterateplone.app.dexterity

plone.app.caching

Products.CMFPlacefulWorkflow

Products.Archetypes

zope.testing

Products.ATContentTypes

plone.app.upgrade

ZODB3

Zope2

Products.CMFPlone

zope.sitezope.publisherzope.processlifetimezope.interface

zope.componentzope.traversing

zope.taleszope.talzope.structuredtext

zope.pagetemplate

zope.locationzope.i18nmessageidzope.i18nzope.event

zope.dottednamezope.deprecation

zope.deferredimportzope.container

zope.cachedescriptors

zope.app.locales

z3c.autoinclude

transaction

plonetheme.barceloneta

plone.theme

plone.sessionplone.schemaplone.registryplone.protectplone.portlets

plone.portlet.staticplone.portlet.collection

plone.outputfiltersplone.memoizeplone.lockingplone.intelligenttext

plone.indexer

plone.i18n

plone.contentrulesplone.browserlayerplone.batching

plone.app.workflowplone.app.vocabulariesplone.app.viewletmanagerplone.app.uuid

plone.app.users

plone.app.theming

plone.app.registryplone.app.redirector

plone.app.portletsplone.app.localesplone.app.linkintegrityplone.app.layout

plone.app.multilingualplone.app.i18nplone.app.folderplone.app.discussionplone.app.customerize

plone.app.controlpanelplone.app.contenttypes

plone.app.contentrulesplone.app.contentmenu

plone.app.contentlistingplone.app.content

plone.api

mockup

five.pt

five.localsitemanager

five.customerize

borg.localrole

Products.statusmessagesProducts.contentmigration

Products.ResourceRegistries

Products.PortalTransforms

Products.PluginRegistry

Products.PluggableAuthService

Products.PlonePAS

Products.PlacelessTranslationService

Products.PasswordResetToolProducts.MimetypesRegistry

Products.MimetypesRegistry

Products.GenericSetup

Products.ExternalEditorProducts.ExtendedPathIndex

Products.DCWorkflowProducts.CMFUidProducts.CMFQuickInstallerTool

Products.CMFEditionsProducts.CMFDynamicViewFTI

Products.CMFDiffTool

Products.CMFCore

ExtensionClass

DateTimeAcquisition

zdaemon

ZConfig

zc.lockfile

Products.StandardCacheManagersProducts.PythonScriptsProducts.MIMEToolsProducts.MailHostProducts.ExternalMethodProducts.BTreeFolder2

zope.viewlet

zope.testbrowserzope.size

zope.sequencesortzope.sendmailzope.security

zope.schema

zope.ptresource

zope.proxy

zope.lifecycleevent

zope.exceptions

zope.contenttypezope.contentproviderzope.configurationzope.browserresourcezope.browserpagezope.browsermenuzope.browser

zLOGzExceptionstempstorage

pytzinitgroupsdocutilsZopeUndoRestrictedPythonRecord

Products.ZCTextIndexProducts.ZCatalog

Products.OFSPPersistenceMultiMapping

Missing

DocumentTemplateAccessControlProducts.SecureMailHostProducts.CMFFormController

zope.ramcachezope.ramcacheplone.openidzope.annotation

z3c.formplone.z3cform

plone.supermodel

plone.autoform

plone.app.z3cform

plone.schemaeditorplone.rfc822

plone.namedfile

plone.formwidget.namedfile

plone.dexterityplone.behaviorplone.app.textfield

z3c.zcmlhook

plone.cachepurging

plone.caching

Products.validationplone.app.widgets

plone.app.collection

plone.app.blob

plone.uuid

plone.folder

Products.ZSQLMethods

zope.datetimezope.brokenzope.filerepresentation

plone.keyring

collective.monkeypatcher

five.globalrequest

repoze.xmliter

plone.transformchain

Unidecodezope.componentvocabulary

zope.formlib

plone.app.imaging

plone.app.querystring

plone.subrequestplone.resourceeditorplone.resourcediazoplone.app.relationfield

plone.app.intidz3c.relationfield

archetypes.multilingual

plone.app.lockingbehavior

plone.app.versioningbehaviorplone.app.event

plone.stringinterp

zope.globalrequest

Chameleon

z3c.pt

Products.ZopeVersionControlzope.copy

zope.app.publication

plone.scale

plone.synchronize

plone.alterego

archetypes.schemaextender

five.intid

zope.intid

zc.relation

z3c.objpath

plone.formwidget.recurrence

plone.event

Products.DateRecurringIndexcollective.elephantvocabularyzope.error

zope.authenticationzope.keyreference

Products.OFSP

AccessControl

zope.security/securitypolicy plone.server

aiohttp/plone.server

Products.ExtendedPathIndex

Products.ZCTextIndexProducts.ZCatalog

Products.DateRecurringIndex

zope.testing

zope.publisher

zope.testbrowser

plone.app.users

DateTime

Products.BTreeFolder2

plone.portlets

zope.tales

ExtensionClass

zope.site

zope.traversing

Page 54: Plone server

plone.app.openid

plone.app.iterate

plone.app.dexterity

plone.app.caching

Products.CMFPlacefulWorkflow

zope.testing

plone.app.upgrade

ZODB3

Products.CMFPlone

zope.sitezope.publisherzope.processlifetimezope.interface

zope.componentzope.traversing

zope.taleszope.talzope.structuredtext

zope.locationzope.i18nmessageidzope.i18n

zope.event

zope.dottednamezope.deprecation

zope.deferredimportzope.container

zope.cachedescriptors

zope.app.locales

z3c.autoincludetransaction

plone.sessionplone.schemaplone.registryplone.protectplone.portlets

plone.portlet.static

plone.portlet.collection

plone.outputfiltersplone.memoizeplone.lockingplone.intelligenttext

plone.indexer

plone.i18n

plone.contentrulesplone.browserlayerplone.batching

plone.app.workflow

plone.app.vocabularies

plone.app.viewletmanager

plone.app.uuid

plone.app.users

plone.app.registry

plone.app.redirector

plone.app.portlets

plone.app.localesplone.app.linkintegrity

plone.app.layout

plone.app.multilingual

plone.app.i18n

plone.app.folder

plone.app.discussion

plone.app.customerize

plone.app.controlpanel

plone.app.contenttypes

plone.app.contentrules

plone.app.contentmenu

plone.app.contentlisting

plone.app.content

plone.api

mockup

borg.localrole

Products.statusmessages

Products.contentmigration

Products.PortalTransforms

Products.PluginRegistry

Products.PluggableAuthServiceProducts.PlonePAS

Products.PlacelessTranslationService

Products.PasswordResetToolProducts.MimetypesRegistry

Products.MimetypesRegistry

Products.GenericSetup

Products.ExternalEditorProducts.ExtendedPathIndex

Products.DCWorkflow

Products.CMFUid

Products.CMFQuickInstallerTool

Products.CMFEditions

Products.CMFDynamicViewFTI

ExtensionClass

DateTime

zc.lockfile

Products.StandardCacheManagersProducts.PythonScriptsProducts.MIMEToolsProducts.MailHostProducts.ExternalMethodProducts.BTreeFolder2

zope.testbrowserzope.size

zope.sequencesortzope.sendmailzope.security

zope.schemazope.ptresource

zope.proxyzope.lifecycleeventzope.exceptionszope.contenttype

zope.contentprovider

zope.configuration

zope.browserresource

zope.browserpage

zope.browser

zLOGzExceptionstempstorage

docutils

ZopeUndoRestrictedPythonRecord

Products.ZCTextIndex

Products.ZCatalogPersistence

MultiMapping

Missing

DocumentTemplateAccessControlProducts.SecureMailHost

zope.ramcachezope.ramcacheplone.openidzope.annotation

plone.supermodel

plone.schemaeditor

plone.rfc822

plone.dexterity

plone.behaviorplone.app.textfield

z3c.zcmlhook

plone.cachepurging

plone.caching

Products.validation

plone.app.collection

plone.app.blobplone.uuid

zope.datetimezope.broken

zope.filerepresentation

plone.keyring

collective.monkeypatcher

repoze.xmliter

plone.transformchain

Unidecode

zope.componentvocabulary

plone.app.imagingplone.app.querystring

plone.subrequest

plone.resourceeditor

plone.resource

diazo

plone.app.relationfield

plone.app.intid

z3c.relationfield

plone.app.lockingbehavior

plone.app.versioningbehavior

plone.app.event

plone.stringinterp

zope.globalrequest

Products.ZopeVersionControl

zope.copy

zope.app.publication

plone.scale

plone.synchronize

plone.alterego

zope.intidz3c.objpath

plone.event

Products.DateRecurringIndex

collective.elephantvocabulary

zope.error

zope.authentication

zope.keyreference

zope.browsermenu

Persistence

Products.CMFQuickInstallerTool

plone.app.blob

plone.serverplone.namedfile

plone.folder

borg.localrole

plone.app.uuid

plone.app.redirector

zope.ptresource

plone.app.intid

plone.app.i18n

Products.CMFPlone

plone.browserlayer

plone.app.textfield

Page 55: Plone server

plone.app.iterate

plone.app.caching Products.CMFPlacefulWorkflow

plone.app.upgrade

ZODB5

zope.processlifetime

zope.interface

zope.component

zope.structuredtext

zope.location

zope.i18nmessageid

zope.i18n

zope.dottedname

zope.deprecation

zope.deferredimport

zope.container

zope.cachedescriptors

zope.app.locales

z3c.autoinclude

transaction

plone.sessionplone.schema

plone.registry

plone.protect

plone.outputfilters

plone.memoize

plone.locking

plone.intelligenttext

plone.indexer

plone.i18n

plone.contentrules

plone.batching

plone.app.vocabularies

plone.app.locales

plone.app.layout

plone.app.customerize

plone.app.contentrules

plone.api

Products.contentmigration

Products.PortalTransforms

Products.PluginRegistry

Products.PlacelessTranslationService

Products.MimetypesRegistry

Products.MimetypesRegistry

Products.GenericSetup

Products.DCWorkflow

Products.CMFEditions

zc.lockfile

Products.StandardCacheManagers

Products.PythonScripts

Products.MIMETools

Products.MailHost

Products.ExternalMethodzope.size

zope.sequencesort

zope.sendmail

zope.security

zope.schema

zope.proxy

zope.lifecycleevent

zope.exceptions

zope.contenttype

zope.contentprovider

zope.configurationzLOG

zExceptions

ZopeUndo

RestrictedPython

Record

MultiMapping

DocumentTemplateProducts.SecureMailHostzope.ramcache

zope.ramcache

plone.openid

zope.annotation

plone.supermodel

plone.rfc822

plone.dexterity

plone.behavior

z3c.zcmlhook

plone.cachepurging

plone.caching

Products.validation

plone.uuid

zope.datetime

zope.broken

zope.filerepresentation

plone.keyring collective.monkeypatcher

plone.transformchain

zope.componentvocabulary

plone.app.imaging

plone.app.querystring

plone.resource

plone.app.relationfield

z3c.relationfield

plone.app.lockingbehavior

plone.app.versioningbehaviorplone.stringinterp

Products.ZopeVersionControl

zope.copy

zope.app.publication

plone.scale

plone.synchronize

plone.alteregozope.intid z3c.objpath

collective.elephantvocabulary

zope.error

zope.authentication

zope.keyreference

zope.event

zdaemon

ZConfig

persistent

zc.relation

Products.CMFDiffTool

Products.ExternalEditor

Products.PasswordResetTool

Page 56: Plone server

How transactions work?

• 1 connection x thread

• locking 1 transaction x request object

• for each request cache updated

Page 57: Plone server

Async loop

• Why you need async ??

• Async Tasks connected to ZODB

Page 58: Plone server

Async Queueawait getUtility(IQueueUtility).add(viewOperation)

Main Thread

Transaction Executor Thread

Queue Executor Thread

Queue Executor Thread

Queue Executor Thread

ZEO Networking

Thread

Page 59: Plone server

AioHTTP

• FAST

• SSL support

• Custom router

• Websockets support

HTTP client/server for asyncio

Page 60: Plone server

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

Page 61: Plone server

Python

>= 3.5

Page 62: Plone server

Testing

• py.test + layers (gocept.pytestlayer)

• coverage

• Functional to API

• WS and API wrappers / helpers

Page 63: Plone server

Some addons

• users : pserver.oauth

• catalog : pserver.elasticsearch

• field : pserver.gcloudstorage

• cms : pserver.cms

Page 64: Plone server

Performance

• standalone (12t 100c) = 119% + ràpid

• cluster 3 UC

• GUnicorn UVLoop + 2 processos plone.server

• Mean RO : 170% + ràpid

Page 65: Plone server

Performance

Page 66: Plone server

Performance

Page 67: Plone server

Performance

Page 68: Plone server

DEMO

• https://github.com/pyrenees/pserver.demo.git

• Content Type definition

• API definition

• Install

• Configuration of a site

Page 69: Plone server

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

Page 70: Plone server

Futures

• Neo4J backend

• GraphQL query interface

• Create DB in a ZEO ?

Page 71: Plone server

Near future

• REST API

• PLONE_CLIENT

Page 72: Plone server

We are a community! We can have fun!

We should be proud!

Page 73: Plone server
Page 74: Plone server

Who wants this “experiment” is named

plone.server ?

Page 75: Plone server

Thanks !