Hey Jorge, Im not sure I 100% follow what your saying - are you proposing creating a widget that actually has a shortening algorithm? IMO, isnt it better to not re-invent the wheel and use an existing service? (take advantage of their short domain names etc)
What are your thoughts on the blocking vs non-blocking thing? Cheers, Tim On Apr 2, 9:48 pm, Jorge Ortiz <jorge.or...@gmail.com> wrote: > What about easily turning any lift app into a url shortener service? > > Wouldn't be too hard... > > Granted, some services (bit.ly) add statistics, visualization, conversation > tracking, etc. which aren't just url shortening. > > --j > > On Thu, Apr 2, 2009 at 12:13 PM, Tim Perrett <timo...@getintheloop.eu>wrote: > > > > > Guys, > > > I've been contemplating doing this for a while and am now finding > > myself with a bunch of free time tomorrow and a need to write some > > code. > > > So, I want to make a widget that shortens URL's in an extendable > > way... Im thinking of having something like: > > > trait URLReductionProvider { ... } > > > object TinyURL extends URLReductionProvider > > object IsGd extends URLReductionProvider > > object BitLy extends URLReductionProvider > > > You get the general idea... > > > So, im thinking of implementing the actual URL fetching stuff as a > > partial function so that users could do: > > > def reductionResult = { > > case Full(result) => // result is the URL, insert into database etc > > case _ => // something went wrong > > } > > > My question is however, if i make this actor based, could someone > > implement it so rather than writing there URL to database in a > > separate thread to the main one, would it be possible for them to say, > > use a JsCmd and return that to update the browser? Im guessing not > > unless it was a CometActor right. > > > This then got me thinking, do you guys thing this is worth doing actor > > based, or is it just ok to make a blocking call to the provider? > > (tinyurl or is.gd etc) > > > Cheers, Tim --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---