Giter Club home page Giter Club logo

monkshu's People

Contributors

ankit-saxena-deeplogictech avatar arpit9616 avatar bhaveshdhapola avatar ravindradlt avatar ravisiyota avatar sasidhar-dlt avatar sid-dlt avatar sridharan-dlt avatar tekmonksgithub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

monkshu's Issues

Proxy APIs via port 80 / 443

I think it is better if backend APIs are not something special, running on a special server. Of course, they have to be, but there is no reason to need another port, open to the entire world just for them.

We need to add some sort of a proxy bypass into the front-end server, if the URL scheme matches the bypass, then route it as a proxy pattern to a backend API server.

This will allow the API server to be isolated behind the frontend HTTP server, and also reduce the ports open.

Backend unable to serve APIs when launched using cluster

Testing conditions

  • Tested using latest monkshu code. Commit id 3f482a8
  • Node v14.15.1

Success case:

  • Launch backend using backend/server/server.js
  • Call /__org_monkshu__release API using backend/server/lib/rest.js
  • Tested OK

Screenshots:

  • API Call:
    monkshu_api_call_ok
  • Logs:
    monkshu_api_logs_ok

Failure case:

  • Launch backend using backend/server/cluster.js
  • Call /__org_monkshu__release API using backend/server/lib/rest.js
  • No response to the API call
  • Backend server logs error

StackTrace:

TypeError: Cannot read property '/__org_monkshu__release' of undefined
    at Object.getAPI (/home/arpit/Documents/git_repos/monkshu/backend/server/lib/apiregistry.js:65:12)
    at doService (/home/arpit/Documents/git_repos/monkshu/backend/server/server.js:94:26)
    at Object.server.onReqEnd (/home/arpit/Documents/git_repos/monkshu/backend/server/server.js:65:33)
    at IncomingMessage.<anonymous> (/home/arpit/Documents/git_repos/monkshu/backend/server/lib/http_server.js:32:38)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)

Suspected cause:

  • backend/server/lib/apiregistry.js line 64, apireg is set as undefined in the worker processes.

Screenshots:

  • API Call:
    monkshu_api_call_error
  • Logs:
    monkshu_api_logs_error

Frontend should cache entire webroot

Up to a certain size and maybe with filters (e.g. don't cache a large PDF). Then gzip it. On init.

So when requests come in - nothing to read (no IO) and nothing to gzip (no CPU). Just respond...

This should significantly improve performance.

PFX passphrase should be encrypted

A static file must NEVER have an unencrypted password. It is against most security compliance regulations, e.g. PCI.

So the PFX passphrases must be using crypt and be encrypted.

tokens not working with clustered backend

Tokens for APIs are not working in clustered mode, when needsToken=true is set in apiregistry.json for APIs in Monkvision

Some errors seen, when needsToken=true is set:

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.