Hybrid PolyLingual Object Model: An Efficient and Seamless Integration of Java and Native Components on the Dalvik Virtual Machine
Identifieur interne : 000651 ( Pmc/Corpus ); précédent : 000650; suivant : 000652Hybrid PolyLingual Object Model: An Efficient and Seamless Integration of Java and Native Components on the Dalvik Virtual Machine
Auteurs : Yukun Huang ; Rong Chen ; Jingbo Wei ; Xilong Pei ; Jing Cao ; Prem Prakash Jayaraman ; Rajiv RanjanSource :
- The Scientific World Journal [ 2356-6140 ] ; 2014.
Abstract
JNI in the Android platform is often observed with low efficiency and high coding complexity. Although many researchers have investigated the JNI mechanism, few of them solve the efficiency and the complexity problems of JNI in the Android platform simultaneously. In this paper, a hybrid polylingual object (HPO) model is proposed to allow a CAR object being accessed as a Java object and as vice in the Dalvik virtual machine. It is an acceptable substitute for JNI to reuse the CAR-compliant components in Android applications in a seamless and efficient way. The metadata injection mechanism is designed to support the automatic mapping and reflection between CAR objects and Java objects. A prototype virtual machine, called HPO-Dalvik, is implemented by extending the Dalvik virtual machine to support the HPO model. Lifespan management, garbage collection, and data type transformation of HPO objects are also handled in the HPO-Dalvik virtual machine automatically. The experimental result shows that the HPO model outweighs the standard JNI in lower overhead on native side, better executing performance with no JNI bridging code being demanded.
Url:
DOI: 10.1155/2014/785434
PubMed: 25110745
PubMed Central: 4082837
Links to Exploration step
PMC:4082837Le document en format XML
<record><TEI><teiHeader><fileDesc><titleStmt><title xml:lang="en">Hybrid PolyLingual Object Model: An Efficient and Seamless Integration of Java and Native Components on the Dalvik Virtual Machine</title>
<author><name sortKey="Huang, Yukun" sort="Huang, Yukun" uniqKey="Huang Y" first="Yukun" last="Huang">Yukun Huang</name>
<affiliation><nlm:aff id="I1">Tongji University, Shanghai 200092, China</nlm:aff>
</affiliation>
<affiliation><nlm:aff id="I2">Jiangxi University of Finance and Economics, Nanchang 330029, China</nlm:aff>
</affiliation>
</author>
<author><name sortKey="Chen, Rong" sort="Chen, Rong" uniqKey="Chen R" first="Rong" last="Chen">Rong Chen</name>
<affiliation><nlm:aff id="I1">Tongji University, Shanghai 200092, China</nlm:aff>
</affiliation>
<affiliation><nlm:aff id="I3">Shanghai Kortide Century Technology, Shanghai 201203, China</nlm:aff>
</affiliation>
</author>
<author><name sortKey="Wei, Jingbo" sort="Wei, Jingbo" uniqKey="Wei J" first="Jingbo" last="Wei">Jingbo Wei</name>
<affiliation><nlm:aff id="I4">Academy of Space Technology, Nanchang University, Nanchang 330031, China</nlm:aff>
</affiliation>
</author>
<author><name sortKey="Pei, Xilong" sort="Pei, Xilong" uniqKey="Pei X" first="Xilong" last="Pei">Xilong Pei</name>
<affiliation><nlm:aff id="I1">Tongji University, Shanghai 200092, China</nlm:aff>
</affiliation>
</author>
<author><name sortKey="Cao, Jing" sort="Cao, Jing" uniqKey="Cao J" first="Jing" last="Cao">Jing Cao</name>
<affiliation><nlm:aff id="I3">Shanghai Kortide Century Technology, Shanghai 201203, China</nlm:aff>
</affiliation>
</author>
<author><name sortKey="Prakash Jayaraman, Prem" sort="Prakash Jayaraman, Prem" uniqKey="Prakash Jayaraman P" first="Prem" last="Prakash Jayaraman">Prem Prakash Jayaraman</name>
<affiliation><nlm:aff id="I5">CSIRO, Canberra, ACT 2601, Australia</nlm:aff>
</affiliation>
</author>
<author><name sortKey="Ranjan, Rajiv" sort="Ranjan, Rajiv" uniqKey="Ranjan R" first="Rajiv" last="Ranjan">Rajiv Ranjan</name>
<affiliation><nlm:aff id="I5">CSIRO, Canberra, ACT 2601, Australia</nlm:aff>
</affiliation>
</author>
</titleStmt>
<publicationStmt><idno type="wicri:source">PMC</idno>
<idno type="pmid">25110745</idno>
<idno type="pmc">4082837</idno>
<idno type="url">http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4082837</idno>
<idno type="RBID">PMC:4082837</idno>
<idno type="doi">10.1155/2014/785434</idno>
<date when="2014">2014</date>
<idno type="wicri:Area/Pmc/Corpus">000651</idno>
</publicationStmt>
<sourceDesc><biblStruct><analytic><title xml:lang="en" level="a" type="main">Hybrid PolyLingual Object Model: An Efficient and Seamless Integration of Java and Native Components on the Dalvik Virtual Machine</title>
<author><name sortKey="Huang, Yukun" sort="Huang, Yukun" uniqKey="Huang Y" first="Yukun" last="Huang">Yukun Huang</name>
<affiliation><nlm:aff id="I1">Tongji University, Shanghai 200092, China</nlm:aff>
</affiliation>
<affiliation><nlm:aff id="I2">Jiangxi University of Finance and Economics, Nanchang 330029, China</nlm:aff>
</affiliation>
</author>
<author><name sortKey="Chen, Rong" sort="Chen, Rong" uniqKey="Chen R" first="Rong" last="Chen">Rong Chen</name>
<affiliation><nlm:aff id="I1">Tongji University, Shanghai 200092, China</nlm:aff>
</affiliation>
<affiliation><nlm:aff id="I3">Shanghai Kortide Century Technology, Shanghai 201203, China</nlm:aff>
</affiliation>
</author>
<author><name sortKey="Wei, Jingbo" sort="Wei, Jingbo" uniqKey="Wei J" first="Jingbo" last="Wei">Jingbo Wei</name>
<affiliation><nlm:aff id="I4">Academy of Space Technology, Nanchang University, Nanchang 330031, China</nlm:aff>
</affiliation>
</author>
<author><name sortKey="Pei, Xilong" sort="Pei, Xilong" uniqKey="Pei X" first="Xilong" last="Pei">Xilong Pei</name>
<affiliation><nlm:aff id="I1">Tongji University, Shanghai 200092, China</nlm:aff>
</affiliation>
</author>
<author><name sortKey="Cao, Jing" sort="Cao, Jing" uniqKey="Cao J" first="Jing" last="Cao">Jing Cao</name>
<affiliation><nlm:aff id="I3">Shanghai Kortide Century Technology, Shanghai 201203, China</nlm:aff>
</affiliation>
</author>
<author><name sortKey="Prakash Jayaraman, Prem" sort="Prakash Jayaraman, Prem" uniqKey="Prakash Jayaraman P" first="Prem" last="Prakash Jayaraman">Prem Prakash Jayaraman</name>
<affiliation><nlm:aff id="I5">CSIRO, Canberra, ACT 2601, Australia</nlm:aff>
</affiliation>
</author>
<author><name sortKey="Ranjan, Rajiv" sort="Ranjan, Rajiv" uniqKey="Ranjan R" first="Rajiv" last="Ranjan">Rajiv Ranjan</name>
<affiliation><nlm:aff id="I5">CSIRO, Canberra, ACT 2601, Australia</nlm:aff>
</affiliation>
</author>
</analytic>
<series><title level="j">The Scientific World Journal</title>
<idno type="ISSN">2356-6140</idno>
<idno type="eISSN">1537-744X</idno>
<imprint><date when="2014">2014</date>
</imprint>
</series>
</biblStruct>
</sourceDesc>
</fileDesc>
<profileDesc><textClass></textClass>
</profileDesc>
</teiHeader>
<front><div type="abstract" xml:lang="en"><p>JNI in the Android platform is often observed with low efficiency and high coding complexity. Although many researchers have investigated the JNI mechanism, few of them solve the efficiency and the complexity problems of JNI in the Android platform simultaneously. In this paper, a hybrid polylingual object (HPO) model is proposed to allow a CAR object being accessed as a Java object and as vice in the Dalvik virtual machine. It is an acceptable substitute for JNI to reuse the CAR-compliant components in Android applications in a seamless and efficient way. The metadata injection mechanism is designed to support the automatic mapping and reflection between CAR objects and Java objects. A prototype virtual machine, called HPO-Dalvik, is implemented by extending the Dalvik virtual machine to support the HPO model. Lifespan management, garbage collection, and data type transformation of HPO objects are also handled in the HPO-Dalvik virtual machine automatically. The experimental result shows that the HPO model outweighs the standard JNI in lower overhead on native side, better executing performance with no JNI bridging code being demanded.</p>
</div>
</front>
<back><div1 type="bibliography"><listBibl><biblStruct><analytic><author><name sortKey="Liang, S" uniqKey="Liang S">S Liang</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Li, J Z" uniqKey="Li J">J-Z Li</name>
</author>
<author><name sortKey="Zhang, Z P" uniqKey="Zhang Z">Z-P Zhang</name>
</author>
<author><name sortKey="Qiao, B" uniqKey="Qiao B">B Qiao</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Wanbin, Q" uniqKey="Wanbin Q">Q Wanbin</name>
</author>
<author><name sortKey="Guojie, Z" uniqKey="Guojie Z">Z Guojie</name>
</author>
<author><name sortKey="Honglin, Q" uniqKey="Honglin Q">Q Honglin</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Zhang, Y J" uniqKey="Zhang Y">Y-J Zhang</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Lee, S" uniqKey="Lee S">S Lee</name>
</author>
<author><name sortKey="Jeon, Jw" uniqKey="Jeon J">JW Jeon</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Stepanian, L" uniqKey="Stepanian L">L Stepanian</name>
</author>
<author><name sortKey="Brown, Ad" uniqKey="Brown A">AD Brown</name>
</author>
<author><name sortKey="Kielstra, A" uniqKey="Kielstra A">A Kielstra</name>
</author>
<author><name sortKey="Koblents, G" uniqKey="Koblents G">G Koblents</name>
</author>
<author><name sortKey="Stoodley, K" uniqKey="Stoodley K">K Stoodley</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Yu Hsin, T" uniqKey="Yu Hsin T">T Yu-Hsin</name>
</author>
<author><name sortKey="I Wei, W" uniqKey="I Wei W">W I-Wei</name>
</author>
<author><name sortKey="I Chun, L" uniqKey="I Chun L">L I-Chun</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Lee, Y H" uniqKey="Lee Y">Y-H Lee</name>
</author>
<author><name sortKey="Chandrian, P" uniqKey="Chandrian P">P Chandrian</name>
</author>
<author><name sortKey="Li, B" uniqKey="Li B">B Li</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Bubak, M" uniqKey="Bubak M">M Bubak</name>
</author>
<author><name sortKey="Dawid, K" uniqKey="Dawid K">K Dawid</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Hummer, W" uniqKey="Hummer W">W Hummer</name>
</author>
<author><name sortKey="Wolf, W" uniqKey="Wolf W">W Wolf</name>
</author>
<author><name sortKey="Hahn, C" uniqKey="Hahn C">C Hahn</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Chen, M" uniqKey="Chen M">M Chen</name>
</author>
<author><name sortKey="Shalom, G" uniqKey="Shalom G">G Shalom</name>
</author>
<author><name sortKey="Srinivas, S" uniqKey="Srinivas S">S Srinivas</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Halloway, S" uniqKey="Halloway S">S Halloway</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Wang, L" uniqKey="Wang L">L Wang</name>
</author>
<author><name sortKey="Chen, D" uniqKey="Chen D">D Chen</name>
</author>
<author><name sortKey="Hu, Y" uniqKey="Hu Y">Y Hu</name>
</author>
<author><name sortKey="Ma, Y" uniqKey="Ma Y">Y Ma</name>
</author>
<author><name sortKey="Wang, J" uniqKey="Wang J">J Wang</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Zhang, W" uniqKey="Zhang W">W Zhang</name>
</author>
<author><name sortKey="Wang, L" uniqKey="Wang L">L Wang</name>
</author>
<author><name sortKey="Liu, D" uniqKey="Liu D">D Liu</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Wang, L" uniqKey="Wang L">L Wang</name>
</author>
<author><name sortKey="Chen, D" uniqKey="Chen D">D Chen</name>
</author>
<author><name sortKey="Zhao, J" uniqKey="Zhao J">J Zhao</name>
</author>
<author><name sortKey="Tao, J" uniqKey="Tao J">J Tao</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Wang, L" uniqKey="Wang L">L Wang</name>
</author>
<author><name sortKey="Kunze, M" uniqKey="Kunze M">M Kunze</name>
</author>
<author><name sortKey="Tao, J" uniqKey="Tao J">J Tao</name>
</author>
<author><name sortKey="Von Laszewski, G" uniqKey="Von Laszewski G">G von Laszewski</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Wang, L" uniqKey="Wang L">L Wang</name>
</author>
<author><name sortKey="Chen, D" uniqKey="Chen D">D Chen</name>
</author>
<author><name sortKey="Huang, F" uniqKey="Huang F">F Huang</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Von Laszewski, G" uniqKey="Von Laszewski G">G von Laszewski</name>
</author>
<author><name sortKey="Dayal, J" uniqKey="Dayal J">J Dayal</name>
</author>
<author><name sortKey="Wang, L" uniqKey="Wang L">L Wang</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Chen, D" uniqKey="Chen D">D Chen</name>
</author>
<author><name sortKey="Wang, L" uniqKey="Wang L">L Wang</name>
</author>
<author><name sortKey="Bian, C" uniqKey="Bian C">C Bian</name>
</author>
<author><name sortKey="Zhang, X" uniqKey="Zhang X">X Zhang</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Demaster, Jd" uniqKey="Demaster J">JD deMaster</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Beazley, Dm" uniqKey="Beazley D">DM Beazley</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Gabrilovich, E" uniqKey="Gabrilovich E">E Gabrilovich</name>
</author>
<author><name sortKey="Finkelstein, L" uniqKey="Finkelstein L">L Finkelstein</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Chen, R" uniqKey="Chen R">R Chen</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Batyuk, L" uniqKey="Batyuk L">L Batyuk</name>
</author>
<author><name sortKey="Schmidt, Ad" uniqKey="Schmidt A">AD Schmidt</name>
</author>
<author><name sortKey="Schmidt, Hg" uniqKey="Schmidt H">HG Schmidt</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Lin, C M" uniqKey="Lin C">C-M Lin</name>
</author>
<author><name sortKey="Lin, J H" uniqKey="Lin J">J-H Lin</name>
</author>
<author><name sortKey="Dow, C R" uniqKey="Dow C">C-R Dow</name>
</author>
<author><name sortKey="Wen, C M" uniqKey="Wen C">C-M Wen</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Kim, Y J" uniqKey="Kim Y">Y-J Kim</name>
</author>
<author><name sortKey="Cho, S J" uniqKey="Cho S">S-J Cho</name>
</author>
<author><name sortKey="Kim, K J" uniqKey="Kim K">K-J Kim</name>
</author>
<author><name sortKey="Hwang, E H" uniqKey="Hwang E">E-H Hwang</name>
</author>
<author><name sortKey="Yoon, S H" uniqKey="Yoon S">S-H Yoon</name>
</author>
<author><name sortKey="Jeon, J W" uniqKey="Jeon J">J-W Jeon</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Welsh, M" uniqKey="Welsh M">M Welsh</name>
</author>
<author><name sortKey="Culler, D" uniqKey="Culler D">D Culler</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Bubak, M" uniqKey="Bubak M">M Bubak</name>
</author>
<author><name sortKey="Kurzyniec, D" uniqKey="Kurzyniec D">D Kurzyniec</name>
</author>
<author><name sortKey="Luszczek, P" uniqKey="Luszczek P">P Luszczek</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Huang, Y" uniqKey="Huang Y">Y Huang</name>
</author>
<author><name sortKey="Taylor, I" uniqKey="Taylor I">I Taylor</name>
</author>
<author><name sortKey="Walker, Dw" uniqKey="Walker D">DW Walker</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Canfora, G" uniqKey="Canfora G">G Canfora</name>
</author>
<author><name sortKey="Fasolino, Ar" uniqKey="Fasolino A">AR Fasolino</name>
</author>
<author><name sortKey="Frattolillo, G" uniqKey="Frattolillo G">G Frattolillo</name>
</author>
<author><name sortKey="Tramontana, P" uniqKey="Tramontana P">P Tramontana</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Culp, Tr" uniqKey="Culp T">TR Culp</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Huang, Y" uniqKey="Huang Y">Y Huang</name>
</author>
<author><name sortKey="Walker, Dw" uniqKey="Walker D">DW Walker</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Vairale, V" uniqKey="Vairale V">V Vairale</name>
</author>
<author><name sortKey="Honwadkar, K" uniqKey="Honwadkar K">K Honwadkar</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Hirzel, M" uniqKey="Hirzel M">M Hirzel</name>
</author>
<author><name sortKey="Grimm, R" uniqKey="Grimm R">R Grimm</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Hongyu, Z" uniqKey="Hongyu Z">Z Hongyu</name>
</author>
<author><name sortKey="Maofeng, L" uniqKey="Maofeng L">L Maofeng</name>
</author>
<author><name sortKey="Zhiqin, L" uniqKey="Zhiqin L">L Zhiqin</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Verbowski, C" uniqKey="Verbowski C">C Verbowski</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Alder, D" uniqKey="Alder D">D Alder</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Ratabouil, S" uniqKey="Ratabouil S">S Ratabouil</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Lee, Jk" uniqKey="Lee J">JK Lee</name>
</author>
<author><name sortKey="Lee, Jy" uniqKey="Lee J">JY Lee</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Chen, R" uniqKey="Chen R">R Chen</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Mccluskey, G" uniqKey="Mccluskey G">G McCluskey</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Bellia, M" uniqKey="Bellia M">M Bellia</name>
</author>
<author><name sortKey="Occhiuto, Me" uniqKey="Occhiuto M">ME Occhiuto</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Verbowski, C" uniqKey="Verbowski C">C Verbowski</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Cunningham, H" uniqKey="Cunningham H">H Cunningham</name>
</author>
<author><name sortKey="Cunningham, H" uniqKey="Cunningham H">H Cunningham</name>
</author>
<author><name sortKey="Maynard, D" uniqKey="Maynard D">D Maynard</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Reeve, L" uniqKey="Reeve L">L Reeve</name>
</author>
<author><name sortKey="Han, H" uniqKey="Han H">H Han</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Attanasio, Cr" uniqKey="Attanasio C">CR Attanasio</name>
</author>
<author><name sortKey="Bacon, Df" uniqKey="Bacon D">DF Bacon</name>
</author>
<author><name sortKey="Cocchi, A" uniqKey="Cocchi A">A Cocchi</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Chen, R" uniqKey="Chen R">R Chen</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Liu, Y" uniqKey="Liu Y">Y Liu</name>
</author>
<author><name sortKey="Zhu, Y" uniqKey="Zhu Y">Y Zhu</name>
</author>
<author><name sortKey="Ni, L" uniqKey="Ni L">L Ni</name>
</author>
<author><name sortKey="Xue, G" uniqKey="Xue G">G Xue</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Liu, X" uniqKey="Liu X">X Liu</name>
</author>
<author><name sortKey="Yang, Y" uniqKey="Yang Y">Y Yang</name>
</author>
<author><name sortKey="Yuan, D" uniqKey="Yuan D">D Yuan</name>
</author>
<author><name sortKey="Chen, J" uniqKey="Chen J">J Chen</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Xu, Z" uniqKey="Xu Z">Z Xu</name>
</author>
<author><name sortKey="Wei, X" uniqKey="Wei X">X Wei</name>
</author>
<author><name sortKey="Luo, X" uniqKey="Luo X">X Luo</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Xu, Z" uniqKey="Xu Z">Z Xu</name>
</author>
<author><name sortKey="Luo, X" uniqKey="Luo X">X Luo</name>
</author>
<author><name sortKey="Zhang, S" uniqKey="Zhang S">S Zhang</name>
</author>
<author><name sortKey="Wei, X" uniqKey="Wei X">X Wei</name>
</author>
<author><name sortKey="Mei, L" uniqKey="Mei L">L Mei</name>
</author>
<author><name sortKey="Hu, C" uniqKey="Hu C">C Hu</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Xu, Z" uniqKey="Xu Z">Z Xu</name>
</author>
<author><name sortKey="Liu, Y" uniqKey="Liu Y">Y Liu</name>
</author>
<author><name sortKey="Mei, L" uniqKey="Mei L">L Mei</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Luo, X" uniqKey="Luo X">X Luo</name>
</author>
<author><name sortKey="Xu, Z" uniqKey="Xu Z">Z Xu</name>
</author>
<author><name sortKey="Yu, J" uniqKey="Yu J">J Yu</name>
</author>
<author><name sortKey="Chen, X" uniqKey="Chen X">X Chen</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Hu, C" uniqKey="Hu C">C Hu</name>
</author>
<author><name sortKey="Xu, Z" uniqKey="Xu Z">Z Xu</name>
</author>
<author><name sortKey="Liu, Y" uniqKey="Liu Y">Y Liu</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Liu, Y" uniqKey="Liu Y">Y Liu</name>
</author>
<author><name sortKey="Zhang, Q" uniqKey="Zhang Q">Q Zhang</name>
</author>
<author><name sortKey="Ni, L" uniqKey="Ni L">L Ni</name>
</author>
</analytic>
</biblStruct>
<biblStruct><analytic><author><name sortKey="Liu, Y" uniqKey="Liu Y">Y Liu</name>
</author>
<author><name sortKey="Ni, L" uniqKey="Ni L">L Ni</name>
</author>
<author><name sortKey="Hu, C" uniqKey="Hu C">C Hu</name>
</author>
</analytic>
</biblStruct>
</listBibl>
</div1>
</back>
</TEI>
<pmc article-type="research-article"><pmc-dir>properties open_access</pmc-dir>
<front><journal-meta><journal-id journal-id-type="nlm-ta">ScientificWorldJournal</journal-id>
<journal-id journal-id-type="iso-abbrev">ScientificWorldJournal</journal-id>
<journal-id journal-id-type="publisher-id">TSWJ</journal-id>
<journal-title-group><journal-title>The Scientific World Journal</journal-title>
</journal-title-group>
<issn pub-type="ppub">2356-6140</issn>
<issn pub-type="epub">1537-744X</issn>
<publisher><publisher-name>Hindawi Publishing Corporation</publisher-name>
</publisher>
</journal-meta>
<article-meta><article-id pub-id-type="pmid">25110745</article-id>
<article-id pub-id-type="pmc">4082837</article-id>
<article-id pub-id-type="doi">10.1155/2014/785434</article-id>
<article-categories><subj-group subj-group-type="heading"><subject>Research Article</subject>
</subj-group>
</article-categories>
<title-group><article-title>Hybrid PolyLingual Object Model: An Efficient and Seamless Integration of Java and Native Components on the Dalvik Virtual Machine</article-title>
</title-group>
<contrib-group><contrib contrib-type="author"><name><surname>Huang</surname>
<given-names>Yukun</given-names>
</name>
<xref ref-type="aff" rid="I1"><sup>1</sup>
</xref>
<xref ref-type="aff" rid="I2"><sup>2</sup>
</xref>
</contrib>
<contrib contrib-type="author"><name><surname>Chen</surname>
<given-names>Rong</given-names>
</name>
<xref ref-type="aff" rid="I1"><sup>1</sup>
</xref>
<xref ref-type="aff" rid="I3"><sup>3</sup>
</xref>
</contrib>
<contrib contrib-type="author"><name><surname>Wei</surname>
<given-names>Jingbo</given-names>
</name>
<xref ref-type="aff" rid="I4"><sup>4</sup>
</xref>
</contrib>
<contrib contrib-type="author"><name><surname>Pei</surname>
<given-names>Xilong</given-names>
</name>
<xref ref-type="aff" rid="I1"><sup>1</sup>
</xref>
</contrib>
<contrib contrib-type="author"><name><surname>Cao</surname>
<given-names>Jing</given-names>
</name>
<xref ref-type="aff" rid="I3"><sup>3</sup>
</xref>
</contrib>
<contrib contrib-type="author"><name><surname>Prakash Jayaraman</surname>
<given-names>Prem</given-names>
</name>
<xref ref-type="aff" rid="I5"><sup>5</sup>
</xref>
</contrib>
<contrib contrib-type="author"><name><surname>Ranjan</surname>
<given-names>Rajiv</given-names>
</name>
<xref ref-type="aff" rid="I5"><sup>5</sup>
</xref>
<xref ref-type="corresp" rid="cor1">*</xref>
</contrib>
</contrib-group>
<aff id="I1"><sup>1</sup>
Tongji University, Shanghai 200092, China</aff>
<aff id="I2"><sup>2</sup>
Jiangxi University of Finance and Economics, Nanchang 330029, China</aff>
<aff id="I3"><sup>3</sup>
Shanghai Kortide Century Technology, Shanghai 201203, China</aff>
<aff id="I4"><sup>4</sup>
Academy of Space Technology, Nanchang University, Nanchang 330031, China</aff>
<aff id="I5"><sup>5</sup>
CSIRO, Canberra, ACT 2601, Australia</aff>
<author-notes><corresp id="cor1">*Rajiv Ranjan: <email>raj.ranjan@csiro.au</email>
</corresp>
<fn fn-type="other"><p>Academic Editor: Zheng Xu</p>
</fn>
</author-notes>
<pub-date pub-type="ppub"><year>2014</year>
</pub-date>
<pub-date pub-type="epub"><day>12</day>
<month>6</month>
<year>2014</year>
</pub-date>
<volume>2014</volume>
<elocation-id>785434</elocation-id>
<history><date date-type="received"><day>16</day>
<month>5</month>
<year>2014</year>
</date>
<date date-type="accepted"><day>19</day>
<month>5</month>
<year>2014</year>
</date>
</history>
<permissions><copyright-statement>Copyright © 2014 Yukun Huang et al.</copyright-statement>
<copyright-year>2014</copyright-year>
<license license-type="open-access"><license-p>This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.</license-p>
</license>
</permissions>
<abstract><p>JNI in the Android platform is often observed with low efficiency and high coding complexity. Although many researchers have investigated the JNI mechanism, few of them solve the efficiency and the complexity problems of JNI in the Android platform simultaneously. In this paper, a hybrid polylingual object (HPO) model is proposed to allow a CAR object being accessed as a Java object and as vice in the Dalvik virtual machine. It is an acceptable substitute for JNI to reuse the CAR-compliant components in Android applications in a seamless and efficient way. The metadata injection mechanism is designed to support the automatic mapping and reflection between CAR objects and Java objects. A prototype virtual machine, called HPO-Dalvik, is implemented by extending the Dalvik virtual machine to support the HPO model. Lifespan management, garbage collection, and data type transformation of HPO objects are also handled in the HPO-Dalvik virtual machine automatically. The experimental result shows that the HPO model outweighs the standard JNI in lower overhead on native side, better executing performance with no JNI bridging code being demanded.</p>
</abstract>
</article-meta>
</front>
<body><sec id="sec1"><title>1. Introduction</title>
<p>In recent years the Android system has become one of the mainstream mobile operating systems that support applications written in Java. As a core technology in Java, Java Native Interface (JNI) is widely used to call the native code from Java and as vice [<xref rid="B1" ref-type="bibr">1</xref>
]. It is also applied in integrating and reusing the third-party components in Java programs for better performance or to take advantages of hardware features [<xref rid="B2" ref-type="bibr">2</xref>
–<xref rid="B4" ref-type="bibr">4</xref>
]. However, despite the claim in [<xref rid="B5" ref-type="bibr">5</xref>
] that using the JNI with the native code is faster than using Java virtual machine, the communication delay in JNI is not negligible and significant overhead in JNI is still left unsolved. To make it worse, the coding complexity of JNI always makes the developing process inconvenient and cumbersome. Operating efficiency and programming complexity of JNI are more salient on the Android platform, owing to insufficient hardware resources and power limitation as well as frequently visiting peripheral devices. Therefore an efficient and seamless method is needed to reuse native components in an Android application.</p>
<p>In the last two decades, a great deal of research has been dedicated to the improvement of JNI mechanism either for better efficiency or for lower coding complexity. On one hand, efficiency was improved through speeding up the invoking process of native methods with optimized just-in-time (JIT) compiler [<xref rid="B6" ref-type="bibr">6</xref>
, <xref rid="B7" ref-type="bibr">7</xref>
] or by reducing the cost of symbolic lookups for the Java fields and objects accessing [<xref rid="B8" ref-type="bibr">8</xref>
]. On the other hand, using native code always increases the complexity of application development. To avoid the low level and complex JNI code, solutions such as share stub, bridge liberally or middleware [<xref rid="B9" ref-type="bibr">9</xref>
–<xref rid="B47" ref-type="bibr">19</xref>
], automated bridge code, or interface generator [<xref rid="B13" ref-type="bibr">20</xref>
–<xref rid="B15" ref-type="bibr">22</xref>
] were introduced. Some of the efforts mentioned above could be adopted into the Dalvik virtual machine (VM) of the Android platform. However, efforts to improve the efficiency of JNI follow the JNI paradigm which is too complicated to be easily used, while efforts to reduce the complexity of JNI tend to lower down the running efficiency.</p>
<p>One of the reasons that JNI cannot be substituted is that most of the native objects have no metadata and reflection ability, so they are incapable of being recognized by the Java VM and be accessed or managed directly by the Java VM. In this case, data have to be transferred between different executions spaces through the JNI functions, which have been proved to be inconvenient and uneconomic.</p>
<p>To solve this problem for the Android platform, we propose a hybrid polylingual object (HPO) model to merge the native component objects into the Dalvik runtime based on the component assembly runtime (CAR) technology [<xref rid="B16" ref-type="bibr">23</xref>
]. CAR supports the metadata and reflection mechanism for the native components at runtime. We design a metadata injection mechanism to inject the metadata of the CAR component object into the metaclass of a Java object. Under the mechanism, a CAR object can be managed and accessed directly as a Java object and as vice by the Dalvik VM, which greatly improves the execution efficiency of JNI applications. Contributing to the avoided bridging code, the HPO model lowers down the coding complexity substantially.</p>
<p>The rest of this paper is organized as follows. In <xref ref-type="sec" rid="sec2">Section 2</xref>
, JNI related work is introduced for the improvements of efficiency and usability (complexity). <xref ref-type="sec" rid="sec3"> Section 3</xref>
gives an outline of the motivation of the HPO model. In <xref ref-type="sec" rid="sec4">Section 4</xref>
, details and features of the HPO model are proposed. A modified Dalvik VM for the HPO is designed in <xref ref-type="sec" rid="sec5">Section 5</xref>
to support the metadata injection. <xref ref-type="sec" rid="sec6"> Section 6</xref>
provides an experiment to testify our approach and the performance. The last section gives the conclusion and discusses the further study.</p>
</sec>
<sec id="sec2"><title>2. Related Work</title>
<sec id="sec2.1"><title>2.1. Research on JNI Efficiency</title>
<p>Besides the help of visiting hardware resources via native code, JNI enhances the efficiency of Java programs by means of the fast execution of native code, as proved in the studies of [<xref rid="B17" ref-type="bibr">24</xref>
–<xref rid="B19" ref-type="bibr">26</xref>
]. For example,Batyuk et al. [<xref rid="B17" ref-type="bibr">24</xref>
] benchmarked the performance of the Dalvik Java code and the native code on Android devices and found that native C applications can be up to 30 times as fast as an identical algorithm running in Dalvik VM, and Java applications can become a speedup of up to 10 times if utilizing JNI.</p>
<p>However, overheads of JNI functions are disturbing which are often observed to pull down the running performance of native code. In order to improve the invoking efficiency of JNI functions, Stepanian et al. [<xref rid="B6" ref-type="bibr">6</xref>
] introduced a strategy for inline native functions into Java programs using a JIT compiler. This strategy can substantially reduce the overhead of performing JNI calls. They made further optimizations to transform inline call backs into semantically equivalent lightweight operations. Yu-Hsin et al. [<xref rid="B7" ref-type="bibr">7</xref>
] modified the Java Native Access (JNA) source code and integrated the LLVM JIT compiler into JNA to improve the performance. Lee et al. [<xref rid="B8" ref-type="bibr">8</xref>
] found that symbolic lookups of accessing Java fields or objects are expensive and can be avoided by caching field IDs and method IDs in static variables in native programs. Yann-Hang proposed to pin objects to their current memory location to ensure that the addresses can be used in future. The Jaguar project in [<xref rid="B20" ref-type="bibr">27</xref>
] helped Java applications to efficiently access system resources through compile time translation of certain Java bytecodes to inline machine code segments, and a preserialized objects mechanism is advised to reduce the cost of Java object serialization.</p>
</sec>
<sec id="sec2.2"><title>2.2. Research on JNI Complexity</title>
<p>Using native code with JNI always increases the programming complexity. As Bubak et al. [<xref rid="B21" ref-type="bibr">28</xref>
] had claimed, the functionality of JNI is available through a complex set of routines and many low level details involving field IDs, method IDs, and class references, which makes the development process long, inconvenient, and error prone. Furthermore, in order to reuse a third-party component in a Java application, a wrapper component or bridge code that delegates to the third-party component is needed [<xref rid="B22" ref-type="bibr">29</xref>
, <xref rid="B23" ref-type="bibr">30</xref>
]. However, native language programmers have to pay extra effort to attach or detach various Java objects explicitly from native code to access Java object's fields or to avoid resource leak [<xref rid="B24" ref-type="bibr">31</xref>
].</p>
<p>Lots of research aimed at hiding the JNI layer from developers. To reduce the coding complexity of JNI and to help developers write less JNI wrapper code, several tools, including JNA, Simplified Wrapper and Interface Generator (SWIG) [<xref rid="B14" ref-type="bibr">21</xref>
], Java-C automatic wrapper (JACAW) [<xref rid="B25" ref-type="bibr">32</xref>
], and AWGNL [<xref rid="B26" ref-type="bibr">33</xref>
], have been developed to make the bridging process automatic and simple. Wrapper generator shields the user from the details of JNI. For example, SWIG processes an interface file that defines all the variables and functions that need to be accessed from Java and generates the JNI interface to the C code for Java. However, the convenience of these tools comes at the cost of a more complex and cumbersome bridge interface which produces more additional overhead.</p>
<p>In addition to the method of automatic wrapper code generator, several researches hide the JNI layer from developers in other solutions. The Janet package described in [<xref rid="B21" ref-type="bibr">28</xref>
] provides a language extension which allows incorporating native code directly into Java source files. Jeannie designed in [<xref rid="B27" ref-type="bibr">34</xref>
] proposed a new foreign functional interface that makes programmers write both the Java code and the native code in the same file. Gabrilovich and Finkelstein [<xref rid="B15" ref-type="bibr">22</xref>
] suggest a template-based framework that provides automatic selection of the right functions to access Java objects based on their types.</p>
<p>For Windows-specific solutions, many projects, such as Jawin [<xref rid="B12" ref-type="bibr">12</xref>
], RJCB, Bridge2Java [<xref rid="B28" ref-type="bibr">35</xref>
], Microsoft VM [<xref rid="B29" ref-type="bibr">36</xref>
], and Jacob [<xref rid="B30" ref-type="bibr">37</xref>
], have emerged in the early years that enable interactions between Java and COM components. For example, Jacob uses the bridge technique to bind Java objects and COM objects. Bridge2Java uses a proxy generation tool to parse typelib file and transform the dispatch interface of COM server objects to objects and methods of Java agents. Microsoft Java virtual machine integrates two runtime environments—Java and COM, and each type of objects are packaged individually.</p>
<p>Although these technologies reduce the difficulty of the JNI development, they usually introduce substantial overhead in native function calls. Furthermore, most of the mentioned technologies have application constraints and platform dependency, which makes them hard to be applied in the development of JNI application on the Android platform. For Android-platform solutions, the Android NDK is helpful to reuse a large mass of legacy C/C++ code in Android application, and SWIG is also used to create the bridge code or wrapper code for the native components in Android application [<xref rid="B31" ref-type="bibr">38</xref>
, <xref rid="B32" ref-type="bibr">39</xref>
]. Unfortunately, none of them resolved the overheads produced by the JNI function calls.</p>
</sec>
</sec>
<sec id="sec3"><title>3. Analysis the Deficiency of JNI</title>
<p>This paper analyses the deficiency of the JNI mechanism at two points, accessing data and invoking methods. At the point of accessing data, critical overhead occurs during invoking native functions from Java to native and even larger ones during invoking back from native to Java to access the Java methods and data. This is because the JNI mechanism can be regarded as a policy that part of the computing ability of a Java object is migrated to the native side while the fields and data structures are still in the Java side. Then native code has to access these resources via the JNI functions, which leads to significant overhead. As a conclusion, the more frequently a Java object is accessed and operated by a native method, the less efficiently a JNI program performs. At the point of invoking methods, JNI links a native function to a Java native method one by one such that the native code is tightly coupled with the Java code and hard to be updated dynamically. Furthermore, the native functions are grouped in libraries in a flat organizational structure, which increases the cost of the symbolic lookups.</p>
<p>As a solution, if all the Java object's fields that are frequently accessed by the native code were moved to the native side, the overheads of the JNI function calls will be greatly reduced. On the other hand, functions in an object-oriented language must belong to a particular class and be invoked upon the class or an instance of the class. So the native method of a Java class can be mapped to a method that belongs to a native class instead of being mapped to an individual function in native libraries. Following these concepts, both the computing abilities and the data resources of a Java class can be encapsulated into a native class. Similarly, a native class can map its computing abilities and data resources to a Java class too. Instead of using the JNI bridging code to integrate and interoperate between these two kinds of heterogeneous objects, we tend to couple them into a hybrid polylingual object (HPO). The HPO model has the ability of directly interacting with both the Java code and the native code on our modified Dalvik VM. Higher executing and developing efficiency of the HPO model is expected because of the avoided JNI bridging code.</p>
<p>The key point of our proposition is to couple a Java object and a native object together in a virtual machine, which will be achieved through the metadata and reflection mechanism of the CAR technology [<xref rid="B33" ref-type="bibr">40</xref>
]. Java is distinguishable from C/C++ in its reflecting property and metadata maintained. Java objects always carry their own type information with them. The Java's metaprogramming is based on its core reflection API, which allows inspection of types and construction of dynamic method calls [<xref rid="B34" ref-type="bibr">41</xref>
, <xref rid="B35" ref-type="bibr">42</xref>
]. However, C/C++ has no metadata and reflection mechanism. Although a COM object supports metadata, it obtains limited reflection ability through the IDispatch interface and automation techniques [<xref rid="B29" ref-type="bibr">36</xref>
, <xref rid="B36" ref-type="bibr">43</xref>
], which makes it not a good choice for Android applications. The CAR technology is finally chosen to develop native components on the Android platform because of the following. (1) The CAR technology is qualified to be used in an embedded system. (2) CAR has a programming-language independent component standard, and a CAR component can be implemented in C/C++ or other compiled languages. (3) CAR supports metadata and reflection mechanism.</p>
<p>Contributions of this paper are the following. Firstly, we present a HPO model allowing native component object to be accessed directly as a Java object and vice versa. It helps to reduce the overheads of JNI function calls. Secondly, in order to support the HPO model in the Dalvik VM, we propose a metadata injection approach that provides automatic mapping and reflection ability to combine the Java object with the native object. Thirdly, we provide the HPO-oriented development tools that help developers to implement the integration and conversion between the Java components and the native components on the Android platform. With the help of these tools, developers no longer need to write the bridging code for the heterogeneous components or to struggle with the details of JNI programming.</p>
</sec>
<sec id="sec4"><title>4. Hybrid Polylingual Object Model</title>
<p>In this section, a hybrid polylingual object (HPO) model is proposed to achieve the integration and interoperation between Java components and native CAR (C++) components. The definition of the HPO model is given, followed by the features being discussed.</p>
<sec id="sec4.1"><title>4.1. Definition</title>
<p>In general, a HPO has some interoperation interfaces for both Java and CAR programs. The object is defined as a Java class and acts as a normal Java object in the VM, while it is implemented by the native object to improve the running efficiency. A schematic plot of the proposed HPO model is shown in <xref ref-type="fig" rid="fig1">Figure 1(a)</xref>
, in which a hybrid polylingual object is composed of a Java object and a CAR object which are bound through the Dalvik VM. The Java object is named as Java stub object (JSO) and the native object is native entity object (NEO). Based on the HPO model, we provide a runtime environment supporting the life of the objects for Java, HPO, and CAR component simultaneously, as shown in <xref ref-type="fig" rid="fig1">Figure 1(b)</xref>
.</p>
<p><statement id="deff1"><title>Definition 1 (Java stub object). </title>
<p>A JSO is a Java object whose status and behaviors are migrated to the native side. It is merely a stub object for the corresponding object existing in the native side.</p>
</statement>
</p>
<p><statement id="deff2"><title>Definition 2 (native entity object). </title>
<p>A NEO is a native object that encapsulates and implements all the status and behaviors of a JSO. It is the real entity that preserves the status and performs the behaviors that belong to a JSO.</p>
</statement>
</p>
<p><statement id="deff3"><title>Definition 3 (hybrid polylingual object). </title>
<p>A HPO is a cross language compound object that is archived by coupling a Java stub object with one or more NEOs together in virtual machine.</p>
</statement>
</p>
<p>The HPO model has the following features. Firstly, though a JSO and a NEO are located in different address spaces, they have same lifespans and live in same threads. Secondly, the language programming paradigms and compiling for JSOs and NEOs are independent. Thirdly, the HPO model is object-oriented because of its encapsulation and inheritance. Lastly, the HPO model is also a component-oriented model, considering the ability of reusing a HPO component through interfaces without source code.</p>
<p>Though HPO has shown potentials of binding Java object with native object and supporting the integration of Java component and CAR components, some constraints have to be followed to get the characteristics mentioned. These constraints are (1) the cross languages inheritance of a HPO model; (2) the mapping relationships and coupling manners between JSOs and NEOs; (3) the injection mechanism of the programming metadata for a HPO class; and (4) The transformation of Java components and CAR components. These constraints will be discussed in detail as follows.</p>
</sec>
<sec id="sec4.2"><title>4.2. Inheritance in the HPO Model</title>
<p>In the object-oriented programming, inheritance allows a class to pass on its status and behaviours to its children and allows programmers to reuse code. Generally, inheritance can be realized easily in a single program environment, but cross language inheritance of HPO may be more difficult. There are three cases of inheritance for the HPO model, as shown in <xref ref-type="fig" rid="fig2">Figure 2</xref>
.</p>
<p>In the first case, a Java class is inherited from a HPO class and complies with the Java's inheritance mechanism. In other words, a HPO class derives its children class in a Java environment, as shown in <xref ref-type="fig" rid="fig2">Figure 2(a)</xref>
.</p>
<p>In the second case, a NEO class is inherited from another NEO class iteratively. In this case, all the father or ancestor NEO classes related to the first NEO class could be accessed from the same JSO class that is coupled with the first NEO class, as shown in <xref ref-type="fig" rid="fig2">Figure 2(b)</xref>
.</p>
<p>In the last case, a JSO class may inherit from multiple interfaces, and each interface is implemented by one NEO class. In this case, all the NEO objects should be coupled to the corresponding JSO object, as shown in <xref ref-type="fig" rid="fig2">Figure 2(c)</xref>
.</p>
</sec>
<sec id="sec4.3"><title>4.3. Mapping and Coupling</title>
<p>In the HPO model, the mapping relationship between the JSOs and the NEOs is not always the one to one. On one hand, one JSO may be coupled with multiple NEOs in the case of multi-interface inheritance. On the other hand, one NEO may be coupled with multiple JSOs because a NEO may have implemented several interfaces and each interface is coupled with a special JSO. For example, <xref ref-type="fig" rid="fig3">Figure 3(a)</xref>
shows an IDL file of the FooBar component in which the CFooBar class is defined, and <xref ref-type="fig" rid="fig3">Figure 3(b)</xref>
shows that each interface that belongs to the CFooBar class is mapped to one special JSO.</p>
<p>An IDL file in CAR component technology is a .car file and is used to describe the interactive contract between Java components and CAR components. CFooBar is a CAR component class defined in the FooBar component and includes two interfaces, IFoo and IBar. In addition to the interfaces defined explicitly in the .car file, every CAR component class inherits an IObject interface (similar to COM IUnknow) implicitly from CObject. To simplify the mapping relationship of the JSOs and the NEOs, we build a rule on how to map a NEO class to multiple JSOs; each NEO class in a component is mapped to a JSO class, and each interface in a NEO class is mapped to one JSO class, respectively, too.</p>
<p>Following the mapping rule, IObject, IFoo, and IBar are mapped to FooBar.java, IFoo.java, and IBar.java, respectively. However, FooBar.java is different from IFoo.java and IBar.java in two points.<list list-type="alpha-lower"><list-item><p>They are coupled with the CFooBar object through different interfaces. FooBar.java is coupled with the IObject, while IFoo.java and IBar.java are coupled with the IFoo and IBar of the CFooBar, respectively.</p>
</list-item>
<list-item><p>FooBar.java is responsible for instantiating the NEO of the CFooBar class and manages the lifespan, while IFoo.java and IBar.java are exempt from that.</p>
</list-item>
</list>
</p>
<p>For convenience, the FooBar.java class is marked as a native class JSO (ncJSO), while classes of IFoo.java and IBar.java are marked as native interface JSOs (niJSO). <xref ref-type="fig" rid="alg1"> Algorithm 1</xref>
lists the definitions of the JSOs that are mapped from CFooBar.</p>
</sec>
<sec id="sec4.4"><title>4.4. Metadata and Annotation</title>
<p>In the stage of programming, it is necessary to add the mapping information of the JSOs and NEOs to the Java class source code. The coupling of a JSO and a NEO is implemented by the proposed metadata injection mechanism which is critical to realize (1) how a HPO is defined and used in the programming stage without changing the Java syntax and (2) how a HPO is created and managed in the runtime stage.</p>
<p>The metadata of a HPO class can be divided into two types, the metadata that is used in the programming and compiling stage (programming metadata) and the metadata that is used during the runtime stage (runtime metadata). The runtime metadata is relevant to the VM environment and will be discussed in <xref ref-type="sec" rid="sec5">Section 5</xref>
.</p>
<p>Programming metadata is composed of the type of a JSO (ncJSO or niJSO), the name of the component module in which the corresponding NEO is defined, and the class name and the interface name of the NEO. These programming metadata of a NEO is injected into the corresponding JSO class source code by means of the annotation mechanism of Java [<xref rid="B37" ref-type="bibr">44</xref>
]. For each NEO class or interface in a native component, a few annotations are added to its corresponding JSO class. Then a JSO class becomes a HPO class that carries the programming metadata about the NEO. Annotations in Java are a kind of special classes and can be used to comment the classes, methods, variables, parameters, and packages in Java class source code and may be embedded in Java class files by compiler. These annotation classes are recognized by the Java VM at runtime to retrieve values of the embedded elements that are defined in these annotation classes [<xref rid="B38" ref-type="bibr">45</xref>
]. Therefore, the metadata will be exploited by the Dalvik VM to create instances of the HPO classes. This approach neither has it changed any semantics of the Java class, nor has it changed any syntax of the Java language.</p>
<p>Annotations added to the Java class are described as below.<list list-type="simple"><list-item><label>(a)</label>
<p>A Java class is annotated as a ncJSO class by the @HPOClass annotation consisting of two elements: the name of the native component module that defines the NEO class and the name of the NEO class. The @HPOClass annotation is written as
<disp-formula id="EEq1"><label>(1)</label>
<mml:math id="M1"><mml:mtable><mml:mtr><mml:mtd><mml:malignmark></mml:malignmark>
<mml:mo>@</mml:mo>
<mml:mtext>HPOClasss</mml:mtext>
<mml:mrow><mml:mo>(</mml:mo>
<mml:mrow><mml:mtext>Module</mml:mtext>
<mml:mo>=</mml:mo>
<mml:mtext>module_name</mml:mtext>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:mtd>
</mml:mtr>
<mml:mtr><mml:mtd><mml:maligngroup></mml:maligngroup>
<mml:malignmark></mml:malignmark>
<mml:mrow><mml:mrow><mml:mtext>Class</mml:mtext>
<mml:mo>=</mml:mo>
<mml:mtext>class_name</mml:mtext>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>.</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
</disp-formula>
</p>
</list-item>
<list-item><label>(b)</label>
<p>A Java class is annotated as a niJSO class by the @HPOInterface annotation class consisting of two elements: the name of the native component module that defines the NEO interface and the name of the NEO interface. The @HPOInterface annotation is written as
<disp-formula id="EEq2"><label>(2)</label>
<mml:math id="M2"><mml:mtable><mml:mtr><mml:mtd><mml:malignmark></mml:malignmark>
<mml:mo>@</mml:mo>
<mml:mtext>HPOInterface</mml:mtext>
<mml:mrow><mml:mo>(</mml:mo>
<mml:mrow><mml:mtext>Module</mml:mtext>
<mml:mo>=</mml:mo>
<mml:mtext>module_name</mml:mtext>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:mtd>
</mml:mtr>
<mml:mtr><mml:mtd><mml:maligngroup></mml:maligngroup>
<mml:malignmark></mml:malignmark>
<mml:mrow><mml:mrow><mml:mtext>Interface</mml:mtext>
<mml:mo>=</mml:mo>
<mml:mtext>interface_name</mml:mtext>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>.</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
</disp-formula>
</p>
</list-item>
</list>
</p>
<p>It is unnecessary to define any annotations for the native methods in a JSO class source code because the Dalvik VM will automatically mangle the JSO native method with the homonymic method in the corresponding NEO. The definitions of the HPOs converted from CFooBar are shown in <xref ref-type="fig" rid="alg2">Algorithm 2</xref>
.</p>
</sec>
<sec id="sec4.5"><title>4.5. Conversion between Java and CAR Components</title>
<p>The HPO model provides a conversion framework between Java components and CAR components in addition to the benefits of reusing legacy code for CAR components and Java components in Android applications. Tools of CAR2Java and Java2CAR are provided to generate the HPO class source code automatically, which reduce the manual participation during the conversion procedure to improve the developing efficiency. CAR2Java and Java2CAR provide the ability of reading IDL files and generating files of HPO classes that consists of .java (for JSOs), .h and, .cpp (for NEOs). These files will be implemented in Java or CAR, respectively, without any JNI specifications being concerned.</p>
<p>Steps to convert an existing Java component to a CAR component are as follows.<list list-type="alpha-lower"><list-item><p>Write an IDL file to define the interfaces between a Java component and a native component, in which each class, interface, or method is extracted from the JSO class in the Java component.</p>
</list-item>
<list-item><p>Annotate all these JSO classes with the @HPOXxx annotation class that is mentioned in <xref ref-type="sec" rid="sec4.4">Section 4.4</xref>
.</p>
</list-item>
<list-item><p>Parse the IDL file with Java2CAR to generate the skeleton code (header files and source files) of CAR classes.</p>
</list-item>
<list-item><p>Implement all the CAR classes in the native component.</p>
</list-item>
<list-item><p>Compile the native component to get an.eco (.so) file.</p>
</list-item>
<list-item><p>Put the .eco (.so) file to the path that is specified by the Java application.</p>
</list-item>
<list-item><p>Build and run the Java application in the Android SDK.</p>
</list-item>
</list>
</p>
<p>Steps to convert an existing CAR component to a Java component are as follows.<list list-type="alpha-lower"><list-item><p>Write an IDL file to define the interfaces between the CAR component and the Java component, in which each class, interface, or method is extracted from the NEO class in the CAR component.</p>
</list-item>
<list-item><p>Parse the IDL file with CAR2JAVA to generate the source code of the corresponding JSO classes with @HPOXxx annotations inside.</p>
</list-item>
<list-item><p>Write a client Java class to instantiate HPO classes in Java code.</p>
</list-item>
<list-item><p>Put the .eco (.so) file to the path specified by the Java application.</p>
</list-item>
<list-item><p>Build and run the Java application in the Android SDK.</p>
</list-item>
</list>
</p>
<p>If neither Java components nor CAR components are provided, the coding can be motivated by writing an IDL file and putting it to the CAR2JAVA/JAVA2CAR tool to generate the skeleton code for both Java and CAR components.</p>
</sec>
<sec id="sec4.6"><title>4.6. Programming with HPO</title>
<p>Supposed that the FooBar component (as shown in <xref ref-type="fig" rid="fig3">Figure 3</xref>
) has been implemented in CAR and the corresponding HPO classes have been defined in Java (as shown in <xref ref-type="fig" rid="alg2">Algorithm 2</xref>
), a normal Java class is required to serve as a client that instantiates the HPO classes; therefor the HPO can be accessed by other Java classes in an Android application. The example code of the client class, FooBarClient.java, is shown in <xref ref-type="fig" rid="alg3">Algorithm 3</xref>
.</p>
<p>Our approach relieves the Java programmers of learning and using JNI functions. In the Java side, coding in the HPO-based program is almost the same as coding in a JNI-based program; the main difference between these two types lies in the native side. For native code developers, JNI-based programs require the knowledge of JNI functions and JNI specifications. For HPO-based developers, HPO programs require the knowledge of CAR component programing. Since CAR components can be written in C++, a C++ developer can write a CAR component program easily. In a HPO-based program, there is no bridge code between Java and CAR components, so developers write less code and no longer need to struggle with the low level details of JNI.</p>
<p>The HPO model supports dynamic updating of native components in Android applications. A HPO-based Android application consists of two parts: a Java program and one or more native components. These two parts are independent of each other at the compile time; that is, they are dynamically bounded at runtime. Furthermore, these two parts are interacted with each other through an interface. If the interface is kept unchanged, the native components can be dynamically updated and replaced without the need of recompiling the Java code. This is helpful to the migration of HPO programs across platforms.</p>
</sec>
</sec>
<sec id="sec5"><title>5. Design of the HPO-Dalvik VM</title>
<p>An improved Dalvik VM is implemented in this section to support objects of Java, HPO, and CAR simultaneously, which is achieved by modifying the standard Dalvik VM and embedding the CAR runtime in the Dalvik runtime. The improved Dalvik VM is named as the HPO-Dalvik VM for convenience. A HPO-Dalvik VM addresses the following issues: (1) how to recognize a HPO class and figure out the corresponding JSO class and NEO class; (2) how to load a NEO class and instantiate a NEO; (3) how to couple a JSO and a NEO together and invoke native methods in a HPO dynamically; (4) how to manage the lifespan of a HPO;and(5) how to interconvert data types between Java and CAR. Answers to these issues depend heavily on the proposed mechanism of runtime metadata injection.</p>
<sec id="sec5.1"><title>5.1. Runtime Metadata of HPO</title>
<p>In order to couple a JSO and a NEO at runtime, the NEO runtime metadata is injected into the<italic> ClassObject</italic>
of a JSO class. In Java, the metadata of a class is grouped as a sort of metaobject named<italic> ClassObject</italic>
and can be used mostly with the reflection. The runtime metadata of a CAR class is a set of descriptive, structural, and administrative data linked to this class and can be retrieved by the CAR reflection of APIs at runtime. These reflection interfaces for CAR object metadata will be injected into the JSO<italic> ClassObject</italic>
when a HPO class is loaded at runtime, as shown in <xref ref-type="fig" rid="fig4">Figure 4(a)</xref>
.</p>
<p><xref ref-type="fig" rid="fig4">Figure 4(b)</xref>
shows the JSO<italic> ClassObject</italic>
structure of the proposed mechanism of runtime metadata injection. By default, all user classes are loaded by the system class loader, but it is possible to replace the default class loader with one or more customized class loaders. Here a new class loader for HPO classes is implemented. Whenever the HPO-Dalvik VM loads a Java class annotated with @HPOClass or @HPOInterface, it sets a flag in the<italic> accessFlags</italic>
field of a JSO<italic> ClassObject</italic>
to indicate that it is a ncJSO class or a niJSO class. Three<italic> accessFlags</italic>
values are added to indicate the type of a HPO class.<list list-type="alpha-lower"><list-item><p>CLASS_CAR_CLASS indicates that the current Java class is a ncJSO class;</p>
</list-item>
<list-item><p>CLASS_CAR_INTERFACE indicates that the current Java class is a niJSO class;</p>
</list-item>
<list-item><p>CLASS_CAR_NEEDCLEAN is used to perform the garbage collection of the NEO object, which indicates that the current JSO class needs to deconstruct its NEO objects.</p>
</list-item>
</list>
</p>
<p>A HPO-Dalvik VM loads the native component modules and NEO classes of a HPO class by the names of the modules, classes, or interfaces that are specified through the annotations of the HPO class. The HPO-Dalvik VM retrieves the metadata of these NEO classes or interfaces according to the metadata type with the help of the CAR reflection mechanism. The HPO-Dalvik VM injects the references of these metadata into the corresponding fields and structures of the<italic> ClassObject</italic>
.</p>
<p><xref ref-type="fig" rid="fig4">Figure 4(b)</xref>
also shows the metadata injection of the native methods. In a JNI program, a Java method is specified with the flag “native” to tell the Java VM to search for the method in the native code. Similarly, a native method in a JSO is specified with flag “native” and is bounded to the method that has the same name in a NEO. The exact method to be called is determined at the first invocation at runtime. Before the method is called at the first time, the<italic> nativeFunc</italic>
pointer in the<italic> method</italic>
structure points to the entry of the HPO-Dalvik dvmResolveNativeMethod() function. This function is modified from its original version in the Dalvik VM to parse the metadata of the corresponding NEO native method and obtain the exact native method address. If the process is successful, the<italic> insns</italic>
field in the<italic> method</italic>
structure will hold the address of the native method, and the<italic> nativeFunc</italic>
field would be assigned with the entry address of the dvmCallCARJNIMethod() function (implemented in HPO-Dalvik to push the arguments of a JSO native method into the native stack and call the CAR native method that is pointed by the<italic> insns</italic>
field). A HPO-Dalvik VM does not need to go through the resolving process again unless the HPO is destroyed. And all calls to the JSO's native method are bridged by dvmCallCARJNIMethod() function.</p>
</sec>
<sec id="sec5.2"><title>5.2. Instantiation of a HPO</title>
<p>The HPO-Dalvik VM treats a HPO as a normal Java object. A HPO can be regarded as an integer object whose lifespan has the same period to a normal Java object: created, in use, invisible, unreachable, collected, finalized, and deallocated. When the<italic> new</italic>
operator is performed onto a HPO, the HPO-Dalvik VM analyses the JSO's class file to obtain the value of the attribute CLASS_CAR_TYPE and then determines the CLSID of the corresponding CAR object according to the value of CLASS_CAR_TYPE. During this period, the HPO-Dalvik VM looks up necessary information for creating an instance of the CAR object by the CAR's reflection interfaces.</p>
<p>It is reasonable to take inheritance into account when an instance of a HPO class is created. If no inheritance happens, a HPO object involves only one JSO and one NEO. In this case, the HPO-Dalvik VM must allocate one more unit in the size of u4 (unsigned int) behind the instance object of a JSO to store the reference of a NEO instance object. If inheritance happens, a HPO object may involve one JSO and multiple NEOs. In this case, the HPO-Dalvik VM calculates the number of the NEOs (including the direct NEO as well as its father and ancestors) and allocates corresponding memory in the size of u4 behind the instance object of the JSO to store all the references of these NEO instances. The JSO could access its <italic>n</italic>
th NEO on level <italic>n</italic>
by calculating the pointer offset according to
<disp-formula id="EEq3"><label>(3)</label>
<mml:math id="M3"><mml:mtable><mml:mtr><mml:mtd><mml:mtext>offset</mml:mtext>
<mml:mo>=</mml:mo>
<mml:mtext>objectSize</mml:mtext>
<mml:mo>+</mml:mo>
<mml:mtext>sizeof</mml:mtext>
<mml:mrow><mml:mo>(</mml:mo>
<mml:mrow><mml:mtext>u</mml:mtext>
<mml:mn mathvariant="normal">4</mml:mn>
</mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mi>∗</mml:mi>
<mml:mi>n</mml:mi>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
</disp-formula>
</p>
</sec>
<sec id="sec5.3"><title>5.3. Garbage Collection of HPO</title>
<p>The HPO-Dalvik VM manages HPO and Java objects in a unified rule, so the policy of garbage collection for the HPO objects should be the same as that of the normal Java objects. The HPO-Dalvik VM must ensure that all the JSO and NEOs that belong to one HPO have the same lifespan. However, different from the Java garbage collection which manages objects memory implicitly, CAR manages the objects memory by reference counting such as setting the relevant object to null or using release() method to remove the memory explicitly. Our solution is to deconstruct all the NEO objects compulsorily when the JSO object is destroyed by the garbage collectors.</p>
<p>It is worthy of being noted in the case of the movement of Java objects. The Dalvik VM adopts multiple garbage collectors, which cause the movement of a Java object such as copying collectors [<xref rid="B39" ref-type="bibr">46</xref>
]. Typically, copying collectors are to duplicate Java objects from the old heap to the new heap. Once the duplication is done, the old objects become useless and the reference of the JSO will be changed. Since a NEO keeps the reference of the corresponding JSO at the time of its initialization, it has to update the reference to the new JSO address as soon as a JSO is moved.</p>
</sec>
<sec id="sec5.4"><title>5.4. Data Types Transformation</title>
<p>Data types mapping between Java and CAR is shown in <xref ref-type="table" rid="tab1">Table 1</xref>
. There are two kinds of data types in Java: primitive type and reference type. A primitive type is directly mapped to the counterpart of the CAR. For example, boolean, byte, short, int, long, float, double, and char of Java are mapped to Boolean, Byte, Int16, Int32, Int64, Float, Double and Char of CAR, respectively.</p>
<p>Different from the reference types of Java which are passed as opaque references to native methods in JNI, the HPO-Dalvik VM maps Java reference types to CAR reference types by metadata and reflection. Reference types such as String, StringBuffer, arrays, and Java classes are mapped to the reference types of String, StringBuffer, ArrayOf, BufferOf, and CAR classes.</p>
<p>Parameters or objects of each reference type should be converted into a HPO so that they are accessed by a HPO native method. To this end, the corresponding NEO (CAR) objects should already exist in the native side. When the fields and methods of these HPO objects are accessed by a native method, they are actually accessed in its NEO object. The HPO-Dalvik VM will find out the appropriate NEO objects and feed their references to the native method in native side. Take an object type as an example, for a FooBar object in Java, the HPO-Dalvik VM maps it to the type of CFooBar in CAR. If a CFooBar object already exists in the CAR runtime, the HPO-Dalvik VM delivers the CFooBar object reference to the native method that is going to access this FooBar object; otherwise it will create a CFooBar object by CAR's reflection mechanism and deliver the reference of the created object to the native method. Then high performance is expected without the JNI interface method which parses data from the reference parameters or creates and returns a new Java object in the native side.</p>
</sec>
</sec>
<sec id="sec6"><title>6. Performance Evaluation</title>
<p>In order to validate the feasibility of the presented HPO model, we built a prototype of runtime VM for HPO objects on the basis of the Dalvik VM in Android 2.3.7 and the Elastos component platform. The Elastos component platform is a middleware that provides a runtime environment to support CAR components running on embedded systems [<xref rid="B40" ref-type="bibr">47</xref>
]. An experimental application on HPO was developed and was compared with the JNI counterpart.</p>
<p>The experiment was carried out on<list list-type="roman-lower"><list-item><p>CPU: Intel(R) Core (TM) i3-3110 M 2.40 GHz,</p>
</list-item>
<list-item><p>memory size: 2 GB,</p>
</list-item>
<list-item><p>OS: Android2.3.7,</p>
</list-item>
<list-item><p>toolkit: Android NDK R8b,</p>
</list-item>
<list-item><p>device: AVD emulator based on Android2.3.7,</p>
</list-item>
<list-item><p>target: API level 10.</p>
</list-item>
</list>
</p>
<sec id="sec6.1"><title>6.1. Test Cases and Experimental Method</title>
<p>To evaluate the execution efficiency of calling native methods for HPO and JNI, four types of native methods are prepared:<list list-type="alpha-lower"><list-item><p>public native int Sum(int <italic>n</italic>
);</p>
</list-item>
<list-item><p>public native String Strcat(String <italic>a</italic>
, String <italic>b</italic>
);</p>
</list-item>
<list-item><p>public native int[] ArrayAdd(int[] <italic>a</italic>
, int[] <italic>b</italic>
);</p>
</list-item>
<list-item><p>public native MyObject GetMyObject(MyObject obj).</p>
</list-item>
</list>
</p>
<p>Native methods were focused on the execution time running in the Java side and in the native side. Logging facility of the Android platform was used to profile the native calls. The system clock was recorded in millisecond units by the function System.currentTimeMillis() to get the CPU time in the Java side and in microsecond units by the function gettimeofday() to get the CPU time in the native side. Each method was repeated for 100, 200, 400, 600, 800, or 1000 times to get a legible figure and an average time.</p>
</sec>
<sec id="sec6.2"><title>6.2. Experimental Results and Analysis</title>
<sec id="sec6.2.1"><title>6.2.1. Calling Native Method from Java Side</title>
<p><xref ref-type="table" rid="tab2">Table 2</xref>
presents the average execution time of the native methods that are called in the Java side. An outstanding acceleration of the HPO method is clearly observed, though it may vary according to the data types of the method parameters and return value. As an example of simple data types, the average execution time of the HPO-based Sum() method is almost the same as that of the JNI-based Sum() method, with the gap less than 0.5 ms. For the ArrayAdd() and Strcat() methods with complex data type parameters and returning values, the speedup of HPO is quite obvious. For example, under the condition of 400 loops, the JNI-based native method ArrayAdd() costs 30.50 ms, while the corresponding HPO-based method costs only 13.92 ms. Similarly, HPO-based GetMyObject() method of 1000 loops receives a time saving of 69 percent, which indicates that complex data types earn better efficiency improvement than simpler ones.</p>
</sec>
<sec id="sec6.2.2"><title>6.2.2. Running Native Method in Native Side</title>
<p><xref ref-type="table" rid="tab3">Table 3</xref>
displays the execution time of each test case looped 100, 200, 400, 600, 800, and 1000 times in the native side, and similar results are drawn from <xref ref-type="table" rid="tab2">Table 2</xref>
. For simple data types, the execution time of JNI-based Sum() is almost the same as that of HPO-based Sum(). But the execution time of moderate complex data types like HPO-based ArrayAdd() and Strcat() methods reduces to almost half if compared with the corresponding JNI-based methods. For the native method GetMyObject() with complex data types and returning values, the JNI-based implementation spends 1129.12 ms to run 1000 loops in the native side, which is 21 times longer than that of the HPO-based implementation.</p>
</sec>
<sec id="sec6.2.3"><title>6.2.3. Invoking Cost of Native Method</title>
<p>The elapsed time for invoking a native method and returning from it can be obtained by subtracting the average execution time in the native side from the average execution time in Java.</p>
<p>The rightmost two columns in <xref ref-type="table" rid="tab4">Table 4</xref>
show the recorded overhead time for invoking methods and returning process, which show an additional cost of 16% to 114% from the HPO model. The cost of the first three native methods varies from 0.8 <italic>μ</italic>
s to 1.4 <italic>μ</italic>
s, while the gap is widened to 64 <italic>μ</italic>
s in the last method GetMyObject(). This extra cost is caused by the reflection mechanism of the HPO-Dalvik VM reflecting the method metadata and mapping data types of parameters. Owing to the significant speedup of native methods running in native side, the extra invoking cost of the HPO model is acceptable.</p>
<p>The results show that our solution enhances the executing efficiency of calling native methods definitely. There is a performance gain of 10–70% in each call of native methods in a small price for reflection, which indicates that the HPO model is a promising technique for the integration and interoperation of Java components and native components in the Dalvik VM.</p>
</sec>
<sec id="sec6.2.4"><title>6.2.4. The Application Size</title>
<p>From the experiment, HPO-based programs tend to have smaller size, which is meaningful to mobile devices with limited storage space. The HPO program in the test is composed of two parts with total compiled size of 220.6 KB, in which the Java part is 184 KB and the native part is 36.6 KB. However, the total size of the compared JNI program reaches 536 KB. This shrinkage of size can be explained by the avoidable bridging code.</p>
</sec>
</sec>
</sec>
<sec id="sec7"><title>7. Conclusions</title>
<p>High complexity and low efficiency of the JNI mechanism are main obstacles that keep developers from integrating and reusing heterogeneous native components in mobile applications, web services, and wireless networks [<xref rid="B48" ref-type="bibr">48</xref>
–<xref rid="B56" ref-type="bibr">56</xref>
]. Existing approaches or tools for JNI mechanism fail to solve the efficiency and the complexity of JNI simultaneously, which is even critical in the environment of the Android system.</p>
<p>In this paper, a novel approach to reduce the overhead of the JNI function calls and the complexity of JNI programming is proposed. The solution is to build a HPO model, a cross language compound object that is composed of a Java stub object and one or more native entity objects in a virtual machine. The HPO model helps programmers to operate data and objects in the native side, which escapes from the JNI ways that access through the bridging code. The runtime coupling of a Java object and a CAR object is implemented in a modified Dalvik VM based on the technique of metadata injection. The modified VM provides automatic mapping, allowing any CAR component object to be accessible as a Java object and vice versa. This is a powerful feature that makes all the existing CAR-based applications and services become available to Java. Following the ideas, the HPO-based development tools are presented, and a prototype VM is implemented based on the Dalvik VM and Elastos. Experiments with simple or complex data types demonstrate an initial evidence of the feasibility and effectiveness of the HPO model.</p>
<p>Even though the HPO model has been proved to be useful, some other studies are still on the way to perfection. For example, the storage approach for shared fields needs a deeper insight; the callback mechanism and a cross language debug toolkit are also indispensable to make it prevalent; support to other languages like JavaScript and Python is even difficult. All these challenges lead the direction of our next work.</p>
</sec>
</body>
<back><ack><title>Acknowledgment</title>
<p>This work is supported by the National Science and Technology Major Project, under Grant 2009ZX01039-002-002-003 and Grant 2009ZX03004-005.</p>
</ack>
<sec sec-type="conflict"><title>Conflict of Interests</title>
<p>The authors declare that there is no conflict of interests regarding the publication of this paper.</p>
</sec>
<ref-list><ref id="B1"><label>1</label>
<element-citation publication-type="book"><person-group person-group-type="author"><name><surname>Liang</surname>
<given-names>S</given-names>
</name>
</person-group>
<source><italic>The Java TM Native Interface: Programmer's Guide and Specification</italic>
</source>
<year>1999</year>
<publisher-name>Addison-Wesley Professional</publisher-name>
</element-citation>
</ref>
<ref id="B2"><label>2</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Li</surname>
<given-names>J-Z</given-names>
</name>
<name><surname>Zhang</surname>
<given-names>Z-P</given-names>
</name>
<name><surname>Qiao</surname>
<given-names>B</given-names>
</name>
<etal></etal>
</person-group>
<article-title>A component mining approach to incubate grid services in object-oriented legacy systems</article-title>
<source><italic>International Journal of Automation and Computing</italic>
</source>
<year>2006</year>
<volume>3</volume>
<fpage>47</fpage>
<lpage>55</lpage>
</element-citation>
</ref>
<ref id="B3"><label>3</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Wanbin</surname>
<given-names>Q</given-names>
</name>
<name><surname>Guojie</surname>
<given-names>Z</given-names>
</name>
<name><surname>Honglin</surname>
<given-names>Q</given-names>
</name>
</person-group>
<article-title>Related techniques of component reuse in Java</article-title>
<source><italic>Computer Applications</italic>
</source>
<year>2005</year>
<volume>25</volume>
<issue>1</issue>
<fpage>73</fpage>
<lpage>75</lpage>
</element-citation>
</ref>
<ref id="B4"><label>4</label>
<element-citation publication-type="confproc"><person-group person-group-type="author"><name><surname>Zhang</surname>
<given-names>Y-J</given-names>
</name>
</person-group>
<article-title>A new external adaptor to VRML viewer based on Java platform</article-title>
<volume>1–7</volume>
<conf-name>Proceedings of the 7th International Conference on Machine Learning and Cybernetics (ICMLC '08)</conf-name>
<conf-date>July 2008</conf-date>
<fpage>2212</fpage>
<lpage>2216</lpage>
<pub-id pub-id-type="other">2-s2.0-57849146162</pub-id>
</element-citation>
</ref>
<ref id="B5"><label>5</label>
<element-citation publication-type="confproc"><person-group person-group-type="author"><name><surname>Lee</surname>
<given-names>S</given-names>
</name>
<name><surname>Jeon</surname>
<given-names>JW</given-names>
</name>
</person-group>
<article-title>Evaluating performance of android platform using native C for embedded systems</article-title>
<conf-name>Proceedings of the International Conference on Control, Automation and Systems (ICCAS '10)</conf-name>
<conf-date>October 2010</conf-date>
<fpage>1160</fpage>
<lpage>1163</lpage>
<pub-id pub-id-type="other">2-s2.0-78751562124</pub-id>
</element-citation>
</ref>
<ref id="B6"><label>6</label>
<element-citation publication-type="confproc"><person-group person-group-type="author"><name><surname>Stepanian</surname>
<given-names>L</given-names>
</name>
<name><surname>Brown</surname>
<given-names>AD</given-names>
</name>
<name><surname>Kielstra</surname>
<given-names>A</given-names>
</name>
<name><surname>Koblents</surname>
<given-names>G</given-names>
</name>
<name><surname>Stoodley</surname>
<given-names>K</given-names>
</name>
</person-group>
<article-title>Inlining Java native calls at runtime</article-title>
<conf-name>Proceedings of the 1st ACM/USENIX International Conference on Virual Execution Environments (VEE '05)</conf-name>
<conf-date>June 2005</conf-date>
<conf-loc>Chicago, Ill, USA</conf-loc>
<fpage>121</fpage>
<lpage>131</lpage>
<pub-id pub-id-type="other">2-s2.0-32044467926</pub-id>
</element-citation>
</ref>
<ref id="B7"><label>7</label>
<element-citation publication-type="confproc"><person-group person-group-type="author"><name><surname>Yu-Hsin</surname>
<given-names>T</given-names>
</name>
<name><surname>I-Wei</surname>
<given-names>W</given-names>
</name>
<name><surname>I-Chun</surname>
<given-names>L</given-names>
</name>
<etal></etal>
</person-group>
<article-title>Improving performance of JNA by using LLVM JIT compiler</article-title>
<conf-name>Proceedings of the 12th IEEE/ACIS International Conference on Computer and Information Science (ICIS '13)</conf-name>
<conf-date>2013</conf-date>
<fpage>483</fpage>
<lpage>488</lpage>
</element-citation>
</ref>
<ref id="B8"><label>8</label>
<element-citation publication-type="confproc"><person-group person-group-type="author"><name><surname>Lee</surname>
<given-names>Y-H</given-names>
</name>
<name><surname>Chandrian</surname>
<given-names>P</given-names>
</name>
<name><surname>Li</surname>
<given-names>B</given-names>
</name>
</person-group>
<article-title>Efficient Java native interface for android based mobile devices</article-title>
<conf-name>Proceedings of the 110th IEEE International Conference on Trust, Security and Privacy in Computing and Communications (TrustCom '11)</conf-name>
<conf-date>November 2011</conf-date>
<fpage>1202</fpage>
<lpage>1209</lpage>
<pub-id pub-id-type="other">2-s2.0-84862932212</pub-id>
</element-citation>
</ref>
<ref id="B9"><label>9</label>
<element-citation publication-type="confproc"><person-group person-group-type="author"><name><surname>Bubak</surname>
<given-names>M</given-names>
</name>
<name><surname>Dawid</surname>
<given-names>K</given-names>
</name>
</person-group>
<article-title>Creating Java to native code interfaces with Janet extension</article-title>
<conf-name>Proceedings of the 1st Worldwide SGI Users' Conference</conf-name>
<conf-date>2000</conf-date>
<fpage>283</fpage>
<lpage>294</lpage>
</element-citation>
</ref>
<ref id="B10"><label>10</label>
<element-citation publication-type="confproc"><person-group person-group-type="author"><name><surname>Hummer</surname>
<given-names>W</given-names>
</name>
<name><surname>Wolf</surname>
<given-names>W</given-names>
</name>
<name><surname>Hahn</surname>
<given-names>C</given-names>
</name>
</person-group>
<article-title>Accessing COM-based applications from Java using webservices</article-title>
<conf-name>Proceedings of the International Conference on Web Services (ICWS '03)</conf-name>
<conf-date>June 2003</conf-date>
<fpage>487</fpage>
<lpage>490</lpage>
<pub-id pub-id-type="other">2-s2.0-1642304039</pub-id>
</element-citation>
</ref>
<ref id="B11"><label>11</label>
<element-citation publication-type="confproc"><person-group person-group-type="author"><name><surname>Chen</surname>
<given-names>M</given-names>
</name>
<name><surname>Shalom</surname>
<given-names>G</given-names>
</name>
<name><surname>Srinivas</surname>
<given-names>S</given-names>
</name>
<etal></etal>
</person-group>
<article-title>Java JNI bridge: a framework for mixed native ISA execution</article-title>
<conf-name>Proceedings of the International Symposium on Code Generation and Optimization</conf-name>
<conf-date>2006</conf-date>
<fpage>65</fpage>
<lpage>75</lpage>
</element-citation>
</ref>
<ref id="B12"><label>12</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Halloway</surname>
<given-names>S</given-names>
</name>
</person-group>
<article-title>Jawin, an open source interoperability solution</article-title>
<source><italic>Nov</italic>
</source>
<year>2001</year>
<volume>14</volume>
<fpage>1</fpage>
<lpage>11</lpage>
</element-citation>
</ref>
<ref id="B41"><label>13</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Wang</surname>
<given-names>L</given-names>
</name>
<name><surname>Chen</surname>
<given-names>D</given-names>
</name>
<name><surname>Hu</surname>
<given-names>Y</given-names>
</name>
<name><surname>Ma</surname>
<given-names>Y</given-names>
</name>
<name><surname>Wang</surname>
<given-names>J</given-names>
</name>
</person-group>
<article-title>Towards enabling cyberinfrastructure as a service in clouds</article-title>
<source><italic>Computers & Electrical Engineering</italic>
</source>
<year>2013</year>
<volume>39</volume>
<issue>1</issue>
<fpage>3</fpage>
<lpage>14</lpage>
<pub-id pub-id-type="other">2-s2.0-84874109278</pub-id>
</element-citation>
</ref>
<ref id="B42"><label>14</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Zhang</surname>
<given-names>W</given-names>
</name>
<name><surname>Wang</surname>
<given-names>L</given-names>
</name>
<name><surname>Liu</surname>
<given-names>D</given-names>
</name>
<etal></etal>
</person-group>
<article-title>Towards building a multi-datacenter infrastructure for massive remote sensing image processing</article-title>
<source><italic>Concurrency Computation Practice and Experience</italic>
</source>
<year>2013</year>
<volume>25</volume>
<issue>12</issue>
<fpage>1798</fpage>
<lpage>1812</lpage>
<pub-id pub-id-type="other">2-s2.0-84880331316</pub-id>
</element-citation>
</ref>
<ref id="B43"><label>15</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Wang</surname>
<given-names>L</given-names>
</name>
<name><surname>Chen</surname>
<given-names>D</given-names>
</name>
<name><surname>Zhao</surname>
<given-names>J</given-names>
</name>
<name><surname>Tao</surname>
<given-names>J</given-names>
</name>
</person-group>
<article-title>Resource management of distributed Virtual Machines</article-title>
<source><italic>International Journal of Ad Hoc and Ubiquitous Computing</italic>
</source>
<year>2012</year>
<volume>10</volume>
<issue>2</issue>
<fpage>96</fpage>
<lpage>111</lpage>
<pub-id pub-id-type="other">2-s2.0-84864549864</pub-id>
</element-citation>
</ref>
<ref id="B44"><label>16</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Wang</surname>
<given-names>L</given-names>
</name>
<name><surname>Kunze</surname>
<given-names>M</given-names>
</name>
<name><surname>Tao</surname>
<given-names>J</given-names>
</name>
<name><surname>von Laszewski</surname>
<given-names>G</given-names>
</name>
</person-group>
<article-title>Towards building a cloud for scientific applications</article-title>
<source><italic>Advances in Engineering Software</italic>
</source>
<year>2011</year>
<volume>42</volume>
<issue>9</issue>
<fpage>714</fpage>
<lpage>722</lpage>
<pub-id pub-id-type="other">2-s2.0-79960038089</pub-id>
</element-citation>
</ref>
<ref id="B45"><label>17</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Wang</surname>
<given-names>L</given-names>
</name>
<name><surname>Chen</surname>
<given-names>D</given-names>
</name>
<name><surname>Huang</surname>
<given-names>F</given-names>
</name>
</person-group>
<article-title>Virtual workflow system for distributed collaborative scientific applications on Grids</article-title>
<source><italic>Computers & Electrical Engineering</italic>
</source>
<year>2011</year>
<volume>37</volume>
<issue>3</issue>
<fpage>300</fpage>
<lpage>310</lpage>
<pub-id pub-id-type="other">2-s2.0-79956158546</pub-id>
</element-citation>
</ref>
<ref id="B46"><label>18</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>von Laszewski</surname>
<given-names>G</given-names>
</name>
<name><surname>Dayal</surname>
<given-names>J</given-names>
</name>
<name><surname>Wang</surname>
<given-names>L</given-names>
</name>
</person-group>
<article-title>EMOLST: a documentation flow for distributed health informatics</article-title>
<source><italic>Concurrency Computation Practice and Experience</italic>
</source>
<year>2011</year>
<volume>23</volume>
<issue>16</issue>
<fpage>1857</fpage>
<lpage>1867</lpage>
<pub-id pub-id-type="other">2-s2.0-80053557137</pub-id>
</element-citation>
</ref>
<ref id="B47"><label>19</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Chen</surname>
<given-names>D</given-names>
</name>
<name><surname>Wang</surname>
<given-names>L</given-names>
</name>
<name><surname>Bian</surname>
<given-names>C</given-names>
</name>
<name><surname>Zhang</surname>
<given-names>X</given-names>
</name>
</person-group>
<article-title>A grid infrastructure for hybrid simulations</article-title>
<source><italic>Computer Systems Science and Engineering</italic>
</source>
<year>2011</year>
<volume>26</volume>
<issue>3</issue>
<fpage>197</fpage>
<lpage>206</lpage>
<pub-id pub-id-type="other">2-s2.0-80051764794</pub-id>
</element-citation>
</ref>
<ref id="B13"><label>20</label>
<element-citation publication-type="book"><person-group person-group-type="author"><name><surname>deMaster</surname>
<given-names>JD</given-names>
</name>
</person-group>
<source><italic>Java Native Interface Code Generator</italic>
</source>
<year>2000</year>
<publisher-name>Google Patents</publisher-name>
</element-citation>
</ref>
<ref id="B14"><label>21</label>
<element-citation publication-type="confproc"><person-group person-group-type="author"><name><surname>Beazley</surname>
<given-names>DM</given-names>
</name>
</person-group>
<article-title>SWIG: an easy to use tool for integrating scripting languages with C and C++</article-title>
<conf-name>Proceedings of the 4th USENIX Tcl/Tk workshop</conf-name>
<conf-date>1996</conf-date>
<fpage>129</fpage>
<lpage>139</lpage>
</element-citation>
</ref>
<ref id="B15"><label>22</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Gabrilovich</surname>
<given-names>E</given-names>
</name>
<name><surname>Finkelstein</surname>
<given-names>L</given-names>
</name>
</person-group>
<article-title>JNI-C++ integration made easy</article-title>
<source><italic>CC Plus Plus Users Journal</italic>
</source>
<year>2001</year>
<volume>19</volume>
<fpage>10</fpage>
<lpage>21</lpage>
</element-citation>
</ref>
<ref id="B16"><label>23</label>
<element-citation publication-type="other"><person-group person-group-type="author"><name><surname>Chen</surname>
<given-names>R</given-names>
</name>
</person-group>
<article-title>Elastos Development Manual</article-title>
<comment>2012, <ext-link ext-link-type="uri" xlink:href="http://elastos.org/">http://elastos.org/</ext-link>
</comment>
</element-citation>
</ref>
<ref id="B17"><label>24</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Batyuk</surname>
<given-names>L</given-names>
</name>
<name><surname>Schmidt</surname>
<given-names>AD</given-names>
</name>
<name><surname>Schmidt</surname>
<given-names>HG</given-names>
</name>
<etal></etal>
</person-group>
<article-title>Developing and benchmarking native linux applications on android</article-title>
<source><italic>Mobile Wireless Middleware, Operating Systems, and Applications</italic>
</source>
<year>2009</year>
<volume>7</volume>
<fpage>381</fpage>
<lpage>392</lpage>
</element-citation>
</ref>
<ref id="B18"><label>25</label>
<element-citation publication-type="confproc"><person-group person-group-type="author"><name><surname>Lin</surname>
<given-names>C-M</given-names>
</name>
<name><surname>Lin</surname>
<given-names>J-H</given-names>
</name>
<name><surname>Dow</surname>
<given-names>C-R</given-names>
</name>
<name><surname>Wen</surname>
<given-names>C-M</given-names>
</name>
</person-group>
<article-title>Benchmark Dalvik and native code for Android system</article-title>
<conf-name>Proceedings of the 2nd International Conference on Innovations in Bio-inspired Computing and Applications (IBICA '11)</conf-name>
<conf-date>December 2011</conf-date>
<fpage>320</fpage>
<lpage>323</lpage>
<pub-id pub-id-type="other">2-s2.0-84862954809</pub-id>
</element-citation>
</ref>
<ref id="B19"><label>26</label>
<element-citation publication-type="confproc"><person-group person-group-type="author"><name><surname>Kim</surname>
<given-names>Y-J</given-names>
</name>
<name><surname>Cho</surname>
<given-names>S-J</given-names>
</name>
<name><surname>Kim</surname>
<given-names>K-J</given-names>
</name>
<name><surname>Hwang</surname>
<given-names>E-H</given-names>
</name>
<name><surname>Yoon</surname>
<given-names>S-H</given-names>
</name>
<name><surname>Jeon</surname>
<given-names>J-W</given-names>
</name>
</person-group>
<article-title>Benchmarking Java application using JNI and native C application on Android</article-title>
<conf-name>Proceedings of the 12th International Conference on Control, Automation and Systems (ICCAS '12)</conf-name>
<conf-date>October 2012</conf-date>
<fpage>284</fpage>
<lpage>288</lpage>
<pub-id pub-id-type="other">2-s2.0-84872562943</pub-id>
</element-citation>
</ref>
<ref id="B20"><label>27</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Welsh</surname>
<given-names>M</given-names>
</name>
<name><surname>Culler</surname>
<given-names>D</given-names>
</name>
</person-group>
<article-title>Jaguar: enabling efficient communication and I/O in Java</article-title>
<source><italic>Concurrency—Practice and Experience</italic>
</source>
<year>2000</year>
<volume>12</volume>
<fpage>519</fpage>
<lpage>538</lpage>
</element-citation>
</ref>
<ref id="B21"><label>28</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Bubak</surname>
<given-names>M</given-names>
</name>
<name><surname>Kurzyniec</surname>
<given-names>D</given-names>
</name>
<name><surname>Luszczek</surname>
<given-names>P</given-names>
</name>
</person-group>
<article-title>Convenient use of legacy software in Java with Janet package</article-title>
<source><italic>Future Generation Computer Systems</italic>
</source>
<year>2001</year>
<volume>17</volume>
<issue>8</issue>
<fpage>987</fpage>
<lpage>997</lpage>
<pub-id pub-id-type="other">2-s2.0-0035370691</pub-id>
</element-citation>
</ref>
<ref id="B22"><label>29</label>
<element-citation publication-type="confproc"><person-group person-group-type="author"><name><surname>Huang</surname>
<given-names>Y</given-names>
</name>
<name><surname>Taylor</surname>
<given-names>I</given-names>
</name>
<name><surname>Walker</surname>
<given-names>DW</given-names>
</name>
<etal></etal>
</person-group>
<article-title>Wrapping legacy codes for grid-based applications</article-title>
<conf-name>Proceedings of the International Processing Symposium in Parallel and Distributed</conf-name>
<conf-date>2003</conf-date>
<fpage>p. 7</fpage>
</element-citation>
</ref>
<ref id="B23"><label>30</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Canfora</surname>
<given-names>G</given-names>
</name>
<name><surname>Fasolino</surname>
<given-names>AR</given-names>
</name>
<name><surname>Frattolillo</surname>
<given-names>G</given-names>
</name>
<name><surname>Tramontana</surname>
<given-names>P</given-names>
</name>
</person-group>
<article-title>A wrapping approach for migrating legacy system interactive functionalities to Service Oriented Architectures</article-title>
<source><italic>Journal of Systems and Software</italic>
</source>
<year>2008</year>
<volume>81</volume>
<issue>4</issue>
<fpage>463</fpage>
<lpage>480</lpage>
<pub-id pub-id-type="other">2-s2.0-40049091583</pub-id>
</element-citation>
</ref>
<ref id="B24"><label>31</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Culp</surname>
<given-names>TR</given-names>
</name>
</person-group>
<article-title>Easing the transition from C++ to Java (part 1)</article-title>
<source><italic>Journal of Object Technology</italic>
</source>
<year>2002</year>
<volume>1</volume>
<issue>2</issue>
<fpage>79</fpage>
<lpage>93</lpage>
<pub-id pub-id-type="other">2-s2.0-3042686934</pub-id>
</element-citation>
</ref>
<ref id="B25"><label>32</label>
<element-citation publication-type="book"><person-group person-group-type="author"><name><surname>Huang</surname>
<given-names>Y</given-names>
</name>
<name><surname>Walker</surname>
<given-names>DW</given-names>
</name>
</person-group>
<article-title>JACAW: a Java-C automatic wrapper</article-title>
<year>2002</year>
<publisher-loc>Wales, UK</publisher-loc>
<publisher-name>Cardiff University</publisher-name>
</element-citation>
</ref>
<ref id="B26"><label>33</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Vairale</surname>
<given-names>V</given-names>
</name>
<name><surname>Honwadkar</surname>
<given-names>K</given-names>
</name>
</person-group>
<article-title>Wrapper generator using Java Native interface</article-title>
<source><italic>International Journal of Computer Science</italic>
</source>
<year>2010</year>
<volume>2</volume>
<fpage>126</fpage>
<lpage>139</lpage>
</element-citation>
</ref>
<ref id="B27"><label>34</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hirzel</surname>
<given-names>M</given-names>
</name>
<name><surname>Grimm</surname>
<given-names>R</given-names>
</name>
</person-group>
<article-title>Jeannie: granting Java native interface developers their wishes</article-title>
<source><italic>ACM Sigplan Notices</italic>
</source>
<year>2007</year>
<volume>42</volume>
<issue>10</issue>
<fpage>19</fpage>
<lpage>38</lpage>
<pub-id pub-id-type="other">2-s2.0-67650046436</pub-id>
</element-citation>
</ref>
<ref id="B28"><label>35</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hongyu</surname>
<given-names>Z</given-names>
</name>
<name><surname>Maofeng</surname>
<given-names>L</given-names>
</name>
<name><surname>Zhiqin</surname>
<given-names>L</given-names>
</name>
</person-group>
<article-title>Technology of Java/COM integration</article-title>
<source><italic>Journal of SWUST</italic>
</source>
<year>2004</year>
<volume>19</volume>
<issue>2</issue>
<fpage>50</fpage>
<lpage>54</lpage>
</element-citation>
</ref>
<ref id="B29"><label>36</label>
<element-citation publication-type="book"><person-group person-group-type="author"><name><surname>Verbowski</surname>
<given-names>C</given-names>
</name>
</person-group>
<source><italic>Integrating Java and COM</italic>
</source>
<year>1999</year>
<publisher-name>Microsoft</publisher-name>
</element-citation>
</ref>
<ref id="B30"><label>37</label>
<element-citation publication-type="book"><person-group person-group-type="author"><name><surname>Alder</surname>
<given-names>D</given-names>
</name>
</person-group>
<source><italic>The JAcob Project: A Java-COM Bridge, Version 1.8, 1999–2004</italic>
</source>
<year>2004</year>
<publisher-name>Website</publisher-name>
</element-citation>
</ref>
<ref id="B31"><label>38</label>
<element-citation publication-type="book"><person-group person-group-type="author"><name><surname>Ratabouil</surname>
<given-names>S</given-names>
</name>
</person-group>
<source><italic>Android NDK Beginner's Guide</italic>
</source>
<year>2012</year>
<publisher-name>Packt</publisher-name>
</element-citation>
</ref>
<ref id="B32"><label>39</label>
<element-citation publication-type="confproc"><person-group person-group-type="author"><name><surname>Lee</surname>
<given-names>JK</given-names>
</name>
<name><surname>Lee</surname>
<given-names>JY</given-names>
</name>
</person-group>
<article-title>Android programming techniques for improving performance</article-title>
<conf-name>Proceedings of the 3rd International Conference on Awareness Science and Technology (iCAST '11)</conf-name>
<conf-date>September 2011</conf-date>
<fpage>386</fpage>
<lpage>389</lpage>
<pub-id pub-id-type="other">2-s2.0-84863363422</pub-id>
</element-citation>
</ref>
<ref id="B33"><label>40</label>
<element-citation publication-type="other"><person-group person-group-type="author"><name><surname>Chen</surname>
<given-names>R</given-names>
</name>
</person-group>
<article-title>CAR Component Technology</article-title>
<comment>2012, <ext-link ext-link-type="uri" xlink:href="http://elastos.org/">http://elastos.org/</ext-link>
</comment>
</element-citation>
</ref>
<ref id="B34"><label>41</label>
<element-citation publication-type="book"><person-group person-group-type="author"><name><surname>McCluskey</surname>
<given-names>G</given-names>
</name>
</person-group>
<source><italic>Using Java Reflection</italic>
</source>
<year>1998</year>
<publisher-name>Java Developer Connection</publisher-name>
</element-citation>
</ref>
<ref id="B35"><label>42</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Bellia</surname>
<given-names>M</given-names>
</name>
<name><surname>Occhiuto</surname>
<given-names>ME</given-names>
</name>
</person-group>
<article-title>Higher order programming through Java reflection</article-title>
<source><italic>Concurrency, Specification and Programming CS&P</italic>
</source>
<year>2004</year>
<volume>3</volume>
<fpage>447</fpage>
<lpage>459</lpage>
</element-citation>
</ref>
<ref id="B36"><label>43</label>
<element-citation publication-type="book"><person-group person-group-type="author"><name><surname>Verbowski</surname>
<given-names>C</given-names>
</name>
</person-group>
<source><italic>Using COM Objects from Java</italic>
</source>
<year>1999</year>
<publisher-name>Microsoft</publisher-name>
</element-citation>
</ref>
<ref id="B37"><label>44</label>
<element-citation publication-type="book"><person-group person-group-type="author"><name><surname>Cunningham</surname>
<given-names>H</given-names>
</name>
<name><surname>Cunningham</surname>
<given-names>H</given-names>
</name>
<name><surname>Maynard</surname>
<given-names>D</given-names>
</name>
<etal></etal>
</person-group>
<source><italic>JAPE: A Java Annotation Patterns Engine</italic>
</source>
<year>1999</year>
</element-citation>
</ref>
<ref id="B38"><label>45</label>
<element-citation publication-type="confproc"><person-group person-group-type="author"><name><surname>Reeve</surname>
<given-names>L</given-names>
</name>
<name><surname>Han</surname>
<given-names>H</given-names>
</name>
</person-group>
<article-title>Survey of semantic annotation platforms</article-title>
<conf-name>Proceedings of the 20th Annual ACM Symposium on Applied Computing</conf-name>
<conf-date>March 2005</conf-date>
<fpage>1634</fpage>
<lpage>1638</lpage>
<pub-id pub-id-type="other">2-s2.0-33644508912</pub-id>
</element-citation>
</ref>
<ref id="B39"><label>46</label>
<element-citation publication-type="book"><person-group person-group-type="author"><name><surname>Attanasio</surname>
<given-names>CR</given-names>
</name>
<name><surname>Bacon</surname>
<given-names>DF</given-names>
</name>
<name><surname>Cocchi</surname>
<given-names>A</given-names>
</name>
<etal></etal>
</person-group>
<article-title>A comparative evaluation of parallel garbage collector implementations</article-title>
<source><italic>Languages and Compilers for Parallel Computing</italic>
</source>
<year>2003</year>
<volume>2624</volume>
<publisher-name>Springer</publisher-name>
<fpage>177</fpage>
<lpage>192</lpage>
</element-citation>
</ref>
<ref id="B40"><label>47</label>
<element-citation publication-type="other"><person-group person-group-type="author"><name><surname>Chen</surname>
<given-names>R</given-names>
</name>
</person-group>
<article-title>Elastos: an operating system for software defined computers</article-title>
<comment>2013, <ext-link ext-link-type="uri" xlink:href="http://chenrong.elastos.org/2013/04/13/elastos-an-operating-system-for-software-computer">http://chenrong.elastos.org/2013/04/13/elastos-an-operating-system-for-software-computer</ext-link>
</comment>
</element-citation>
</ref>
<ref id="B48"><label>48</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Liu</surname>
<given-names>Y</given-names>
</name>
<name><surname>Zhu</surname>
<given-names>Y</given-names>
</name>
<name><surname>Ni</surname>
<given-names>L</given-names>
</name>
<name><surname>Xue</surname>
<given-names>G</given-names>
</name>
</person-group>
<article-title>A reliability-oriented transmission service in wireless sensor networks</article-title>
<source><italic>IEEE Transactions on Parallel and Distributed Systems</italic>
</source>
<year>2011</year>
<volume>22</volume>
<issue>12</issue>
<fpage>2100</fpage>
<lpage>2107</lpage>
<pub-id pub-id-type="other">2-s2.0-80055037954</pub-id>
</element-citation>
</ref>
<ref id="B49"><label>49</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Liu</surname>
<given-names>X</given-names>
</name>
<name><surname>Yang</surname>
<given-names>Y</given-names>
</name>
<name><surname>Yuan</surname>
<given-names>D</given-names>
</name>
<name><surname>Chen</surname>
<given-names>J</given-names>
</name>
</person-group>
<article-title>Do we need to handle every temporal violation in scientific workflow systems</article-title>
<source><italic>ACM Transactions on Software Engineering and Methodology</italic>
</source>
<year>2013</year>
</element-citation>
</ref>
<ref id="B50"><label>50</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Xu</surname>
<given-names>Z</given-names>
</name>
<name><surname>Wei</surname>
<given-names>X</given-names>
</name>
<name><surname>Luo</surname>
<given-names>X</given-names>
</name>
<etal></etal>
</person-group>
<article-title>Knowle: a semantic link network based system for organizing large scale online news events</article-title>
<source><italic>Future Generation Computer Systems</italic>
</source>
<year>2014</year>
</element-citation>
</ref>
<ref id="B51"><label>51</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Xu</surname>
<given-names>Z</given-names>
</name>
<name><surname>Luo</surname>
<given-names>X</given-names>
</name>
<name><surname>Zhang</surname>
<given-names>S</given-names>
</name>
<name><surname>Wei</surname>
<given-names>X</given-names>
</name>
<name><surname>Mei</surname>
<given-names>L</given-names>
</name>
<name><surname>Hu</surname>
<given-names>C</given-names>
</name>
</person-group>
<article-title>Mining temporal explicit and implicit semantic relations between entities using web search engines</article-title>
<source><italic>Future Generation Computer Systems</italic>
</source>
<year>2013</year>
</element-citation>
</ref>
<ref id="B52"><label>52</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Xu</surname>
<given-names>Z</given-names>
</name>
<name><surname>Liu</surname>
<given-names>Y</given-names>
</name>
<name><surname>Mei</surname>
<given-names>L</given-names>
</name>
<etal></etal>
</person-group>
<article-title>Generating temporal semantic context of concepts using web search engines</article-title>
<source><italic>Journal of Network and Computer Applications</italic>
</source>
<year>2014</year>
<volume>43</volume>
<fpage>42</fpage>
<lpage>55</lpage>
</element-citation>
</ref>
<ref id="B53"><label>53</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Luo</surname>
<given-names>X</given-names>
</name>
<name><surname>Xu</surname>
<given-names>Z</given-names>
</name>
<name><surname>Yu</surname>
<given-names>J</given-names>
</name>
<name><surname>Chen</surname>
<given-names>X</given-names>
</name>
</person-group>
<article-title>Building association link network for semantic link on web resources</article-title>
<source><italic>IEEE Transactions on Automation Science and Engineering</italic>
</source>
<year>2011</year>
<volume>8</volume>
<issue>3</issue>
<fpage>482</fpage>
<lpage>494</lpage>
<pub-id pub-id-type="other">2-s2.0-79960112691</pub-id>
</element-citation>
</ref>
<ref id="B54"><label>54</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hu</surname>
<given-names>C</given-names>
</name>
<name><surname>Xu</surname>
<given-names>Z</given-names>
</name>
<name><surname>Liu</surname>
<given-names>Y</given-names>
</name>
<etal></etal>
</person-group>
<article-title>Semantic link network based model for organizing multimedia big data</article-title>
<source><italic>IEEE Transactions on Emerging Topics in Computing</italic>
</source>
<year>2014</year>
<issue>99</issue>
<fpage>1 pages</fpage>
</element-citation>
</ref>
<ref id="B55"><label>55</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Liu</surname>
<given-names>Y</given-names>
</name>
<name><surname>Zhang</surname>
<given-names>Q</given-names>
</name>
<name><surname>Ni</surname>
<given-names>L</given-names>
</name>
</person-group>
<article-title>Opportunity-based topology control in wireless sensor networks</article-title>
<source><italic>IEEE Transactions on Parallel and Distributed Systems</italic>
</source>
<year>2010</year>
<volume>21</volume>
<issue>3</issue>
<fpage>405</fpage>
<lpage>416</lpage>
<pub-id pub-id-type="other">2-s2.0-76749154972</pub-id>
</element-citation>
</ref>
<ref id="B56"><label>56</label>
<element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Liu</surname>
<given-names>Y</given-names>
</name>
<name><surname>Ni</surname>
<given-names>L</given-names>
</name>
<name><surname>Hu</surname>
<given-names>C</given-names>
</name>
</person-group>
<article-title>A generalized probabilistic topology control for wireless sensor networks</article-title>
<source><italic>IEEE Journal on Selected Areas in Communications</italic>
</source>
<year>2012</year>
<volume>30</volume>
<issue>9</issue>
<fpage>1780</fpage>
<lpage>1788</lpage>
<pub-id pub-id-type="other">2-s2.0-84866947169</pub-id>
</element-citation>
</ref>
</ref-list>
</back>
<floats-group><fig id="fig1" orientation="portrait" position="float"><label>Figure 1</label>
<caption><p>Hybrid polylingual object model and runtime environments. (a) A single HPO. (b) A runtime environment supporting the objects for Java, HPO, and CAR component.</p>
</caption>
<graphic xlink:href="TSWJ2014-785434.001"></graphic>
</fig>
<fig id="fig2" orientation="portrait" position="float"><label>Figure 2</label>
<caption><p>Inheritance of HPO classes. (a) Inheritance in Java side. (b) Inheritance in native side. (c) Interface inheritance.</p>
</caption>
<graphic xlink:href="TSWJ2014-785434.002"></graphic>
</fig>
<fig id="fig3" orientation="portrait" position="float"><label>Figure 3</label>
<caption><p>Mapping and Coupling. (a) FooBar component and CFooBar class. (b)The corresponding JSO classes coupled with CFooBar.</p>
</caption>
<graphic xlink:href="TSWJ2014-785434.003"></graphic>
</fig>
<fig id="fig4" orientation="portrait" position="float"><label>Figure 4</label>
<caption><p>NEO metadata injection. (a) Inject the CAR object metadata into the JSO ClassObject.(b) The modified structure of the JSO ClassObject.</p>
</caption>
<graphic xlink:href="TSWJ2014-785434.004"></graphic>
</fig>
<fig id="alg1" orientation="portrait" position="float"><label>Algorithm 1</label>
<caption><p>Definitions of JSO classes.</p>
</caption>
<graphic xlink:href="TSWJ2014-785434.alg.001"></graphic>
</fig>
<fig id="alg2" orientation="portrait" position="float"><label>Algorithm 2</label>
<caption><p>Definitions of HPO classes.</p>
</caption>
<graphic xlink:href="TSWJ2014-785434.alg.002"></graphic>
</fig>
<fig id="alg3" orientation="portrait" position="float"><label>Algorithm 3</label>
<caption><p>Programming with HPO.</p>
</caption>
<graphic xlink:href="TSWJ2014-785434.alg.003"></graphic>
</fig>
<table-wrap id="tab1" orientation="portrait" position="float"><label>Table 1</label>
<caption><p>Data types of Java and CAR.</p>
</caption>
<table frame="hsides" rules="groups"><thead><tr><th align="left" rowspan="1" colspan="1">Java </th>
<th align="center" rowspan="1" colspan="1">CAR </th>
<th align="center" rowspan="1" colspan="1">Description</th>
</tr>
</thead>
<tbody><tr><td align="left" rowspan="1" colspan="1">boolean</td>
<td align="center" rowspan="1" colspan="1">Boolean</td>
<td align="center" rowspan="1" colspan="1">Eight bit integer</td>
</tr>
<tr><td align="left" rowspan="1" colspan="1">byte</td>
<td align="center" rowspan="1" colspan="1">Byte</td>
<td align="center" rowspan="1" colspan="1">Eight bit signed integer</td>
</tr>
<tr><td align="left" rowspan="1" colspan="1">short</td>
<td align="center" rowspan="1" colspan="1">Int16</td>
<td align="center" rowspan="1" colspan="1">16 bit signed short</td>
</tr>
<tr><td align="left" rowspan="1" colspan="1">int</td>
<td align="center" rowspan="1" colspan="1">Int32</td>
<td align="center" rowspan="1" colspan="1">32 bit signed integer</td>
</tr>
<tr><td align="left" rowspan="1" colspan="1">long</td>
<td align="center" rowspan="1" colspan="1">Int64</td>
<td align="center" rowspan="1" colspan="1">64 bit signed long</td>
</tr>
<tr><td align="left" rowspan="1" colspan="1">char</td>
<td align="center" rowspan="1" colspan="1">Char16</td>
<td align="center" rowspan="1" colspan="1">16 bit unsigned integer</td>
</tr>
<tr><td align="left" rowspan="1" colspan="1">float</td>
<td align="center" rowspan="1" colspan="1">Float</td>
<td align="center" rowspan="1" colspan="1">32 bit float</td>
</tr>
<tr><td align="left" rowspan="1" colspan="1">double</td>
<td align="center" rowspan="1" colspan="1">Double</td>
<td align="center" rowspan="1" colspan="1">64 bit float</td>
</tr>
<tr><td align="left" rowspan="1" colspan="1">Object</td>
<td align="center" rowspan="1" colspan="1">Interface</td>
<td align="center" rowspan="1" colspan="1">object</td>
</tr>
<tr><td align="left" rowspan="1" colspan="1">String</td>
<td align="center" rowspan="1" colspan="1">String</td>
<td align="center" rowspan="1" colspan="1">String</td>
</tr>
<tr><td align="left" rowspan="1" colspan="1">StringBuffer</td>
<td align="center" rowspan="1" colspan="1">StringBuf</td>
<td align="center" rowspan="1" colspan="1">String buffer</td>
</tr>
<tr><td align="left" rowspan="1" colspan="1">array []</td>
<td align="center" rowspan="1" colspan="1">ArrayOf/BufferOf</td>
<td align="center" rowspan="1" colspan="1">array</td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="tab2" orientation="portrait" position="float"><label>Table 2</label>
<caption><p>Call native method from Java.</p>
</caption>
<table frame="hsides" rules="groups"><thead><tr><th align="left" rowspan="2" colspan="1">From Java (ms)</th>
<th align="center" colspan="2" rowspan="1">100</th>
<th align="center" colspan="2" rowspan="1">200</th>
<th align="center" colspan="2" rowspan="1">400</th>
<th align="center" colspan="2" rowspan="1">600</th>
<th align="center" colspan="2" rowspan="1">800</th>
<th align="center" colspan="2" rowspan="1">1000</th>
</tr>
<tr><th align="center" rowspan="1" colspan="1">JNI</th>
<th align="center" rowspan="1" colspan="1">HPO</th>
<th align="center" rowspan="1" colspan="1">JNI</th>
<th align="center" rowspan="1" colspan="1">HPO</th>
<th align="center" rowspan="1" colspan="1">JNI</th>
<th align="center" rowspan="1" colspan="1">HPO</th>
<th align="center" rowspan="1" colspan="1">JNI</th>
<th align="center" rowspan="1" colspan="1">HPO</th>
<th align="center" rowspan="1" colspan="1">JNI</th>
<th align="center" rowspan="1" colspan="1">HPO</th>
<th align="center" rowspan="1" colspan="1">JNI</th>
<th align="center" rowspan="1" colspan="1">HPO</th>
</tr>
</thead>
<tbody><tr><td align="left" rowspan="1" colspan="1">Sum</td>
<td align="center" rowspan="1" colspan="1">0.20</td>
<td align="center" rowspan="1" colspan="1">0.21</td>
<td align="center" rowspan="1" colspan="1">0.38</td>
<td align="center" rowspan="1" colspan="1">0.75</td>
<td align="center" rowspan="1" colspan="1">1.00</td>
<td align="center" rowspan="1" colspan="1">1.10</td>
<td align="center" rowspan="1" colspan="1">1.22</td>
<td align="center" rowspan="1" colspan="1">1.24</td>
<td align="center" rowspan="1" colspan="1">1.71</td>
<td align="center" rowspan="1" colspan="1">1.78</td>
<td align="center" rowspan="1" colspan="1">1.80</td>
<td align="center" rowspan="1" colspan="1">1.85</td>
</tr>
<tr><td align="left" rowspan="1" colspan="1">ArrayAdd</td>
<td align="center" rowspan="1" colspan="1">7.85</td>
<td align="center" rowspan="1" colspan="1">0.66</td>
<td align="center" rowspan="1" colspan="1">17.00</td>
<td align="center" rowspan="1" colspan="1">8.44</td>
<td align="center" rowspan="1" colspan="1">30.50</td>
<td align="center" rowspan="1" colspan="1">13.92</td>
<td align="center" rowspan="1" colspan="1">46.50</td>
<td align="center" rowspan="1" colspan="1">28.77</td>
<td align="center" rowspan="1" colspan="1">53.30</td>
<td align="center" rowspan="1" colspan="1">41.92</td>
<td align="center" rowspan="1" colspan="1">86.10</td>
<td align="center" rowspan="1" colspan="1">78.60</td>
</tr>
<tr><td align="left" rowspan="1" colspan="1">Strcat</td>
<td align="center" rowspan="1" colspan="1">15.12</td>
<td align="center" rowspan="1" colspan="1">1.21</td>
<td align="center" rowspan="1" colspan="1">23.60</td>
<td align="center" rowspan="1" colspan="1">9.06</td>
<td align="center" rowspan="1" colspan="1">35.70</td>
<td align="center" rowspan="1" colspan="1">28.50</td>
<td align="center" rowspan="1" colspan="1">56.43</td>
<td align="center" rowspan="1" colspan="1">25.96</td>
<td align="center" rowspan="1" colspan="1">95.70</td>
<td align="center" rowspan="1" colspan="1">49.12</td>
<td align="center" rowspan="1" colspan="1">136.26</td>
<td align="center" rowspan="1" colspan="1">85.00</td>
</tr>
<tr><td align="left" rowspan="1" colspan="1">GetMyObject</td>
<td align="center" rowspan="1" colspan="1">148.10</td>
<td align="center" rowspan="1" colspan="1">15.70</td>
<td align="center" rowspan="1" colspan="1">259.12</td>
<td align="center" rowspan="1" colspan="1">36.82</td>
<td align="center" rowspan="1" colspan="1">477.37</td>
<td align="center" rowspan="1" colspan="1">91.40</td>
<td align="center" rowspan="1" colspan="1">873.03</td>
<td align="center" rowspan="1" colspan="1">172.02</td>
<td align="center" rowspan="1" colspan="1">1139.78</td>
<td align="center" rowspan="1" colspan="1">309.60</td>
<td align="center" rowspan="1" colspan="1">1354.90</td>
<td align="center" rowspan="1" colspan="1">423.00</td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="tab3" orientation="portrait" position="float"><label>Table 3</label>
<caption><p>Run native method in native.</p>
</caption>
<table frame="hsides" rules="groups"><thead><tr><th align="left" rowspan="2" colspan="1">From Java (ms)</th>
<th align="center" colspan="2" rowspan="1">100</th>
<th align="center" colspan="2" rowspan="1">200</th>
<th align="center" colspan="2" rowspan="1">400</th>
<th align="center" colspan="2" rowspan="1">600</th>
<th align="center" colspan="2" rowspan="1">800</th>
<th align="center" colspan="2" rowspan="1">1000</th>
</tr>
<tr><th align="center" rowspan="1" colspan="1">JNI</th>
<th align="center" rowspan="1" colspan="1">HPO</th>
<th align="center" rowspan="1" colspan="1">JNI</th>
<th align="center" rowspan="1" colspan="1">HPO</th>
<th align="center" rowspan="1" colspan="1">JNI</th>
<th align="center" rowspan="1" colspan="1">HPO</th>
<th align="center" rowspan="1" colspan="1">JNI</th>
<th align="center" rowspan="1" colspan="1">HPO</th>
<th align="center" rowspan="1" colspan="1">JNI</th>
<th align="center" rowspan="1" colspan="1">HPO</th>
<th align="center" rowspan="1" colspan="1">JNI</th>
<th align="center" rowspan="1" colspan="1">HPO</th>
</tr>
</thead>
<tbody><tr><td align="left" rowspan="1" colspan="1">Sum</td>
<td align="center" rowspan="1" colspan="1">0.12</td>
<td align="center" rowspan="1" colspan="1">0.13</td>
<td align="center" rowspan="1" colspan="1">0.27</td>
<td align="center" rowspan="1" colspan="1">0.28</td>
<td align="center" rowspan="1" colspan="1">0.58</td>
<td align="center" rowspan="1" colspan="1">0.52</td>
<td align="center" rowspan="1" colspan="1">0.87</td>
<td align="center" rowspan="1" colspan="1">0.99</td>
<td align="center" rowspan="1" colspan="1">1.15</td>
<td align="center" rowspan="1" colspan="1">1.33</td>
<td align="center" rowspan="1" colspan="1">1.56</td>
<td align="center" rowspan="1" colspan="1">1.65</td>
</tr>
<tr><td align="left" rowspan="1" colspan="1">ArrayAdd</td>
<td align="center" rowspan="1" colspan="1">7.77</td>
<td align="center" rowspan="1" colspan="1">0.36</td>
<td align="center" rowspan="1" colspan="1">12.94</td>
<td align="center" rowspan="1" colspan="1">4.20</td>
<td align="center" rowspan="1" colspan="1">20.09</td>
<td align="center" rowspan="1" colspan="1">14.38</td>
<td align="center" rowspan="1" colspan="1">33.45</td>
<td align="center" rowspan="1" colspan="1">16.48</td>
<td align="center" rowspan="1" colspan="1">40.82</td>
<td align="center" rowspan="1" colspan="1">20.15</td>
<td align="center" rowspan="1" colspan="1">70.63</td>
<td align="center" rowspan="1" colspan="1">26.45</td>
</tr>
<tr><td align="left" rowspan="1" colspan="1">Strcat</td>
<td align="center" rowspan="1" colspan="1">6.16</td>
<td align="center" rowspan="1" colspan="1">0.40</td>
<td align="center" rowspan="1" colspan="1">17.02</td>
<td align="center" rowspan="1" colspan="1">4.82</td>
<td align="center" rowspan="1" colspan="1">33.84</td>
<td align="center" rowspan="1" colspan="1">16.28</td>
<td align="center" rowspan="1" colspan="1">54.84</td>
<td align="center" rowspan="1" colspan="1">20.26</td>
<td align="center" rowspan="1" colspan="1">98.93</td>
<td align="center" rowspan="1" colspan="1">24.19</td>
<td align="center" rowspan="1" colspan="1">127.34</td>
<td align="center" rowspan="1" colspan="1">29.77</td>
</tr>
<tr><td align="left" rowspan="1" colspan="1">GetMyObject</td>
<td align="center" rowspan="1" colspan="1">145.62</td>
<td align="center" rowspan="1" colspan="1">12.11</td>
<td align="center" rowspan="1" colspan="1">251.60</td>
<td align="center" rowspan="1" colspan="1">18.43</td>
<td align="center" rowspan="1" colspan="1">442.18</td>
<td align="center" rowspan="1" colspan="1">27.65</td>
<td align="center" rowspan="1" colspan="1">787.20</td>
<td align="center" rowspan="1" colspan="1">42.89</td>
<td align="center" rowspan="1" colspan="1">1054.20</td>
<td align="center" rowspan="1" colspan="1">51.34</td>
<td align="center" rowspan="1" colspan="1">1129.14</td>
<td align="center" rowspan="1" colspan="1">53.42</td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="tab4" orientation="portrait" position="float"><label>Table 4</label>
<caption><p>Average elapsed time and invoking cost of native method.</p>
</caption>
<table frame="hsides" rules="groups"><thead><tr><th align="left" rowspan="2" colspan="1">From Java (ms)</th>
<th align="center" colspan="2" rowspan="1">From Java</th>
<th align="center" colspan="2" rowspan="1">In native</th>
<th align="center" colspan="2" rowspan="1">Invoking cost</th>
</tr>
<tr><th align="center" rowspan="1" colspan="1">JNI</th>
<th align="center" rowspan="1" colspan="1">HPO</th>
<th align="center" rowspan="1" colspan="1">JNI</th>
<th align="center" rowspan="1" colspan="1">HPO</th>
<th align="center" rowspan="1" colspan="1">JNI</th>
<th align="center" rowspan="1" colspan="1">HPO</th>
</tr>
</thead>
<tbody><tr><td align="left" rowspan="1" colspan="1">Sum</td>
<td align="center" rowspan="1" colspan="1">2.06</td>
<td align="center" rowspan="1" colspan="1">2.45</td>
<td align="center" rowspan="1" colspan="1">1.40</td>
<td align="center" rowspan="1" colspan="1">1.04</td>
<td align="center" rowspan="1" colspan="1">0.66</td>
<td align="center" rowspan="1" colspan="1">1.41</td>
</tr>
<tr><td align="left" rowspan="1" colspan="1">ArrayAdd</td>
<td align="center" rowspan="1" colspan="1">78.33</td>
<td align="center" rowspan="1" colspan="1">43.76</td>
<td align="center" rowspan="1" colspan="1">61.66</td>
<td align="center" rowspan="1" colspan="1">23.28</td>
<td align="center" rowspan="1" colspan="1">16.67</td>
<td align="center" rowspan="1" colspan="1">20.48</td>
</tr>
<tr><td align="left" rowspan="1" colspan="1">Strcat</td>
<td align="center" rowspan="1" colspan="1">118.06</td>
<td align="center" rowspan="1" colspan="1">53.06</td>
<td align="center" rowspan="1" colspan="1">95.62</td>
<td align="center" rowspan="1" colspan="1">27.10</td>
<td align="center" rowspan="1" colspan="1">22.45</td>
<td align="center" rowspan="1" colspan="1">25.96</td>
</tr>
<tr><td align="left" rowspan="1" colspan="1">GetMyObject</td>
<td align="center" rowspan="1" colspan="1">1367.45</td>
<td align="center" rowspan="1" colspan="1">277.72</td>
<td align="center" rowspan="1" colspan="1">1233.09</td>
<td align="center" rowspan="1" colspan="1">79.40</td>
<td align="center" rowspan="1" colspan="1">134.36</td>
<td align="center" rowspan="1" colspan="1">198.32</td>
</tr>
</tbody>
</table>
</table-wrap>
</floats-group>
</pmc>
</record>
Pour manipuler ce document sous Unix (Dilib)
EXPLOR_STEP=$WICRI_ROOT/Ticri/CIDE/explor/CyberinfraV1/Data/Pmc/Corpus
HfdSelect -h $EXPLOR_STEP/biblio.hfd -nk 000651 | SxmlIndent | more
Ou
HfdSelect -h $EXPLOR_AREA/Data/Pmc/Corpus/biblio.hfd -nk 000651 | SxmlIndent | more
Pour mettre un lien sur cette page dans le réseau Wicri
{{Explor lien |wiki= Ticri/CIDE |area= CyberinfraV1 |flux= Pmc |étape= Corpus |type= RBID |clé= PMC:4082837 |texte= Hybrid PolyLingual Object Model: An Efficient and Seamless Integration of Java and Native Components on the Dalvik Virtual Machine }}
Pour générer des pages wiki
HfdIndexSelect -h $EXPLOR_AREA/Data/Pmc/Corpus/RBID.i -Sk "pubmed:25110745" \ | HfdSelect -Kh $EXPLOR_AREA/Data/Pmc/Corpus/biblio.hfd \ | NlmPubMed2Wicri -a CyberinfraV1
![]() | This area was generated with Dilib version V0.6.25. | ![]() |