Giter VIP home page Giter VIP logo

crache's People

Contributors

ccfontes avatar jumarko avatar micha avatar strongh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

crache's Issues

Delay returned on cache lookup

I'm probably just missing something here, but why does lookup return a Delay? It's pretty frustrating to need to check delay? or force just for crache when other core.cache backends don't return Delays.

crache needs better performance

As a follow-up from #3 :

Depending on your application, you could consider having 2 layers of memoization; the local in-memory core.memoize, as well as the crache.memo for keys not in the first cache.

Crache will absolutely be slower than the core equivalents. It's performing serialization and deserialization, and possibly communicating over a network. Is your redis server co-located with your app?

Shouldn't deserialized data be ready to use when requested, rather than deserialized on demand? I think if it is deserialized on demand, it's a huge bottleneck.

The first optimization I'd consider is serialization. Currently (de)serialization is done by pr-str and read-string, which I doubt are terribly performant.

In fact it seems it is, but just a little :) so I was using nippy instead to replace pr-str/read-string, before deciding to use your redis backed memoization solution. nippy didn't seem to correctly serialize/deserialize some unknown amount of data for a reason I cannot understand yet. But maybe that problem wont reproduce here. In their website they claim:

Clojure's rich data types are awesome. And its reader allows you to take your data just about anywhere. But the reader can be painfully slow when you've got a lot of data to crunch (like when you're serializing to a database).

Use case is online if you want to try it: http://kanasubs.com . Just insert a file and wait a little until it is converted.

I wanted to try something myself, but Clojars is down for SCP uploads since a vulnerability was found in bash.

Insecure HTTP repository without TLS

I can't install crache for the aforementioned reason.

Updating carmine to 2.19.1 fixes the issue for me, although I don't know what implications that might have...

memo-redis third party lib fn

How would you apply memo-redis for the fn of a library without changing the library in the following situation. I want to be able to memoize an fn I don't directly use in my app, but which is called by an fn I actually use.
I tried alter-var-root to no avail. At least after restarting the app, the performance didn't increase with the redis saved memoization:

(alter-var-root (var f) (fn [f] (memo-redis f)))

not able to list client

I use your library like this:

(defn start-memo-redis []
  (doseq [f [f1 f2 f3]]
    (memo-redis f)))

(start-memo-redis)

But even with snapshotting configured, it doesn't save anything, So after I tried to list the client. In redis-cli, I type client list,

127.0.0.1:6379> client list
addr=127.0.0.1:57331 fd=6 name= age=2 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 events=r cmd=client

but only the cli client is listed. Maybe I'm doing something wrong?

Using Redis 2.8.6.

Push a new snapshot?

Hello, when you have a chance, would you mind pushing a new snapshot? The most recent in Clojars is from 7760bf7. Thank you ๐Ÿ˜„

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.