CAD/CAM application development API using CORBA?

CAD/CAM application development API using CORBA?

Post by Tamás Vere » Sat, 18 Nov 2000 04:00:00



Hello,
I've been developing a CAD/CAM kernel for a couple of years and I would
like to make is as extendable as possible. It already has a run-time
type information subsystem, which makes it possible to save,
dynamically create and load objects, which are derived from the general
modeling class. An extendable command architecture with user inputs, a
messaging system and a multi-platform GUI (based on <a
href="http://www.wxwindows.org">wxWindows</a> ) offers entry points for
3rd party applicatons under Win32 and Linux/GTK . I've decided to open -
almost- all kernel classes for the 3rd party developers and not to
shrink the possibilities down.
The C++ interface for such applications is working fine (I'm using it
for the NC toolpath generator, STEP/PDES, IGES, VRML interface and for
3D modeling applications).
Commands, GUI elements and international message strings are loaded
from ASCII resource files this time and they are linked to each other
through a naming mechanism. (the 'ADK Editor' has not been implemented
yet). Applications are stored in dynamically linked libraries and being
loaded at run-time.
But, I've found, that most of my customers and partners would prefer to
extend or customize it in a 'lighter' development environment (Java or
Delphi), instead of C++.
A CORBA-based API seems to be the best solution, but I would like to
collect information, how to start to rewrite my code to have its
kernel a CORBA-based API.
I know, that it is possible, a simulation package based on CORBA is
being developed at <a
href="http://hpcc.lerc.nasa.gov/hpcc2/oop_sys_sw.shtml">NASA</a>, but I
haven't cotacted them yet.
My kernel's code is written in C++ (cca. 690-700 header files, 1000+
classes) and about 450-500 000 lines of source code, so I'm aware of
jumping into it without asking CORBA experts, what to begin with.
So, my questions are the following :
- Is CORBA a good choice to open up a CAD/CAM kernel? (what is the
performance of CORBA calls on the same machine compared to a DLL or a
Linux library?)
- Which ORB to use on Win32 and on Linux to avoid headache when porting
it?
- Is there a tool, which helps creating IDL files from class
definitions/header files? (I'm worrying about the amount of typing and
copy-paste mistakes)
- Which book/tutorial to buy/read. (next week I will buy one copy
of "Advanced CORBA Programming with C++" by Michi Henning and Steve
Vinoski)

Thank you in advance
Tamas Veres

ICQ 10239451
--
"Always look on the bright side of CAM"

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

CAD/CAM application development API using CORBA?

Post by Tom Hawke » Tue, 21 Nov 2000 04:00:00


An interesting situation.

Let me first ask you what you WANT to expose.  That is, what information needs
to be known to or received by a client, what information needs to be known to
or received by a server, what operations a client needs to be able to perform
and how those are to be grouped together (CAD, CAM, CAE, mill selection, tool
selection, simulation, scheduling, file management, derived object management,
property management, raw device control, inventory control, s*management,
all those funky dependencies, VRML and 3D rendering, and so on).  It may be
that what you want to do is to leave your CAD/CAM kernel untouched, but copy or
migrate certain parts of it into other programming languages (such as the
command infrastructure).  CORBA can then be used to communicate from a client
to the CAD/CAM kernel running as a server.  That's what I interpreted your
customers and partners wanted when I read your message.

What you will undoubtedly find is that the client-server view does not
necessarily match your existing class hierarchy.  The interfaces you develop,
with their data structures, unions, enumerations, valuetypes, constants, and so
on, will be a formal but external specification of your CAD/CAM system.  You
must then translate between the two models.  I don't know of any commercial ORB
that reads C++ headers and from them builds IDL files.  The Rational Rose and
TogetherSoft tool suites, on the other hand, do have round-trip development
capabilities.  One (TogetherSoft?) should be able to read the C++ files and
build a matching model from which you can define the appropriate IDL interfaces
and have the corresponding C++ code generated.  Note that the important
operational word here is "generated".

I am certainly not a C++ expert.  I can see how well-used multiple-inheritance
can permit you to "graft" the CORBA implementation onto the existing CAD/CAM
kernel.  My guess is it would not be pretty.  Keeping them separate is probably
a better idea, where you can add suitable transformation methods similar to the
marshalling and unmarshalling code implemented by the ORB vendor's IDL
translator.  This will allow your kernel to become (and remain) a back-end
service to the clients.  Most of the tailoring they might want can, and
possibly should, be done through properties attached to the various objects.
You may need to define new objects or think of existing objects in new ways.
The result is client language independence.  You do not care what environment
the client uses providing some minimum restrictions are met, such as using the
wide string types to permit national language strings.

CORBA performance varies on a number of parameters.  You indicate below that
you want an estimate of performance on the "same machine" and you want it
contrasted with DLLs or other shared coding technique.  CORBA is a
communications middleware technology that isolates sender and receiver.  It
does not tightly couple them in the way that DLLs or libraries would.  Hence,
there is going to be a performance penalty to move data from the client to the
server and back.  I don't have any numbers what it will be;  you will have to
ask individual ORB vendors.  For certain applications you may want to tightly
couple them, in which case use Java's native method invocation and don't bother
with CORBA.

I'm sorry I cannot offer you any suggestions on the literature.  I've been
doing CORBA for many years, even having written my own variant before I knew
what CORBA was.  You are going to have a very big job ahead of you.  I
recommend that you start with a very small piece of the puzzle, such as file
management, and gradually work your way into other pieces.  You may decide
after some experimentation that, in a distributed sytsem, the way the kernel
works is not what you want the clients to see.

If you want to follow this up with a more detailed discussion, please feel free
to contact me directly.

Tom Hawker, Iconixx


> Hello,
> I've been developing a CAD/CAM kernel for a couple of years and I would
> like to make is as extendable as possible. It already has a run-time
> type information subsystem, which makes it possible to save,
> dynamically create and load objects, which are derived from the general
> modeling class. An extendable command architecture with user inputs, a
> messaging system and a multi-platform GUI (based on <a
> href="http://www.veryComputer.com/">wxWindows</a> ) offers entry points for
> 3rd party applicatons under Win32 and Linux/GTK . I've decided to open -
> almost- all kernel classes for the 3rd party developers and not to
> shrink the possibilities down.
> The C++ interface for such applications is working fine (I'm using it
> for the NC toolpath generator, STEP/PDES, IGES, VRML interface and for
> 3D modeling applications).
> Commands, GUI elements and international message strings are loaded
> from ASCII resource files this time and they are linked to each other
> through a naming mechanism. (the 'ADK Editor' has not been implemented
> yet). Applications are stored in dynamically linked libraries and being
> loaded at run-time.
> But, I've found, that most of my customers and partners would prefer to
> extend or customize it in a 'lighter' development environment (Java or
> Delphi), instead of C++.
> A CORBA-based API seems to be the best solution, but I would like to
> collect information, how to start to rewrite my code to have its
> kernel a CORBA-based API.
> I know, that it is possible, a simulation package based on CORBA is
> being developed at <a
> href="http://www.veryComputer.com/;>NASA</a>, but I
> haven't cotacted them yet.
> My kernel's code is written in C++ (cca. 690-700 header files, 1000+
> classes) and about 450-500 000 lines of source code, so I'm aware of
> jumping into it without asking CORBA experts, what to begin with.
> So, my questions are the following :
> - Is CORBA a good choice to open up a CAD/CAM kernel? (what is the
> performance of CORBA calls on the same machine compared to a DLL or a
> Linux library?)
> - Which ORB to use on Win32 and on Linux to avoid headache when porting
> it?
> - Is there a tool, which helps creating IDL files from class
> definitions/header files? (I'm worrying about the amount of typing and
> copy-paste mistakes)
> - Which book/tutorial to buy/read. (next week I will buy one copy
> of "Advanced CORBA Programming with C++" by Michi Henning and Steve
> Vinoski)

> Thank you in advance
> Tamas Veres

> ICQ 10239451
> --
> "Always look on the bright side of CAM"

> Sent via Deja.com http://www.veryComputer.com/
> Before you buy.