Code Monkey home page Code Monkey logo

Comments (5)

fscherf avatar fscherf commented on June 17, 2024

Hi @semigodking,

i am very sorry, you discoverd a bug here. At the moment i am working on a release that fixes the broken publish-subscribe system. I missed the code you wonder about.

As i started this project, all message encoding and decoding was part of a custom subclass of the aiohttp websocket class (therefore "ws").
We splitted this code in multiple libraries because we have a rpc client library now that needs message processing as well.
If you want to send a notification based on a request (no broadcasting) you use aiohttp_json_rpc.communication.JsonRpcRequest.send_notification now.

Thx for pointing this issue out, i fixed the wrong call and added a test.

from aiohttp-json-rpc.

semigodking avatar semigodking commented on June 17, 2024

Hi @fscherf,
About these two lines, i am wondering why they are needed. They send staled notification whenever a client subscribes a topic.

from aiohttp-json-rpc.

fscherf avatar fscherf commented on June 17, 2024

@semigodking
If you subscribe to a topic on which were notifications send you missed, you get the last one.
We call this 'state' and use it for progress informations on long running tasks.
So if you connect on 10% of the task you dont have to wait for 11% to see the current progress.

from aiohttp-json-rpc.

semigodking avatar semigodking commented on June 17, 2024

from aiohttp-json-rpc.

fscherf avatar fscherf commented on June 17, 2024

you are right. you could make it configurable in a pull request :)

from aiohttp-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.