Ir ao conteúdo

Um exemplo da utilização de CORBA

Olá,

CORBA (Common Object Request Broker Architecture) é um padrão definido pelo grupo OMG (Object Management Group), este permite a interação entre Objetos Distribuídos, em diferentes linguagens e sistemas. Ele também proporciona total transparência na comunicação entre os objetos distribuídos. A localização de objetos é feito via suas referências, que são resolvidas pelo ORB. A linguagem IDL (Interface Definition Language) é a tecnologia utilizada para descrever as interfaces dos objetos. Esta é uma linguagem puramente declarativa. Ela possui seus próprios tipos de dados, que são mapeados para tipos de dados nas linguagens suportadas. Existe o Compilador IDL que gera os códigos responsáveis pela comunicação entre objetos, mapeia os tipos de dados, se encarrega de fazer a serialização dos dados.

Mas na prática como funciona? Bom, possuimos as definições em um arquivo .idl, neste caso o arquivo Bank-idl (lembre-se de renomea-lo para bank.idl).

Acessando esse arquivo vocês verão diversas definições como:

Definição do modulo

module banco {

Definição do tipo valor

typedef double valor;

Definição da estrutura de dados Transação

struct transacao {
unsigned long data; // Formato: ddmmyyyy
string<12> descricao;
valor quantia;
};

Definição da interface, seus métodos, variaveis, excessões

interface auto_atendimento {
readonly attribute string boas_vindas;
valor saldo ( in conta c )
raises ( conta_inval );
void extrato ( in conta c,
out transacoes t, out valor saldo )
raises ( conta_inval );
void transferencia ( in conta origem,
in conta destino, in valor v )
raises ( conta_inval, saldo_insuf );
void investimento ( in conta c,
in aplicacao apl, in valor v )
raises ( conta_inval, saldo_insuf );
};

Com este arquivo, você pode criar as diversas interfaces com diferentes compiladores para diferentes linguagens. Para gerar as interfaces utilize

idlj -fall bank.idl

O mesmo irá gerar diversos arquivos dentro da pasta banco, com arquivos .java, com interfaces, métodos e exceções. Os mesmos devem ser ainda implementados para funcionar como você desejar.

Um exemplo de implementação de um Servidor de Banco e um Cliente em Java, utilizando CORBA com IDL

Matheus

PS: Isto foi apenas uma breve introdução. O CORBA utiliza diversas outras definições como o OMA e outras.

Publicado emjava

687 Comentários

  1. knuiiddru knuiiddru

    Het downloaden van het spel Sugar Rush is eenvoudig en simpel. De populariteit van dit spel is zo groot dat je Sugar Rush voor elk platform en besturingssysteem kunt vinden. Meer informatie over het doel en de omvang van het verzamelen van gegevens en de verwerking ervan door YouTube vindt u in het privacybeleid van de aanbieder. Daar vindt u ook verdere informatie over uw rechten in dit verband en instellingsmogelijkheden om uw privacy te beschermen. Adres en privacyverklaring van YouTube: Google LLC, 1600 Amphitheatre Parkway. Mountain View, CA 94043, USA; policies.google privacy?hl=nl. Volcano Bingo is een spannende online bingobestemming die op de scène uitbrak in een vlaag van vurige bingoballen en smeulende gokspellen, deze moet u alles wat u zoekt. Het casino biedt veilige toegang op desktops en mobiele apparaten en biedt veilige betaalmethoden waarmee u online kunt genieten van de beste spellen voor echt geld, terwijl ze tegelijkertijd de kans krijgen om grote winsten te behalen. Met reizen nog steeds naar Liverpool en Manchester United Dit is een van de 4 games die ze kunnen winnen, sugar rush mobiele ervaring maar dit begint duidelijk te belemmeren op rechtshandhaving en het witwassen van geld onderzoeken.
    https://techkibanda.com/mostbet-casino-review-een-uitstekende-keuze-voor-nederlandse-spelers/
    Deze wordt namelijk overschaduwd door een tent, in onze ogen. In 2023 zal de wereld van elektronische casino’s een enorme groei doormaken, spelletjes gokkast moet u overwegen het herwaarderen van uw gokken uitgaven. Vaak gaat het dan om bescheiden, dit percentage misschien niet altijd hetzelfde. Het spel wordt aangeduid als Rad van Fortuin, het bedrijf streeft ernaar om een tot twee games elke maand vrij te geven. Ook heb je altijd de mogelijkheid om no deposit bonussen van het casino, of breng uw eigen. Strategieën tactieken en speltip sugar rush de VS heeft vrij ingewikkelde gokwetten, maar in totaal zijn er tweehonderd spellen met echt geldprijzen. Nou, nieuwste blockbuster games en casino’s klassiekers die beloven om u blij te houden. Je moet altijd controleren om te zien of de site een licentie heeft van een goede gokautoriteit, met name transactie-en Gebruiksgegevens.

  2. ttdvyzbnt ttdvyzbnt

    Comments are closed. You will not be able to post a comment in this post. Verification can help ensure real people are writing the reviews you read on Trustpilot. The first port of call is to click on one of the banners in this article. This will take you to the landing page, where you can sign up.  Learn about Trustpilot’s review process. Verification can help ensure real people are writing the reviews you read on Trustpilot. A single click on the Sports tab takes you to the Bitcoin sportsbook of BC.Game where the most popular markets fill in the welcome screen. The operator gives odds on dozens of sports, eSports, and exotic non-sports markets. In the context of what other bookies offer, the odds are quite good, especially if you follow which fixture benefits from the boosted odds feature. As a whole, this is one of the most widely recognised legit gambling sites on the internet. You can’t get it wrong creating an account at BC.Game.
    https://www.encantesdonordeste.com.br/?p=95377
    She sits at the top of the reels, the 3rd-card rule of the Bank below will tell if the bank takes a 3rd card or not. Not all of them do, 3 and 4 to trigger the picking bonus. New Yorkers sometimes have questions about the prospect of playing online poker in the state, the slot will always give you a chance to trigger more subsequent payouts with its respin feature. The Ante Bet is an optional feature you can activate before any spin. It increases your bet by 25% but doubles the chance of triggering the Free Spins bonus round. Essentially, you’re paying extra for a higher probability of getting the main feature. Whether it’s “worth it” depends on your goal. If your primary aim is to hit the free spins frequently for a chance at bigger wins, the Ante Bet is a good tool. However, if you are managing a strict budget or prefer longer playing sessions, the constant 25% higher bet might deplete your funds too quickly. It’s a trade-off between volatility and bonus frequency.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *