Re: Templates available to a cluster

2011-10-20 Thread Konstantinos Pachnis
Hello,

I had the same problem, but not a clue how to implement this.
After Donald mentioned that the template system uses pluggable loaders,
I spent some time to create one for my own use. It's very basic, but at
least I believe it demonstrates how to create a template loader.

Kurtis, you can find the plugin at
https://github.com/jezdez/django-dbtemplates.



Basic database loader snippet link: http://dpaste.com/638238/


> 
>
>   Javier Guerra Giraldez 
> October 20, 2011 01:59
>
>
> On Wed, Oct 19, 2011 at 5:17 PM, Kurtis Mullins
>
> note that 'document' in MongoDB parlance means 'complex document', as
> in 'more complex than a field'. in this case, the template is just a
> (long?) text string. any good DB (relational or not) should perform
> similarly, given the same hardware.
>
> 
>
>   Kurtis Mullins 
> October 20, 2011 01:17
>
>
> Good idea. I'm going to check out MongoDB for this. Looks like there's
> already some Django tools for it out there.
>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
> 
>
>   Donald Stufft 
> October 20, 2011 00:57
>
>
> If I wanted maximum performance from a distributed on the fly template
> system. I'd probably store them in a fast document db.
>
> On Wednesday, October 19, 2011 at 5:54 PM, Kurtis Mullins wrote:
>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
> 
>
>   Kurtis Mullins 
> October 20, 2011 00:54
>
>
> Very true, I could definitely implement it as a pluggable loader. I'll
> try to find the DB Template Loader too. I'm mainly concerned with this
> being a large bottle neck for our front-facing pages so I'm not sure
> which path to choose. Maybe some R&D is in order :) Thanks!
>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
> 
>
>   Donald Stufft 
> October 20, 2011 00:52
>
>
> The template system uses pluggable loaders that can locate a template
> based upon it's name. So using that you can store your template
> anywhere. There is already an app for storing templates in the db, you
> could easily make one to store it somewhere else as well.
>
> On Wednesday, October 19, 2011 at 5:48 PM, Kurtis wrote:
>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

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

<>

Re: Templates available to a cluster

2011-10-19 Thread Javier Guerra Giraldez
On Wed, Oct 19, 2011 at 5:17 PM, Kurtis Mullins
 wrote:
> Good idea. I'm going to check out MongoDB for this. Looks like there's
> already some Django tools for it out there.
>
> On Wed, Oct 19, 2011 at 5:57 PM, Donald Stufft 
> wrote:
>>
>> If I wanted maximum performance from a distributed on the fly template
>> system. I'd probably store them in a fast document db.

note that 'document' in MongoDB parlance means 'complex document', as
in 'more complex than a field'.  in this case, the template is just a
(long?) text string.  any good DB (relational or not) should perform
similarly, given the same hardware.

-- 
Javier

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



Re: Templates available to a cluster

2011-10-19 Thread Kurtis Mullins
Good idea. I'm going to check out MongoDB for this. Looks like there's
already some Django tools for it out there.

On Wed, Oct 19, 2011 at 5:57 PM, Donald Stufft wrote:

> If I wanted maximum performance from a distributed on the fly template
> system. I'd probably store them in a fast document db.
>
> On Wednesday, October 19, 2011 at 5:54 PM, Kurtis Mullins wrote:
>
> Very true, I could definitely implement it as a pluggable loader. I'll try
> to find the DB Template Loader too. I'm mainly concerned with this being a
> large bottle neck for our front-facing pages so I'm not sure which path to
> choose. Maybe some R&D is in order :) Thanks!
>
> On Wed, Oct 19, 2011 at 5:52 PM, Donald Stufft wrote:
>
>  The template system uses pluggable loaders that can locate a template
> based upon it's name. So using that you can store your template anywhere.
> There is already an app for storing templates in the db, you could easily
> make one to store it somewhere else as well.
>
> On Wednesday, October 19, 2011 at 5:48 PM, Kurtis wrote:
>
> I'm working on a project where I will eventually need to be able to
> add/delete/manage templates on the fly. Our Django Application Servers
> are setup as a cluster behind an Nginx Front-end Server.
>
> We're not at that point, yet -- but I wanted to see if there's any
> architectural issues I need to prepare for. I was thinking we could
> store them on some sort of a networking file system but then I worry
> about load-times and stability. We could store them in a database but
> I imagine that may slow things down even more, plus we'd have to build
> some sort of a system for pulling templates from the database.
>
> If anyone's attempted this sort of thing before, I'd be interested in
> hearing some options you took and the outcome.
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

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



Re: Templates available to a cluster

2011-10-19 Thread Donald Stufft
If I wanted maximum performance from a distributed on the fly template system. 
I'd probably store them in a fast document db.

On Wednesday, October 19, 2011 at 5:54 PM, Kurtis Mullins wrote:

> Very true, I could definitely implement it as a pluggable loader. I'll try to 
> find the DB Template Loader too. I'm mainly concerned with this being a large 
> bottle neck for our front-facing pages so I'm not sure which path to choose. 
> Maybe some R&D is in order :) Thanks!
> 
> On Wed, Oct 19, 2011 at 5:52 PM, Donald Stufft  (mailto:donald.stu...@gmail.com)> wrote:
> > The template system uses pluggable loaders that can locate a template based 
> > upon it's name. So using that you can store your template anywhere. There 
> > is already an app for storing templates in the db, you could easily make 
> > one to store it somewhere else as well. 
> > 
> > On Wednesday, October 19, 2011 at 5:48 PM, Kurtis wrote:
> > 
> > > I'm working on a project where I will eventually need to be able to
> > > add/delete/manage templates on the fly. Our Django Application Servers
> > > are setup as a cluster behind an Nginx Front-end Server.
> > > 
> > > We're not at that point, yet -- but I wanted to see if there's any
> > > architectural issues I need to prepare for. I was thinking we could
> > > store them on some sort of a networking file system but then I worry
> > > about load-times and stability. We could store them in a database but
> > > I imagine that may slow things down even more, plus we'd have to build
> > > some sort of a system for pulling templates from the database.
> > > 
> > > If anyone's attempted this sort of thing before, I'd be interested in
> > > hearing some options you took and the outcome.
> > > 
> > > Thanks
> > > 
> > > -- 
> > > You received this message because you are subscribed to the Google Groups 
> > > "Django users" group.
> > > To post to this group, send email to django-users@googlegroups.com 
> > > (mailto:django-users@googlegroups.com).
> > > To unsubscribe from this group, send email to 
> > > django-users+unsubscr...@googlegroups.com 
> > > (mailto:django-users+unsubscr...@googlegroups.com).
> > > For more options, visit this group at 
> > > http://groups.google.com/group/django-users?hl=en.
> > > 
> > > 
> > > 
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google Groups 
> > "Django users" group.
> > To post to this group, send email to django-users@googlegroups.com 
> > (mailto:django-users@googlegroups.com).
> > To unsubscribe from this group, send email to 
> > django-users+unsubscr...@googlegroups.com 
> > (mailto:django-users%2bunsubscr...@googlegroups.com).
> > For more options, visit this group at 
> > http://groups.google.com/group/django-users?hl=en.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com 
> (mailto:django-users@googlegroups.com).
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com 
> (mailto:django-users+unsubscr...@googlegroups.com).
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.

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



Re: Templates available to a cluster

2011-10-19 Thread Kurtis Mullins
Very true, I could definitely implement it as a pluggable loader. I'll try
to find the DB Template Loader too. I'm mainly concerned with this being a
large bottle neck for our front-facing pages so I'm not sure which path to
choose. Maybe some R&D is in order :) Thanks!

On Wed, Oct 19, 2011 at 5:52 PM, Donald Stufft wrote:

>  The template system uses pluggable loaders that can locate a template
> based upon it's name. So using that you can store your template anywhere.
> There is already an app for storing templates in the db, you could easily
> make one to store it somewhere else as well.
>
> On Wednesday, October 19, 2011 at 5:48 PM, Kurtis wrote:
>
> I'm working on a project where I will eventually need to be able to
> add/delete/manage templates on the fly. Our Django Application Servers
> are setup as a cluster behind an Nginx Front-end Server.
>
> We're not at that point, yet -- but I wanted to see if there's any
> architectural issues I need to prepare for. I was thinking we could
> store them on some sort of a networking file system but then I worry
> about load-times and stability. We could store them in a database but
> I imagine that may slow things down even more, plus we'd have to build
> some sort of a system for pulling templates from the database.
>
> If anyone's attempted this sort of thing before, I'd be interested in
> hearing some options you took and the outcome.
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

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



Re: Templates available to a cluster

2011-10-19 Thread Donald Stufft
The template system uses pluggable loaders that can locate a template based 
upon it's name. So using that you can store your template anywhere. There is 
already an app for storing templates in the db, you could easily make one to 
store it somewhere else as well. 


On Wednesday, October 19, 2011 at 5:48 PM, Kurtis wrote:

> I'm working on a project where I will eventually need to be able to
> add/delete/manage templates on the fly. Our Django Application Servers
> are setup as a cluster behind an Nginx Front-end Server.
> 
> We're not at that point, yet -- but I wanted to see if there's any
> architectural issues I need to prepare for. I was thinking we could
> store them on some sort of a networking file system but then I worry
> about load-times and stability. We could store them in a database but
> I imagine that may slow things down even more, plus we'd have to build
> some sort of a system for pulling templates from the database.
> 
> If anyone's attempted this sort of thing before, I'd be interested in
> hearing some options you took and the outcome.
> 
> Thanks
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com 
> (mailto:django-users@googlegroups.com).
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com 
> (mailto:django-users+unsubscr...@googlegroups.com).
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
> 
> 


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



Templates available to a cluster

2011-10-19 Thread Kurtis
I'm working on a project where I will eventually need to be able to
add/delete/manage templates on the fly. Our Django Application Servers
are setup as a cluster behind an Nginx Front-end Server.

We're not at that point, yet -- but I wanted to see if there's any
architectural issues I need to prepare for. I was thinking we could
store them on some sort of a networking file system but then I worry
about load-times and stability. We could store them in a database but
I imagine that may slow things down even more, plus we'd have to build
some sort of a system for pulling templates from the database.

If anyone's attempted this sort of thing before, I'd be interested in
hearing some options you took and the outcome.

Thanks

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