Date   

Testing archives

Jeff Licquia <jeff@...>
 

This is a test message to ensure that archives are now working properly.


[PATCH] Added additional build dependencies to README

Michael Schonberg <mschonberg@...>
 

Added the following depenencies to the README file:
* flex
* autoconf
* automake
* libtool
* uuid-dev
These are based on what additional packages needed to be installed over a clean
Ubuntu 11.10 installation.

Changed the requiment for a C99 compiler to "gcc/g++". The unit tests require a
c++ compiler, and it is better to recommend a specific compiler that works. We
can add others if they are known to work.

Signed-off-by: Michael Schonberg <mschonberg@...>
---
README | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/README b/README
index df67156..68a443e 100644
--- a/README
+++ b/README
@@ -39,7 +39,12 @@ package (as described below):

* GNU-compatible Make or gmake
* POSIX-standard shell
- * C99 compiler
+ * gcc/g++
+ * flex
+ * autoconf
+ * automake
+ * libtool
+ * uuid-dev

To use OpenMama you will need a middleware/payload. An example
middleware bridge and payload is included for Avis which can be
--
1.7.5.4


[RFC] BUILD: Add --mama-no-msg-bridge and --mama-no-payload-bridge options to MAMA configure.ac

Mike Schonberg <mschonberg@...>
 

Currently, OpenMAMA builds without complaints if Avis is not installed. In
itself, this is not a bad thing; however, this may not be the expected
behavior.

There are situations where building without middleware or payload bridges
is desired. For example, a middleware vendor supplies a
bridge shared object, and the user wants to use this shared object with
their own build. These scenarios are not common ones and should be the
exception, not the rule.

I think that the build should fail if configure fails to find the default
(Avis) middleware and payloads unless the caller passes parameters
explicitly requesting a build with no payload or middleware bridges. The
parameters will be:
--mama-no-msg-bridge
--mama-no-payload-bridge
If they are not present and no middleware or payload bridges are found,
Configure will fail.


-Mike
Please consider the environment before printing this email.

Visit our website at http://www.nyse.com

****************************************************

Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.


Make problem - Ubuntu 11.10

Kyle Redelinghuys <awesomistguy@...>
 

Hi there

I am trying to compile the OpenMAMA software on Ubuntu 11.10 but am having trouble doing so. After ./configure, sudo make throws an error. This is the error I am getting:

/usr/bin/ld: cannot find -lwombatcommon
collect2: ld returned 1 exit status
make[5]: *** [libmama.la] Error 1
make[5]: Leaving directory `/home/user/Software/OpenMAMA/mama/c_cpp/src/c'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/user/Software/OpenMAMA/mama/c_cpp/src/c'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/user/Software/OpenMAMA/mama/c_cpp/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/user/Software/OpenMAMA/mama/c_cpp'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/user/Software/OpenMAMA/mama/c_cpp'

What can I install to get this working? Or will this software only work on Redhat/SUSE distributions?

Apologies for mailing direct, searching revealed no answers.

Thanks
Kyle


Re: openMAMA bridge documentation

Mike Schonberg <mschonberg@...>
 

Jon,

 

Currently there is no document describing how to write message or payload bridges; however, it is definitely something that we intend to provide in the near future. For the moment the AVI bridge is a simple bridge implementation that you may use as an example.

 

If you don’t mind my asking. For what middleware do you want a bridge?

 

In the future, send these questions to the openmama-dev mailing list so others can benefit from the discussion.

 

Regards,

-Mike

 

From: jon dyte [mailto:jon.dyte@...]
Sent: Wednesday, November 02, 2011 6:38 AM
To: Mike Schonberg
Subject: openMAMA bridge documentation

 

Hi Mike

 

I've downloaded openMama.

 

I'm looking for a document which describes writing yr own bridge to plug into openMama.

 

Does such a thing exist?

 

Many thanks

 

Jon

 




Please consider the environment before printing this email.

Visit our website at http://www.nyse.com
*****************************************************************************
Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.


Re: Make problem - Ubuntu 11.10

Mike Schonberg <mschonberg@...>
 


I am trying to compile the OpenMAMA software on Ubuntu 11.10 but am
having trouble doing so. After ./configure, sudo make throws an error.
This is the error I am getting:

/usr/bin/ld: cannot find -lwombatcommon
collect2: ld returned 1 exit status
make[5]: *** [libmama.la] Error 1
make[5]: Leaving directory
`/home/user/Software/OpenMAMA/mama/c_cpp/src/c'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory
`/home/user/Software/OpenMAMA/mama/c_cpp/src/c'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/home/user/Software/OpenMAMA/mama/c_cpp/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/home/user/Software/OpenMAMA/mama/c_cpp'
make[1]: *** [all] Error 2
make[1]: Leaving directory
`/home/user/Software/OpenMAMA/mama/c_cpp'

What can I install to get this working? Or will this software only work
on Redhat/SUSE distributions?
Although we do most of our testing on Redhat and SUSE, OpenMAMA will build on Ubuntu. From Your errors, it appears that you do not have flex installed. You will also need uuid-dev. See http://www.openmama.org/users/build-openmama for a list of prerequisites for building OpenMAMA.

Regards,
-Mike
Please consider the environment before printing this email.

Visit our website at http://www.nyse.com

****************************************************

Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.


Writing an AMQP bridge

Raph Cohn
 

OpenMAMA looks like it's got the potential to solve a substantial hole in messaging. In particular, it makes a superb way to write portable C applications that use MQ.

We've been looking at the documentation and source, and are interested in working with the OpenMAMA community to develop an AMQP 1-0 bridge. We currently have an active open source project for a C client for AMQP 1-0, libamqp (https://github.com/libamqp)

It looks like it would be quite possible to integrate this into OpenMAMA. The challenge is that we'd also need to define a small 'profile' for AMQP 1-0 vendors to support the full fidelity of OpenMAMA (eg data dictionaries) - we've done some work on how this might be possible. Ideally this would need the buy in from the other AMQP vendors. However, OpenMAMA steering group members and AMQP membership is somewhat aligned, so I'm sure that this is possible.

We'd also be interested in helping write a Java wrapper, to provide a sensible, cross-platform alternative to JMS. As a first pass, this could use BridJ to deliver most functionality (http://code.google.com/p/bridj/). In our experience it can achieve about 90% of JNI's performance, and, with modification to use Sun specifics (eg Unsafe), can be used in a most un-Java, but efficient, manner. For the final 10% one is almost better off compiling a special JVM.

Introductions over,

Raph

Raphael Cohn
Chief Architect
raphael.cohn@...
StormMQ Limited

UK Office:
Gateshead int'l Business Centre, Mulgrave Terrace, Gateshead, NE8 1AN, United Kingdom
Telephone: +44 845 3712 567

Registered office:
16 Anchor Street, Chelmsford, Essex, CM2 0JY, United Kingdom
StormMQ Limited is Registered in England and Wales under Company Number 07175657
StormMQ.com


Re: Writing an AMQP bridge

Michael Schonberg <mschonberg@...>
 

2011/11/2 Raphael Cohn <raphael.cohn@...>:
OpenMAMA looks like it's got the potential to solve a substantial hole in
messaging. In particular, it makes a superb way to write portable C
applications that use MQ.

We've been looking at the documentation and source, and are interested in
working with the OpenMAMA community to develop an AMQP 1-0 bridge. We
currently have an active open source project for a C client for AMQP 1-0,
libamqp (https://github.com/libamqp)
An AMQP bridge would be great. I was hoping that someone would develop one
sooner rather than later.

We considered AMQP when we we looking for an open source middleware; however,
we already had an Elvin/Avis bridge and we were short on time. We have found
that it is usually not too difficult to implement bridges around
exiting C messaging
APIs.

Please let me know through the mailing list if you require any
assistance. I will be more
than happy to assist you in any way possible.


It looks like it would be quite possible to integrate this into OpenMAMA.
The challenge is that we'd also need to define a small 'profile' for AMQP
1-0 vendors to support the full fidelity of OpenMAMA (eg data dictionaries)
- we've done some work on how this might be possible. Ideally this would
need the buy in from the other AMQP vendors. However, OpenMAMA steering
group members and AMQP membership is somewhat aligned, so I'm sure that this
is possible.
OpenMAMA provides data dictionary support on top of the payload bridge
as part of
the API. Usually it does not require any additional effort. What else
needs to be defined
as part of this profile?

I also interested in any potential enhancements to OpenMAMA that a
complete AMQP
bridge might require.

We'd also be interested in helping write a Java wrapper, to provide a
sensible, cross-platform alternative to JMS. As a first pass, this could use
BridJ to deliver most functionality (http://code.google.com/p/bridj/). In
our experience it can achieve about 90% of JNI's performance, and, with
modification to use Sun specifics (eg Unsafe), can be used in a most
un-Java, but efficient, manner. For the final 10% one is almost better off
compiling a special JVM.
We already have a full JNI wrapper for OpenMAMA, and we should be
releasing it in
the near future: http://www.openmama.org/what-is-openmama/openmama-roadmaps.
It wraps the C API so it supports all middleware and payload bridges.

Introductions over,

Raph

Raphael Cohn
Chief Architect
raphael.cohn@...
StormMQ Limited

UK Office:
Gateshead int'l Business Centre, Mulgrave Terrace, Gateshead, NE8 1AN,
United Kingdom
Telephone: +44 845 3712 567

Registered office:
16 Anchor Street, Chelmsford, Essex, CM2 0JY, United Kingdom
StormMQ Limited is Registered in England and Wales under Company Number
07175657
StormMQ.com

_______________________________________________
Openmama-dev mailing list
Openmama-dev@...
http://lists.openmama.org/listinfo/openmama-dev

I look forward to working with you on this.

Regards,
Michael Schonberg
OpenMAMA Maintainer
mschonberg@...


[PATCH] BUILD: configure should fail by default with no bridge

Michael Schonberg <mschonberg@...>
 

From: Mike Schonberg <mikeschonberg@...>

Although it should be possible to build without a messaging or payload bridge,
this is not normally the desired result. To follow the principal of least
astonishment, configure for MAMA should fail if it fails to find a middleware or
payload bridge, unless passed parameters explicitly requesting a build without
them.

Add --without-middleware-bridge and --without-payload-bridge arguments to
configure.ac for MAMA. Tested the following permutations:

--with-avis | --without-payload-bridge | --without-middleware-bridge | result
-------------------------------------------------------------------------------
Y | N | N | pass
Y | Y | N | fail
Y | N | Y | fail
Y | Y | Y | fail
N | Y | Y | pass
N | Y | N | fail
N | N | Y | fail
N | N | N | fail

Signed-off-by: Michael Schonberg <mschonberg@...>
---
mama/c_cpp/configure.ac | 52 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/mama/c_cpp/configure.ac b/mama/c_cpp/configure.ac
index 1bae611..d081d30 100644
--- a/mama/c_cpp/configure.ac
+++ b/mama/c_cpp/configure.ac
@@ -47,6 +47,10 @@ AC_PROG_CXX
AC_PROG_LEX
AC_PROG_CC

+# make sure that we configure bridges or specifically build without them
+mwbridge=false
+payloadbridge=false
+
# Check whether to use built-in library archiver if C++ compiler is Sun/Forte
if CXXbase=`echo ${CXX} | ${ac_cv_prog_AWK} '{ print $1; }'` ; \
test "x${build_vendor}" = "xsun" -a "x`basename ${CXXbase}`" = "xCC"
@@ -199,6 +203,9 @@ AC_ARG_WITH(
LDFLAGS="$LDFLAGS -L$AVIS_HOME/lib"
with_avis=true
mama_platform=avis
+ mama_payload=avis
+ mwbridge=true
+ payloadbridge=true
],
[
AC_MSG_ERROR([Valid Avis installation not found! You may need to copy avis_client_config.h from platforms/gnu_auotmake to $AVIS_HOME/include/avis)])
@@ -272,6 +279,51 @@ AC_ARG_WITH(
AM_CONDITIONAL(WITH_TESTTOOLS, test x$with_testtools = xtrue)

##################################################
+# NO BRIDGES: --no-middleware-bridge --no-payload-bridge
+#
+# If we get here and the build is not configured for a bridge we need to ensure
+# that we really want to build without them.
+#
+##################################################
+
+# --without-middleware-bridge
+AC_ARG_WITH([middleware-bridge],
+ [AS_HELP_STRING([--without-middleware-bridge],
+ [Build OpenMAMA with no middleware bridge.])],
+ [],
+ [with_middleware_bridge=yes])
+
+# --without-payload-bridge
+AC_ARG_WITH([payload-bridge],
+ [AS_HELP_STRING([--without-payload-bridge],
+ [Build OpenMAMA with no payload bridge.])],
+ [],
+ [with_payload_bridge=yes])
+
+
+# Trying to build without a message bridge but --without-middleware-bridge
+# not specified
+if test x${mwbridge} = xfalse -a x$with_middleware_bridge = xyes; then
+ AC_MSG_ERROR([No middleware bridge specified! If this is intentional specify --without-middleware-bridge])
+fi
+
+# Trying bo build without a middleware bridge but bridge specified
+if test x${mwbridge} = xtrue -a x$with_middleware_bridge = xno; then
+ AC_MSG_ERROR([--without-middleware-bridge specified with ${mama_platform}])
+fi
+
+# Trying to build without a payload bridge but --without-payload-bridge
+# not specified
+if test x${payloadbridge} = xfalse -a x$with_payload_bridge = xyes; then
+ AC_MSG_ERROR([No payload bridge specified! If this is intentional specify --without-payload-bridge])
+fi
+
+# Trying bo build without a payload bridge but bridge specified
+if test x${mwbridge} = xtrue -a x$with_payload_bridge = xno; then
+ AC_MSG_ERROR([--without-payload-bridge specified with ${mama_payload}])
+fi
+
+##################################################
#
# VERSION FILE GENERATION
#
--
1.7.5.4


[PATCH] BUILD: script to clean the build files

Jacobraj Benet <JBenet@...>
 

A script has been added to clear off all the build related files and this script would be triggered on dist clean command from Makefile.

This script basically clears all the build files, which makes it easy to merge and also check for any difference between the local files and the files in the repository.

Signed-off-by: Jacobraj Benet <jbenet@...>

----
diff --git a/Makefile b/Makefile
index 24c7555..e2df1e8 100644
--- a/Makefile
+++ b/Makefile
@@ -49,3 +49,6 @@ common-clean:
 install: common-install mama-install
 
 clean: common-clean mama-clean
+
+distclean: clean
+       ./clearBuildFiles.sh

----
clearBuildFiles.sh

cd common/c_cpp
rm -rf autom4te.cache etc
rm -rf config.h config.status etc stamp-h1 aclocal.m4 config.h.in configure doxyconfig-c libtool Makefile.in autom4te.cache config.log Makefile 
cd - ; cd common/c_cpp/src
rm -rf Makefile Makefile.in
cd - ; cd common/c_cpp/src/c
rm -rf Makefile Makefile.in .deps properties.c version.h
cd -;

cd mama/c_cpp
rm -rf autom4te.cache etc
rm -rf config.h config.status etc stamp-h1 aclocal.m4 config.h.in configure doxyconfig-c libtool Makefile.in autom4te.cache config.log Makefile
cd -; cd mama/c_cpp/src
rm -rf Makefile Makefile.in .deps

cd -; cd mama/c_cpp/src/c
rm -rf Makefile Makefile.in .deps version.c

cd -; cd mama/c_cpp/src/c/mama
rm -rf version.h

cd -; cd mama/c_cpp/src/examples
rm -rf Makefile Makefile.in .deps
cd -; cd mama/c_cpp/src/examples/c
rm -rf Makefile Makefile.in .deps
cd common/c_cpp
rm -rf autom4te.cache etc
rm -rf config.h config.status etc stamp-h1 aclocal.m4 config.h.in configure doxyconfig-c libtool Makefile.in autom4te.cache config.log Makefile 
cd - ; cd common/c_cpp/src
rm -rf Makefile Makefile.in
cd - ; cd common/c_cpp/src/c
rm -rf Makefile Makefile.in .deps properties.c version.h
cd -;

cd mama/c_cpp
rm -rf autom4te.cache etc
rm -rf config.h config.status etc stamp-h1 aclocal.m4 config.h.in configure doxyconfig-c libtool Makefile.in autom4te.cache config.log Makefile
cd -; cd mama/c_cpp/src
rm -rf Makefile Makefile.in .deps

cd -; cd mama/c_cpp/src/c
rm -rf Makefile Makefile.in .deps version.c

cd -; cd mama/c_cpp/src/c/mama
rm -rf version.h

cd -; cd mama/c_cpp/src/examples
rm -rf Makefile Makefile.in .deps
cd -; cd mama/c_cpp/src/examples/c
rm -rf Makefile Makefile.in .deps

cd -; cd mama/c_cpp/src/testtools
rm -rf Makefile Makefile.in .deps
cd -; cd mama/c_cpp/src/testtools/load/c
rm -rf Makefile Makefile.in .deps
cd -; cd mama/c_cpp/src/testtools/load
rm -rf Makefile Makefile.in .deps
cd -; cd mama/c_cpp/src/testtools/performance/c
rm -rf Makefile Makefile.in .deps
cd -; cd mama/c_cpp/src/testtools/performance
rm -rf Makefile Makefile.in .deps
cd -; cd mama/c_cpp/src/testtools/capturereplay/c
rm -rf Makefile Makefile.in .deps
cd -; cd mama/c_cpp/src/testtools/capturereplay
rm -rf Makefile Makefile.in .deps

cd -; cd mama/c_cpp/src/regression
rm -rf Makefile Makefile.in .deps

cd -; cd mama/c_cpp/src/gunittest
rm -rf Makefile Makefile.in .deps
cd -; cd mama/c_cpp/src/gunittest/c
rm -rf Makefile Makefile.in .deps

cd -; cd mama/c_cpp/src/c/payload
rm -rf Makefile Makefile.in .deps
cd -; cd mama/c_cpp/src/c/payload/avismsg
rm -rf Makefile Makefile.in .deps

cd -; cd mama/c_cpp/src/c/bridge
rm -rf Makefile Makefile.in .deps

cd -; cd mama/c_cpp/src/c/bridge/avis
rm -rf Makefile Makefile.in .deps
cd -; cd mama/c_cpp/src/testtools
rm -rf Makefile Makefile.in .deps
cd -; cd mama/c_cpp/src/testtools/load/c
rm -rf Makefile Makefile.in .deps
cd -; cd mama/c_cpp/src/testtools/load
rm -rf Makefile Makefile.in .deps
cd -; cd mama/c_cpp/src/testtools/performance/c
rm -rf Makefile Makefile.in .deps
cd -; cd mama/c_cpp/src/testtools/performance
rm -rf Makefile Makefile.in .deps
cd -; cd mama/c_cpp/src/testtools/capturereplay/c
rm -rf Makefile Makefile.in .deps
cd -; cd mama/c_cpp/src/testtools/capturereplay
rm -rf Makefile Makefile.in .deps

cd -; cd mama/c_cpp/src/regression
rm -rf Makefile Makefile.in .deps

cd -; cd mama/c_cpp/src/gunittest
rm -rf Makefile Makefile.in .deps
cd -; cd mama/c_cpp/src/gunittest/c
rm -rf Makefile Makefile.in .deps

cd -; cd mama/c_cpp/src/c/payload
rm -rf Makefile Makefile.in .deps
cd -; cd mama/c_cpp/src/c/payload/avismsg
rm -rf Makefile Makefile.in .deps

cd -; cd mama/c_cpp/src/c/bridge
rm -rf Makefile Makefile.in .deps

cd -; cd mama/c_cpp/src/c/bridge/avis
rm -rf Makefile Makefile.in .deps

 

Jacobraj Benet

NYSE Technologies

+1 312 442 7956

 




Please consider the environment before printing this email.

Visit our website at http://www.nyse.com
*****************************************************************************
Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.


Re: [PATCH] BUILD: script to clean the build files

Michael Schonberg <mschonberg@...>
 

On 11/08/2011 12:41 PM, Jacobraj Benet wrote:
A script has been added to clear off all the build related files and this script would be triggered on dist clean command from Makefile.

This script basically clears all the build files, which makes it easy to merge and also check for any difference between the local files and the files in the repository.
Your mail client is not encoding the patch correctly. It is definitely
converting tabs to spaces which breaks the Makefile and has other formatting
issues as well. If you can't get your email client to send the patch
correctly, it is probably best to include a plain text attachment in addition
to the in-line patch. See:
http://kerneltrap.org/Linux/Email_Clients_and_Patches. I have also had good
luck with git-send-email; however, you will likely need a gmail account or
something similar which you can configure to send email as jbenet@....

Try to keep the margin for your description at 80 characters.

Signed-off-by: Jacobraj Benet <jbenet@... <mailto:jbenet@...>>

----
diff --git a/Makefile b/Makefile
index 24c7555..e2df1e8 100644
--- a/Makefile
+++ b/Makefile
@@ -49,3 +49,6 @@ common-clean:
install: common-install mama-install

clean: common-clean mama-clean
+
+distclean: clean
+ ./clearBuildFiles.sh
This should be:
sh ./clearBuildFiles.sh".
Note that your mailer changed the tab to a space here as well. You could also
add "#!/bin/sh" to the script and make sure that the executable bit is set.

We will also need to provide an alternative to the shell script when we
reintroduce windows support. I suspect that Python might be a good choice since
we already depend on it for regression tests. It also depends on what tools we
choose for windows builds. In any event the shell script is fine for the moment.



----
clearBuildFiles.sh
The patch fails to add this as a new file. We should have something like:

--- /dev/null
+++ b/clearBuildFiles.sh

If you are using git-diff to generate the patch, you need to add the new file,
commit your changes to your local repository and use "git diff HEAD^" to
generate the patch. If you format your checkin comment properly and setup git
with the correct configuration, git-format-patch works very well.

If you use diff you need to pass "-N" for new files to get applied correctly by
git-apply or git-am.

I will try to add some additional instructions to the web site.


cd common/c_cpp
rm -rf autom4te.cache etc
rm -rf config.h config.status etc stamp-h1 aclocal.m4 config.h.in <http://config.h.in> configure doxyconfig-c libtool Makefile.in autom4te.cache config.log Makefile
Your email client did something funky here with config.h.in.

Also, automake provides "distclean" and "maintainer-clean" targets that do a
lot of the work for you. Something like this might provide a good starting
point:

-----
diff --git a/Makefile b/Makefile
index 24c7555..b98dd94 100644
--- a/Makefile
+++ b/Makefile
@@ -49,3 +49,19 @@ common-clean:
install: common-install mama-install

clean: common-clean mama-clean
+
+mama-distclean:
+ cd mama/c_cpp ; make distclean; cd -
+
+common-distclean:
+ cd common/c_cpp ; make distclean -j1 -l80 ; cd -
+
+distclean: common-distclean mama-distclean
+
+cleanclean: distclean
+ cd mama/c_cpp ; make maintainer-clean; cd -
+ cd common/c_cpp ; make maintainer-clean; cd -
+
+
+
+
----

With this your script can be a lot smaller.

Also describe briefly how you verified the fix.

Regards,
-Mike


OpenMAMA integration with Citihub Permission Server API

David Sewell <david.sewell@...>
 

Citihub have integrated the OpenMAMA API source code with the Citihub Permission Server API, and would like to submit the OpenMAMA code changes for review and integration into the main OpenMAMA release.

 

The Citihub Permission Server API (libPermSvr) and associated server process (PermSvr) is a proxy for enterprise permission systems and allows clients to be permissioned for market data and other data sources using proprietary or  3rd party permission systems like Thomson Reuters DACS. So, with libPermSvr integrated into OpenMAMA, applications can be entitled for market data using existing market data permission systems, making the adoption of OpenMAMA easier and more attractive for large enterprises with existing market data systems.

 

The libPermSvr API integration provides the same features as the current OpenMAMA entitlement capability, but adds support for multiple proprietary and 3rd party permission systems. We have also added support for permissioning of basic subscriptions (Topic only) and publication, and we have update the build process and GNU automake scripts, so the build process includes an option to enable the libPermSvr code, e.g. ./configure –with-chub-permsvr=<path to libpermsvr libs and header>.

 

The Citihub Permission Server API is used by a number of large investment banks for market data entitlement control and usage reporting. The API has been integrated with various proprietary market data API’s and deployed in low latency market data environments, and we have had strong interest from clients for the integration of the Citihub Permission Server API into OpenMAMA to make the adoption of OpenMAMA more attractive to the development community.

 

The Permission Server software is licensed and maintained by Citihub and is distributed, with support, as binaries for Linux, Solaris and Windows with API support for C/C++, C# and Java. We also share the source code with clients with unrestricted rights to change and reuse source code.

 

If there is interest in the OpenMAMA community for this feature, we will submit source code patches for review and inclusion in a future release.

 

Regards,

 

David Sewell

CTO, Citihub

 

London ● New York ● Singapore ● Hong Kong ● Dubai

www.citihub.com

 

1 Canada Square, Canary Wharf, London E14 5AB

t: +44 800 0281901

m: +44 7808 584684

e: david.sewell@...

 


This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Citihub. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error.


Re: OpenMAMA integration with Citihub Permission Server API

Mike Schonberg <mschonberg@...>
 

David,

-----Original Message-----
From: openmama-dev-bounces@... [mailto:openmama-
dev-bounces@...] On Behalf Of David Sewell
Sent: Monday, December 05, 2011 2:29 PM
To: openmama-dev@...
Subject: [Openmama-dev] OpenMAMA integration with Citihub Permission
Server API
Citihub have integrated the OpenMAMA API source code with the Citihub
Permission Server API, and would like to submit the OpenMAMA code
changes for review and integration into the main OpenMAMA release.

Please submit your patches as a patch as described at http://www.openmama.org/developers/patch-submission. If the changes are extensive, you should consider breaking them down logical series that can be applied incrementally.



The Citihub Permission Server API (libPermSvr) and associated server process
(PermSvr) is a proxy for enterprise permission systems and allows clients to
be permissioned for market data and other data sources using proprietary or
3rd party permission systems like Thomson Reuters DACS. So, with
libPermSvr integrated into OpenMAMA, applications can be entitled for
market data using existing market data permission systems, making the
adoption of OpenMAMA easier and more attractive for large enterprises
with existing market data systems.



The libPermSvr API integration provides the same features as the current
OpenMAMA entitlement capability, but adds support for multiple
proprietary and 3rd party permission systems. We have also added support
for permissioning of basic subscriptions (Topic only) and publication, and we
have update the build process and GNU automake scripts, so the build
process includes an option to enable the libPermSvr code, e.g. ./configure ?
with-chub-permsvr=<path to libpermsvr libs and header>.
It is very important that your change provide generic support for 3rd party entitlement systems as other entitlement vendors will surely follow your lead and add support to OpenMAMA.


...

The Permission Server software is licensed and maintained by Citihub and is
distributed, with support, as binaries for Linux, Solaris and Windows with API
support for C/C++, C# and Java. We also share the source code with clients
with unrestricted rights to change and reuse source code.
Will it be necessary to add C++, Java and C# support for your changes as we release the corresponding support in OpenMAMA?



If there is interest in the OpenMAMA community for this feature, we will
submit source code patches for review and inclusion in a future release.
I think that support for 3rd party entitlement systems is an excellent idea and I look forward to reviewing your patches.

Regards,
Mike

Michael Schonberg
OpenMAMA Maintainer
mschonberg@...



Regards,



David Sewell

CTO, Citihub



London ● New York ● Singapore ● Hong Kong ● Dubai

www.citihub.com <http://www.citihub.com>



1 Canada Square, Canary Wharf, London E14 5AB

t: +44 800 0281901

m: +44 7808 584684

e: david.sewell@...




This email and any attachments to it may be confidential and are intended
solely for the use of the individual to whom it is addressed. Any views or
opinions expressed are solely those of the author and do not necessarily
represent those of Citihub. If you are not the intended recipient of this
email, you must neither take any action based upon its contents, nor copy or
show it to anyone. Please contact the sender if you believe you have
received this email in error.
Please consider the environment before printing this email.

Visit our website at http://www.nyse.com

****************************************************

Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.


documentation for bridges

Daniel Cegiełka <daniel.cegielka@...>
 

Hi,

Do you plan to make available any documentation on how to write new bridges for MAMA (and when one can expect such documentation)?

Best regards,
Daniel


Re: documentation for bridges

Mike Schonberg <mschonberg@...>
 

-----Original Message-----
From: openmama-dev-bounces@... [mailto:openmama-
dev-bounces@...] On Behalf Of Daniel Cegielka
Sent: Wednesday, December 07, 2011 11:35 AM
To: Openmama-dev@...
Subject: [Openmama-dev] documentation for bridges
Hi,

Do you plan to make available any documentation on how to write new
bridges for MAMA (and when one can expect such documentation)?

Best regards,
Daniel
Daniel,

We currently do not have documentation that addresses how to write new payload or messaging bridges for OpenMAMA as the bridge APIs were internal until now; however, we definitely intend to provide bridge API documentation in the near future.

In the meantime, I am more than happy to assist you in any way necessary through this mailing list. Your experiences will certainly prove valuable as we develop the documentation.

The Avis bridge, included as part of OpenMAMA, provides a simple example that might prove useful.

Regards,
-Mike

Michael Schonberg
OpenMAMA Maintainer
NYSE Technologies
mschonberg@...
Please consider the environment before printing this email.

Visit our website at http://www.nyse.com

****************************************************

Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.


Re: documentation for bridges

Daniel Cegiełka <daniel.cegielka@...>
 

Thank you for your response. I think that bridge for ZeroMQ is worth to prepare.


I'm a little surprised that you have chosen Avis instead ZeroMQ. ZeroMQ from the beginning was designed as a messaging for market data:


Best regards,
Daniel


2011/12/7 Mike Schonberg <mschonberg@...>



> -----Original Message-----
> From: openmama-dev-bounces@... [mailto:openmama-
> dev-bounces@...] On Behalf Of Daniel Cegielka
> Sent: Wednesday, December 07, 2011 11:35 AM
> To: Openmama-dev@...
> Subject: [Openmama-dev] documentation for bridges
> Hi,
>
> Do you plan to make available any documentation on how to write new
> bridges for MAMA (and when one can expect such documentation)?
>
> Best regards,
> Daniel

Daniel,

We currently do not have documentation that addresses how to write new payload or messaging bridges for OpenMAMA as the bridge APIs were internal until now; however, we definitely intend to provide bridge API documentation in the near future.

In the meantime, I am more than happy to assist you in any way necessary through this mailing list. Your experiences will certainly prove valuable as we develop the documentation.

The Avis bridge, included as part of OpenMAMA, provides a simple example that might prove useful.

Regards,
-Mike

Michael Schonberg
OpenMAMA Maintainer
NYSE Technologies
mschonberg@...
Please consider the environment before printing this email.

Visit our website at http://www.nyse.com

****************************************************

Note:  The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure.  If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system.  Thank you.  NYSE Euronext.



Re: documentation for bridges

Mike Schonberg <mschonberg@...>
 

Daniel,

We selected Avis because we already had a bridge implementation from a previous project, and it was much easier to provide the Avis bridge than to write a new one for a middleware with which we were not familiar. When we considered other open source bridges, ZeroMQ was at the top of our list.

I agree that ZeroMQ is a better choice in general and for market data specifically. It is my hope that the community will provide several open source alternatives to Avis including ZeroMQ. If you are interested in implementing a bridge, I will provide as much support as you require.

Regards,
-Mike

Michael Schonberg
OpenMAMA Maintainer
NYSE Technologies
mschonberg@...

-----Original Message-----
From: Daniel Cegiełka [mailto:daniel.cegielka@...]
Sent: Wednesday, December 07, 2011 12:44 PM
To: Mike Schonberg
Cc: Openmama-dev@...
Subject: Re: [Openmama-dev] documentation for bridges
Thank you for your response. I think that bridge for ZeroMQ is worth to
prepare.

http://www.zeromq.org/

I'm a little surprised that you have chosen Avis instead ZeroMQ. ZeroMQ
from the beginning was designed as a messaging for market data:

http://www.zeromq.org/whitepapers:market-analysis

Best regards,
Daniel


2011/12/7 Mike Schonberg <mschonberg@...>




> -----Original Message----- > From:
openmama-dev-bounces@... [mailto:openmama- >
dev-bounces@...] On Behalf Of Daniel Cegielka > Sent:
Wednesday, December 07, 2011 11:35 AM > To:
Openmama-dev@... > Subject: [Openmama-dev] documentation
for bridges > Hi, > > Do you plan to make available any documentation
on how to write new > bridges for MAMA (and when one can expect such
documentation)? > > Best regards, > Daniel


Daniel,

We currently do not have documentation that addresses how to
write new payload or messaging bridges for OpenMAMA as the bridge APIs
were internal until now; however, we definitely intend to provide bridge API
documentation in the near future.

In the meantime, I am more than happy to assist you in any way
necessary through this mailing list. Your experiences will certainly prove
valuable as we develop the documentation.

The Avis bridge, included as part of OpenMAMA, provides a simple
example that might prove useful.

Regards,
-Mike

Michael Schonberg
OpenMAMA Maintainer
NYSE Technologies
mschonberg@...
Please consider the environment before printing this email.

Visit our website at http://www.nyse.com

****************************************************

Note: The information contained in this message and any attachment to
it is privileged, confidential and protected from disclosure. If the
reader of this message is not the intended recipient, or an employee or
agent responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or copying
of this communication is strictly prohibited. If you have received this
communication in error, please notify the sender immediately by replying
to the message, and please delete it from your system. Thank you. NYSE
Euronext.


Please consider the environment before printing this email.

Visit our website at http://www.nyse.com

****************************************************

Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.


[PATCH] Edits and corrections to README file

Michael Schonberg <mschonberg@...>
 

From: Mike Schonberg <mschonberg@...>

Adding edits and corrections suggested by a technical writer who reviewed the
README file.

Signed-off-by: Michael Schonberg <mschonberg@...>
---
README | 184 +++++++++++++++++++++++++++++++++++-----------------------------
1 files changed, 100 insertions(+), 84 deletions(-)

diff --git a/README b/README
index 68a443e..5ebfa70 100644
--- a/README
+++ b/README
@@ -1,41 +1,42 @@
OpenMAMA Client Library
============================

-http://
+Project Page
+------------
+
+http://www.openmama.org

Overview
--------

-OpenMAMA provides a lightweight wrapper to give a common API interface
-across different middleware and messaging solutions across a variety of
-platforms and languages.
+OpenMAMA is a lightweight wrapper that provides a common API interface to
+different middleware and messaging solutions across a variety of platforms and
+languages.

-Please see the project page above for more information as well as the
-mailing list for questions, discussions, and development.
+Please see the project page above for more information, as well as the mailing
+list for questions, discussions, and development.

Supported Platforms
-------------------

-Currently C on Linux is the only supported platform. Supported
-distributions are
+Currently C on Linux is the only supported platform. Supported distributions
+are

* Redhat 4
* Redhat 5
* SLERT
* SuSe 10

-
Requirements for End Users
--------------------------

-OpenMama is designed to have fairly minimal requirements to build,
-but there are some.
+OpenMAMA is designed to have minimal build requirements.

Linux
-----

-These are the base requirements to build and use OpenMama from a source
-package (as described below):
+These are the base requirements to build and use OpenMAMA from a source package
+(as described below):

* GNU-compatible Make or gmake
* POSIX-standard shell
@@ -46,22 +47,22 @@ package (as described below):
* libtool
* uuid-dev

-To use OpenMama you will need a middleware/payload. An example
-middleware bridge and payload is included for Avis which can be
-obtianed from the following website.
+To use OpenMAMA you will need a middleware/payload. An example middleware
+bridge and payload is included for Avis. Avis can be obtained from the following
+website:

http://avis.sourceforge.net.

-OpenMAMA reference documentation has dependancy on
+OpenMAMA API reference documentation depends on:

* doxygen

-Unittests are dependant on Google Testing Framework which is
-available from
+Unittests are dependent on the Google Testing Framework, which is available
+from:

http://code.google.com/p/googletest/

-OpenMAMA's own regression tests also relie on
+OpenMAMA's own regression tests also rely on:

*Python version 2.3 or newer

@@ -72,21 +73,20 @@ Getting the Source
There are two primary ways of getting OpenMAMA's source code:

* Download a stable source release in archive format
- * check out the source from our GIT repositary.
+ * Check out the source from our GIT repository.

-The GIT checkout requires a few extra steps and some extra software
-packages on your system, but lets you track the latest development and
-make patches much more easily.
+The GIT checkout requires a few extra steps, and extra software packages to be
+installed on your system. However, it provides easier tracking of the latest
+development and make patches.

### Source Package ###

-OpenMAMA is released in versioned source packages which can be
-downloaded from:
+OpenMAMA is released in versioned source packages which can be downloaded from:

- http://
+ http://www.openmama.org/downloads

-Once the package is downloaded, expand it. This will result in a
- new directory with the name
+Once the package is downloaded, expand it. This will result in a new directory
+with the name

openmama-X.Y.Z

@@ -94,9 +94,9 @@ which contains all of the source code.

### GIT Checkout ###

-To check out the main branch of OpenMAMA, run the following
-GIT command:
+To check out the main branch of OpenMAMA, run the following GIT command:

+ git clone http://git.openmama.org/OpenMAMA-1.1.git

Distribution Layout
-------------------
@@ -117,19 +117,19 @@ mama/c_cpp/
configure.ac autoconf script
Makefile.am autoconf makefile
doxyconfig-c.in doxygen config
- doc referance guide style
- doc/images referance guide images
+ doc reference guide style
+ doc/images reference guide images

mama/c_cpp/src/c c files for mama library
bridge/avis c files for avis middleware bridge implementation
conflation c files for mama conflation component
mama header files for mama
payload/avismsg c files for avis payload bridge implementation
- payload/playback c files for mama playback component
+ playback c files for mama playback component


mama/c_cpp/src/examples
- mama.properties exmaple mama.properties file
+ mama.properties example mama.properties file
c c files for mama example applications
c/Makefile.sample Makefile to build examples only

@@ -138,11 +138,10 @@ mama/c_cpp/src/examples
c/tools test apps for c API
c/* tests and expected results for c API

- mama/c_cpp/src/testtools
- c test tools for c API
- c/capturereplay capture adn replay apps using c API
- c/load load testing apps for c API
- c/performance performance testing apps for c API
+ mama/c_cpp/src/testtools test tools for c API
+ capturereplay capture and replay apps using c API
+ load load testing apps for c API
+ performance performance testing apps for c API


Building OpenMAMA
@@ -150,13 +149,13 @@ Building OpenMAMA

### Avis Install ###

-Curretnly OpenMAMA assumes Avis is the middleware to be built with as
-this is currently the only opensource middleware supported. Therefore
-the Avis client libraries must be available.
+Currently OpenMAMA assumes Avis is the middleware to be built with as this is
+currently the only opensource middleware supported. Therefore the Avis client
+libraries must be available.

-The default install of Avis missing a header file and this needs to be
-moved manually in the include directory. The OpenMAMA configure script
-checks for this header and will exit with an error if not found.
+The default install of Avis is missing a header file. This needs to be moved
+manually in the include directory. The OpenMAMA configure script checks for
+this header and will exit with an error if not found.

mv ${AVIS_SOURCE}/lib/avis_client_config.h ${AVIS_HOME}/include/avis

@@ -164,8 +163,8 @@ checks for this header and will exit with an error if not found.

### Google Test Install ###

-OpenMAMA uses the static google test library and expects the files to be
-in the following format.
+OpenMAMA uses the static google test library and expects the files to be in the
+following format.

${GTEST_HOME}/include - include files
${GTEST_HOME}/lib - library files
@@ -174,9 +173,9 @@ ${GTEST_HOME}/lib - library files

### GNU Automake Instructions ###

-The following uses teh defualt settings to build the OpenMAMA library
-and exmaple applications. This assumes that Avis middleware is avialble
-in /usr/local and will install OpenMAMA to /opt/OpenMAMA
+The following uses the default settings to build the OpenMAMA library and
+example applications. This assumes that Avis middleware is available in
+/usr/local, and will install OpenMAMA to /opt/OpenMAMA

./configure
make
@@ -185,43 +184,42 @@ in /usr/local and will install OpenMAMA to /opt/OpenMAMA

### Configure arguments ###

-The following arguments can be passed to configure if you wish to use
-non-default paths or build extra components of OpenMAMA
+The following arguments can be passed to the configure script if you wish to use
+non-default paths, or build extra components of OpenMAMA:

-specify an alternative install location
+specify an alternative install location:
--prefix=${INSTALL_DIR}

-specify non defualt Avis install
+specify non default Avis install:
--avis-path=${AVIS_HOME}

-build unittests, specify google test location
+build unittests, specify google test location:
--gtest-path=${GTEST_HOME}

-build testtools
+build testtools:
--with-testtools


### Building reference guide ###

- If you wish to build the latest refernce guide use the following command
- after configure
+To build the latest reference guide, use the following command after Configure:

make docs

- This will build the docs in the mama/c_cpp/src/doc folder.
+This will build the docs in the mama/c_cpp/src/doc folder.


### Running Unit tests ###

- After the build is complete an extra binary can be found in the bin
- folder of the install.
+After the build is complete an extra binary can be found in the bin folder of
+the install.

MainUnitTestC

- This runs the full set of unit tests using the google test framework.
+This runs the full set of unit tests using the google test framework.

- The following commar line arguments are available as well as the
- normal google test options
+The following command line arguments are available, as well as the normal Google
+test options:

-m ${MIDDLEWARE}

@@ -229,34 +227,55 @@ build testtools

### Running regression tests ###

- The regression tests do full end to end testing using a specific set of test
- applications and a predetermined input output scenario.
+The regression tests do full end to end testing using a specific set of test
+applications and a predetermined input output scenario.

- In-order to run the regression scripts an elvin router must be available. If
- it is not running on the defaulkt port on localhost then the mama.properties
- file provided in examples should be used with the ${WOMBAT_PATH} variable to
- give the location of the router.
+In-order to run the regression scripts Avis should be running on the same
+machine with the elvin router listening on the default port on localhost. If it
+is not running on the default port on localhost, then the mama.properties file
+provided in examples should be used with the ${WOMBAT_PATH} variable to give the
+location of the router.

- To build the regression tests move into teh regression/tols folder. Modify
- the makefile with your install path if is non-default. The execute the following commnad
+NOTE: The publish/subscribe regression test is based on comparing the output
+file against an expected results file. The intial expected results file should
+be created by running the test with unmodified OpenMAMA code - steps listed
+below.

- make
+Setting up regression tests:
+1) Build required binaries:
+ - cd src/regression/c/tools
+ - Edit Makefile: Set API_HOME to the path of the build/root directory of built API
+
+2) Run 'make'.
+
+3) Set AVIS_PATH:
+ - export AVIS_PATH=/path_to_avis_client
+ eg. export AVIS_PATH=/usr/local/avis-client-1.2.4

- After the tests apps are sucessfully built move into the directory of the
- test you wish to run and execute the python file
+4) Set OPENMAMA_PATH:
+ - export OPENMAMA_PATH=/path_to_openmama_build_directory
+ eg. export OPENMAMA_PATH=/usr/local/openmama/build

- eg
- cd ../basicpubsub
- ./regression.sh
+5) Set PYTHON_PATH:
+ - export PYTHON_PATH=/path_to_python_binary
+ eg. export PYTHON_PATH=/usr/bin/python2.4

+6) Run the test script:
+ - cd src/regression/c/basicpubsub
+ - run regression.sh

- NOTE: python 2.3 or higher required for regression tests
+7) FOR THE FIRST RUN OF TESTS create the expectedsub_out file
+ - after step 6) create the expectedsub_out from the sub_out file
+ ie. mv sub_out expectedsub_out
+ - run step 6) again to run tests
+
+ NOTE: python 2.3 or higher required for regression tests.


Contributing
-------------

-
+see: www.openmama.org

License
--------
@@ -264,6 +283,3 @@ build testtools
The OpenMAMA library is distributed under the terms of the GNU
Lesser General Public license version 2. Please see COPYING
for full licence text.
-
-
-
--
1.7.5.4


Re: documentation for bridges

Daniel Cegiełka <daniel.cegielka@...>
 

thx Mike

Absolutely I'm interested to add such support for ZeroMQ. ZeroMQ gives the possibility to add support at the same level as RV, wmw or lbm - this means support for TCP, IPC and multicast.

The first step to think of such a bridge for ZeroMQ is good documentation. I also hope that such a ZeroMQ bridge would be part of MAMA (like Avis). So I'm waiting when the NYSE will provide more detailed documentation for the bridges.

Best regards,
Daniel Cegielka



W dniu 7 grudnia 2011 22:14 użytkownik Mike Schonberg <mschonberg@...> napisał:

Daniel,

We selected Avis because we already had a bridge implementation from a previous project, and it was much easier to provide the Avis bridge than to write a new one for a middleware with which we were not familiar. When we considered other open source bridges, ZeroMQ was at the top of our list.

I agree that ZeroMQ is a better choice in general and for market data specifically. It is my hope that the community will provide several open source alternatives to Avis including ZeroMQ. If you are interested in implementing a bridge, I will provide as much support as you require.

Regards,
-Mike

Michael Schonberg
OpenMAMA Maintainer
NYSE Technologies
mschonberg@...


> -----Original Message-----
> From: Daniel Cegiełka [mailto:daniel.cegielka@...]
> Sent: Wednesday, December 07, 2011 12:44 PM
> To: Mike Schonberg
> Cc: Openmama-dev@...
> Subject: Re: [Openmama-dev] documentation for bridges
> Thank you for your response. I think that bridge for ZeroMQ is worth to
> prepare.
>
> http://www.zeromq.org/
>
> I'm a little surprised that you have chosen Avis instead ZeroMQ. ZeroMQ
> from the beginning was designed as a messaging for market data:
>
> http://www.zeromq.org/whitepapers:market-analysis
>
> Best regards,
> Daniel
>
>
> 2011/12/7 Mike Schonberg <mschonberg@...>
>
>
>
>
>       > -----Original Message-----    > From:
> openmama-dev-bounces@... [mailto:openmama-     >
> dev-bounces@...] On Behalf Of Daniel Cegielka  > Sent:
> Wednesday, December 07, 2011 11:35 AM         > To:
> Openmama-dev@...       > Subject: [Openmama-dev] documentation
> for bridges   > Hi,   >       > Do you plan to make available any documentation
> on how to write new   > bridges for MAMA (and when one can expect such
> documentation)?       >       > Best regards,         > Daniel
>
>
>       Daniel,
>
>       We currently do not have documentation that addresses how to
> write new payload or messaging bridges for OpenMAMA as the bridge APIs
> were internal until now; however, we definitely intend to provide bridge API
> documentation in the near future.
>
>       In the meantime, I am more than happy to assist you in any way
> necessary through this mailing list. Your experiences will certainly prove
> valuable as we develop the documentation.
>
>       The Avis bridge, included as part of OpenMAMA, provides a simple
> example that might prove useful.
>
>       Regards,
>       -Mike
>
>       Michael Schonberg
>       OpenMAMA Maintainer
>       NYSE Technologies
>       mschonberg@...
>       Please consider the environment before printing this email.
>
>       Visit our website at http://www.nyse.com
>
>       ****************************************************
>
>       Note:  The information contained in this message and any attachment to
> it is privileged, confidential and protected from disclosure.  If the
> reader of this message is not the intended recipient, or an employee or
> agent responsible for delivering this message to the intended recipient,
> you are hereby notified that any dissemination, distribution or copying
> of this communication is strictly prohibited.  If you have received this
> communication in error, please notify the sender immediately by replying
> to the message, and please delete it from your system.  Thank you.  NYSE
> Euronext.
>
>
>
Please consider the environment before printing this email.

Visit our website at http://www.nyse.com

****************************************************

Note:  The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure.  If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system.  Thank you.  NYSE Euronext.



[Patch 1.1 1/1] Mama: Add support for Citihub permission server abstraction API

David Sewell <david.sewell@...>
 

This patch adds support for the Citihub permission server abstraction API which provides integration with multiple 3rd party entitlement systems (e.g. Thomson Reuters DACS, Bloomberg). This new feature will allow OpenMAMA API to integrate with existing permission systems, making the adoption of OpenMAMA easier and more attractive for large enterprises with existing market data systems and compliance control systems.

The change does not have any direct impact on the rest of the OpenMAMA API, all code changes are encompassed within the #ifdef WITH_CHUB_PERMSVR ... #endif pre-processor directives which is enabled with the build configuration option '--with-chub-permsvr=<path to libPermSvr>'. No existing APIs have been modified, deprecated or removed in this patch.

The inclusion of this new feature was discussed on the mailing lists here: http://lists.openmama.org/pipermail/openmama-dev/2011-December/000011.html.

Documentation for Citihub's Permission Server software can be downloaded from the following URLs:
Overview
http://server1.citihub.com/downloads/Citihub%20Permission%20Server%20Brochure%20v1.2.pdf
API Developers Guide
http://server1.citihub.com/downloads/libPermSvr_APIGuide_v17_3.pdf
Permission Server Admin Guide
http://server1.citihub.com/downloads/PermSvr_Installation_and_Admin_Guide_17_2.pdf

Instructions for testing Citihub Permission Server integration with OpenMAMA

1. Download Citihub libPermSvr library from the following URL (built on Ubuntu 11.10 32bit but should be portable and Citihub can provide binaries for most popular versions of Linux, Solaris and Windows)
http://server1.citihub.com/downloads/libPermSvr_12.0.17.7-beta-r205.linux.tar.gz

2. Download demo Citihub Permission Server from one of the following URLs (built on Ubuntu 11.10 32bit but should be portable and Citihub can provide binaries for most popular versions of Linux and Solaris)
- With file based permissions (used for testing only)
http://server1.citihub.com/downloads/PermSvr_12.0.17.4-beta-demo-fileonly-r278.linux.tar.gz

- With support for Thomason Reuters DACS (requires RFA and DACS software and licenses which are not included)
http://server1.citihub.com/downloads/PermSvr_12.0.17.4-beta-demo-withDACS-r278.linux.tar.gz

3. Uncompress the Permission Server software
tar xzvf PermSvr_12.0.17.4-beta-demo-fileonly-r278.linux.tar.gz
./PermSvr_12.0.17.4-beta-demo-fileonly-r278
:

4. Configure and start Permission Server
cd PermSvr_12.0.17.4-beta-demo-fileonly-r278
vi etc/perm_file.usr (optional configure test userid's and permissions)
./script/do_PermSvr start
tail -200 ./log/log_PermSvr.log
PermSvr Admin GUI - http://<hostname>:7141

5. Uncompress the libPermSvr software package
tar xzvf libPermSvr_12.0.17.7-beta-r205.linux.tar.gz
./libPermSvr_12.0.17.7-beta-r205
:

6. Build OpenMAMA with libPermSvr enabled
cd <root of OpenMama source code>
patch -p1 <patch file given below>
generateBuildFiles.sh
./configure --with-chub-permsvr=<path to libPermSvr software from step 5. above>
make
make install
7. Configure Permission Server host and port details in the mama.entitlement.servers parameter, see full list of libPermSvr configuration parameters below.

8. Run OpenMAMA test client, e.g.

cd /opt/openmama
./bin/mamasubscriberc -m avis
Starting Subscriber with:
topic: MAMA_TOPIC
transport: sub
2011-12-09 13:45:58:
********************************************************************************
Warning: This is a developer release and has only undergone basic sanity checks.
It is for testing only and should not be used in a production environment
**********************************************************************************
2011-12-09 13:45:58: openmama DEVRELEASE.. (1.2.4) (entitled libPermSvr)
2011-12-09 13:45:58: libPermSvr Build 17.7 r204 Dec 4 2011 12:40:31 (c) Citihub Ltd.
[2011-12-09 13:45:58.754779] libPermSvr Build 17.7 r204 Dec 4 2011 12:40:31 (c) Citihub Ltd.
[2011-12-09 13:45:58.755084] Logging enabled: stdout [level 2]
[2011-12-09 13:45:58.755262] [INFO] CHUB_GetLibAttr()
2011-12-09 13:45:58: Entitlement position ID : testuser
2011-12-09 13:45:58: Attempting to connect to entitlement server : testhost4:9990,testhost1:9990
[2011-12-09 13:45:58.756147] [INFO] CHUB_InitializeSingleUser( testhost4:9990,testhost1:9990, testuser )
[2011-12-09 13:45:58.756326] [INFO] CHUB_Initialize( testhost4:9990,testhost1:9990 )
[2011-12-09 13:45:58.756903] [INFO] CHUB_SetLibAttr()
[2011-12-09 13:45:58.757120] [INFO] CHUB_Connect()
[2011-12-09 13:45:58.758309] [WARNING] testhost4:9990 connected
[2011-12-09 13:45:58.758588] [INFO] SO_RCVBUF : Grow from 87552 to 262142
[2011-12-09 13:45:58.759924] [INFO] CBK CONNECT : testhost4:9990
[2011-12-09 13:45:58.760145] [INFO] CHUB_WaitOnConnect( 3 )
[2011-12-09 13:45:58.761579] [INFO] CHUB_WaitOnUserReady( testuser, 2 )
[2011-12-09 13:45:58.859171] [INFO] IOCTL : CPE=0; SFN=1
[2011-12-09 13:45:58.859640] [INFO] LOGIN : testuser; ID=158.760650-a8c085e9; PING=60
[2011-12-09 13:45:58.860141] [INFO] CBK LOGIN : testuser
[2011-12-09 13:45:58.863638] [INFO] GETALL : testuser ID=158.760650-a8c085e9; TTL=43200; STATE=READY
[2011-12-09 13:45:58.865290] [INFO] CBK GETALL testuser; nSBE=12; nCBE=3; STATE=READY
2011-12-09 13:45:58: Creating transport: [sub]
2011-12-09 13:45:58: Setting mama.entitlement.transport.sub.source=WOMBAT
2011-12-09 13:45:58: initializing Avis transport: sub
2011-12-09 13:45:58: sub: Using default preinitial strategy: ON_GAP
[2011-12-09 13:45:58.879395] [INFO] CHUB_IsPermissioned( testuser,WOMBAT,MAMA_TOPIC,0 ) = PERMIT
2011-12-09 13:45:58: setupBasic(): MAMA_TOPIC: subscription (0x8276018)
mamasubscriberc: Created inbound subscription.
mamasubscriberc: Recieved msg.
10002 10002 STRING MAMA_TOPIC
10 10 I32 290
2 2 I32 0

Citihub Permission Server configuration parameters in mama.properties:

mama.entitlement.servers = <host:port>,<host:port>
mama.entitlement.altposid = <userid>+<appid>+<ipaddr/net>:<entitlement_system>+<siteid> Override below parameters e.g. testuser+256+127.0.0.1/net:DACS+DACS
mama.entitlement.altuserid = <userid> defaults to runtime user name
mama.entitlement.appid = <num> application id known to permission system
mama.entitlement.effective_ip_address= <ip address> adress to use in position id
mama.entitlement.entitlement_system = <FILE|DACS> entitlement system used in position id
mama.entitlement.siteid = <string> site id or domain used in position id
mama.entitlement.transport.<name>.source = <string> source name for transport used by basic subscriber (TOPIC only subscription)
mama.entitlement.log.level = <0-6> 0-None,1-Error,2-API calls,3-XML,4-Debug,5-Pump,6-Mutex
mama.entitlement.log.filename = <filename or stdout/stderr>
mama.entitlement.log.size = <num K> max log file size in K before rolling
mama.entitlement.log.max_backup = <num> max number of rolled log files to retain>
mama.entitlement.cache_filename = <filename> file to store local PE cache
mama.entitlement.user_timeout = <seconds> timeout for login and getall
mama.entitlement.connect_timeout = <seconds> timeout for server connection
mama.entitlement.getpe_all = <true/false> enable ALL switch for getall
mama.entitlement.getpe_timeout = <seconds> timeout for getpe
mama.entitlement.auto_getall = <true/false> enable automatic getall
mama.entitlement.enable_ping = <true/false> enable ping
mama.entitlement.enable_events = <true/false> enable automatic event updates
mama.entitlement.enable_getpe = <true/false> enable getpe
mama.entitlement.failover_notify = <true/false> enable server failover notify

Signed-off-by: David Sewell david.sewell@...
---
diff --git a/mama/c_cpp/configure.ac b/mama/c_cpp/configure.ac
index 1bae611..daadc23 100644
--- a/mama/c_cpp/configure.ac
+++ b/mama/c_cpp/configure.ac
@@ -178,6 +178,44 @@ then
fi

##################################################
+# CHUB_PERMSVR: --with-chub-permsvr
+# Whether or not to link in libPermSvr
+##################################################
+AC_ARG_WITH(
+ chub_permsvr,
+ [AC_HELP_STRING([--with-chub-permsvr=DIR],
+ [Location of libPermSvr SRC in DIR])],
+ [
+ if test -d "$withval"; then
+ CHUB_HOME="$withval"
+ fi
+ ]
+ AC_CHECK_FILE(
+ [$CHUB_HOME/include/libPermSvr.h],
+ [
+ CPPFLAGS="$CPPFLAGS -DWITH_CHUB_PERMSVR -I$CHUB_HOME/include"
+ LDFLAGS="$LDFLAGS -L$WOMBATMSG_HOME/lib -L$CHUB_HOME/lib"
+ LIBS="$LIBS -lPermSvr"
+ with_chub_permsvr=true
+ ],
+ [
+ AC_MSG_FAILURE([Building with libPermSvr Failed.])
+ ])
+ )
+AC_SUBST(chub_permsvr_dir,[$CHUB_HOME])
+AM_CONDITIONAL(WITH_CHUB_PERMSVR, test x$with_chub_permsvr = "xtrue")
+
+if test x$with_chub_permsvr = xtrue
+then
+ AC_MSG_CHECKING(for Solaris)
+ case "$host" in
+ *-solaris*)
+ LIBS="$LIBS -lnsl -lsocket"
+ ;;
+ esac
+fi
+
+##################################################
# AVIS: --with-avis
# Whether or not to link in the Avis middleware
##################################################
diff --git a/mama/c_cpp/src/c/listenermsgcallback.c b/mama/c_cpp/src/c/listenermsgcallback.c
index 4ff9ea4..108031e 100644
--- a/mama/c_cpp/src/c/listenermsgcallback.c
+++ b/mama/c_cpp/src/c/listenermsgcallback.c
@@ -38,6 +38,9 @@
#ifdef WITH_ENTITLEMENTS
#include <OeaClient.h>
extern oeaClient * gEntitlementClient;
+#elif WITH_CHUB_PERMSVR
+#include <libPermSvr.h>
+extern int gEntitlementClient;
#endif /* WITH_ENTITLEMENTS */


@@ -84,6 +87,11 @@ listenerMsgCallback_create( listenerMsgCallback *result,
{
return MAMA_ENTITLE_NO_SERVERS_SPECIFIED;
}
+#elif WITH_CHUB_PERMSVR
+ if( gEntitlementClient == 0 )
+ {
+ return MAMA_ENTITLE_NO_SERVERS_SPECIFIED;
+ }
#endif /* WITH_ENTITLEMENTS */

if( callback == NULL )
@@ -549,6 +557,90 @@ checkEntitlement( msgCallback *callback, mamaMsg msg, SubjectContext* ctx )
}

return result;
+#elif WITH_CHUB_PERMSVR
+ int result = 0;
+ int32_t value;
+ int32_t count;
+ if( ctx->mEntitlementAlreadyVerified )
+ {
+ return 1;
+ }
+
+ if( MAMA_STATUS_OK == mamaMsg_getEntitleCode( msg,
+ &value ) )
+ {
+ if ((gMamaLogLevel >= MAMA_LOG_LEVEL_FINER) ||
+ (mamaSubscription_checkDebugLevel (self->mSubscription,
+ MAMA_LOG_LEVEL_FINER)))
+ {
+ mama_log (MAMA_LOG_LEVEL_FINER,
+ "Checking injected entitlement: %d\n", value);
+ }
+
+ if( value == 0 )
+ {
+ return 1;
+ }
+ const char* userSymbol = NULL;
+ const char* userSource = NULL;
+ void* closure = NULL;
+
+ mamaSubscription_getSymbol (self->mSubscription, &userSymbol);
+ mamaSubscription_getSource (self->mSubscription, &userSource);
+ mamaSubscription_getClosure (self->mSubscription, &closure);
+ ctx->mEntitleCode = value;
+ result = CHUB_IsPermissionedPE( gEntitlementClient,
+ (char *)0,
+ userSource,
+ userSymbol,
+ &ctx->mEntitleCode,
+ &count);
+ printf ("svc=%s, ric=%s, pe=%d %s\n", userSource,
+ userSymbol,
+ ctx->mEntitleCode,
+ CHUB_GetPermCodeStr(result));
+ if ((gMamaLogLevel >= MAMA_LOG_LEVEL_FINER) ||
+ (mamaSubscription_checkDebugLevel (self->mSubscription,
+ MAMA_LOG_LEVEL_FINER)))
+ {
+ mama_log (MAMA_LOG_LEVEL_FINER,
+ "Entitlement: source=%s, symbol=%s, code=%d, count=%d, permission=%s\n",
+ userSource,
+ userSymbol,
+ ctx->mEntitleCode,
+ CHUB_GetPermCodeStr(result)
+ );
+ }
+ if (!result)
+ {
+
+ mamaMsgCallbacks *cbs =
+ mamaSubscription_getUserCallbacks (self->mSubscription);
+
+ mama_setLastError (MAMA_ERROR_NOT_ENTITLED);
+
+ mamaSubscription_deactivate (self->mSubscription);
+
+ cbs->onError (self->mSubscription,
+ MAMA_STATUS_NOT_ENTITLED,
+ NULL,
+ userSymbol,
+ closure);
+ }
+ }
+ else
+ {
+ /* This is only temporary until the entitle code is sent with
+ * every message. */
+ return 1;
+ }
+
+ if( result )
+ {
+ ctx->mEntitlementAlreadyVerified = 1;
+ }
+
+ return result;
#else
return 1;
#endif /* WITH_ENTITLEMENTS */
diff --git a/mama/c_cpp/src/c/mama.c b/mama/c_cpp/src/c/mama.c
index ee0d6a0..59c2233 100644
--- a/mama/c_cpp/src/c/mama.c
+++ b/mama/c_cpp/src/c/mama.c
@@ -104,6 +104,16 @@ static const char* gServerProperty = NULL;
static const char* gServers[MAX_ENTITLEMENT_SERVERS];
static mama_status enableEntitlements (const char **servers);
static const char* gEntitled = "entitled";
+#elif WITH_CHUB_PERMSVR
+#include <libPermSvr.h>
+#define SERVERS_PROPERTY "entitlement.servers"
+#define MAX_ENTITLEMENT_SERVERS 32
+#define MAX_USER_NAME_STR_LEN 64
+#define MAX_HOST_NAME_STR_LEN 64
+CHUBLibAttr *gCHUBLibAttr = (CHUBLibAttr *)0;
+int gEntitlementClient = 0;
+static mama_status enableEntitlements (const char *servers);
+static const char* gEntitled = "entitled libPermSvr";
#else
static const char* gEntitled = "not entitled";
#endif /*WITH_ENTITLEMENTS */
@@ -858,13 +868,7 @@ mama_openWithProperties (const char* path,
return MAMA_STATUS_NO_BRIDGE_IMPL;
}

-#ifndef WITH_ENTITLEMENTS
- mama_log (MAMA_LOG_LEVEL_WARN,
- "\n********************************************************************************\n"
- "Note: This build of the MAMA API is not enforcing entitlement checks.\n"
- "Please see the Licensing file for details\n"
- "**********************************************************************************");
-#else
+#ifdef WITH_ENTITLEMENTS
result = enableEntitlements (NULL);
if (result != MAMA_STATUS_OK)
{
@@ -874,6 +878,22 @@ mama_openWithProperties (const char* path,
mama_close();
return result;
}
+#elif WITH_CHUB_PERMSVR
+ result = enableEntitlements (NULL);
+ if (result != MAMA_STATUS_OK)
+ {
+ mama_log (MAMA_LOG_LEVEL_SEVERE,
+ "mama_openWithProperties(): "
+ "Error connecting to Entitlements Server");
+ mama_close();
+ return result;
+ }
+#else
+ mama_log (MAMA_LOG_LEVEL_WARN,
+ "\n********************************************************************************\n"
+ "Note: This build of the MAMA API is not enforcing entitlement checks.\n"
+ "Please see the Licensing file for details\n"
+ "**********************************************************************************");
#endif /* WITH_ENTITLEMENTS */

if (strtobool(statsLogging))
@@ -1058,6 +1078,12 @@ mama_close ()
oeaClient_destroy( gEntitlementClient );
gEntitlementClient = 0;
}
+#elif WITH_CHUB_PERMSVR
+ if( gEntitlementClient != 0 )
+ {
+ CHUB_Destroy( gEntitlementClient );
+ gEntitlementClient = 0;
+ }
#endif /* WITH_ENTITLEMENTS */

pthread_key_delete(last_err_key);
@@ -1668,6 +1694,201 @@ enableEntitlements (const char **servers)

return MAMA_STATUS_OK;
}
+#elif WITH_CHUB_PERMSVR
+static mama_status
+enableEntitlements (const char *servers)
+{
+ char buf[K];
+ int32_t iDbg = 0;
+ int32_t iSize = K;
+ int32_t iMaxBkup = 3;
+ const char* pDbg = NULL;
+ const char* userID = (const char *)0;
+ char* posID = buf;
+ const char* ipAddr = (const char *)0;
+ const char* appID = (const char *)0;
+ const char* pServers = servers;
+ const char* pPropertyValue = (const char *)0;
+
+
+ if (gEntitlementClient != 0)
+ {
+ CHUB_Destroy(gEntitlementClient);
+ gEntitlementClient = 0;
+ }
+
+ mama_getUserName (&userID);
+ lookupIPAddress();
+
+ pPropertyValue = properties_Get (gProperties, "mama.entitlement.servers");
+ if ( pPropertyValue && strlen(pPropertyValue)>0 )
+ {
+ pServers = strdup ( pPropertyValue );
+ }
+ pPropertyValue = properties_Get (gProperties, "mama.entitlement.altposid");
+ if ( pPropertyValue && strlen(pPropertyValue)>0 )
+ {
+ posID += sprintf( posID, "%s", pPropertyValue );
+ }
+ else
+ {
+ pPropertyValue = properties_Get (gProperties, "mama.entitlement.altuserid");
+ if ( pPropertyValue && strlen(pPropertyValue)>0 )
+ {
+ userID = strdup ( pPropertyValue );
+ }
+ pPropertyValue = properties_Get (gProperties, "mama.entitlement.appid" );
+ if ( pPropertyValue && strlen(pPropertyValue)>0 )
+ {
+ appID = strdup ( pPropertyValue );
+ }
+ pPropertyValue = properties_Get (gProperties, "mama.entitlement.effective_ip_address");
+ if ( pPropertyValue && strlen(pPropertyValue)>0 )
+ {
+ ipAddr = strdup ( pPropertyValue );
+ }
+ else
+ {
+ ipAddr = gIPAddress;
+ }
+ if ( userID )
+ {
+ posID += sprintf( posID, "%s", userID );
+ if ( appID )
+ {
+ posID += sprintf( posID, "+%s", appID );
+ if ( ipAddr )
+ {
+ posID += sprintf( posID, "+%s/net", ipAddr );
+ }
+ else
+ {
+ posID += sprintf( posID, "+127.0.0.1/net" );
+ }
+ }
+ }
+ }
+ pPropertyValue = properties_Get (gProperties, "mama.entitlement.entitlement_system");
+ if ( pPropertyValue && strlen(pPropertyValue)>0 )
+ {
+ posID += sprintf ( posID, ":%s", pPropertyValue );
+ }
+ pPropertyValue = properties_Get (gProperties, "mama.entitlement.siteid");
+ if ( pPropertyValue && strlen(pPropertyValue)>0 )
+ {
+ posID += sprintf ( posID, "+%s", pPropertyValue );
+ }
+ posID = strdup ( buf );
+ pPropertyValue = properties_Get (gProperties, "mama.entitlement.log.level" );
+ if( pPropertyValue && strlen(pPropertyValue)>0 )
+ {
+ iDbg = atoi ( pPropertyValue );
+ }
+ pPropertyValue = properties_Get (gProperties, "mama.entitlement.log.filename" );
+ if( pPropertyValue )
+ {
+ pDbg = strdup ( pPropertyValue );
+ }
+ pPropertyValue = properties_Get (gProperties, "mama.entitlement.log.size" );
+ if( pPropertyValue && strlen(pPropertyValue)>0 ) {
+ iSize = atoi ( pPropertyValue );
+ }
+ pPropertyValue = properties_Get (gProperties, "mama.entitlement.log.max_backup" );
+ if( pPropertyValue && isdigit( pPropertyValue ) )
+ {
+ iMaxBkup = atoi ( pPropertyValue );
+ }
+
+ mama_log (MAMA_LOG_LEVEL_NORMAL,
+ "%s", CHUB_Version());
+
+ if ( iDbg ) {
+ CHUB_RollingLog( (const char*)pDbg, iDbg, iSize*K, iMaxBkup );
+ sprintf( buf, "%s\n", CHUB_Version());
+ CHUB_Logger( 0, buf );
+ sprintf( buf, "Logging enabled: %s [level %d]\n", pDbg, iDbg );
+ CHUB_Logger( 0, buf );
+ }
+
+ gCHUBLibAttr = (CHUBLibAttr *)calloc( 1, sizeof( CHUBLibAttr ) );
+ CHUB_GetLibAttr( 0, gCHUBLibAttr );
+
+ if ( !gCHUBLibAttr )
+ {
+ return MAMA_STATUS_SYSTEM_ERROR;
+ }
+
+ pPropertyValue = properties_Get (gProperties, "mama.entitlement.cache_filename" );
+ if( pPropertyValue && strlen(pPropertyValue)>0 )
+ {
+ gCHUBLibAttr->_pCBEFile = strdup ( pPropertyValue );
+ }
+ pPropertyValue = properties_Get (gProperties, "mama.entitlement.user_timeout" );
+ if( pPropertyValue && strlen(pPropertyValue)>0 )
+ {
+ gCHUBLibAttr->_nUserTout = strtod ( pPropertyValue, NULL );
+ }
+ pPropertyValue = properties_Get (gProperties, "mama.entitlement.connect_timeout" );
+ if( pPropertyValue && strlen(pPropertyValue)>0 )
+ {
+ gCHUBLibAttr->_nConnectTout = atoi ( pPropertyValue );
+ }
+ pPropertyValue = properties_Get (gProperties, "mama.entitlement.getpe_all" );
+ if( pPropertyValue && strlen(pPropertyValue)>0 )
+ {
+ gCHUBLibAttr->_bGetPEAll = properties_GetPropertyValueAsBoolean( pPropertyValue );
+ }
+ pPropertyValue = properties_Get (gProperties, "mama.entitlement.getpe_timeout" );
+ if( pPropertyValue && strlen(pPropertyValue)>0 )
+ {
+ gCHUBLibAttr->_nGetPETout = atoi ( pPropertyValue );
+ }
+ pPropertyValue = properties_Get (gProperties, "mama.entitlement.auto_getall" );
+ if( pPropertyValue && strlen(pPropertyValue)>0 )
+ {
+ gCHUBLibAttr->_bAutoGetAll = properties_GetPropertyValueAsBoolean( pPropertyValue );
+ }
+ pPropertyValue = properties_Get (gProperties, "mama.entitlement.enable_ping" );
+ if( pPropertyValue && strlen(pPropertyValue)>0 )
+ {
+ gCHUBLibAttr->_bChannelPing = properties_GetPropertyValueAsBoolean( pPropertyValue );
+ }
+ pPropertyValue = properties_Get (gProperties, "mama.entitlement.enable_events" );
+ if( pPropertyValue && strlen(pPropertyValue)>0 )
+ {
+ gCHUBLibAttr->_bChannelEvent = properties_GetPropertyValueAsBoolean( pPropertyValue );
+ }
+ pPropertyValue = properties_Get (gProperties, "mama.entitlement.enable_getpe" );
+ if( pPropertyValue && strlen(pPropertyValue)>0 )
+ {
+ gCHUBLibAttr->_bChannelGetPE = properties_GetPropertyValueAsBoolean( pPropertyValue );
+ }
+ pPropertyValue = properties_Get (gProperties, "mama.entitlement.failover_notify" );
+ if( pPropertyValue && strlen(pPropertyValue)>0 )
+ {
+ gCHUBLibAttr->_bSFN = properties_GetPropertyValueAsBoolean( pPropertyValue );
+ }
+
+ mama_log (MAMA_LOG_LEVEL_NORMAL,
+ "Entitlement position ID : %s", posID );
+ mama_log (MAMA_LOG_LEVEL_NORMAL,
+ "Attempting to connect to entitlement server : %s",
+ pServers );
+
+ if ( !pServers || !strlen( pServers ) )
+ {
+ return MAMA_ENTITLE_NO_SERVERS_SPECIFIED;
+ }
+
+ gEntitlementClient = CHUB_InitializeSingleUser( pServers, posID, gCHUBLibAttr );
+
+ if (!gEntitlementClient)
+ {
+ return MAMA_ENTITLE_SERVER_NOT_FOUND;
+ }
+
+ return MAMA_STATUS_OK;
+}

#endif

diff --git a/mama/c_cpp/src/c/mama/mama.h b/mama/c_cpp/src/c/mama/mama.h
index 658bce6..65bfd49 100644
--- a/mama/c_cpp/src/c/mama/mama.h
+++ b/mama/c_cpp/src/c/mama/mama.h
@@ -67,6 +67,8 @@ extern "C"
#define MAMA_MAX_SYMBOL_LEN 128
#define MAMA_MAX_SOURCE_LEN 64
#define MAMA_MAX_TRANSPORT_LEN 64
+#define K 1024
+

/**
* \mainpage Middleware Agnostic Messaging API (MAMA) C API
diff --git a/mama/c_cpp/src/c/mama/status.h b/mama/c_cpp/src/c/mama/status.h
index bccb7e0..2ad75b7 100644
--- a/mama/c_cpp/src/c/mama/status.h
+++ b/mama/c_cpp/src/c/mama/status.h
@@ -27,6 +27,8 @@

#ifdef WITH_ENTITLEMENTS
#include <OeaStatus.h>
+#elif WITH_CHUB_PERMSVR
+#include <libPermSvr.h>
#endif


@@ -163,6 +165,9 @@ typedef enum
MAMA_ENTITLE_NO_USER = MAMA_ENTITLE_HTTP_OVERLOAD + 1, /* 9029 */
MAMA_ENTITLE_NO_SERVERS_SPECIFIED = MAMA_ENTITLE_NO_USER + 1, /* 9030 */
MAMA_ENTITLE_SITE_NOT_FOUND = MAMA_STATUS_BASE + OEA_STATUS_SITE_NOT_FOUND /* 9032 */
+#elif WITH_CHUB_PERMSVR
+ ,MAMA_ENTITLE_NO_SERVERS_SPECIFIED = MAMA_STATUS_BASE + 1, /* 9006 */
+ MAMA_ENTITLE_SERVER_NOT_FOUND = MAMA_ENTITLE_NO_SERVERS_SPECIFIED + 1 /* 9008 */
#endif
} mama_status;

diff --git a/mama/c_cpp/src/c/publisher.c b/mama/c_cpp/src/c/publisher.c
index 500465e..91683b2 100644
--- a/mama/c_cpp/src/c/publisher.c
+++ b/mama/c_cpp/src/c/publisher.c
@@ -21,6 +21,7 @@

#include "mama/mama.h"
#include "mama/publisher.h"
+#include "mama/types.h"

#include "bridge.h"
#include "throttle.h"
@@ -31,6 +32,13 @@

#include "list.h"

+#ifdef WITH_CHUB_PERMSVR
+
+#include <libPermSvr.h>
+extern int gEntitlementClient;
+
+#endif /* WITH_CHUB_PERMSVR */
+
/*Main mamaPublisher structure for the API*/
typedef struct mamaPublisherImpl_
{
@@ -57,6 +65,38 @@ struct publisherClosure
void* mSendCompleteClosure;
};

+/* *************************************************** */
+/* Internal Functions. */
+/* *************************************************** */
+#ifdef WITH_CHUB_PERMSVR
+static int
+isEntitledToPublish (const char *source, const char*symbol)
+{
+ int result = 0;
+ int count = 0;
+#define MAX_PUBLISH_SOURCE_SIZE 261 /* 256 + 5 */
+ char tsource[MAX_PUBLISH_SOURCE_SIZE];
+ if ( NULL!=source)
+ {
+ snprintf( tsource, MAX_PUBLISH_SOURCE_SIZE, "_pub.%s", source );
+ }
+
+ if (gEntitlementClient == 0) /* Not enforcing entitlements. */
+ {
+ return 1;
+ }
+
+ result = CHUB_IsPermissionedPE( gEntitlementClient,
+ (char *)0,
+ tsource,
+ symbol,
+ 0,
+ 0 );
+
+ return result;
+}
+#endif /* WITH_ENTITLEMENTS */
+
static mama_status
_createByIndex (mamaPublisher* result,
mamaTransport tport,
@@ -91,6 +131,23 @@ _createByIndex (mamaPublisher* result,
source ? source : "",
symbol ? symbol : "");

+#ifdef WITH_CHUB_PERMSVR
+ const char *tsource;
+ if ( NULL!=source)
+ {
+ tsource = source;
+ }
+ else
+ {
+ mamaTransport_getDefSource(tport, &tsource);
+ }
+ /*Up from entitlement check based on string compare on symbol*/
+ if (!isEntitledToPublish (tsource, symbol))
+ {
+ return MAMA_STATUS_NOT_ENTITLED;
+ }
+#endif
+
/*Get the bridge impl from the transport - mandatory*/
bridgeImpl = mamaTransportImpl_getBridgeImpl (tport);
if (!bridgeImpl) return MAMA_STATUS_NO_BRIDGE_IMPL;
diff --git a/mama/c_cpp/src/c/status.c b/mama/c_cpp/src/c/status.c
index 1c394e3..b3aea59 100644
--- a/mama/c_cpp/src/c/status.c
+++ b/mama/c_cpp/src/c/status.c
@@ -113,6 +113,9 @@ mamaStatus_stringForStatus (mama_status status)
case MAMA_ENTITLE_NO_USER : return "ENTITLE_NO_USER";
case MAMA_ENTITLE_NO_SERVERS_SPECIFIED : return "ENTITLE_NO_SERVERS_SPECIFIED";
case MAMA_ENTITLE_SITE_NOT_FOUND : return "ENTITLE_SITE_NOT_FOUND";
+#elif WITH_CHUB_PERMSVR
+ case MAMA_ENTITLE_NO_SERVERS_SPECIFIED : return "MAMA_ENTITLE_NO_SERVERS_SPECIFIED";
+ case MAMA_ENTITLE_SERVER_NOT_FOUND : return "MAMA_ENTITLE_SERVER_NOT_FOUND";
#endif
}
return "unknown";
diff --git a/mama/c_cpp/src/c/subscription.c b/mama/c_cpp/src/c/subscription.c
index d6d0c00..8eaa248 100644
--- a/mama/c_cpp/src/c/subscription.c
+++ b/mama/c_cpp/src/c/subscription.c
@@ -52,6 +52,11 @@
#include <OeaSubscription.h>
extern oeaClient * gEntitlementClient;

+#elif WITH_CHUB_PERMSVR
+
+#include <libPermSvr.h>
+extern int gEntitlementClient;
+
#endif /* WITH_ENTITLEMENTS */

/* *************************************************** */
@@ -525,6 +530,24 @@ isEntitledToSymbol (const char *source, const char*symbol, mamaSubscription subs
result = oeaSubscription_isAllowed (impl->mSubjectContext.mOeaSubscription);

return result;
+#elif WITH_CHUB_PERMSVR
+ int result = 0;
+ int count = 0;
+ mamaSubscriptionImpl *impl = (mamaSubscriptionImpl *)subscription;
+
+ if (gEntitlementClient == 0) /* Not enforcing entitlements. */
+ {
+ return 1;
+ }
+
+ result = CHUB_IsPermissionedPE( gEntitlementClient,
+ (char *)0,
+ source,
+ symbol,
+ &impl->mSubjectContext.mEntitleCode,
+ &count );
+
+ return result;
#else
return 1;
#endif /* WITH_ENTITLEMENTS */
@@ -951,6 +974,8 @@ mama_status mamaSubscription_processMsg(mamaSubscription subscription, mamaMsg m

#ifdef WITH_ENTITLEMENTS
mamaMsg_getEntitleCode (message, &entitleCode);
+#elif WITH_CHUB_PERMSVR
+ mamaMsg_getEntitleCode (message, &entitleCode);
#endif
if (entitleCode == 0)
{
@@ -993,6 +1018,8 @@ mama_status mamaSubscription_processTportMsg(mamaSubscription subscription, mama

#ifdef WITH_ENTITLEMENTS
mamaMsg_getEntitleCode (msg, &entitleCode);
+#elif WITH_CHUB_PERMSVR
+ mamaMsg_getEntitleCode (msg, &entitleCode);
#endif
if (entitleCode == 0)
{
@@ -1038,6 +1065,8 @@ mama_status mamaSubscription_processWildCardMsg(mamaSubscription subscription, m

#ifdef WITH_ENTITLEMENTS
mamaMsg_getEntitleCode (msg, &entitleCode);
+#elif WITH_CHUB_PERMSVR
+ mamaMsg_getEntitleCode (msg, &entitleCode);
#endif
if (entitleCode == 0)
{
@@ -2656,6 +2685,17 @@ mama_status mamaSubscription_createBasic(mamaSubscription subscription, mamaTran

else
{
+#ifdef WITH_CHUB_PERMSVR
+ /* Get entitlements source from transport */
+ const char *tsource;
+ mamaTransport_getDefSource(transport, &tsource);
+ /*Up from entitlement check based on string compare on symbol*/
+ if (!isEntitledToSymbol (tsource, topic, impl))
+ {
+ setSubscInfo (impl, transport, NULL, tsource, topic);
+ return MAMA_STATUS_NOT_ENTITLED;
+ }
+#endif
/* Initialise the impl. */
impl->mClosure = closure;
impl->mQueue = queue;
diff --git a/mama/c_cpp/src/c/subscriptionimpl.h b/mama/c_cpp/src/c/subscriptionimpl.h
index eaad852..63cd6b7 100644
--- a/mama/c_cpp/src/c/subscriptionimpl.h
+++ b/mama/c_cpp/src/c/subscriptionimpl.h
@@ -93,6 +93,10 @@ typedef struct SubjectContext_
int32_t mEntitleCode;
uint8_t mEntitlementAlreadyVerified;
oeaSubscription* mOeaSubscription;
+#elif WITH_CHUB_PERMSVR
+ EntitleStatus mEntitlement; /* default to NOT_DETERMINED! */
+ int32_t mEntitleCode;
+ uint8_t mEntitlementAlreadyVerified;
#endif
/* The data quality context includes a recap request. */
mamaDqContext mDqContext;
diff --git a/mama/c_cpp/src/c/transport.c b/mama/c_cpp/src/c/transport.c
index de92a56..fe18ee2 100644
--- a/mama/c_cpp/src/c/transport.c
+++ b/mama/c_cpp/src/c/transport.c
@@ -116,6 +116,9 @@ typedef struct transportImpl_

refreshTransport mRefreshTransport;
char mName[MAX_TPORT_NAME_LEN];
+#ifdef WITH_CHUB_PERMSVR
+ char mDefSource[MAX_TPORT_NAME_LEN];
+#endif
mamaCmResponder mCmResponder;
char* mDescription;

@@ -526,6 +529,28 @@ mamaTransport_create (mamaTransport transport,

mama_log (MAMA_LOG_LEVEL_FINE, "Creating transport: [%s]",
name ? name : "");
+#ifdef WITH_CHUB_PERMSVR
+ const char* propValue = NULL;
+ char propNameBuf[MAX_TPORT_NAME_LEN];
+
+ snprintf (propNameBuf, MAX_TPORT_NAME_LEN, "mama.entitlement.transport.%s.source", self->mName);
+
+ propValue = properties_Get (mamaInternal_getProperties (),
+ propNameBuf);
+
+ if (NULL!=propValue)
+ {
+ mama_log (MAMA_LOG_LEVEL_NORMAL, "Setting %s=%s",
+ propNameBuf, propValue);
+ snprintf (self->mDefSource, MAX_TPORT_NAME_LEN, "%s", propValue);
+ self->mDefSource[MAX_TPORT_NAME_LEN-1] = '\0';
+ }
+ else
+ {
+ snprintf (self->mDefSource, MAX_TPORT_NAME_LEN, "%s", self->mName);
+ self->mDefSource[MAX_TPORT_NAME_LEN-1] = '\0';
+ }
+#endif

if (MAMA_STATUS_OK!=(status=mama_getDefaultEventQueue (
(mamaBridge)(self->mBridgeImpl), &defaultQueue)))
@@ -1236,6 +1261,28 @@ mamaTransport_setName (mamaTransport transport,
{
mamaStatsCollector_setName (*self->mStatsCollector, self->mName);
}
+#ifdef WITH_CHUB_PERMSVR
+ const char* propValue = NULL;
+ char propNameBuf[MAX_TPORT_NAME_LEN];
+
+ snprintf (propNameBuf, MAX_TPORT_NAME_LEN, "mama.entitlement.transport.%s.source", self->mName);
+
+ propValue = properties_Get (mamaInternal_getProperties (),
+ propNameBuf);
+
+ if (NULL!=propValue)
+ {
+ mama_log (MAMA_LOG_LEVEL_NORMAL, "Setting %s=%s",
+ propNameBuf, propValue);
+ snprintf (self->mDefSource, MAX_TPORT_NAME_LEN, "%s", propValue);
+ self->mDefSource[MAX_TPORT_NAME_LEN-1] = '\0';
+ }
+ else
+ {
+ snprintf (self->mDefSource, MAX_TPORT_NAME_LEN, "%s", self->mName);
+ self->mDefSource[MAX_TPORT_NAME_LEN-1] = '\0';
+ }
+#endif

return MAMA_STATUS_OK;
}
@@ -1253,6 +1300,21 @@ mamaTransport_getName (mamaTransport transport,
return MAMA_STATUS_OK;
}

+#ifdef WITH_CHUB_PERMSVR
+mama_status
+mamaTransport_getDefSource (mamaTransport transport,
+ const char** result)
+{
+ if (!self)
+ {
+ *result = NULL;
+ return MAMA_STATUS_NULL_ARG;
+ }
+ *result = self->mDefSource;
+ return MAMA_STATUS_OK;
+}
+#endif
+
const char *
mamaTransport_getMiddleware (mamaTransport transport)
{

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Citihub. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error.