Re: [google-appengine] [Python] Endpoints vs ProtoRPC ~200ms overhead

2013-04-17 Thread alex
Great news!
Yeah, of course, I wouldn't expect Endpoints to be as fast either but I
think it's really worth it.

Thanks!




On Wed, Apr 17, 2013 at 11:15 PM, Dan Holevoet wrote:

> Hi Alex,
>
> No, I don't think you're doing it wrong. Your post encouraged me to find
> out the results of our internal analysis, which came up similar to what you
> were seeing. The good news is that there are a few different efforts
> underway to chip away at the latency total. I can't give specifics, but
> this is something we're working to improve.
>
> I wouldn't expect Endpoints to be as fast as ProtoRPC, but hopefully we
> can close the gap a bit. I also hope that the extra features provided by
> Endpoints (currently, or in the future) will make it worth the latency hit.
>
> Thanks,
> Dan
>
>
> On Mon, Apr 15, 2013 at 2:49 PM, alex  wrote:
>
>> Hey, Dan. So, I basically took those numbers from logs of one of my
>> apps (Python 2.7, threadsafe=true, SDK v1.7.7)
>>
>> I was looking at the logs the other day and noticed all Endpoints API
>> calls were taking at least 200ms up to 400-500ms (well, I clearly had
>> some Datastore and other stuff going on for it to be 500ms).
>>
>> I started experimenting and ended up with those two simple classes,
>> EndpointsTest vs ProtoRpcTest, and TestMsg with the only msg string
>> field.
>>
>> I then started calling their test method using curl (manually from a
>> terminal) and watch the logs, for maybe 15-20 mins repeatedly with
>> about 0.3-0.5 rps rate. I did the average in my head. Pretty easy - it
>> never went lower than 200ms and higher than 270ms for
>> EndpointsTest.test, and was in between 6ms-12ms for ProtoRpcTest.test.
>>
>> This was running an app in EU datacenters. I thought I'd try it with
>> anothe app in US but got the same results.
>>
>> Maybe I was doing it all wrong. Actually, I'll be happy to hear that.
>>
>> Please let me know if this makes sense or I'm just comparing apples to
>> oranges.
>>
>> On Mon, Apr 15, 2013 at 11:19 PM, Dan Holevoet
>>  wrote:
>> > Hi Alex,
>> >
>> > Can you share a bit more information about how you performed your
>> tests? Are
>> > those numbers averages? How many times did you call both APIs? Was this
>> > repeatable or did you run the test multiple times?
>> >
>> > Thanks,
>> > Dan
>> >
>> >
>> > On Sat, Apr 13, 2013 at 1:46 AM, alex  wrote:
>> >>
>> >> I'm not sure it's even possible (to reduce the overhead), and I do
>> >> understand there's another infrastructure layer that uses ProtoPRC
>> lib, but
>> >> still comare this:
>> >>
>> >> @endpoints.api(name='test', version='v1')
>> >> class EndpointsTest(remote.Service):
>> >>   @endpoints.method(VoidMessage, TestMsg)
>> >> def test(req):
>> >>   return TestMsg(msg='Hello there')
>> >>
>> >> curl /test/v1/test
>> >> {msg:'Hello there'}
>> >>
>> >> - results in at least 200ms
>> >>
>> >>
>> >> to this:
>> >>
>> >> class ProtoRpcTest(remote.Service):
>> >>   @remote.method(VoidMessage, TestMsg)
>> >>   def test(req):
>> >> return TestMsg(msg='Hello there')
>> >>
>> >> curl -X POST /prototest.test
>> >> {msg:'Hello there'}
>> >>
>> >> - results in about 7-10ms
>> >>
>> >>
>> >> There seem to be a few additional roundtrips going on when making
>> requests
>> >> via Endpoints.
>> >> Do you guys think it's possible to reduce the latency?
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> Groups
>> >> "Google App Engine" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send
>> an
>> >> email to google-appengine+unsubscr...@googlegroups.com.
>> >> To post to this group, send email to google-appengine@googlegroups.com
>> .
>> >> Visit this group at
>> http://groups.google.com/group/google-appengine?hl=en.
>> >> For more options, visit https://groups.google.com/groups/opt_out.
>> >>
>> >>
>> >
>> >
>> >
>> >
>> > --
>> > Dan Holevoet
>> > Google Developer Relations
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups
>> > "Google App Engine" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> an
>> > email to google-appengine+unsubscr...@googlegroups.com.
>> > To post to this group, send email to google-appengine@googlegroups.com.
>> > Visit this group at
>> http://groups.google.com/group/google-appengine?hl=en.
>> > For more options, visit https://groups.google.com/groups/opt_out.
>> >
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to google-appengine+unsubscr...@googlegroups.com.
>> To post to this group, send email to google-appengine@googlegroups.com.
>> Visit this group at http://groups.google.com/group/google-appengine?hl=en
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
> --
> Dan Holevoet
> Google Developer Relations
>
> --
> You receive

Re: [google-appengine] [Python] Endpoints vs ProtoRPC ~200ms overhead

2013-04-17 Thread Dan Holevoet
Hi Alex,

No, I don't think you're doing it wrong. Your post encouraged me to find
out the results of our internal analysis, which came up similar to what you
were seeing. The good news is that there are a few different efforts
underway to chip away at the latency total. I can't give specifics, but
this is something we're working to improve.

I wouldn't expect Endpoints to be as fast as ProtoRPC, but hopefully we can
close the gap a bit. I also hope that the extra features provided by
Endpoints (currently, or in the future) will make it worth the latency hit.

Thanks,
Dan


On Mon, Apr 15, 2013 at 2:49 PM, alex  wrote:

> Hey, Dan. So, I basically took those numbers from logs of one of my
> apps (Python 2.7, threadsafe=true, SDK v1.7.7)
>
> I was looking at the logs the other day and noticed all Endpoints API
> calls were taking at least 200ms up to 400-500ms (well, I clearly had
> some Datastore and other stuff going on for it to be 500ms).
>
> I started experimenting and ended up with those two simple classes,
> EndpointsTest vs ProtoRpcTest, and TestMsg with the only msg string
> field.
>
> I then started calling their test method using curl (manually from a
> terminal) and watch the logs, for maybe 15-20 mins repeatedly with
> about 0.3-0.5 rps rate. I did the average in my head. Pretty easy - it
> never went lower than 200ms and higher than 270ms for
> EndpointsTest.test, and was in between 6ms-12ms for ProtoRpcTest.test.
>
> This was running an app in EU datacenters. I thought I'd try it with
> anothe app in US but got the same results.
>
> Maybe I was doing it all wrong. Actually, I'll be happy to hear that.
>
> Please let me know if this makes sense or I'm just comparing apples to
> oranges.
>
> On Mon, Apr 15, 2013 at 11:19 PM, Dan Holevoet
>  wrote:
> > Hi Alex,
> >
> > Can you share a bit more information about how you performed your tests?
> Are
> > those numbers averages? How many times did you call both APIs? Was this
> > repeatable or did you run the test multiple times?
> >
> > Thanks,
> > Dan
> >
> >
> > On Sat, Apr 13, 2013 at 1:46 AM, alex  wrote:
> >>
> >> I'm not sure it's even possible (to reduce the overhead), and I do
> >> understand there's another infrastructure layer that uses ProtoPRC lib,
> but
> >> still comare this:
> >>
> >> @endpoints.api(name='test', version='v1')
> >> class EndpointsTest(remote.Service):
> >>   @endpoints.method(VoidMessage, TestMsg)
> >> def test(req):
> >>   return TestMsg(msg='Hello there')
> >>
> >> curl /test/v1/test
> >> {msg:'Hello there'}
> >>
> >> - results in at least 200ms
> >>
> >>
> >> to this:
> >>
> >> class ProtoRpcTest(remote.Service):
> >>   @remote.method(VoidMessage, TestMsg)
> >>   def test(req):
> >> return TestMsg(msg='Hello there')
> >>
> >> curl -X POST /prototest.test
> >> {msg:'Hello there'}
> >>
> >> - results in about 7-10ms
> >>
> >>
> >> There seem to be a few additional roundtrips going on when making
> requests
> >> via Endpoints.
> >> Do you guys think it's possible to reduce the latency?
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "Google App Engine" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> an
> >> email to google-appengine+unsubscr...@googlegroups.com.
> >> To post to this group, send email to google-appengine@googlegroups.com.
> >> Visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
> >> For more options, visit https://groups.google.com/groups/opt_out.
> >>
> >>
> >
> >
> >
> >
> > --
> > Dan Holevoet
> > Google Developer Relations
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to google-appengine+unsubscr...@googlegroups.com.
> > To post to this group, send email to google-appengine@googlegroups.com.
> > Visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-appengine+unsubscr...@googlegroups.com.
> To post to this group, send email to google-appengine@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-appengine?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>


-- 
Dan Holevoet
Google Developer Relations

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-ap

Re: [google-appengine] [Python] Endpoints vs ProtoRPC ~200ms overhead

2013-04-15 Thread alex
Hey, Dan. So, I basically took those numbers from logs of one of my
apps (Python 2.7, threadsafe=true, SDK v1.7.7)

I was looking at the logs the other day and noticed all Endpoints API
calls were taking at least 200ms up to 400-500ms (well, I clearly had
some Datastore and other stuff going on for it to be 500ms).

I started experimenting and ended up with those two simple classes,
EndpointsTest vs ProtoRpcTest, and TestMsg with the only msg string
field.

I then started calling their test method using curl (manually from a
terminal) and watch the logs, for maybe 15-20 mins repeatedly with
about 0.3-0.5 rps rate. I did the average in my head. Pretty easy - it
never went lower than 200ms and higher than 270ms for
EndpointsTest.test, and was in between 6ms-12ms for ProtoRpcTest.test.

This was running an app in EU datacenters. I thought I'd try it with
anothe app in US but got the same results.

Maybe I was doing it all wrong. Actually, I'll be happy to hear that.

Please let me know if this makes sense or I'm just comparing apples to oranges.

On Mon, Apr 15, 2013 at 11:19 PM, Dan Holevoet
 wrote:
> Hi Alex,
>
> Can you share a bit more information about how you performed your tests? Are
> those numbers averages? How many times did you call both APIs? Was this
> repeatable or did you run the test multiple times?
>
> Thanks,
> Dan
>
>
> On Sat, Apr 13, 2013 at 1:46 AM, alex  wrote:
>>
>> I'm not sure it's even possible (to reduce the overhead), and I do
>> understand there's another infrastructure layer that uses ProtoPRC lib, but
>> still comare this:
>>
>> @endpoints.api(name='test', version='v1')
>> class EndpointsTest(remote.Service):
>>   @endpoints.method(VoidMessage, TestMsg)
>> def test(req):
>>   return TestMsg(msg='Hello there')
>>
>> curl /test/v1/test
>> {msg:'Hello there'}
>>
>> - results in at least 200ms
>>
>>
>> to this:
>>
>> class ProtoRpcTest(remote.Service):
>>   @remote.method(VoidMessage, TestMsg)
>>   def test(req):
>> return TestMsg(msg='Hello there')
>>
>> curl -X POST /prototest.test
>> {msg:'Hello there'}
>>
>> - results in about 7-10ms
>>
>>
>> There seem to be a few additional roundtrips going on when making requests
>> via Endpoints.
>> Do you guys think it's possible to reduce the latency?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to google-appengine+unsubscr...@googlegroups.com.
>> To post to this group, send email to google-appengine@googlegroups.com.
>> Visit this group at http://groups.google.com/group/google-appengine?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>
>
>
>
> --
> Dan Holevoet
> Google Developer Relations
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-appengine+unsubscr...@googlegroups.com.
> To post to this group, send email to google-appengine@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-appengine?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [google-appengine] [Python] Endpoints vs ProtoRPC ~200ms overhead

2013-04-15 Thread Dan Holevoet
Hi Alex,

Can you share a bit more information about how you performed your tests?
Are those numbers averages? How many times did you call both APIs? Was this
repeatable or did you run the test multiple times?

Thanks,
Dan


On Sat, Apr 13, 2013 at 1:46 AM, alex  wrote:

> I'm not sure it's even possible (to reduce the overhead), and I do
> understand there's another infrastructure layer that uses ProtoPRC lib, but
> still comare this:
>
> @endpoints.api(name='test', version='v1')
> class EndpointsTest(remote.Service):
>   @endpoints.method(VoidMessage, TestMsg)
> def test(req):
>   return TestMsg(msg='Hello there')
>
> curl /test/v1/test
> {msg:'Hello there'}
>
> - results in at least 200ms
>
>
> to this:
>
> class ProtoRpcTest(remote.Service):
>   @remote.method(VoidMessage, TestMsg)
>   def test(req):
> return TestMsg(msg='Hello there')
>
> curl -X POST /prototest.test
> {msg:'Hello there'}
>
> - results in about 7-10ms
>
>
> There seem to be a few additional roundtrips going on when making requests
> via Endpoints.
> Do you guys think it's possible to reduce the latency?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-appengine+unsubscr...@googlegroups.com.
> To post to this group, send email to google-appengine@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-appengine?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Dan Holevoet
Google Developer Relations

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[google-appengine] [Python] Endpoints vs ProtoRPC ~200ms overhead

2013-04-13 Thread alex
I'm not sure it's even possible (to reduce the overhead), and I do
understand there's another infrastructure layer that uses ProtoPRC lib, but
still comare this:

@endpoints.api(name='test', version='v1')
class EndpointsTest(remote.Service):
  @endpoints.method(VoidMessage, TestMsg)
def test(req):
  return TestMsg(msg='Hello there')

curl /test/v1/test
{msg:'Hello there'}

- results in at least 200ms


to this:

class ProtoRpcTest(remote.Service):
  @remote.method(VoidMessage, TestMsg)
  def test(req):
return TestMsg(msg='Hello there')

curl -X POST /prototest.test
{msg:'Hello there'}

- results in about 7-10ms


There seem to be a few additional roundtrips going on when making requests
via Endpoints.
Do you guys think it's possible to reduce the latency?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.