GithubHelp home page GithubHelp logo

Comments (22)

rentalcustard avatar rentalcustard commented on August 18, 2024

👍

from split.

andrew avatar andrew commented on August 18, 2024

I've started working on extracting the redis calls on this branch: https://github.com/andrew/split/tree/db-adapters

from split.

josedonizetti avatar josedonizetti commented on August 18, 2024

What is missing for this to be finished? I can help on that.

from split.

andrew avatar andrew commented on August 18, 2024

I basically need to get the tests passing on the mongo adapter, refactor it a little and create the ability to switch adapters in the configuration block.

from split.

josedonizetti avatar josedonizetti commented on August 18, 2024

Ok. I'll do that, and send a pull request for you to review!

from split.

andrew avatar andrew commented on August 18, 2024

Awesome, thanks!

The redis adapter may need to be changed as well to make a nicer internal API for others to create adapters.

from split.

josedonizetti avatar josedonizetti commented on August 18, 2024

The mongodb tests are green on my fork, branch db-adapters. But there's still lots of refactoring to do. But first I will impement the support for mysql. I want to run a stress-test between those versions and see how they go, and then improve the interface. Let me know your opnition about that.

from split.

andrew avatar andrew commented on August 18, 2024

Sounds good!

from split.

thomas-atwood avatar thomas-atwood commented on August 18, 2024

Given the default use of Postgres on heroku — how about a version that runs with Postgres. Not sure whether it should run in the same Postgres database as the rest of the application, or in a separate one.

from split.

buddhamagnet avatar buddhamagnet commented on August 18, 2024

Best approach would be to abstract the Redis interface into an adapter and merge. Then the road is clear to build new adapters. I guess we are quite a way along the road and bearing in mind the amount of work that has been done in master since merging may well be tricky.

from split.

buddhamagnet avatar buddhamagnet commented on August 18, 2024

On that note, just had a dig into that branch and it strikes me that "backend" is a better description of the data source than "database" as we could be storing the alternatives etc anywhere. Have just pushed up a branch along those lines.

from split.

buddhamagnet avatar buddhamagnet commented on August 18, 2024

Actually, going to trash that branch and look again.

from split.

buddhamagnet avatar buddhamagnet commented on August 18, 2024

Down to two failing specs, @andrew you may be in a better position to deal. If this branch is good when the specs pass, we have a bang up to date adapter branch that defaults to redis, which means we can start rolling in the refactoring suggested by code climate hot on its heels.

from split.

buddhamagnet avatar buddhamagnet commented on August 18, 2024

Also added an example driver.rb file for new adapters.

from split.

buddhamagnet avatar buddhamagnet commented on August 18, 2024

One spec left to pass!

from split.

buddhamagnet avatar buddhamagnet commented on August 18, 2024

The other thing to note with this branch is, as we have now abstracted the data source, we can't test using MockRedis as we are now calling adapter methods (ie we call backend.clean - which does not exist for MockRedis). So back to testing against the real backend for a while.

from split.

woodhull avatar woodhull commented on August 18, 2024

Why is this a good idea?

Seems totally reasonable to require redis.

from split.

buddhamagnet avatar buddhamagnet commented on August 18, 2024

Er...because we are building an adapter layer so the backend may not be redis?

from split.

woodhull avatar woodhull commented on August 18, 2024

Sure. I know. It just doesn't seem like the sort of thing that I would allow if I were maintaing the gem.

I tend to think that it would make things fairly complex to maintain for questionable benefit. See discussion of the same issue for sidekiq: https://github.com/mperham/sidekiq/wiki/FAQ

from split.

buddhamagnet avatar buddhamagnet commented on August 18, 2024

Take it up with @andrew. Oh and happy new year!

from split.

andrew avatar andrew commented on August 18, 2024

When I first built split we used redis because that fitted the use case at the time, but we're not really using any special parts of redis so there is not really much reason to limit it.

There have been projects where I've added redis to the stack simply to use split, where I'd prefer not to add a second database to manage in production if I can avoid it.

from split.

andrew avatar andrew commented on August 18, 2024

I'm going to close this as we've not made much progress on it in a while.

from split.

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.