Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / September 2007



Tip: Looking for answers? Try searching our database.

Is it possible to implement a share-nothing architecture with CF8?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cffan3 - 23 Aug 2007 11:34 GMT
Hi All -

I'm currently running a very large scale CF app using CFMX over J2EE, in a
cluster of CF enterprise servers of course, with a mySql cluster as the
backend. The performance is really good using a mix of in-memory variables and
disk caching. However, the scaling is a pain :-D

For my next project I want to go for a share nothing architecture. Meaning if
we need more headroom for more users we just slap a new box in the datacenter.  
I have only 2 questions:

- Is there an existing "share nothing" CF framework I could inspire myself
from?
- How can I manage sessions in such an environment? I imagine they would all
have to be commited to DB, but how can I recognize a user is logged in when
they come knocking, and how can I manage session expiration? 'Could CF Store
session in DB' option be the solution?

Any pointers, advice etc would be much, much appreciated!

Thanks in advance!!

CFFan3
c_wigginton - 27 Aug 2007 15:25 GMT
Take a look at ClusterCats with session-awareness also known as "Sticky"
sessions.

Reference:

Managing Clusters with Enterprise Manager and Packaging Applications in
ColdFusion MX 7
http://www.adobe.com/devnet/coldfusion/articles/clustering.html

(This might me outdated since it doesn't mention anything above 6.1)
ClusterCATS Supported Platforms Update
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_18991&sliceId=2

Managing Session-Aware Clusters

http://www.adobe.com/devnet/server_archive/articles/managing_session-aware_clust
ers.html
cffan3 - 27 Aug 2007 18:06 GMT
Sorry C_wigginton, but my question was actually trying to figure out the exact
opposite. I don't want in-memory anything. Clusters is what I'm using at the
moment. I want to step away from that and use CF the way PHP does thing:
nothing in memory, nothing on the application server, everything in the DB.

Is there a way?
c_wigginton - 27 Aug 2007 19:31 GMT
When you say "The way PHP does things", are you referring to the serilization
of session information (see php link below).  Normally the session information
on a single server (PHP) is written to a file in a temporary session folder but
can be serialized to a database through custom session handlers.

As far as doing the same in ColdFusion, you probably want to look at using
J2EE Session Management which would let you serialize the Session Scope and
implement Session Swapping.    The "Persistent session failover in JRun"
article below discusses some of this.

The end result is the same in that you have to serialize the session state and
then persist that data in a manner that is accessible to any system in the
cluster, so that on subsequent hits, the user's session can be de-serialized.

Reference:
(PHP) Session Handling Functions
http://us.php.net/session

Stateful Session Clustering: Have Your Availability and Scale It Too
http://www.devx.com/Java/Article/32603

ColdFusion and J2EE session management
http://livedocs.adobe.com/coldfusion/6.1/htmldocs/shared29.htm

Persistent session failover in JRun
http://livedocs.adobe.com/coldfusion/6/Using_ClusterCATS/config9.htm
cffan3 - 27 Aug 2007 19:33 GMT
Yup - nice one :D THANKS!
aqlong_gmail - 07 Sep 2007 20:01 GMT
And if you want the equivalent of session management, but where session data is
stored in the DB, then use Client variables instead of Session, and have your
Client variables use a DB instead of Registry or Cookies.

Note that to scale well you should put the Client variable DB tables on a
separate DB from the one(s) your app uses, that you can't store complex data
easily in Client variables, and you should make sure to regularly purge the
table data and put efficient DB indexes on them.  If you do all that, it's a
very nice, simple, scalable solution for CF.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.