i do know perl after all

, posted: 14-Aug-2006 20:25

i spent today (and friday and thursday) writing perl.

it's been a long time, but it seems to be coming back to me.

i'm taking an app that was storing values in IPC Shared Memory, and irefactoring it to use memcached

it's been used by other people at catalyst.net.nz, so it's been well tested.
it's also used in this well known site called livejournal.com.

so, what is it?

  • a daemon, start from command line
    # ./memcached -d -m 2048 -l 10.0.0.40 -p 11211

  • you connect tcp

  • ->put($key, $value) in, ->get($key) values out, like a one level hash

  • it keeps a cache in memory, all is gone when it's restarted

  • has apis in a bunch of languages, perl, php, python, ruby, java, c, c#, protocol



the nifty bit for me, was the expiry...

I can set a value, and an expiry for that value... It'll remove the value from memory when it expires.. so i can put session data in there and not manage the expiry. It means expired session don't fill memory.

i can also distribute it across several servers (i haven't yet, but i can see the app expanding that way)

it's less arcane than IPC::SharedCache, mostly because it takes care of itself.

oh, and it came recommended by Ned

Other related posts:
find a new job on #geekzone
Mobile Number Portability... tick tick tick
Cross site scripting and your home router.


Permalink to i do know perl after all | Add a comment (2 comments) | Main Index




Comment by juha, on 14-Aug-2006 20:36

PERL is good. Puts hairs on your chest.

Incidentally, your HTML editor thing still looks skewhiff...


Author's note by taniwha, on 14-Aug-2006 20:56

Pfftt.


Add a comment

Please note: comments that are inappropriate or promotional in nature will be deleted. E-mail addresses are not displayed, but you must enter a valid e-mail address to confirm your comments.

Are you a registered Geekzone user? Login to have the fields below automatically filled in for you and to enable links in comments. If you have (or qualify to have) a Geekzone Blog then your comment will be automatically confirmed and shown in this blog post.

Your name:

Your e-mail:

Your webpage:

taniwha's profile

Wally (Brenda) 
Te Whanganui O Tara
New Zealand