Memcached

Posted by Doomshammer on Tuesday, February 6. 2007 at 00:27 in Anwendungen, Computer, English only, Flickr, Thoughts, Web

I just played around with memcached and it's Perl module Cache::Memcached. Pretty cool stuff. I think this can be very useful for my ordr interface. As all photo informations are stored in a PostgreSQL database, it will be very "expensive" when reading one and the same entries from the DB with every page load. Memcached will hopefully help, to relax the database and also to speed up the page (though I don't think that it'll be slow at all ;-) ).

ordr 2.0 backend is working

Posted by Doomshammer on Saturday, January 27. 2007 at 22:09 in Anwendungen, Computer, English only, Flickr, Photography, Privat, Web

As some of already know, I am currently rewritting my ordr interface. I want it to be more effective and high-performance as well as it shall get a nicer and more userfriendly interface. To make it short- I wanna make it a bit "Web 2.0"- that's why the new release will be "ordr 2.0" ("beta" of course ;-) ).

Ajax activity indicator

Posted by Doomshammer on Saturday, January 6. 2007 at 23:05 in Anwendungen, Computer, English only, Web
As preparation for my ordr interface I was wondering how this fancy activity indicators work. Well, after playing around a bit, I found a pretty easy way to get it set it. Take a look at this stupid example :-)

Ajax test II
Ajax Last.fm

I'm gettin' Web 2.0

Posted by Doomshammer on Saturday, January 6. 2007 at 17:37 in Anwendungen, Computer, English only, Privat, Thoughts, Web
I've just written my first AJAX web "application" :-) It's actually not as hard as one would think. Try my pretty cool webapp here. I think AJAX might be helpful for my new ordr interface.

[Update] How to get unique key inserts

Posted by Doomshammer on Friday, January 5. 2007 at 17:56 in Anwendungen, Computer, English only, Privat


I am currently rewritting my ordr interface from scratch, as it's currently using SQLite as backend which pretty much sucks. So during the rewrite I had the problem to avoid unique key violations when inserting the photos/photosets from the Flickr API to my database. The following solution helps to get this done:

QUOTE:
INSERT INTO ordr.photosets
SELECT 12345678,
87654321,
10,
'Testtitel',
'Just a long description Text',
'123MyUID@Flickr'
WHERE NOT EXISTS (
SELECT sid FROM ordr.photosets WHERE sid = 12345678
);

Side note: This works with PostgreSQL. I'm not sure if this will also work with other RDBMS. IIRC Sybase for instance has it's own function for such tasks. S. th. like this:

QUOTE:
IF NOT EXISTS
(SELECT * FROM MyTable WHERE name = 'FooBar')
INSERT INTO MyTable VALUES('FooBar', 50, 'Even more FooBar')


Update: AndrewSN from #postgresql on irc.freenode.net mentioned that my query has a race condition.
QUOTE:
[22:31:32] <AndrewSN> Doomshammer: if there's a concurrent insert in another transaction that isn't committed yet, then the "not exists" won't be able to see it
[22:32:09] <AndrewSN> Doomshammer: so your statement can still error out with duplicate key errors

Which of course is absolutelly true. So my example is not a good solution. But luckily PostgreSQL's exellent documentation has a solution for nearly every problem. So this is what AndrewSN pointed out:
http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE

Thanks a lot AndrewSN!

ordr is working again

Posted by Doomshammer on Sunday, December 31. 2006 at 17:54 in Anwendungen, English only, Flickr, Photography, Privat
I just noticed that SnapFish (aka PIXACO) finally fixed the bugs in their API so that my ordr Interface is working fine again. Now I can use it again, to directly order photos out of my flickr account. Yay! :-)

Calendar

Back May '13
Mon Tue Wed Thu Fri Sat Sun
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

Quicksearch

Not for Sale!

This blog is not for sale!

Latest twitter

Latest Photos

ERROR: The HTTP server returned the error or the warning(result:403).

Getaggte Artikel

Buttons

Ich bin ein Dokuleser
Get OpenSolaris
Gimme a Smile
neessen.net - Webhosting
I'm a blogger!
Lebst Du noch oder oarks Du schon?
last.fm
trnd - be trendy
I hear Metal
Visit GeoURL
Powered by Linux
Zsh lover
VIM! The Editor
Get Firefox
Ihr, nicht ich!
My amazon wishlist

BLOGROLL