System structure - Midlets and / or threads? | Thales IoT Developer Community
March 17, 2015 - 12:59am, 2524 views
I amd looking at the feasibility of designing a system which is required to have the following functionality:
· Listen for HTTP activity.
If user request from Web browser, request data from RS232 port, create web page with data.
· Listen for SMS – ie for OTAP updates.
· Listen for input from the RS232 port. Inspect data to determine if HTTP, FTP, SMS or SMTP request(s) and action that request.
With the above requirements how can the system be best divided into threads and / or Midlets ?
Midlet 1: Creates a socket connection for HTTP transfers - use threads to handle multiple user request – typically up to five on an EHS6T modem.
Midlet 2: Handler OTAP updates via SMS requests.– a separate Midlet with pipe connection number of threads
Midlet 3: Handler communications from the RS232 port which may be to / from the port.
I would like to support both FTP and HTTP – would separate sockets be required for FTP and HTTP, and thus limit number of users to a maximum of four? If a separate socket would it be best to use a separate midlets for HTTP and FTP.
Unsure of the implications of trying to support both FTP and HTTP since although Midlets can be run in parallel, they can’t share the same hardware resource.
Any help would be appreciated in determining how the above system should be structured – and fill in the large gaps of my knowledge of the capabilities / limitations for designing the above system for running on an EHS6T modem.
High-lighting any limitations of any recommended structure would also be appreciated to allow the final system to be optimised if requirements change.