ankraft / ACME-oneM2M-CSE

An open source CSE Middleware for Education.
https://acmecse.net/
BSD 3-Clause "New" or "Revised" License
23 stars 16 forks source link

Feat/storage mongodb #123

Closed samuelbles07 closed 11 months ago

samuelbles07 commented 11 months ago

Hi, it is a mistake, it should not PR to this repository.

Btw, this PR is about integrating MongoDB as storage options and changing WSGI to waitress

ankraft commented 11 months ago

Interesting work! I would be interested in the performance differences. Perhaps you might run the test cases against the implementation?

Also, the change to WSGI is interesting. But I noticed that this removes the certificate checks for https, right?

samuelbles07 commented 11 months ago

I will upload the perfomance differences in this thread later after i fix a couple things.

Yes the WSGI changes will remove the certificate checks, that's why it needs a frontend web server to make https works (nginx, etc)

ankraft commented 11 months ago

Basically an authorising API gateway. This looks like a fairly moderate change. Perhaps I can adopt it to the project, but make it configurable, which method to use (standalone vs managed infrastructure). Anyway: Great work!

Also, I just added simple basic and bearer (using token) authentication to the http server (via the Authorization header) in the development branch. By no means ready for production, but as a starting point which can be extended later.

BobFIV commented 11 months ago

I have previously worked on an implementation based on MongoDB. We went through a lot of optimization and scaling efforts. I'll be interested in your results and happy to offer suggestions, if needed.

ankraft commented 11 months ago

Reg WSGI: I made a quick integration test, and it works fine. I will now integrate it further and make it configurable.

One thing I noticed when running the load tests is that by default the number of concurrent connections is limited to 100 by default. I found that this number can be changed by passing the connection_limit parameter to serve(), e.g. serve(..., connection_limit=200).