1 / 16

Kodegenerering

Kodegenerering. Til RPC. Uafklarede områder. Performance med WebService /SOAP Nye målinger på localhost. Problemet. Flash SOAP. POST / RpcSoapTester /services/Server HTTP/1.1 x-flash-version: 10,0,22,91 Content-Type: text / xml ; charset =utf-8 SOAPAction : "" Content- Length : 773

Download Presentation

Kodegenerering

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Kodegenerering Til RPC

  2. Uafklarede områder • Performance med WebService/SOAP • Nye målinger på localhost

  3. Problemet

  4. Flash SOAP POST /RpcSoapTester/services/Server HTTP/1.1 x-flash-version: 10,0,22,91 Content-Type: text/xml; charset=utf-8 SOAPAction: "" Content-Length: 773 User-Agent: Shockwave Flash Host: localhost:81 Cache-Control: no-cache <SOAP-ENV:Envelopexmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:BodySOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <intf:callWithObjectxmlns:intf="http://test"> <objectxsi:type="tns1:TestObject" xmlns:tns1="http://objects.generated.rpcgenerator.com"> <objectsSOAP-ENC:arrayType="tns1:TestObjectItem[]" xsi:type="SOAP-ENC:Array" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"> <item xsi:type="tns1:TestObjectItem"> <item xsi:type="xsd:string">x</item> <item xsi:type="xsd:string">x</item> <item xsi:type="xsd:string">x</item> <item xsi:type="xsd:string">x</item> <item xsi:type="xsd:string">x</item> </item> </objects> </object> </intf:callWithObject> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

  5. Java/Axis SOAP HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: text/xml;charset=utf-8 Transfer-Encoding: chunked Date: Sat, 13 Nov 2010 13:58:56 GMT 445 <?xml version="1.0" encoding="utf-8"?> <soapenv:Envelopexmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:callWithObjectResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://test"> <callWithObjectReturnhref="#id0"/> </ns1:callWithObjectResponse> <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:TestObject" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://objects.generated.rpcgenerator.com"> <objectssoapenc:arrayType="ns2:TestObjectItem[1]" xsi:type="soapenc:Array"> <objectshref="#id1"/> </objects> </multiRef> <multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:TestObjectItem" xmlns:ns3="http://objects.generated.rpcgenerator.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <item xsi:type="xsd:string">x</item> <item xsi:type="xsd:string">x</item> <item xsi:type="xsd:string">x</item> <item xsi:type="xsd:string">x</item> </multiRef> </soapenv:Body> </soapenv:Envelope> 0

  6. Gammel måling

  7. Ny måling

  8. Timing checkI millisekunder med binær.Array med 0 elementer. Sendt : 12 bytes. Modtaget: 8 bytes

  9. WebService/SOAPMåling i millisekunder. Array med 5.000 elementer. Sendt : 225Kb. Modtaget: 331Kb

  10. [1-2] AS3 marshalling • Mistanke: Flash/AS3 • Ekstra tidsmåling på afsendelse • Alternativer • Skrive eget webservice framework

  11. BinærMåling i millisekunder. Array med 50.000 elementer. Sendt og modtaget: 250Kb

  12. [4-5] Java marshalling • Mistanke: java.nio.ByteBuffer • Pris for at udvide buffer mange gange • Alternativer • Skrive direkte til stream ? • Benytte array eller Collection til data i stedet • Andre forbedringer • Nye datatyper til korte lister og strenge

  13. Optimeret binærMåling i millisekunder. Array med 50.000 elementer. Sendt og modtaget: 250Kb

  14. Optimeret binær (datatung)Måling i millisekunder. Array med 1.000.000 elementer. Sendt og modtaget: 5Mb

  15. XMLMåling i millisekunder. Array med 100.000 elementer. Sendt og modtaget: 800Kb

  16. Konklusion • Ringe WebService performance skyldes Flash • Forståelse for egen udvikling af framework • Binær optimeret • Stadig favorit • Marshalling mere krævende en unmarshalling • Reservering i memory • Monitor • Viden om opbygning af HTTP

More Related