{"id":925,"date":"2010-09-21T19:46:54","date_gmt":"2010-09-21T22:46:54","guid":{"rendered":"http:\/\/wordpress.matbra.com\/?p=925"},"modified":"2010-09-21T19:46:54","modified_gmt":"2010-09-21T22:46:54","slug":"um-exemplo-da-utilizacao-de-corba","status":"publish","type":"post","link":"https:\/\/wordpress.matbra.com\/en\/2010\/09\/21\/um-exemplo-da-utilizacao-de-corba\/","title":{"rendered":"An example of use of CORBA"},"content":{"rendered":"<p>Hello<\/p>\n<p>CORBA (Common Object Request Broker Architecture) is a standart defined by OMG (Object Management Group), this let distributed object from different languages and OS to communicate. It also provides total transparency in the communication. The IDL (Interface Definition Language) is the tecnology used to describe the interfaces. IDL has your own data types, that are mapped to the data types in other languages. There is an IDL compiler, it generates the codes that do the communication. <\/p>\n<p>But how it works? We have some definitions in a .idl file, in this case  <a href='http:\/\/wordpress.matbra.com\/wp-content\/uploads\/Bank-idl.txt'>Bank-idl<\/a> (remember to change the filename).<\/p>\n<p><!--more--><\/p>\n<p>Acessing the files, you will see a lot of definitions like:<\/p>\n<p>Module definition:<\/p>\n<blockquote><p>\nmodule banco {\n<\/p><\/blockquote>\n<p>Definition of data type valor as double<\/p>\n<blockquote><p>  typedef double valor; <\/p><\/blockquote>\n<p>Definition of the transacao struct<\/p>\n<blockquote><p>struct transacao {<br \/>\n    unsigned long data; \/\/ Formato: ddmmyyyy<br \/>\n    string<12>    descricao;<br \/>\n    valor         quantia;<br \/>\n  };<\/p><\/blockquote>\n<p>Definition of some methos, vars and exceptions<\/p>\n<blockquote><p>interface auto_atendimento {<br \/>\n    readonly attribute string boas_vindas;<br \/>\n    valor saldo ( in conta c )<br \/>\n    raises ( conta_inval );<br \/>\n   void extrato ( in conta c,<br \/>\n    out transacoes t, out valor saldo )<br \/>\n    raises ( conta_inval );<br \/>\n    void transferencia ( in conta origem,<br \/>\n    in conta destino, in valor v )<br \/>\n    raises ( conta_inval, saldo_insuf );<br \/>\n    void investimento ( in conta c,<br \/>\n    in aplicacao apl, in valor v )<br \/>\n    raises ( conta_inval, saldo_insuf );<br \/>\n  };<\/p><\/blockquote>\n<p>With this file you can generate a lot of different interfaces compiled to different languages. To generate the interfaces in Java use:<\/p>\n<blockquote><p>idlj -fall bank.idl<\/p><\/blockquote>\n<p>It will generate many files inside a banco folder, with the .java files. Now you just have to code what each method will do.<\/p>\n<p><a href='http:\/\/wordpress.matbra.com\/wp-content\/uploads\/CORBA.tar.gz'>Example of implementation of a bank service and a client in Java using CORBA and IDL<\/a><\/p>\n<p>Matheus<\/p>\n<p>PS: This is just a introduction to CORBA. It uses a lot of other definitions as Object Management Architecture and others<\/p>\n<p>References:<br \/>\n<a href=\"http:\/\/www.inf.ufsc.br\/~frank\">My Professor Frank page.<\/a><br \/>\n<a href=\"http:\/\/en.wikipedia.org\/wiki\/Common_Object_Request_Broker_Architecture\">http:\/\/en.wikipedia.org\/wiki\/Common_Object_Request_Broker_Architecture<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Hello CORBA (Common Object Request Broker Architecture) is a standart defined by OMG (Object Management Group), this let distributed object from different languages and OS<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/wordpress.matbra.com\/en\/2010\/09\/21\/um-exemplo-da-utilizacao-de-corba\/\">Continue reading<span class=\"screen-reader-text\">An example of use of CORBA<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[47],"tags":[183,321],"class_list":["post-925","post","type-post","status-publish","format-standard","hentry","category-java","tag-corba","tag-java","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/psjGE-eV","_links":{"self":[{"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/posts\/925","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/comments?post=925"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/posts\/925\/revisions"}],"predecessor-version":[{"id":928,"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/posts\/925\/revisions\/928"}],"wp:attachment":[{"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/media?parent=925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/categories?post=925"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/tags?post=925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}