Project details
Background
In relation to the switch to a new CMS for norden.org, an idea to decouple the organisation data from the CMS and use it as a service. At the time there was no system that could manage all the different organisation and workgroups within the Nordic Co-operation. There are over 500 organisations under the co-operation and more than 2200 persons actively having an assignment in one or more organisations.
A decision was made that we would build this solution inhouse and since I (David) were the only developer: The task was all mine. It should be built as a service that could integrate with norden.org and other systems, such as event registrations, calendar applications and so on. It should also support the six different work languages we use in the organisation. So each description of an organisation should be able to be localized.
After interviewing a few experts within the field of the organisation structure of the Nordic Co-operation drafts of data models were made and the development could start.
Choice of technology
For ease of development I chose to use the Django Framework in order to build the foundation of OAS. I've good experiences with Python and Django in smaller projects before and in regards for the deadline ahead it was the right choice. Django is a mature and stable framework that will support the system for a long time forward.
Project and development cycle
This project was running along side the development of the new norden.org and when time allowed, I was working on OAS. I quickly made good progress, much thanks to the choice of framework and a rigid data-model. The first hurdles I had to run through was the multilingual feature, that took some time to setup and work well with the Organisation models.
The project consists of a database and API layer which was the quickest to put in place. The administration frontend took the majority of the development time. Django has a admin page which is very good for some administrative tasks, but a tailor made frontend was needed for coordinators who would register new organistations, new assignments and new people.
The project was deployed into production in end of August 2018 and been having some minor updates since then. Such as JWT support between diffent services and a v2 API.
Today OAS is being used to pull out lists of different people in national delegations, party groups and parties for the Nordic Council, and well integrated with the main website norden.org.
Multilingual support
The multilingual support was developed from scratch. This in order to support fallback languages (natural replacement language for a certain language). A great deal of inspiration was taken from LinguaPlone. An "object" can have a canonical language (original language) and translations. All multilingual text fields in OAS uses this feature and are optimized for searching.
Integrations
First off the OAS has a "Read Only" REST API where authenticated users can pull data. This is pretty standard, the user authenticates and requests a token (with a TTL value) which has to be passed on every requests. This grants the user access to the different organistions and assignments within the organistion.
Secondly there is a PUSH feature in OAS, which sends signals to norden.org when an event has happend. We call them PushAttempts.
As an example: If a new person has been registered and saved in OAS a signal is calling a HTTP requests to a "subscriber" (norden.org is a subscriber). It tells the subscriber. "A new CREATE event on PERSON has been fired, here is the URI, go fetch". The subscriber responds to the requests with a HTTP response code.
If there is a problem the PushAttempt is marked as failed and will be retried at a later stage, or manually from a list within Django. There are PushAttempts for CREATE, UDPATE and DELETE.
Since signals in Django is not asyncronous, the http request is fired out on its own thread to prevent blocking the administrator in OAS.
My role in the project
I've been the driving force to make this project happen and resulting in a product that now is a of the web ecosystem for the Nordic Co-operation. I've been responsible for every part of the process. From designing the solution, development and deployment and server setup. It's a databank. Fully GDPR compliant and can be well used in the future for up coming software and services.