views:

134

answers:

1

Most people use some kind of an IoC framework - Guice, Spring, you name it. Many of us need to scale their applications too, so they complicate their lifes with Terracotta, Glassfish/JBoss/insertyourfavouritehere clusters.

But is it really the way to go? Are you using any of the above?

Here's some ideas we currently have implemented in a yet-to-be-opensourced framework, and I'd like to see what you think of it, or maybe "it's a complete ripoff of XY!".

  • cluster-wide object replication - give it a name, and whenever you do something (in any node) on such an object, it will get replicated - with different guarantees
  • do transparent soft-loadbalancing - simplest scenario: restful webservice method call proxied to an other node
  • view-only node injection: inject a proxy to a "named" object, and get your calls automatically proxied to a node

Would you use something like that? Is there a current, stable, enterprise-ready implementation out there?

+1  A: 

FWIW I work at a company that does very large scale web applications and we tend not to use this form of object caching.

In fact we tend to make our lives easier by not storing anything in the session and not caching anything that is transactional and needs to be read in a current state. This way your application is quite simple, easy to reason about, and very easy to scale horizontally.

I guess the rationale behind using these object caches is primarily to reduce load on your persistence store and possibly to reduce latency. My suggestion is to work at scaling this backend independently from the relatively dumb webapp. Most large sites do this through the use of read replicas and data sharding. Have a look here: http://highscalability.com/livejournal-architecture. I remember looking at this a long time ago and it was pretty interesting. It also fits reasonably well into the kind of architecture that I see being used in high traffic websites.

elchuppa
well, thanks for sharing, but the goal is _not_ caching. it's only scalability, at this point. we've got some single-image clusters (meaning that every node is _exactly_ the same), and using these ideas we can scale almost linearily. but I'm not into the web, so this might not work there.
Zoltan