All that polls are going to introduce delays and generate additional traffic that you cannot avoid. Ideally, you would like to go on-air with a direct solution: "socket to socket" or asynchronous push with something like zeromq (also via btw socket, just abstracted).
The question is whether it is worth while working inside the trader's terminal. As you go from terminal to server to terminal, a delay is already inherent. In addition, you will be delayed by the execution on the recipient's side, as well as the speed of the broker. Thus, at the end, when the market moves, you will see a huge difference between the original and the copy that defeats the goal of the solution. This functionality is really what should be provided by the broker and implemented in api server plugins or api manager (at least). With the exception of most broker's settings: delay + spread + markup eats up any advantage of your client if you are hoping to get by copying "good" deals.
To fix network problems, since you know that your clients are working with mt4, you also know that 443 outbox should be open on the client machine since it uses mt4. You can also be fairly confident that http (80) is also open, especially since the current solution uses http for communication. Therefore, if you make the server server 443 or 80, and your sender and recipient connect as clients to your server, the client and firewall settings should not matter. In addition, you can always implement some kind of file-based configuration so that you can configure the port on the client side during installation / troubleshooting. In the end, whether your poll or asynchronous network problems are the same, it all comes down to tcp over the socket.
source share