Hello everyone, I'm new in this mailing list; my name is Vanja Ozegovic and I'm currently getting to know Apache Mina. I have read the tutorials, documentation and the code, and have been working with the framework for couple of months.
The problem I am facing is as follows. I created a proxy server in Apache Mina, following the logic in Proxy Example. On the server side I have an HTTP server (also following modified HTTP server logic) and on the client side I have a Serial Port Connector. The main requirement is to be able to process petitions from thousands HTTP clients simultaneously. I am aware that this is not possible on the serial port side since the access to the serial port is exclusive (one client at a moment). My question is what would be the correct approach for synchronization in this case? I was considering to create a request queue on the server side, to allow only one petition to be forwarded to the Serial Port Connector at a given moment but this doesn't seem quite correct. I also though about using semaphores but this doesn't seem to be right neither since I need to restrict access for obtaining the serial port session and also to restrict the writing the messages to the serial port session (in sessionOpened and messageReceived methods respectively). Is there any other approach? I haven't work that deeply with event driven approach, so if anyone can provide my a hint on this problem, I would be very grateful. Best Regards, V. Ozegovic
