MarketFilter advice

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DivideByZeroError
    Junior Member
    • May 2009
    • 13

    #1

    MarketFilter advice

    Hello, I see the following advice from the streaming API docs:

    It is preferable to use coarse grain subscriptions (subscribe to a super-set) rather than fine grain (specific market ids).
    If you find yourself frequently changing subscriptions you probably want to find a wider super-set to subscribe to


    First question is why is this? Is there a performance impact? Is it something that impacts the exchange server side or the client?

    Now, I want to subscribe to all UK horse races plus all UK Premier League football matches. I can't see a way to get this without listing MarketIds or alternatively subscribing to all football matches globally, since I'd have to add both eventTypeIds (1, 7). I can't see a way to filter by competition but even if I could there would also have to be competitions that describe the horse races that I want.

    An alternative would be to manage two sessions with the two distinct subscriptions. When might that be appropriate?

    Thanks.
  • LiamP
    Junior Member
    • Oct 2015
    • 284

    #2
    Originally posted by DivideByZeroError View Post
    Hello, I see the following advice from the streaming API docs:

    It is preferable to use coarse grain subscriptions (subscribe to a super-set) rather than fine grain (specific market ids).
    If you find yourself frequently changing subscriptions you probably want to find a wider super-set to subscribe to


    First question is why is this? Is there a performance impact? Is it something that impacts the exchange server side or the client?

    Now, I want to subscribe to all UK horse races plus all UK Premier League football matches. I can't see a way to get this without listing MarketIds or alternatively subscribing to all football matches globally, since I'd have to add both eventTypeIds (1, 7). I can't see a way to filter by competition but even if I could there would also have to be competitions that describe the horse races that I want.

    An alternative would be to manage two sessions with the two distinct subscriptions. When might that be appropriate?

    Thanks.
    Regarding performance it is going to be for both client and server, betfair don't want to send you updates you don't want and visa versa.

    I currently send a catalogue request or multiple catalogue requests and then create a stream filter based on the market id's. This is assuming you start/stop your program each day as you won't get any 'new' markets.
    Last edited by LiamP; 19-04-2017, 06:56 AM.

    Comment

    • DivideByZeroError
      Junior Member
      • May 2009
      • 13

      #3
      Hi Liam, thanks for the reply.

      The way I read the quoted advice is that it is encouraging users to effectively subscribe to more markets than they need by recommending using coarse grain subscriptions (subscribe to a super-set) rather than specific market ids.

      I could believe that coarse subscriptions makes it easier on the server side, where the filtering logic is perhaps more cumbersome than sending more traffic than necessary. But that's my speculation and I was hoping one of the BDP team could shed some light.

      I'm also looking into using multiple sessions to manage the issue and wonder how Betfair might limit subscriptions?

      Comment

      • DivideByZeroError
        Junior Member
        • May 2009
        • 13

        #4
        Hi,

        I raised a support ticket and received a good explanation.

        The advice to make coarse grained subscriptions is primarily to reduce the need to send large initial images. For example, if you subscribe to market ids 1, 2 and 3 then at a later stage want to add market id 4 you'll have to start all over again with a full image of 1, 2 and 3. Whereas if you had subscribed to an event (or event type) which included all of these then you'd just get the incremental information at each stage, even if you are receiving information about markets which you're not interested in.

        Comment

        Working...
        X