4 ms·
Having worked at Bloomberg I really wish there was more content published about how it's implemented because it pretty astonishing in both good and bad ways. Fo
by dtrailin 7y ago
Having worked at Bloomberg I really wish there was more content published about how it's implemented because it pretty astonishing in both good and bad ways. For one thing the codebase is ancient there are still some Fortran bits that in use today. However the more modern code is in C/C++ and designed heavily with latency in mind. In particular the feeds are designed to be extremely fast with a few custom built high performance databases built to serve this [0].
The bit that really amazed me was the way the front end is implemented. The front-end is fully rendered server side (meaning every click requires a full round trip to Bloombergs servers) in Javascript using spidermonkey. This caused a lot of difficulties since any real time elements needed to be rendered in a totally different way. As well the version of Javascript was restricted from using things like timers or callbacks since that could make rendering stall. In some ways it's impressive that they were doing server side Javascript at least 5 years before nodeJS but whole approach seems like a byproduct of age of mainframes.
[0] https://bloomberg.github.io/comdb2/overview_home.html https://bloomberg.github.io/comdb2/overview_home.html
- aledthemathguy 7y agoThat's so interesting! Thx for sharing this.
- dkersten 7y ago> designed heavily with latency in mind > The front-end is fully rendered server side (meaning every click requires a full round trip to Bloombergs servers) O_o Ok ok I guess that’s not the area where they care about low latency?
- wtetzner 7y agoOr they care about latency so much because they need to keep full page load latency as low as possible?
- wtetzner 7y agoWhat was the reason for using Javascript to do the server-side rendering (as opposed to another language on the server)? Was it just a preference, or were there some technical reasons?
- apaprocki 7y agoThere were reasons for wanting to use an embedded scripting language in general. Ultimately the choice (at the time) came down to either Lua or JavaScript. There were pros/cons to each approach and in the end JavaScript was chosen mainly because many coming in from the outside would already be familiar with it. Keep in mind that this was before Chrome existed and browser wars had not begun yet... so things were a bit rocky at first, but really it's peen proven to be the right path. Eich's common line -- "Always bet on JS" and all :)
- akhilcacharya 7y agoThe UI library is also GTK, or at least GTK of a bygone era.
- swyx 7y agoi'd love to read more about how Bloomberg Launchpad was implemented [0]. that seemed like a HUGE departure from the clunky old bloomberg interface. it had all the visualizations you want, excellent snap to grid, and was live updating everything. just amazing for its time. [0] https://www.bloomberg.com/professional/product/launchpad/ https://www.bloomberg.com/professional/product/launchpad/
- apaprocki 7y agoIt's implemented in the same manner as the traditional "panels" (how we refer to the non-Launchpad windows). It's the same code, same implementation, same development environment. Everything's integrated. When it started out (~17 years ago) it was different and new, but the work there was taken back into the main panels to replace what you think of as old 80x25 screens. All of it is now rendered using Chromium (Blink).
- swyx 7y agothats fascinating. it looks and feels so different from the main panels. once i had launch pad i was like "i never wanna go back to the main panels again" lol. (of course, i couldnt, cos some functionality was missing plus it just felt good punching weird keywords i already memorized)
- kjhjkwher 7y agoYes, the Bloomberg Terminal app is basically an Electron app, but built with Bloomberg's equivalent of Electron. Bloomberg is one of the biggest users of JavaScript in the world, many millions line of code, but most of it used in a desktop app.
- quietbritishjim 7y agoThe Bloomberg terminal is totally different from Electron apps. For a start, it's all rendered server side, as the parent comment explained.
- kjhjkwher 7y agoIt depends on what you mean by "rendered". The client side is a highly modified Chromium which runs a GTK like GUI implemented in JavaScript. https://github.com/bloomberg/chromium.bb https://github.com/bloomberg/chromium.bb So it is like Electron in that you are literally interacting with a web-browser, but one made too look like a desktop app.
- bulldoa 7y agomight be a dumb question, but how do you render frontend server side? Is the content of the UI dynamically generated in the backend and serve as a static page to users?
- amykyta 7y agoI’d love to re-read that ancient white paper called ‘Bloomberg in a nutshell’ if anyone has it. It explains the server side architecture which is pretty interesting and terrifying as you said.