maailma / kansa

Open-source convention member services
Apache License 2.0
17 stars 6 forks source link

Refactor API servers into one modular server #60

Closed eemeli closed 6 years ago

eemeli commented 6 years ago

Fixes #57

This PR effects a number of related changes:

Actual implementation and functionality should not be affected by any of these changes, and there are no changes to the database. A few things that should belong to individual modules don't yet; specifically the tests for Hugo nomination endpoints are still under integration-tests/.

eemeli commented 6 years ago

Updates:

offbyone commented 6 years ago

I'm late to the party, but I wanted to add that I actually really prefer the microserver architecture that is in there now to this. It gives the freedom to break out parts of the functionality of the system and replace them with other tools in a modular fashion behind the main API facade. That's a really powerful pattern, and I'd rather keep it.

offbyone commented 6 years ago

I want to be quite specific here, I want the ability to plug in different API frameworks, all the way up to language runtimes, under the main /api facade.

eemeli commented 6 years ago

This change should in fact make it easier to implement services with other language runtimes, as it's starting a process of breaking apart the functionalities provided in particular by what was kansa into smaller modules, which may then in turn be enabled or disabled. No changes are made to e.g. persistence.

As a specific example, stripe is now a module alongside hugo and raami because the overhead involved in splitting into a module (mostly in terms of complexity) is now sufficiently low that it makes sense. To now use an alternative implementation for it, it suffices to disabled the express.js module from the kansa.yaml config, add the alternative to your container orchestration, and configure your reverse proxy for it. Previously doing the same would have been somewhat messier.

offbyone commented 6 years ago

Ah! I misunderstood the level at which the split was occurring. 👍🏻🤟🏻 On Sat, Sep 8, 2018 at 11:15 AM Eemeli Aro notifications@github.com wrote:

This change should in fact make it easier to implement services with other language runtimes, as it's starting a process of breaking apart the functionalities provided in particular by what was kansa into smaller modules, which may then in turn be enabled or disabled. No changes are made to e.g. persistence.

As a specific example, stripe is now a module alongside hugo and raami because the overhead involved in splitting into a module (mostly in terms of complexity) is now sufficiently low that it makes sense. To now use an alternative implementation for it, it suffices to disabled the express.js module from the kansa.yaml config, add the alternative to your container orchestration, and configure your reverse proxy for it. Previously doing the same would have been somewhat messier.

— You are receiving this because your review was requested.

Reply to this email directly, view it on GitHub https://github.com/maailma/kansa/pull/60#issuecomment-419662795, or mute the thread https://github.com/notifications/unsubscribe-auth/AALFvWjVVHhxPfLY4LJpN7AcxQRKx21Xks5uZAkkgaJpZM4Wf4IX .

--

Chris R offby1 on Twitter, offbyone on github Not to be taken literally, internally, or seriously

eemeli commented 6 years ago

More updates:

eemeli commented 6 years ago

Hopefully I can let this rest for a little while after this:

eemeli commented 6 years ago

So as it turns out I didn't let this rest for a while.

I'm going to now merge this into master, and effectively continue development in a new dev branch that builds on top of this (including PRs #61 and #63) and includes changes to the API endpoints.