[ ... ]
What you say is: Once your server is crunched and cached
the results of those queries, ok, it won't crash if the
same queries are made. But of course, each time brand new
queries with different Contacts are generated.

Could I make myself clear this time?

I was already clear on that but trying to implement caching somehow. My question for the previous mail was not "is caching can handle the load or not". It was the point of my first mail (do that once a day) and understood that is not possible.

so my question is is there a better way to cache this? (see my paragragh below "Maybe we need a trade-off here")


 >function shortest-path (membera memberb)
 >{
 >if ispathcached (membera memberb)

Probably not.
You are absolutely right. When I browse such sites, I rarely click on people whom I already know.

 >     p = getcachedpath (membera memberb)
 >     t = getcachedtime (membera memberb)

 >//is cache still valid?
 >for each member of p as m
 >     mt = getmodificationtimeofconnlist(m)
 >     if (mt > t)
 >     {
 >         np = regeneratecache(membera memberb)
 >         return np
 >     }

And you imagine connections are rock hard?
Maybe our good old acquaintance has just left the
network. I'm making the same query, you and me
but the network data has changed. So you have
to modify your cache. That means recalculating.
What an acquaintance! Anyway, again you had to
calculate. Lots of calculations, people are
clicking, think of 10.000 people network, a few
thousand online, every minute a few 10 people
are coming, partially connected and making queries
which are not cached yet.

Maybe we need a trade-off here.

we can cache some intermediate paths and somehow calculate "the not so shortest path". a -> c is (a g j o d c) for a->d, you can assume (a g j o d) although there may be a path such that (a w d) if you need a connection, we have that. but if you need "the" shortest path this is not the answer. I think this is better than showing nothing.

We are also talking about "shortest path" which is not an easy to solve problem. and doing this over and over again. I am curious how orkut handles that load (with the help of google's cluster? :)).


Emre S.



--
@n

_______________________________________________
cs-lisp mailing list
[email protected]
http://church.cs.bilgi.edu.tr/lcg
http://cs.bilgi.edu.tr/mailman/listinfo/cs-lisp

Cevap