Another idea, maybe too far out there to do but food-for-thought, is for FD to roll the EDDN functionality into the core server and then it could stream market updates to clients that connect kinda like the NYSE or LSE does.
(Note that they make heavy use of private networks with multi-casting enabled - which we cannot do over the Internet.)
So we'd have an API to query for known system and station data which could include last-known-good commodity data and then a streaming service for market data. Part of the data you query for is to get the system-station ID which is like a stock-ticket but probably just a GUID perhaps modified to have a couple digits to reflect the galactic sector it's in. Then in the streaming service you use the fixed-size ID (not variable size strings) to send data and now you can easily do it with a binary format.
I would like to register a loud vote against JSON. It's a terribly inefficient and difficult to parse format which translate to wasted cycles dealing with it which matters when there's a lot of them. I read ridiculous things like omg it handles 200 updates a minute with a thousand end-points it's great!
The target capability is a thousand updates per second with ten's of thousands of end-points.
Read it yesterday, decided to sleep over it for a night before adding a post. I TRULY like the idea of FD rolling out EDDN functionality. For Commanders who know me a bit (see profile) this does not come as a surprise ;-) Lets call the FD version FDDR (FD Data Relay). In this case they only have to create a ZeroMQ (ZMQ) PUB (publisher), which is VERY easy to create. It would have a few advantages.
- Prevents poisoning the well. With EDDN it relies on multiple sources. Commanders against EDDN could send bogus info to EDDN. Just like the BPC in the past was fed was stuff like Javacakes and bogus prices. This could ofc be handled by EDDN (login for example) but it would make EDDN a bit more complicated and less K.I.S.S.
- Less bandwidth. If multiple commanders enter a station and open the commodities market normally with EDDN both commanders (if they participate in EDDN) would upload that info to EDDN - which then directly distriubutes it. FD could decided to send the info only once the info IF the market hasn't changed when multiple commanders in the same station open the market.
I DO agree that it should be an opt-in feature. As in commanders have an option in ED to have FD send their commodities prices to FDDR, which can then be read by subscribed tools/commanders. Some commanders don't want to share their info because they fear it will hurt their discovered trade runs - which is of course fine.
EMDR handles approx 1 Million messages a day (almost 12 messages per second). Its very scalable, robust, redundant. EDDN (which is heavily based upon EVE's
EMDR) and FDDR can use this setup. I haven't logged in to the EDDN server to see the current bandwidth usage. MagmaiKH wrote: "The target capability is a thousand updates
per second with ten's of thousands of end-points". I don't think that is true. Let me try to explain.
I think most commanders are not going to subscribe to FDDR, just like they don't all connect to EDDN. Commanders use trading tools like the BPC, Thrudd. These tools connect to FDDR and store the info locally in a database. The BPC, Thrudd website accesses that database. BPC/Thrudd atm get their data from OCR-ed screens and manual input.
Hoping they output/upload to EDDN soon ;-) For tools which run locally without a huge database (for older/historical data) like Trade Dangerous its a bit different. Normally they should connect 24/7 to FDDR/EDDN to stay up to date. EDDN is just a simple relay, it doesn't store info. The mission of EDDN is clear and a simple one, K.I.S.S. principle. It relies on value added services (VAS) to make it more useful. One such service is created by Maddavo which has a merge tool for TD. It connects to EDDN. TD commanders can get the latest up to date .prices file for TD from within TD by a certain sub command. When TD commanders upload their manual entered (or OCR-ed) prices to the merge tool they update the merge tool. With EDDN atm we have at least two commanders who connect to EDDN AND make the stored historical data available to other commanders - so it can be used in their tools. I'm sure more services will be created. EDDB is being created. I would be surprised if in the end more then 100,200 commanders would connect directly to FDDR. Others will probably use the various VA services out there. A tool I like and which is being created by a commander (who liked the idea) for EDDN is the equivalent of
EVE's EMDR map - See the solar systems light up as market data arrives.
If FD is concerned about bandwidth usage they could limit access to FDDR. As in for example only EDDN (or a few more) can subscribe to it. The community then connects to EDDN and its up to EDDN to be scalable, redundant enough. The community would provide the needed bandwidth!!!. In the case of EDDN we were very lucky. Commander Errantthought (thanks a lot man) pitched the idea to his boss and we got free hosting services. Its described on the wiki page of EDDN - to prevent possibly violating forum rules here. See this high-level overview of EMDR to get an idea of how this is done in EMDR. The discussed announcers/relays are visualized in the tool EMDR monitor - EMDR relay/announcer monitor web app. It would cost FD very little bandwidth in this setup - limit access to FDDR to a few tools like EDDN.
TLDR; Yes I hope FD creates EDDN functionality into the core server and then it could stream market updates to clients. It even has a few advantages over EDDN....
Edit: Yes in hindsight I should have chosen a different name. EDDR (Elite Dangerous Data
Relay) would have been a more fitting name then EDDN (Elite Dangerous Data Network) as EDDN does not store anything. Ah well live and learn ;-)
Edit2: ZMQ supports multicast. Wrt ZMQ performance, see
here. Snippet of info: "As for bandwidth usage we are able to get to 1Gb/sec boundary for messages 128 bytes long. 2Gb/sec boundary is passed for messages 1024 bytes long and bandwidth of 2.5Gb/s is reached for messages 32kB long" AND "Throughput gets to the maximum of 2.8 million messages per second for messages 8 bytes long".
To make this absolutely totally clear: I'm NOT the one who implemented EDDN. That excellent work has been done by commander jamesremuscat. Thanks again for all your hard your work James!!! I'm just the guy who liked the original EMMD idea by commander Andreas (heavily based on EMDR) and tried to see it revived....