Howdy,

 

Lately, I have been playing around with application servers, and want to start to play around with making a page (perhaps much like the front page I have on my.yahoo.com) could contain many chunks, each compiled in a rather arbitrary way.  I really just want a few features to start

 

  1. the ability to call a function in a chunk (out of the box in TT)
  2. assigning priorities to handle ordering
  3. chunks with lower priority can use information from earlier chunks

 

Here's some pseudo code:

 

[% id = get_id(env.http_host), priority = 0 %]

 

[% geo = id2geo(id), priority = 1 %]

[% weather = geo2weather(geo), priority = 2 %]

[% movies = geo2movies(geo), priority = 2 %]

[% activities = weather2activities(weather), priority = 3 %]

[% reviews = movies2reviews(movies), priority = 3 %]

 

Currently, in my head the process goes something like

 

  1. TT parses the page and does all tags, except those containing a priority
  2. I get, say, an array ref of hash refs, corresponding to the tags for an entire page (since priorities don't necessarily match layout order),
  3. my stuff handles the priorities and make the calls in parallel, waiting for calls to finish appropriately
  4. I pass the array ref back to TT for interpolation, with variables set in my code available to TT

 

Not sure if that makes any sense, but I guess the big thing is that I would like to be able to process TT tags in parallel fashion.  Likely way ahead of me, but if I have ten tags that each take a second, I have a ten second+ load time.  Do the same thing in parallel and I am around a second.  Like I say, I want to play around with some potentially expensive application server calls, and see how well I can handle them in parallel. 

 

I think it could be a very powerful tool.  Tags could essentially correspond to application servers and be handled accordingly.  New, expensive tags just mean more servers.  Kind of strange, but TT actually starts to model your network architecture.

 

Wondering if the above is even possible, or if similar efforts are underway.  Just looking for thoughts.

 

Thanks,

Earl

Reply via email to