SaaS in cfwheels

29 views
Skip to first unread message

Samson Quaye

unread,
Feb 7, 2012, 4:07:38 PM2/7/12
to ColdFusion on Wheels
Hello,

What would be the best implimentation method of a SaaS application
using the coldfusion on wheels mvc framework.

Any suggestion is welcomed.

Thanks

Samson Quaye

Andy Bellenie

unread,
Feb 7, 2012, 4:23:44 PM2/7/12
to cfwh...@googlegroups.com
SaaS applications aren't anything specific to cfwheels, so it's more of a application server question as the issues you need to deal with are high availability and resilience. CFWheels can handle large SaaS systems, so it's down to the specific app.


Samson Quaye

--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfwheels?hl=en.


Samson Quaye

unread,
Feb 8, 2012, 5:31:46 AM2/8/12
to cfwh...@googlegroups.com
Hello Andy,

Thank for your response.

In your own opinion, what would be best  method to handle multi tenancy in a case where each client has his/her own database and data-source? 

Thanks
Samson Quaye

tpet...@gmail.com

unread,
Feb 8, 2012, 9:24:10 AM2/8/12
to ColdFusion on Wheels
in the model init call a method that will check for a request variable
value that will set the datasource

<cffunction name="init">
<cfset switchDataSource()>
</cffunction>


<cffunction name="switchDataSource">
<cfif StructKeyExists(request, "clientDatasource")>
<cfset dataource(request.clientDatasource)>
</cfif>
</cffunction>

so now if request.clientDatasource doesn't exist, wheels will use the
default datasource of the application. if it does, it will set the
datasource of the model to the value in request.clientDatasource.



On Feb 8, 5:31 am, Samson Quaye <squay...@gmail.com> wrote:
> Hello Andy,
>
> Thank for your response.
>
> In your own opinion, what would be best  method to handle multi tenancy in
> a case where each client has his/her own database and data-source?
>
> Thanks
> Samson Quaye
>
>
>
>
>
>
>
> On Tuesday, 7 February 2012, Andy Bellenie wrote:
> > SaaS applications aren't anything specific to cfwheels, so it's more of a
> > application server question as the issues you need to deal with are high
> > availability and resilience. CFWheels can handle large SaaS systems, so
> > it's down to the specific app.
>
> > On 7 February 2012 21:07, Samson Quaye <squay...@gmail.com<javascript:_e({}, 'cvml', 'squay...@gmail.com');>
> > > wrote:
>
> >> Hello,
>
> >> What would be the best implimentation method of a SaaS application
> >> using the coldfusion on wheels mvc framework.
>
> >> Any suggestion is welcomed.
>
> >> Thanks
>
> >> Samson Quaye
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "ColdFusion on Wheels" group.
> >> To post to this group, send email to cfwh...@googlegroups.com<javascript:_e({}, 'cvml', 'cfwh...@googlegroups.com');>
> >> .
> >> To unsubscribe from this group, send email to
> >> cfwheels+u...@googlegroups.com <javascript:_e({}, 'cvml',
> >> 'cfwheels%2Bunsu...@googlegroups.com');>.
> >> For more options, visit this group at
> >>http://groups.google.com/group/cfwheels?hl=en.
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "ColdFusion on Wheels" group.
> > To post to this group, send email to cfwh...@googlegroups.com<javascript:_e({}, 'cvml', 'cfwh...@googlegroups.com');>
> > .
> > To unsubscribe from this group, send email to
> > cfwheels+u...@googlegroups.com <javascript:_e({}, 'cvml',
> > 'cfwheels%2Bunsu...@googlegroups.com');>.

Samson Quaye

unread,
Feb 8, 2012, 1:56:04 PM2/8/12
to cfwh...@googlegroups.com
thanks Tpetruzzi. That was helpful.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.

Andy Bellenie

unread,
Feb 8, 2012, 3:11:58 PM2/8/12
to cfwh...@googlegroups.com
Won't that be cached?

Adam Michel

unread,
Feb 11, 2012, 8:27:39 PM2/11/12
to cfwh...@googlegroups.com
This was my understanding as well, that dynamically changing the datasource wouldn't work since it's cached in the application scope. Is this somehow avoided by moving the datasource setter into a separate function and not simply in the init function?
Reply all
Reply to author
Forward
0 new messages