JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Java & XML、Web Service  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to topicthreaded modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 Compression of big xml file
vincent_hwu





發文: 153
積分: 2
於 2005-12-11 02:43 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我最近Go一個專案碰到了 Wes Service XML壓縮的問題,試了好幾個壓縮的演算法,似乎都得到不滿意的結果,我相信這個議題也已經冷飯熱炒了好幾次,想到最近熱門的SOA是架構在Web Service上面,真不知道他們如何面對這個嚴重的問題,一但資料量很多,直接影響到整個Solution的效能,不知道有哪為先進能解答我的疑惑,或者是已經有一個比較好的解決方式,在面對這個棘手又不得不面對的問題。謝謝!!

reply to postreply to post
作者 Re:Compression of big xml file [Re:vincent_hwu]
jini

SoftLeader Taiwan

版主

發文: 1266
積分: 23
於 2005-12-11 03:18 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
WebServices with XML data will solve the "Integration" problem, however, you need to face the "Performance" problem !

Q:What is the *REAL* bottle-neck of your system ?

(1) The Database Query ?
(2) The Internet Band ?
(3) The XML Parsing ?

If you want to use compression, i guess that you got the probelms about internet transfer time ! I suggestion, use WebServices for basic data transfer now by SOAP, and transfer larger XML data with other protocol, for example, ftp !

I think that you have ever tried the ZIP method in xml - compression. However, the system need to zip and unzip ! I need to say, it's not a good solution in XML, for example, in VRML 2.0 , they tried to transfer data by zip. the result " the VRML is dead " !

And if you face the performance problem of xml-parsing ! you can read some documents about StAX , from J2EE 1.4, another xml-parsing standard which be announced by BEA !

Well, if u need other solution, some articles that talked about binary-xml ( I don't like it , get one performance , loss more XML oringinal designs ) , and fast-WS ( http://java.sun.com/developer/technicalArticles/WebServices/fastWS/ ) , You can read it !

So, if u want to use "binary-XML" with any compression technology, why not use ROWDATA to transfer data Smile


jini edited on 2005-12-11 03:29
reply to postreply to post
作者 Re:Compression of big xml file [Re:vincent_hwu]
jd001982





發文: 366
積分: 6
於 2005-12-12 05:34 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
應該是 system design 的問題. 有幾個可能.....

* 如果被傳送的 XML 需要壓縮:
1. 你根本不應該用 XML 傳送 data.
2. XML 的 schema 沒設計過.

* 如果被傳送的 XML 是 web service 的 message, 除了上面提到的之外:
1. data 流程沒弄清楚. 真的需要一次傳送這麼多 data 嗎? 真的需要傳送的這麼頻繁嗎?
2. 系統介面的 granularity 沒設計好. 分太細會造成 message 泛濫, 分太粗會讓 message 太大.
3. 你不該用 web service. Web service 是用來做 system integration 的, 而不是在同一個 system 裡代替 messaging 的 (或 method call).

還有, 你確定你的 hardware 夠用嗎 (server, network, ....)?


reply to postreply to post
作者 Re:Compression of big xml file [Re:vincent_hwu]
vincent_hwu





發文: 153
積分: 2
於 2005-12-13 01:24 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
感謝二位的解答,兩位也都看出來在這個專案裡ws 似乎被定位成rpc的角色,似乎偏離ws真正的使用目的,不過我不是SA or SD,我只是剛好在implement ws的位置上,在我實際implement的過程發生這個問題,所以提出來發問,也因為這個問題更加深ws真正在distribution computing世界裡的定位,至於hardware一定夠用,只能用"猛"字形容,bandwith也一定夠,我覺得真的是正個design發生的問題....,講到這裡真想換帳號繼續寫,因為公司的人知道我用這個帳號。anyway謝謝二位在design以及ws purpose的解釋。不過公司的人繼續在compression上面打轉(least effort),我真正擔心的是在client(flash)的decompression時間。

辛苦一天最欣慰的是看著女朋友睡的很甜、窗外的台北市夜景依舊很美。


vincent_hwu edited on 2005-12-13 01:27
reply to postreply to post
作者 Re:Compression of big xml file [Re:vincent_hwu]
jd001982





發文: 366
積分: 6
於 2005-12-13 02:28 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
不過公司的人繼續在compression上面打轉(least effort),我真正擔心的是在client(flash)的decompression時間。

compression 能省的空間和 transmission time 還不一定能彌補 comp/decomp 賠上的時間.

... 窗外的台北市夜景依舊很美。

拉斯維加斯的夜景 也不錯...


reply to postreply to post
作者 Re:Compression of big xml file [Re:vincent_hwu]
ray_linn

什么都不懂的小白

版主

發文: 540
積分: 10
於 2005-12-20 15:37 user profilesend a private message to usersend email to ray_linnreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
可以尝试将所传送的物件系列化之后再透过SOAP传送,可以减少大量Tag.

Large Value Object --->Serialzie--->Data File--->Compress Base64-Encoding --->SOAP---->Compress Base64-decoding--->deserialzie--->Large Value Object.


reply to postreply to post
飞翔的候鸟
» JWorld@TW »  Java & XML、Web Service

reply to topicthreaded modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8