ethereum-oasis-op / baseline

The Baseline Protocol is an open source initiative that combines advances in cryptography, messaging, and distributed ledger technology to enable confidential and complex coordination between enterprises while keeping data in systems of record. This repo serves as the main repo for the Baseline Protocol, containing core packages, examples, and reference implementations.
https://docs.baseline-protocol.org
Other
576 stars 237 forks source link

Decide on and introduce a server framework for SRI #491

Closed Therecanbeonlyone1969 closed 2 years ago

Therecanbeonlyone1969 commented 2 years ago

Overview

Core Devs need to decide on the server framework used for the SRI nad implement it as part of the node.js project.

Questions

Assumptions

Acceptance

Tasks

skosito commented 2 years ago

My suggestion is we use express.js, it is very simple and common choice. If you agree, I can setup simple project.

Therecanbeonlyone1969 commented 2 years ago

question: given that the SRI will probably be most commonly used to not only get started but also as the basis for company-specific implementation, are there any downsides to using express vs axios vs koa for example?

Manik-Jain commented 2 years ago

Express can act as a quick starter as @skosito mentioned, and considering what @Therecanbeonlyone1969 has mentioned I think it would be even better to have some out of the box implementation frameworks like NestJS that build upon the basic express and TS, and provide improved package control. And eliminating a lot of initial setup and lint issues

https://nestjs.com/

ognjenkurtic commented 2 years ago

@Manik-Jain i agree, we do not need to reinvent the wheel here. I especially like https://docs.nestjs.com/recipes/cqrs. Proven scalable pattern for a growing codebase. I would be happy to implement an example and share with the team.

@Therecanbeonlyone1969 i am not an expert on node. Express and Koa are server frameworks while Axios is a HTTP client. Koa is marketed as the spiritual leader of Express. but i am not sure if our choice would make any impact on the adoption. I am much more in favor of Manik's proposal - it means we can bootstrap quickly and focus on the architecture and features, instead of on the low level stuff. NestJS is a commonly used framework that should be understandable to a large number of devs.

ognjenkurtic commented 2 years ago

@Manik-Jain i agree, we do not need to reinvent the wheel here. I especially like https://docs.nestjs.com/recipes/cqrs. Proven scalable pattern for a growing codebase. I would be happy to implement an example and share with the team.

@Therecanbeonlyone1969 i am not an expert on node. Express and Koa are server frameworks while Axios is a HTTP client. Koa is marketed as the spiritual leader of Express. but i am not sure if our choice would make any impact on the adoption. I am much more in favor of Manik's proposal - it means we can bootstrap quickly and focus on the architecture and features, instead of on the low level stuff. NestJS is a commonly used framework that should be understandable to a large number of devs.

Any thoughts on nest.js and cqrs?

ognjenkurtic commented 2 years ago

We (BRI-3 team) decided to go with nest.js and cqrs after a walkthrough of the POC implementation on the weekly meeting today. I 'll be opening a PR with a sample implementation of the BpiSubjects CRUD task from #488, together with comments, that will serve as a basis for further implementation.