Git Product home page Git Product logo

Comments (5)

truedat101 avatar truedat101 commented on August 16, 2024 1

I believe this is now supported as of #23. Thanks. Closing.

from tiny-redis.

adilbaig avatar adilbaig commented on August 16, 2024

Hey,

Thanks for putting your time into this. This would be a great addition. I happened to peek into your fork, just to get a feel of the work. Good progress!

I'd like to share a quick thought on this. I intend to keep this library thread free. Any introduction of threads means it will require careful consideration on the user's part to use it, especially as a lower level abstraction for higher tools. I don't want to limit the audience this way.

My idea for SUBSCRIBE would be to create a separate Subscribe object with a 'socket.accept' loop, and just return Responses as they come in. That object can only unsubscribe. If a user intends to SUBSCRIBE and issue Redis commands they'll need to open two socket connections and deal with Threading themselves.

Thoughts?

from tiny-redis.

truedat101 avatar truedat101 commented on August 16, 2024

I agree on the "no threads" approach. It pushes the baggage up a level to the application developer.

I took a survey of other client libs out there and it seems they range the expanse from super simple (incomplete) all the way to over the top with async, sync, etc... and some require an external event lib. To keep with the spirit of Redis I think it makes sense to keep it lightweight and simple with few dependencies and easy inspection of how it works.

from tiny-redis.

SommerEngineering avatar SommerEngineering commented on August 16, 2024

Any news about this implementation? It would be a great extension to have PUB/SUB support e.g. to implement microservices, etc. Keep the good work 👍

from tiny-redis.

truedat101 avatar truedat101 commented on August 16, 2024

I made something (not completely in the spirit of single threaded design desired by the author). At the end of the day, I found the author maybe was on to something. Due to thread-local constraints, sharing data between threads is a problem in the current design. I thought originally I could use Fibers or Threads, but ran into numerous design issues trying this route. I think the above comment from the author suggests the right approach . Others who know D better than I may suggest how to get an alternative working.

from tiny-redis.

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.