Code Monkey home page Code Monkey logo

Comments (4)

tshemsedinov avatar tshemsedinov commented on June 14, 2024

Now we have:

  • per connection context and context.uuid autogenerated to identify connection context
  • persistently stored context.session for whole session identified by context.session.token
  • and context.session.accountId to identify certain user

See example: https://github.com/metarhia/Example/blob/34e4bb05b3048778c28dff675cfe64f9159b87d9/application/api/example.1/getClientInfo.js#L1-L9

I think we do not need session or connection bounded logger, because we use local logs for system logging, while for business-process logging we need separate place: Journal (system wide, single for all servers)

Also I do not think that we need database connection in context associated with certain transaction, we can do it in different way: any transaction should be started/committed/rolledback in a single routine, if we need to pass a reference to a connection to other procedures, we can do it manually, but I'd like to have start/commit/rollback in one place and use passed reference just for queries but not for doing operations with transaction.

from impress.

tshemsedinov avatar tshemsedinov commented on June 14, 2024

Also we do not need class or factory function for context, what we need is a schema and .d.ts typing

from impress.

tshemsedinov avatar tshemsedinov commented on June 14, 2024

Platform should catch all context identifiers like context.uuid when we

  • throw
  • return Error
  • console.*
    and write to logs

Alternatively we can register ids manually:

  • by context.tag: object
  • or context.registerLogId('key', value)
  • or console.registerLogId('key', value)

from impress.

tshemsedinov avatar tshemsedinov commented on June 14, 2024

Partially done in Version 3.0.0, other features requires consensus and we will open new issues for them

from impress.

Related Issues (20)

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.