Coder Social home page Coder Social logo

Comments (4)

macsnoeren avatar macsnoeren commented on July 18, 2024

Ohw ... the old ways to implement the framework shall still be available ;), not breaking you code.

from python-p2p-network.

SamuelHaidu avatar SamuelHaidu commented on July 18, 2024

I was thinking about this. Maybe can implemented with middlewares like http frameworks. The middleware will intercepted the message or connection make something and pass to the next step. Can be implemented compression, encryption, encode and decoding objects (like blocks on blockchain).

from python-p2p-network.

macsnoeren avatar macsnoeren commented on July 18, 2024

Just like nodejs express framework or so. That sounds indeed interesting. I am now busy with experimenting with plugin framework. The plugins can interact on all the events that occur and are processed in the order that they have been added. It looks a bit like middleware solution.

from python-p2p-network.

macsnoeren avatar macsnoeren commented on July 18, 2024

I am now considering a design pattern for this according to http frameworks. Not yet found a solution other than the plugin I already implemented some how. However, with the plugins all plugins are executed. Within the HTTP frameworks if next() is not called, the process stops. That is also great for error handling.

The difference with HTTP framework is that also functionality to send specific message for instance. Discovery functionality for example. That can be implemented well using plugins. I am struggling how this could be done using the design pattern of the http framework.

Do you have any suggestions?

from python-p2p-network.

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.