T5: some automagical way to export versioned assets to CDN?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

T5: some automagical way to export versioned assets to CDN?

gbrits

Versioning in Tapestry is really easy. Just increment the version-nr in
appModule and you're set.
 
However, I'd like my assets to live on a CDN. (Amazon S3 + cloudfront) . For
this to work (along with versioning)  I would have to do 2 conceptual
things:
1. export assets to a specific s3 bucket linked to cloudfront.
2. point html-code to correct path.

To do this manually I'd have to:
- up the version in appmodule by hand.
- create a new s3 bucket by hand (with the version-nr encoded in it)
- ? copy/ move the versioned assets-directory created by Tapestry to the
newly created S3- bucket ( I assume it is created on-the-fly on run-time and
are saved to disk?
- point html-code to the new correct path. I assume I can code this once,
bc. I must be able to access the versionnr, and along with the static
s3-path be able to create the path to the newly created s3-bucket.


All this is possible, but I would like it to be automated. Is this already
possible (with some minor tweaking)
If not, where would I start looking to automate this?

any pointers highly appreciated.

Best regards,
Geert-Jan

--
View this message in context: http://n2.nabble.com/T5-some-automagical-way-to-export-versioned-assets-to-CDN-tp4437084p4437084.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: T5: some automagical way to export versioned assets to CDN?

Jun Tsai
You can override AssetPathConverter  service.

example:
http://code.google.com/p/corner/source/browse/corner3/trunk/src/main/java/corner/asset/services/impl/CDNAssetPathConverterImpl.java



2010/1/22 britske <[hidden email]>

>
> Versioning in Tapestry is really easy. Just increment the version-nr in
> appModule and you're set.
>
> However, I'd like my assets to live on a CDN. (Amazon S3 + cloudfront) .
> For
> this to work (along with versioning)  I would have to do 2 conceptual
> things:
> 1. export assets to a specific s3 bucket linked to cloudfront.
> 2. point html-code to correct path.
>
> To do this manually I'd have to:
> - up the version in appmodule by hand.
> - create a new s3 bucket by hand (with the version-nr encoded in it)
> - ? copy/ move the versioned assets-directory created by Tapestry to the
> newly created S3- bucket ( I assume it is created on-the-fly on run-time
> and
> are saved to disk?
> - point html-code to the new correct path. I assume I can code this once,
> bc. I must be able to access the versionnr, and along with the static
> s3-path be able to create the path to the newly created s3-bucket.
>
>
> All this is possible, but I would like it to be automated. Is this already
> possible (with some minor tweaking)
> If not, where would I start looking to automate this?
>
> any pointers highly appreciated.
>
> Best regards,
> Geert-Jan
>
> --
> View this message in context:
> http://n2.nabble.com/T5-some-automagical-way-to-export-versioned-assets-to-CDN-tp4437084p4437084.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
regards,
Jun Tsai
Reply | Threaded
Open this post in threaded view
|

Re: T5: some automagical way to export versioned assets to CDN?

gbrits

Just to get this straight: That code takes care of rewiring the templates to
use the correct asset-path right?
But it doesn't take care of actually getting the updated assets to CDN in
the first place?

Thanks,
Geert-Jan

2010/1/22 Jun Tsai [via Tapestry Users] <
[hidden email]<ml-node%[hidden email]>
>

> You can override AssetPathConverter  service.
>
> example:
>
> http://code.google.com/p/corner/source/browse/corner3/trunk/src/main/java/corner/asset/services/impl/CDNAssetPathConverterImpl.java
>
>
>
> 2010/1/22 britske <[hidden email]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4438110&i=0>>
>
>
> >
> > Versioning in Tapestry is really easy. Just increment the version-nr in
> > appModule and you're set.
> >
> > However, I'd like my assets to live on a CDN. (Amazon S3 + cloudfront) .
> > For
> > this to work (along with versioning)  I would have to do 2 conceptual
> > things:
> > 1. export assets to a specific s3 bucket linked to cloudfront.
> > 2. point html-code to correct path.
> >
> > To do this manually I'd have to:
> > - up the version in appmodule by hand.
> > - create a new s3 bucket by hand (with the version-nr encoded in it)
> > - ? copy/ move the versioned assets-directory created by Tapestry to the
> > newly created S3- bucket ( I assume it is created on-the-fly on run-time
> > and
> > are saved to disk?
> > - point html-code to the new correct path. I assume I can code this once,
>
> > bc. I must be able to access the versionnr, and along with the static
> > s3-path be able to create the path to the newly created s3-bucket.
> >
> >
> > All this is possible, but I would like it to be automated. Is this
> already
> > possible (with some minor tweaking)
> > If not, where would I start looking to automate this?
> >
> > any pointers highly appreciated.
> >
> > Best regards,
> > Geert-Jan
> >
> > --
> > View this message in context:
> >
> http://n2.nabble.com/T5-some-automagical-way-to-export-versioned-assets-to-CDN-tp4437084p4437084.html
> > Sent from the Tapestry Users mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4438110&i=1>
> > For additional commands, e-mail: [hidden email]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4438110&i=2>
> >
> >
>
>
> --
> regards,
> Jun Tsai
>
>
> ------------------------------
>  View message @
> http://n2.nabble.com/T5-some-automagical-way-to-export-versioned-assets-to-CDN-tp4437084p4438110.html
> To unsubscribe from T5: some automagical way to export versioned assets to
> CDN?, click here< (link removed) =>.
>
>
>

--
View this message in context: http://n2.nabble.com/T5-some-automagical-way-to-export-versioned-assets-to-CDN-tp4437084p4439561.html
Sent from the Tapestry Users mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: T5: some automagical way to export versioned assets to CDN?

Thiago H de Paula Figueiredo
On Fri, 22 Jan 2010 09:44:48 -0200, britske <[hidden email]> wrote:

> Just to get this straight: That code takes care of rewiring the  
> templates to use the correct asset-path right?

Yes.

> But it doesn't take care of actually getting the updated assets to CDN in
> the first place?

No, it doesn't. You would need to do that yourself or find some package  
that does that.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]