Coder Social home page Coder Social logo

Comments (8)

greenhat avatar greenhat commented on June 12, 2024

Also, not all users need the whole OraclePool struct. If only one or two properties are used, consider passing them instead.

from oracle-core.

SethDusek avatar SethDusek commented on June 12, 2024

I will work on this. Just to clarify, the goal is to make OraclePool instance static via lazy_static right?

from oracle-core.

greenhat avatar greenhat commented on June 12, 2024

I thought about lazy_static, but I see it as a sort of "last resort". I mean it's essentially an immutable global var, which we cannot mock in tests. I'd prefer passing an instance as a parameter and if it gets too ugly, make it a lazy_static.

from oracle-core.

hanbu97 avatar hanbu97 commented on June 12, 2024

Do we need implement Sync for OraclePool first?

from oracle-core.

greenhat avatar greenhat commented on June 12, 2024

Do we need implement Sync for OraclePool first?

Good question. I'd keep it as simple as possible. If it becomes too much of a hassle, we can pass only needed fields as arguments.

from oracle-core.

hanbu97 avatar hanbu97 commented on June 12, 2024

For simplicity, maybe a channel and spawned OraclePool can be introduced. But the performance will be limited to single thread(or multi by mpmc and multiple spawned). Do you have any good idea?

from oracle-core.

greenhat avatar greenhat commented on June 12, 2024

For simplicity, maybe a channel and spawned OraclePool can be introduced. But the performance will be limited to single thread(or multi by mpmc and multiple spawned). Do you have any good idea?

Oh, it sounds way too complicated. It's essentially a bunch of parameters of simple types used to query the node. I mean, I'm not even sure that we need OraclePool to keep those "scans" together. I believe we can pass them directly to the interested parties. Also, *Scan types are not set in stone and can be altered if needed.

from oracle-core.

greenhat avatar greenhat commented on June 12, 2024

The bounty is sent. Thank you!

from oracle-core.

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.