Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Refinitiv Data Platform /
  • Refinitiv Data Platform Libraries /
avatar image
Question by vaibhav.sahu · Mar 12, 2020 at 05:26 AM · python apirdptrep apirdp library.

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

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by jirapongse.phuriphanvichai · Mar 19, 2020 at 07:29 AM

@vaibhav.sahu

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.

Comment
veerapath.rungruengrayubkul

People who like this

1 Show 3 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
vaibhav.sahu · Mar 27, 2020 at 05:47 AM 0
Share

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

  1. Get more feature
  2. 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 .

avatar image
REFINITIV
jirapongse.phuriphanvichai ♦♦ vaibhav.sahu · Mar 27, 2020 at 05:55 AM 0
Share

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.

avatar image
vaibhav.sahu · Apr 03, 2020 at 05:01 AM 0
Share

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 .


Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
8 People are following this question.

Related Questions

Python RDP API does not use proxy server when connecting

How do I retrieve index constituents in RDP/Python

RDP authentication error

Asynio library errors when running rdp.StreamingPrices simple test

RDP libraries: 'Request' object has no attribute 'prepare'

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges