Long running BlogML exports...

0 views
Skip to first unread message

Phil Haack

unread,
Dec 21, 2009, 5:56:37 PM12/21/09
to sub...@googlegroups.com

Despite all the effort I put into BlogML export, there’s still one glaring issue. I can’t export haacked.com because it takes too long and times out.

 

At this point, it seems like I need to have the export run on a separate threadpool thread and store the exported file somewhere. This seems like the right way to implement such a long running task anyways. The import/export UI would then have to show a list of exports and allow the user to delete exports.

 

There are 2 options that I can think of that would work in medium trust.

 

1.       Write the export file to App_Data.

a.       Pros: Easy to implement. Fast to download.

b.      Cons: Anyone who knows the URL would be able to access it.

2.       Write the export file to a Text field in the database

a.       Pros: No need to write to the file system. Better security as we’d only allow downloading from the Admin section.

b.      Cons: Slower to download as we would have to stream it from the DB.

 

I’m leaning towards #2. To keep it simple for this iteration, we could only allow 1 export per blog at a time. Thus when you start a new export, we delete the old one. That way we can tell you when it’s done.

 

We should have email notification if email is set up properly. When the export is done, you’ll see a link to it on the import/export page. That would link to a controller action which streams the database column as a FileResult.

 

Anyone interested in helping to take this on?


Phil

Steven Harman

unread,
Dec 21, 2009, 7:27:08 PM12/21/09
to sub...@googlegroups.com
sure would be nice to have Delayed::Job or Resque for stuff like this, huh? :)

-steve

--

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

Phil Haack

unread,
Dec 21, 2009, 7:49:56 PM12/21/09
to <subtext@googlegroups.com>, sub...@googlegroups.com
Heh, I dint know what those are, but I'll just say yes. As I think about this more (while trying to resist scope creep, but failing) I think there's two features here.

Long Running Tasks and Database FileSystem. The latter we talked about before where we could store certain files as blobs in the DB if the user should so choose.

Phil

Sent from my mobile phone

Phil Haack

unread,
Dec 22, 2009, 12:02:10 AM12/22/09
to Phil Haack, <subtext@googlegroups.com>, sub...@googlegroups.com

On second thought, I’ll do the simplest thing that’ll work for this upcoming release and save the scope creep for the next release.

 

Phil

Simone Chiaretta

unread,
Dec 22, 2009, 5:40:11 AM12/22/09
to sub...@googlegroups.com
And what about a command line tool that connects directly to the DB? Many hosting providers allow direct access to the DB.
Not as only option, but as additional option for people that run their own blog (won't work on multi blog environments like GWB or UGIDOTNET.

Simo
Simone Chiaretta
Microsoft MVP ASP.NET - ASPInsider
Blog: http://codeclimber.net.nz
RSS: http://feeds2.feedburner.com/codeclimber
twitter: @simonech

Any sufficiently advanced technology is indistinguishable from magic
"Life is short, play hard"

Phil Haack

unread,
Dec 22, 2009, 1:31:28 PM12/22/09
to sub...@googlegroups.com

Not a bad idea.

Reply all
Reply to author
Forward
0 new messages