|
52 | 52 | "cell_type": "markdown", |
53 | 53 | "metadata": {}, |
54 | 54 | "source": [ |
| 55 | + "Please see a full documentation of this example application in [this article](https://developers.refinitiv.com/article/introduction-machine-readable-news-elektron-websocket-api-refinitiv).\n", |
| 56 | + "\n", |
55 | 57 | "If you are not familiar with MRN concept, please visit the following resources which will give you a full explanation of the MRN data model and implementation logic:\n", |
56 | 58 | "* [Webinar Recording: Introduction to Machine Readable News](https://developers.refinitiv.com/news#news-accordion-nid-12045)\n", |
57 | 59 | "* [Introduction to Machine Readable News (MRN) with Elektron Message API (EMA)](https://developers.refinitiv.com/article/introduction-machine-readable-news-mrn-elektron-message-api-ema).\n", |
|
197 | 199 | "The subsequent update contains the fields necessary to identify the MRN data item, the order of this fragment among all the fragments for this item, and the fragment itself. The other point to note is that (for a Multi fragment item), Update messages with FRAG_NUM >1 will have fewer FIDs as the metadata is included in the first Update message (FRAG_NUM=1) for that item\n", |
198 | 200 | "\n", |
199 | 201 | "#### News Fragments simple handle logic\n", |
200 | | - "1. Check if incoming message FRAG_NUM value =1\n", |
201 | | - "2. If yes, this message is the first update message\n", |
202 | | - " * convert FRAGMENT value from Base64 ascii string to bytes value with [base64](https://docs.python.org/3/library/base64.html) module\n", |
203 | | - " * if FRAGMENT bytes length equal to TOT_SIZE value, it means this is a single fragment news. \n", |
204 | | - " * The application uses [zlib](https://docs.python.org/3/library/zlib.html) module to unzip the FRAGMENT bytes value to JSON string\n", |
205 | | - " * if not, it means this message is a first fragment of multiple fragments news. \n", |
206 | | - " * The application then keeps news update data in dictionary object with GUID as a key.\n", |
207 | | - "3. If FRAG_NUM value > 1, it means this is a subsequent Update message for multiple fragments news\n", |
208 | | - " * get associate news data (previous multi-fragments) from GUID\n", |
209 | | - " * convert FRAGMENT value from Base64 ascii string to bytes value and add it to current multi-fragments\n", |
210 | | - " * if this multi-fragments bytes length equal to TOT_SIZE value, it means this news fragment is completed and all fragments have been received. \n", |
211 | | - " * The application unzip this multi-fragments bytes value to JSON string\n", |
212 | | - " * if not, the application continue wating for more fragments from furthure update for the same GUID\n" |
| 202 | + "\n", |
| 203 | + "\n" |
213 | 204 | ] |
214 | 205 | }, |
215 | 206 | { |
|
2153 | 2144 | "* [Refinitiv Elektron SDK Family page](https://developers.refinitiv.com/elektron) on the [Refinitiv Developer Community](https://developers.thomsonreuters.com/) web site.\n", |
2154 | 2145 | "* [Refinitiv Elektron WebSocket API page](https://developers.refinitiv.com/websocket-api).\n", |
2155 | 2146 | "* [Developer Webinar Recording: Introduction to Electron WebSocket API](https://www.youtube.com/watch?v=CDKWMsIQfaw).\n", |
| 2147 | + "* [Introduction to Machine Readable News with Elektron WebSocket API](https://developers.refinitiv.com/article/introduction-machine-readable-news-elektron-websocket-api-refinitiv).\n", |
2156 | 2148 | "* [Machine Readable News (MRN) & N2_UBMS Comparison and Migration Guide](https://developers.refinitiv.com/article/machine-readable-news-mrn-n2_ubms-comparison-and-migration-guide).\n", |
2157 | 2149 | "* [Introduction to Machine Readable News (MRN) with Elektron Message API (EMA)](https://developers.refinitiv.com/article/introduction-machine-readable-news-mrn-elektron-message-api-ema).\n", |
2158 | 2150 | "* [MRN Data Models and Elektron Implementation Guide](https://developers.refinitiv.com/elektron/elektron-sdk-java/docs?content=8736&type=documentation_item).\n", |
|
2185 | 2177 | "name": "python", |
2186 | 2178 | "nbconvert_exporter": "python", |
2187 | 2179 | "pygments_lexer": "ipython3", |
2188 | | - "version": "3.7.3" |
| 2180 | + "version": "3.7.4" |
2189 | 2181 | } |
2190 | 2182 | }, |
2191 | 2183 | "nbformat": 4, |
|
0 commit comments