Notification for new subscriptions


Mathias Kim
 

Hi,

 

Currently, I am trying to set up a publisher for market data with OpenMAMA in C#.

I wonder if there is a way to receive a notifcation every time my publisher accepts a new subscription from a subscriber? Is there an event thrown that I can handle?

 

Also, I still don't completely understand the difference between a basic publisher and an advanced publisher. In the development guide, the latter is only mentioned but never described in detail (e.g. how to use it).

 

Best regards

 

Mathias


Paul Bradbury
 

From what I recall there, are no .net wrappers for the DQPublisher as yet (although somewhat unfairly there are in the Java codebase!). For me as a greenfield application, it was simpler to write in C++, but I think adding those wrappers wasn’t too big a deal as they were really just wrappers along the lines of the existing code for the normal publisher.

 

Paul.

 

From: openmama-dev-bounces@... [mailto:openmama-dev-bounces@...] On Behalf Of Kim Mathias
Sent: 26 January 2015 16:03
To: openmama-dev@...
Subject: [Openmama-dev] Notification for new subscriptions

 

Hi,

 

Currently, I am trying to set up a publisher for market data with OpenMAMA in C#.

I wonder if there is a way to receive a notifcation every time my publisher accepts a new subscription from a subscriber? Is there an event thrown that I can handle?

 

Also, I still don't completely understand the difference between a basic publisher and an advanced publisher. In the development guide, the latter is only mentioned but never described in detail (e.g. how to use it).

 

Best regards

 

Mathias


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.5645 / Virus Database: 4273/9002 - Release Date: 01/26/15


Mathias Kim
 

Hi all,

 

we put some effort into this and came up with an implementation of the dqpublisher, but the code fails when the onCreate callback is called. When we try to convert the closure pointer to an handle we get a FatalExecutionEngineError (error code 0xc0000005).

Since we have limited experience with wrapping c code for .net, we just did it in the way you did for the BasicSubscriber. As we get a callback from the c class, we think we’re on the right path. Nonetheless, the values we get back (closure) seems to point to the wrong place in the memory.

 

        private static void onCreate(IntPtr NativeHandle, IntPtr closure)

        {

            GCHandle handle = GCHandle.FromIntPtr(closure); //code fails in this line

            MamaDQPublishManagerImpl impl = (MamaDQPublishManagerImpl)handle.Target;

            impl.InvokeCreate();

 

        }

 

 

Therefore we ask ourselves:

-          Are we doing it right?

-          Is there something like a manual on how to wrap c classes for .net

-          Sometimes a *impl class is used, sometime the MamaCallbackWrapper class. Where is the difference and when do you use which?

 

If needed, our code can be provided.

 

Best regards

 

Mathias

 

From: openmama-dev-bounces@... [mailto:openmama-dev-bounces@...] On Behalf Of Glenn McClements
Sent: Dienstag, 27. Januar 2015 18:22
To: Paul Bradbury; openmama-dev@...
Subject: Re: [Openmama-dev] Notification for new subscriptions Mathias

 

Hi Mathias, 

 

As Paul pointed out, what you would really want is DQPublisher for C#, but unfortunately there isn’t one at the moment. The reason for this is that that previously there hasn’t been a real demand as most C# applications have been on the client subscribing side, not the publishing side.

 

It sounds like there are a least a few people now looking for one so I’d be interested in finding out if there are others out there looking the same and if anyone if willing to contribute code in this are? 

 

Also to clarify:

The MamaPublisher  “basic" publishing ie. without sequence numbers, initial images/recaps etc or any other market data/data quality type features. The equivalent class on the subscribing side is MamaBasicSubscription.

 

The MamaDQPublisher and associated classes have sequence number injection, callbacks when a client subscription is made etc. The equivalent class on the subscribing side is MamaSubscription.

 

Cheers,

Glenn 

 

From: Paul Bradbury <paul.bradbury@...>
Date: Monday, 26 January 2015 16:20
To: "openmama-dev@..." <openmama-dev@...>
Subject: Re: [Openmama-dev] Notification for new subscriptions

 

From what I recall there, are no .net wrappers for the DQPublisher as yet (although somewhat unfairly there are in the Java codebase!). For me as a greenfield application, it was simpler to write in C++, but I think adding those wrappers wasn’t too big a deal as they were really just wrappers along the lines of the existing code for the normal publisher.

 

Paul.

 

From: openmama-dev-bounces@... [mailto:openmama-dev-bounces@...] On Behalf Of Kim Mathias
Sent: 26 January 2015 16:03
To: openmama-dev@...
Subject: [Openmama-dev] Notification for new subscriptions

 

Hi,

 

Currently, I am trying to set up a publisher for market data with OpenMAMA in C#.

I wonder if there is a way to receive a notifcation every time my publisher accepts a new subscription from a subscriber? Is there an event thrown that I can handle?

 

Also, I still don't completely understand the difference between a basic publisher and an advanced publisher. In the development guide, the latter is only mentioned but never described in detail (e.g. how to use it).

 

Best regards

 

Mathias


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.5645 / Virus Database: 4273/9002 - Release Date: 01/26/15


Mathias Kim
 

Hi again,

 

I made a mistake in my previous mail. We tried to implement the dqpublishermanager, not the dqpublisher.

 

Best regards

 

Mathias

 

From: openmama-dev-bounces@... [mailto:openmama-dev-bounces@...] On Behalf Of Mathias Kim
Sent: Donnerstag, 19. Februar 2015 13:46
To: openmama-dev@...
Subject: Re: [Openmama-dev] Notification for new subscriptions

 

Hi all,

 

we put some effort into this and came up with an implementation of the dqpublisher, but the code fails when the onCreate callback is called. When we try to convert the closure pointer to an handle we get a FatalExecutionEngineError (error code 0xc0000005).

Since we have limited experience with wrapping c code for .net, we just did it in the way you did for the BasicSubscriber. As we get a callback from the c class, we think we’re on the right path. Nonetheless, the values we get back (closure) seems to point to the wrong place in the memory.

 

        private static void onCreate(IntPtr NativeHandle, IntPtr closure)

        {

            GCHandle handle = GCHandle.FromIntPtr(closure); //code fails in this line

            MamaDQPublishManagerImpl impl = (MamaDQPublishManagerImpl)handle.Target;

            impl.InvokeCreate();

 

        }

 

 

Therefore we ask ourselves:

-          Are we doing it right?

-          Is there something like a manual on how to wrap c classes for .net

-          Sometimes a *impl class is used, sometime the MamaCallbackWrapper class. Where is the difference and when do you use which?

 

If needed, our code can be provided.

 

Best regards

 

Mathias

 

From: openmama-dev-bounces@... [mailto:openmama-dev-bounces@...] On Behalf Of Glenn McClements
Sent: Dienstag, 27. Januar 2015 18:22
To: Paul Bradbury; openmama-dev@...
Subject: Re: [Openmama-dev] Notification for new subscriptions Mathias

 

Hi Mathias, 

 

As Paul pointed out, what you would really want is DQPublisher for C#, but unfortunately there isn’t one at the moment. The reason for this is that that previously there hasn’t been a real demand as most C# applications have been on the client subscribing side, not the publishing side.

 

It sounds like there are a least a few people now looking for one so I’d be interested in finding out if there are others out there looking the same and if anyone if willing to contribute code in this are? 

 

Also to clarify:

The MamaPublisher  “basic" publishing ie. without sequence numbers, initial images/recaps etc or any other market data/data quality type features. The equivalent class on the subscribing side is MamaBasicSubscription.

 

The MamaDQPublisher and associated classes have sequence number injection, callbacks when a client subscription is made etc. The equivalent class on the subscribing side is MamaSubscription.

 

Cheers,

Glenn 

 

From: Paul Bradbury <paul.bradbury@...>
Date: Monday, 26 January 2015 16:20
To: "openmama-dev@..." <openmama-dev@...>
Subject: Re: [Openmama-dev] Notification for new subscriptions

 

From what I recall there, are no .net wrappers for the DQPublisher as yet (although somewhat unfairly there are in the Java codebase!). For me as a greenfield application, it was simpler to write in C++, but I think adding those wrappers wasn’t too big a deal as they were really just wrappers along the lines of the existing code for the normal publisher.

 

Paul.

 

From: openmama-dev-bounces@... [mailto:openmama-dev-bounces@...] On Behalf Of Kim Mathias
Sent: 26 January 2015 16:03
To: openmama-dev@...
Subject: [Openmama-dev] Notification for new subscriptions

 

Hi,

 

Currently, I am trying to set up a publisher for market data with OpenMAMA in C#.

I wonder if there is a way to receive a notifcation every time my publisher accepts a new subscription from a subscriber? Is there an event thrown that I can handle?

 

Also, I still don't completely understand the difference between a basic publisher and an advanced publisher. In the development guide, the latter is only mentioned but never described in detail (e.g. how to use it).

 

Best regards

 

Mathias


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.5645 / Virus Database: 4273/9002 - Release Date: 01/26/15


Ian Bell <i.bell@...>
 

Hi

 

Can you attach the full patch for a full look?

It seems like the DQPublishermanager create callback does not directly return the closure, unlike the normal subscription / basic subscription OnCreate callback.

Therefore you should use the getclosure api to obtain it. Similar to what happens in the JNI version.

 

static void MAMACALLTYPE mamaDQPublisherManagerOnCreateCb (mamaDQPublisherManager manager)

{

                JNIEnv*             env             =   NULL;

                dqcallbackClosure*    closureImpl     =   (dqcallbackClosure*)mamaDQPublisherManager_getClosure(manager);

 

There is no specific documentation on creating the wrappers but in general you shold be able to work in a similar way to the existing CPP and JNI wrappers.

 

Thanks

Ian

 

 

 

From: openmama-dev-bounces@... [mailto:openmama-dev-bounces@...] On Behalf Of Mathias Kim
Sent: 19 February 2015 13:06
To: openmama-dev@...
Subject: Re: [Openmama-dev] Notification for new subscriptions

 

Hi again,

 

I made a mistake in my previous mail. We tried to implement the dqpublishermanager, not the dqpublisher.

 

Best regards

 

Mathias

 

From: openmama-dev-bounces@... [mailto:openmama-dev-bounces@...] On Behalf Of Mathias Kim
Sent: Donnerstag, 19. Februar 2015 13:46
To:
openmama-dev@...
Subject: Re: [Openmama-dev] Notification for new subscriptions

 

Hi all,

 

we put some effort into this and came up with an implementation of the dqpublisher, but the code fails when the onCreate callback is called. When we try to convert the closure pointer to an handle we get a FatalExecutionEngineError (error code 0xc0000005).

Since we have limited experience with wrapping c code for .net, we just did it in the way you did for the BasicSubscriber. As we get a callback from the c class, we think we’re on the right path. Nonetheless, the values we get back (closure) seems to point to the wrong place in the memory.

 

        private static void onCreate(IntPtr NativeHandle, IntPtr closure)

        {

            GCHandle handle = GCHandle.FromIntPtr(closure); //code fails in this line

            MamaDQPublishManagerImpl impl = (MamaDQPublishManagerImpl)handle.Target;

            impl.InvokeCreate();

 

        }

 

 

Therefore we ask ourselves:

-          Are we doing it right?

-          Is there something like a manual on how to wrap c classes for .net

-          Sometimes a *impl class is used, sometime the MamaCallbackWrapper class. Where is the difference and when do you use which?

 

If needed, our code can be provided.

 

Best regards

 

Mathias

 

From: openmama-dev-bounces@... [mailto:openmama-dev-bounces@...] On Behalf Of Glenn McClements
Sent: Dienstag, 27. Januar 2015 18:22
To: Paul Bradbury;
openmama-dev@...
Subject: Re: [Openmama-dev] Notification for new subscriptions Mathias

 

Hi Mathias, 

 

As Paul pointed out, what you would really want is DQPublisher for C#, but unfortunately there isn’t one at the moment. The reason for this is that that previously there hasn’t been a real demand as most C# applications have been on the client subscribing side, not the publishing side.

 

It sounds like there are a least a few people now looking for one so I’d be interested in finding out if there are others out there looking the same and if anyone if willing to contribute code in this are? 

 

Also to clarify:

The MamaPublisher  “basic" publishing ie. without sequence numbers, initial images/recaps etc or any other market data/data quality type features. The equivalent class on the subscribing side is MamaBasicSubscription.

 

The MamaDQPublisher and associated classes have sequence number injection, callbacks when a client subscription is made etc. The equivalent class on the subscribing side is MamaSubscription.

 

Cheers,

Glenn 

 

From: Paul Bradbury <paul.bradbury@...>
Date: Monday, 26 January 2015 16:20
To: "
openmama-dev@..." <openmama-dev@...>
Subject: Re: [Openmama-dev] Notification for new subscriptions

 

From what I recall there, are no .net wrappers for the DQPublisher as yet (although somewhat unfairly there are in the Java codebase!). For me as a greenfield application, it was simpler to write in C++, but I think adding those wrappers wasn’t too big a deal as they were really just wrappers along the lines of the existing code for the normal publisher.

 

Paul.

 

From: openmama-dev-bounces@... [mailto:openmama-dev-bounces@...] On Behalf Of Kim Mathias
Sent: 26 January 2015 16:03
To:
openmama-dev@...
Subject: [Openmama-dev] Notification for new subscriptions

 

Hi,

 

Currently, I am trying to set up a publisher for market data with OpenMAMA in C#.

I wonder if there is a way to receive a notifcation every time my publisher accepts a new subscription from a subscriber? Is there an event thrown that I can handle?

 

Also, I still don't completely understand the difference between a basic publisher and an advanced publisher. In the development guide, the latter is only mentioned but never described in detail (e.g. how to use it).

 

Best regards

 

Mathias


No virus found in this message.
Checked by AVG -
www.avg.com
Version: 2015.0.5645 / Virus Database: 4273/9002 - Release Date: 01/26/15