in my case,, i have a bunch of constantly changing user entered data
that quite simply needs to be translated into the locale of any
connecting user. to complicate the problem, many sections of the site
are contextual. proxying things through google really isnt a good
solution. i wrote a simple servlet to to convert the text on the fly
using the translate api.
public static String translate(String string, String langStringfrom ,
String langStringto) {
if (string.length() > 0) {
try {
Translate.setHttpReferrer("http://www.foo.com");
String translatedText = Translate.execute(string,
Language.fromString(langStringfrom),
Language.fromString(langStringto));
System.out.println(translatedText);
return translatedText;
} catch (Exception ex) {
ex.printStackTrace();
return string;
}
} else return string;
}
in testing, it was slowing down the site by about 1.5 seconds a page.
not good, but considering all that was happening it was tolerable.
moved it to production and the load time quickly jump to 10+ seconds a
page... after checking the logs i now see that google is throttling
the connections. the transactions with google happen as a result of a
users clicking... so im ok with TOS there,, but if i translate all the
data into every language a head of time to speed it up,, besides
having an disastrously bloated DB,, ive violated the TOS with google.
unfortunately im ive already found the best solution in simply using
this api... i just need bandwidth.... and unthrottled connections.
what does that cost?
On Apr 7, 5:11 pm, Zdravko Gligic <[email protected]> wrote:
> It would be extremely useful to get as much detail as possible about
> your particular use case (even if for privacy and/or competitive
> reasons you told us about a totally invented use case that is TOS
> representative of what you are doing) so that we can get a bit more
> insight into what on earth GOOG is doing and whether it might be the
> best for many of us to wait until they get serious at their end. The
> only thing that should matter to them are use case concepts and
> especially how GOOG services are used in conjunction to sites' own
> revenue generation models, etc. It is totally mind boggling that
> success of a site should make any difference in the overall allocation
> of how much one can consume. In fact, the whole thing has a rotten
> smell to it - one of not being at all interested in good ideas that
> are well executed but only in perhaps identifying good ideas that are
> poorly executed and that are therefore lot easier to purloin. Now
> having written this previous sentence, even sensible me can not
> believe that I wrote it. However, I ended up leaving it in purely as
> an illustration of how little sense this current scheme makes. To
> fine people who work on this at GOOG, I am sorry.
>
> On Thu, Apr 7, 2011 at 3:47 PM, johnny <[email protected]> wrote:
> > im in the same boat... worked like a dream in testing.. moved it to
> > production and my connections are getting throttled.
> > ive read that api license 5 times. the only way i can reduce traffic
> > and provide the translation service is to violate the terms of
> > service. google needs to address this problem even if the solution is
> > to offer us a licensed instance of google translate for dedicated/
> > untrottled use.
>
> > On Apr 6, 1:53 pm, LAHatfield <[email protected]> wrote:
> >> Our website is built up dynamically in javascript at runtime and
> >> involves a number of elements which are not visible from the outset
> >> but later are shown. I have tried adding googles translate javascript
> >> to our page in the hope it would just work but it cause the whole page
> >> to fall over.
>
> >> I have since starting converting all text as I write it out to the
> >> page, passing it through googles translate api. However I am getting
> >> issues on the 500 character limit, as well as issues with timing as i
> >> need to do some 800 translations which takes time and i will quickly
> >> get terms of service error messages. I have though about caching it in
> >> the application object the first time that particular language is
> >> requested but am worried that also breaks googles rules.
>
> >> Has anyone come up with a way around this? Is it possible to pay
> >> google to get unlimited access to the API? Or are there any other good
> >> free/paid for tools out there which i can plug into?
>
> >> Thanks
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google AJAX APIs" group.
> > To post to this group, send email to
> > [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > For more options, visit this group
> > athttp://groups.google.com/group/google-ajax-search-api?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Google AJAX APIs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en.