Using CORBA To Bridge C and JMS - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Using CORBA To Bridge C and JMS

Description:

http://stapley.web.cern.ch/stapley/CORBAtoJMS/doc/ 2. Overview. Alarms ... int main (int argc, char* argv[]) { Publisher &the_publisher = Publisher::init( argc, argv ) ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 12
Provided by: stap2
Category:
Tags: corba | jms | argv | bridge | using

less

Transcript and Presenter's Notes

Title: Using CORBA To Bridge C and JMS


1
Using CORBA To Bridge C and JMS
  • Niall Stapley, CERN
  • email niall.stapley_at_cern.ch
  • http//stapley.web.cern.ch/stapley/CORBAtoJMS/doc/

2
Overview
  • Alarms
  • Message Oriented Middleware
  • Architecture
  • MessageStruct
  • Bridge Description
  • The C client
  • Current Status

3
Alarms
  • Part of CERN SL/CO.
  • Gather, analyze, distribute fault states.
  • Sources from any part of CERN
  • heterogeneous platforms
  • Servers
  • PCs
  • VME computers
  • and languages
  • C, C
  • Java

4
Message Oriented Middleware
  • What is it?
  • Queue-based asynchronous message exchange
  • Provides reliability, flexibility, portability
  • Allows many-to-many communication
  • Good for event-driven communication
  • Java Message Service is the Java standard
  • Includes publish and subscribe
  • CMW project defined a MOM API
  • which simplifies JMS
  • but only implemented in Java

5
Architecture
6
MessageStruct
union BodyFormatUnion switch (BodyFormatEnum)
case BYTES_FORMAT OctetSeq octetSeqV
case TEXT_FORMAT string stringV case
MAP_FORMAT MapSeq mapSeqV case
STREAM_FORMAT DataTypeUnionSeq
dataTypeUnionSeqV case ANY_FORMAT
any anyV struct MessageStruct HeaderSeq
headers PropertySeq properties
BodyFormatUnion body
7
Bridge Description
8
Publish Example
  • include ltinclude_the_world.hgt
  • using namespace everything
  • int main (int argc, char argv)
  • Publisher the_publisher Publisherinit(
    argc, argv )
  • TextMessage message()
  • message.setStringProperty( "the_name",
    "the_value" )
  • message ltlt "This is inserted into the body"
  • the_publisher.publish( "CERN.TEST", message
    )
  • return (EXIT_SUCCESS)
  • // main

9
Subscribe Example
  • include ltinclude_the_world.hgt
  • using namespace everything
  • void messageHandler (Message message)
  • int main (int argc, char argv)
  • Subscriber the_subscriber Subscriberinit(
    argc, argv )
  • long long handle the_subscriber.subscribe(
    jms_topic, "",

  • messageHandler )
  • // do other stuff
  • the_subscriber.unsubscribe( handle )
  • return (EXIT_SUCCESS)
  • //main

10
Current Status
  • Provides Publish / Subscribe MOM API as shown.
  • Uses JacORB and Orbix/E
  • Potential attention areas
  • Increase security
  • The long descriptor.
  • Add user / password protection.
  • Add JMS Message Headers.
  • Dynamic Object/IDL conversion handler.
  • extern C client library
  • Start testing it with alarms

11
And Finally...
  • Thanks for your attention!
  • Any questions?
Write a Comment
User Comments (0)
About PowerShow.com