I am a new to Nodejs dev trying to make a prototype crypto exchange for a project. I am using express/jade with mysql.I am using data tables to load data everytime the server sends market data.How can I check which market page / pair a socket has open?For example, say I send market data every second to every connected socket then the socket splits it apart into buy/sell/recently closed/chart data.Do I send every market at once? How do I check which page each socket has open so I can send coinA data to socket 1 and coinB data to socket 2.I have setup a bot to post orders and I am trying to optimise the site.Once I get to about 200,000 orders it starts to get a little laggy because of how much data is being sent every second for the tick.The app compiles all the data from mysql. I was thinking redis might help but I am not sure how much because I will still have to pull the data from mysql to out into redis every second.Anyone have any ideas?Instead of sending data globally, if I had the user request the data of the market they need what sort of vulnerabilities do I have to think about when the user is sending data to the server through a socket? I would have to setup a basic rate limiter?I will post a link soon when I get home and start the server.I have a private repo on github, not sure if anyone wants to help out or take a look at what I have wrote. Not to bothered about people stealing code lol rather having massive vulnerabilities where someone can access machine some how
Submitted July 17, 2019 at 05:46PM by lordoftheshroom
No comments:
Post a Comment