RDP Python API performance

I am doing POC of python Library with our first client .
Client requirement is pretty straight forward . They are subscribing around 9000 RIC & interested in snapshot data only with 2 fields (i.e. Dynamic View request for Image )
I tried 4 different models (for Delivery & Contents Layer functions in Sync/Async mode ) with 1000 Rics for POC . All are getting taking around 2 mins to process that much responses .
One of a Async non-streaming sample code is as such :-
def create_cache(name,msg ):
#outPut[msg['Key']['Name']]=msg
print( " Response Recevied for ",msg['Key']['Name'] )
.
.
.
ricList = getItemList() ## here geting 1000 rics for POC
tasks=[]
mySession = sh.get_session('deployed')
mySession.open()
display_stats( " Record processing started ") ## Start time for calculation
for ric in ricList:
order_book = rdp.ItemStream(
name = ric,
service = 'CANNED_DATA',
session = mySession,
domain = "MarketPrice",
streaming =False,
fields = ['BID', 'ASK'],
on_refresh = lambda name , msg : create_cache(name,msg), ## At the moment just printing
on_update = lambda s,msg : print (" Update Msg ", s,json.dumps(msg, indent=2))
)
tasks.append(order_book.open_async())
loop = asyncio.get_event_loop()
loop.run_until_complete(asyncio.wait(tasks))
display_stats(" process "+ str( len(outPut))+ " Records") ## End time for processing calc
I am wondering if there is something i can do to improve performance , expecting to process ~9000 Rics in 10 seconds
Best Answer
-
Typically, the WebSocket API supports the batch request. With the batch request, you can use one request message to request multiple items. This could improve the performance of the application.
However, from my checking, the RDP Python library may not support the batch request.
I think to get more performance you can directly use WebSocket API to consume the data. The example is available on GitHub.
0
Answers
-
Thanks Jirapongse , Actually we were using websocket API earlier for this client . We have written an Async wrapper on top of that . Anyhow Async wrapper is not feature rich . So thought of moving to RDP for two things
- Get more feature
- Better support
Anyhow we stuck with performance issue here . I have raised this to Olivier & waiting for some input from Refinitiv .
On Other note , i can see we can send Batch request in content layer i.e. StreamingPrices fucntion . It takes a list of instruments as universe parameters . Anyhow that's not giving decent performance .
0 -
I have checked the code. If I am correct, the API internally separates a batch request into individual requests. Therefore, it will get the same performance as individual requests.
0 -
Hi Jirapongse,
Thanks for your reply. Actually our client was already using a in-house developed async wrapper written on top of websocket API . That wrapper has a decent performance but not feature rich (i.e connection recovery , item recovery ). Also that library was not easy to be used . That' why we thought of giving try to RDP python Library. I checked with Refinitiv support & look like you do have plan to add new features in RDP (i.e. connection recovery , item recovery etc.).
Anyhow we stuck with the performance issue with RDP here .
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 618 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 557 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 276 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 655 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 229 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛