Your SlideShare is downloading. ×
0
Appengine Java Night #2 LT
Appengine Java Night #2 LT
Appengine Java Night #2 LT
Appengine Java Night #2 LT
Appengine Java Night #2 LT
Appengine Java Night #2 LT
Appengine Java Night #2 LT
Appengine Java Night #2 LT
Appengine Java Night #2 LT
Appengine Java Night #2 LT
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Appengine Java Night #2 LT

1,585

Published on

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,585
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
30
Comments
0
Likes
4
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. appengine java night #2 ProtocolBuffer on HTTP shin1ogawa@
  • 2. ApiProxy#getDelegate() Application Stub LowLevelAPI PB ApiProxy PB #getDelegate()
  • 3. Delegate#makeSyncCall() Service ,Method ,Request(byte[]) ApiProxy #getDelegate() #makeSyncCall() PB(byte[]) Stub/
  • 4. Server … • ApiProxy.setDelegate( Delegate) ProtocolBuffer • ProtocolBuffer
  • 5. • OreOreDelegate #makeSyncCall() Stub • ApiProxy.getDelegate().makeSyncCall() • OreOreDelegate Low-Level API • Low-Level API Application
  • 6. ProtocolBuffer on HTTP Application LowLevelAPI PB PB OreOreServlet OreOreDelegate PB
  • 7. MakeSyncCallServlet makeSyncCall() String serviceName = req.getHeader(SERVICE_NAME); String methodName = req.getHeader(METHOD_NAME); byte[] requestBytes = IOUtils.toByteArray(req.getInputStream()); byte[] responseBytes = ApiProxy.getDelegate().makeSyncCall( ApiProxy.getCurrentEnvironment(), serviceName, methodName, requestBytes); resp.getOutputStream().write(responseBytes);
  • 8. MakeSyncCallDelegate MakeSyncCall public byte[] makeSyncCall( Environment environment, String serviceName, String methodName, byte[] request) throws ApiProxyException { return protocolBufferOnHttp( environment, serviceName, methodName, request); } byte[] protocolBufferOnHttp(.....) { // makeSyncCall Post byte[] }
  • 9. • Datastore " Datastore • Datastore " Datastore • Memcache " Memcache
  • 10. shin1ogawa@

×