Build CORBA Applications with C++, MICO and Win32 Luiz Carlos d´Oleron

Slides:



Advertisements
Similar presentations
Java Development Kit Installation Guide Sun Microsystems.
Advertisements

Stored procedures and views You can see definitions for stored procedures and views in the demo databases but you can’t change them. For views, expand.
Presentation Heading – font Arial
1 CSCI N305 C Language Programming Welcome to CSCI N305! Compiling Your First Program Using Microsoft Visual Studio 2008.
Installing geant4 v9.5 using Windows Daniel Brandt, 06 April 2012 Installing Geant4 v9.5 for Windows A step-by-step guide for Windows XP/Vista/7 using.
Michael Donovan, River Campus Libraries – 12/03 DocuShare Overview and Training.
Network Printing. Printer sharing Saves money by only needing one printer Increases efficiency of managing resources.
EGR 141 Computer Problem Solving in Engineering and Computer Science Interfacing with a Database in Visual Basic.NET 2005.
CS 1400 Using Microsoft Visual Studio 2005 if you don’t have the appropriate appendix.
LAUNCHXL2-RM57L – Project 0
Installing geant4 v9.5 using Windows Daniel Brandt, 06 April 2012 Installing Geant4 v9.5 for Windows A step-by-step guide for Windows XP/Vista/7 using.
Here’s how to start the Microsoft Visual C++ program; click on start, then programsclick on start, then programs Choose Microsoft Visual C++ or Microsoft.
Using Visual C++ and Pelles C
SOUL INSTALLATION Step-1 For this Please Install the Version 7.0 or SQL Server 2000 or onwards.
Java web development Servlet & Java server pages.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 21: Publishing Your Pages on the Web.
MCTS Guide to Microsoft Windows Server 2008 Applications Infrastructure Configuration (Exam # ) Chapter Two Deploying Windows Servers.
Servlets Environment Setup. Agenda:  Setting up Java Development Kit  Setting up Web Server: Tomcat  Setting up CLASSPATH.
Computing IV Visual C Introduction with OpenCV Example Xinwen Fu.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
IT 211 Project Integration and Deployment Lab #11.
CS Tutorial 1 Getting Started with Visual Studio 2012 (Visual Studio 2010 are no longer available on MSDNAA, please choose Visual Studio 2012 which.
Word 2016 for Mac Basics Training Deck Microsoft Microsoft Office365
Intro to C++. Getting Started with Microsoft Visual Studios Open Microsoft Visual Studios 2010 Click on file Click on New Project Choose Visual C++ on.
C O M P U T E R G R A P H I C S Jie chen Computer graphic -- OpenGL Howto.
Setting up Eclipse Computer Organization I 1 August 2009 ©2009 McQuain Getting Eclipse for C/C++ Development Go to and click on Download.
Fall 2011 Nassau Community College ITE153 – Operating Systems Session 23 Shared Folders 1.
Lecture Set 2 Part B – Configuring Visual Studio; Configuration Options and The Help System (scan quickly for future reference)
Plug-in Development Environment. Session Outline Tools Installation Configuration New Project Basic Debugging Remote Debugging.
CS 450: COMPUTER GRAPHICS INSTALLING GLUT AND GLEW SPRING 2015 DR. MICHAEL J. REALE.
Active-HDL Interfaces Debugging C Code Course 10.
Prachi Chitnis.  The CSS feel  SDS – Synoptic Display Studio  ADL Converter  PV table, Probe…
Computer Science and Engineering Department VI I - SEMESTER Subject Name : MIDDLEWARE TECHNOLOGIES LABORATORY Subject Code : IT-404.
Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )
Programming with Visual Studio 2005.NET A short review of the process.
Using Microsoft Visual Studio C++ Express 2005 Name: Dr Ju Wang Ashwin Belle Course Resource:
Programming with Visual Studio.NET A short review of the process.
Introduction to Web Services. Examples Using a Web Service Creating a new Web Service.
DEVS M&S Tutorial with eclipse IDE Chungman Seo
How To Configure Thunderbird For Your Webspace Account.
Protocols COM211 Communications and Networks CDA College Olga Pelekanou
Surya Bahadur Kathayat Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example.
IS493 INFORMATION SECURITY TUTORIAL # 1 (S ) ASHRAF YOUSSEF.
Computer Graphics Lab 1 OpenGL.
1 How to Install OpenGL u Software running under Microsoft Windows makes extensive use of "dynamic link libraries." A dynamic link library (DLL) is a set.
Lab00-Getting Started with VC Launch VS 2005 Launch Visual Studio 2005 – Start > All Programs > Microsoft Visual Studio 2005 > Microsoft Visual.
1 Installing Java on Your PC. Installing Java To develop Java programs on your PC: Install JDK (Java Development Kit) Add the directory where JDK was.
1 G52IWS: Example Web-services Chris Greenhalgh. 2 Contents Software requirements AXIS web service run-time components Getting started with Jetty & AXIS.
1 Getting Started with C++ Part 1 Windows. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Microsoft.
Open project in Microsoft Visual Studio → build program in “Release” mode.
® IBM Software Group © 2006 IBM Corporation Rational Asset Manager v7.2 Using Scripting Tutorial for using command line and scripting using Ant Tasks Carlos.
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
1 BCS 4 th Semester. Step 1: Download SQL Server 2005 Express Edition Version Feature SQL Server 2005 Express Edition SP1 SQL Server 2005 Express Edition.
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
CACI Proprietary Information | Date 1 PD² SR13 Client Upgrade Name: Semarria Rosemond Title: Systems Analyst, Lead Date: December 8, 2011.
How to develop a VoIP softphone in C# that enables SIP Instant Messaging (IM) This presentation describes how to create a softphone in C# that allows you.
1 Adding a Model. We have created an MVC web app project Added a controller class. Added a view class. Next we will add some classes for managing movies.
DEVRY CIS 170 C I L AB 1 OF 7 G ETTING S TARTED Check this A+ tutorial guideline at
Development Environment Setup
Getting Eclipse for C/C++ Development
How to create a web page using word …
MIK 2.1 DBNS - introduction to WS-PGRADE, 2013
CMPE 152: Compiler Design ANTLR 4 and C++
Social Media And Global Computing Introduction to Visual Studio
Understanding the Visual IDE
1. Open Visual Studio 2008.
Double click Microsoft Visual Studio 2010 on the Computer Desktop
Getting Eclipse for C/C++ Development
Presentation transcript:

Build CORBA Applications with C++, MICO and Win32 Luiz Carlos d´Oleron

Acknowlegdes Mayank Mishra, Master in Computer Science, Sun MicroSystems Nelson Souto Rosa, Doctor in Computer Science, Cin/UFPe

Break Point This is a attachment to the regular course. In this material, only practical issues can be found. Please, read the references of CORBA and Distributed Systems in discipline home page !

Pre-requisits Before you continue, be sure that you have at least: Low level C/C++ domain Familiar with Middlewares, CORBA and Distributed Systems concepts Solid knowledges in Object Oriented Paradgma Familiar with Windows and Microsoft Visual Studio 2003 platform* * so little work is sufficient to migrate to others platforms

What´s MICO MICO is CORBA! Micro CORBA A Implementation of CORBA specification subset With him you can write CORBA applications in C++ or Java Visit

Install MICO on Windows Download MICO source from mico.org Unzip it Read README-WIN32 to compile the source Edit the environment variables to add win32-bin directory to PATH variable You can download a compiled distribution of MICO to Win32 in

Configure Visual Studio Project 1) File ->New->Project… 2) Expand “Visual C++ Projects” 3) Select Win32 Folder 4) Select Win32 Console Project 5) Enter a Name to Project 6) Click OK

Configure Visual Studio Project 7) Click in “Application Settings” 8) Be sure that the “Console application” is selected 9) Mark the “Empty project” checkbox 10) Click in Finish to create the project

Configure Visual Studio Project Was create a simple Empty project 11) Go to Project Menu 12) Select the “Properties” Item Where are the C/C++ Option? :O For Respond: 13) Click in Cancel Button

Configure Visual Studio Project 14) Add a new file from source 15) Select C++ File 16) Choose a name to a file, like “server.cpp” 17) Click in “Open”:D

Configure Visual Studio Project Well, the file server.cpp was created. Now, 18) Click in Project Menu 19) Select Properties Tharamm! The C/C++ folder is enable! 20) Expand him 21) In “Additional include Directories” enter the complete path from the Include folder of MICO distro.

Configure Visual Studio Project 22) Expand linker 23) In “ Additonal Library Directories, enter the complete path of the lib folder over win32-bin directory of MICO 24) Select Input 25) Enter the mico2312.lib and micocoss2312.lib references. 26) Click OK Finish the Visual Studio Project Configuration for MICO Applications

Create and Compile the IDL File interface Account{ void deposit(in long amount); void withdraw(in long amount); long balance(); }; account.idl 1)Create the account.idl text file in project folder 2)Open the cmd (start->run enter ‘cmd’) 3)Go to project folder 4)Enter “idl account.idl” The idl.exe from MICO will compile the account.idl and generate two files: account.h account.cc Add this files to project

Additional Tasks Hei, in account.cc file, change the include to “account.h” Do you remember the server.cpp file? Open and enter the includes: #include #include "account.h"

Coding the server Create Account_impl class, that will execute the business logic

Coding the server Don’t forget the witdraw and balance methods

Coding the server

Excecute the server Observe the account.ior file generated in project folder.

account.ior The ior file have data that represents the remote object location In each execution, a new account.ior file is created, and replace the prior Clients that use the server will need read the account.ior file to locate the remote object

Create the Client 1. The client is another process that use CORBA to communicate with the server 2. Thus, we need create another project to coding the client (in new instance of MS Visual Studio) 3. Create the AccountClient project, and configure it with the instructions few slides ago. Instead of server.cpp, generate the client.cpp file 4. Copy from the server project to the client project the three files: account.cc, account.h and account.ior 5. Add to project only the account.cc and account.h

Create the Client

Execute the client Client´s execution with the server response. If you have communication matters, try copy any time the account.ior file from server project to client project. Note that the client can execute serious times with the same server process

The bootstrapping problem How client obtains the first server´s reference? To solve this problem, server´s information go to client outside the CORBA Framework There are some approachs: File-Based Bootstrapping (used in our example) Naming Service

Naming Service is crucial in distributed applications Examples: java RMI Registry and DNS The Corba Naming Service maps names to Remote Objects Client yet knew where is the Naming Service Naming Server resolve names in references

Naming Service Refactored Example - server In server.cpp file, edit only the header declarations, plus the include, and the main method

Naming Service Refactored Example - server

Naming Service Refactored Example - client

Starting Naming Service 1.Open the command prompty 2.Navigate to the server project directory 3.Enter nsd -ORBIIOPAddr inet:localhost:9001 That start Naming Service on port 9001

Execute the server and the client 1) The server startup 2) The client execution 3) The server execution

Issues Be sure that you understand: How the server and the client acquire the Naming Service reference How server use the Naming Service to bind the Account reference to a name How client acquire the Account remote reference How client use the methods from the Account Remote reference

References Distributed Systems Architecture – Arno Puder at al C++ Programming with CORBA - Andreas Vogel at al Advanced CORBA® Programming with C++ - Michi Henning at al MICO-mail list

Luiz Carlos d´Oleron Graduate in Computer Science, CIn/UFPE Monitor Infra-Estrutura de Software