Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

squarism

Members
  • Content Count

    1
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by squarism

  1. I made a redis client (lol).  It's pretty alpha I think.  Here's the repo:  https://github.com/squarism/opencomputers_redis

    local redis = require("redis")
    client = redis.connection('opencomputers://localhost:6379')
    
    -- change databases
    client:select(11)
    
    -- basic usage
    client:set("redis", "awesome")

    This will store "awesome" in the "redis" key in the real-world redis server on localhost.  Of course you need an Internet card and some other setup.  It's in the README and if it's not it should be and that's a bug.  :)

     

    You have to unblacklist localhost in this case.  The other details are in the README.  If you are asking "whyyyyyy" or yelling "staaahp".  First, calm down bro.   :)  Second, I'm using this to pump metrics into statsd and then putting that into a real metrics system.  Redis in this case is a simple database for OC.  I'd love to have redis or something inside of minecraft but that's porting C to Lua (eesh).  Getting a redis client was tricky enough.  Most of the code is not mine (credited) but the trick was to attach to a fake OC socket.  Crazy.

     

    I'm attaching a screenshot but for those of you coming from Google and not able to see screenshots, here's a tweet with a screenshot of the metrics thing:

     

    https://twitter.com/squarism/status/575927329932759040

    post-1826-0-11101700-1427344094_thumb.png

     

    (very complicated setup, post if you are interested)

     

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.