GithubHelp home page GithubHelp logo

Server issued notifications about json-rpc HOT 2 OPEN

ikv avatar ikv commented on August 15, 2024
Server issued notifications

from json-rpc.

Comments (2)

pavlov99 avatar pavlov99 commented on August 15, 2024

Hi, @ikv

This library's main purpose is to provide a protocol implementation and be as much server agnostic as possible. It does support "request-response" functionality via manager and provides optional backends for Django and Flask.

In your case, there is no API request "from outside" as the server sends notifications based on some internal event. That means that you do not need to use a large chunk (80%+) of this library. I would consider two cases:

  1. Use this library to make sure notifications are in a correct JSON-RPC format (regular or batch). The library provides some validation, data manipulation, and serialization mechanisms. Please take a look at JSONRPC20Response.

  2. Skip this library and manually create a JSON-RPC response object. Since it is created on the server side, you know it is in the right format. In this case, you don't need any format validation or exception handling on the server.

Please let me know what you think about it.

from json-rpc.

ikv avatar ikv commented on August 15, 2024

In your case, there is no API request "from outside" as the server sends notifications based on some internal event.

This is not the case.
I need to do both: accept external requests and issue notifications.

For example, this protocol requires to push two different events (miming.set_target and mining.notify) after first call to mining.authorize.

from json-rpc.

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.