Hi,

Please find my inline comments for your concerns:

How you know is it rarely used port?

I have used the resources [1] [2] and [3] to find out the commonly used
ports and chose a port, even though it is impossible to ensure that this
port is idle in all cases, these ports are generally unused ports.

Yes, we should check the available ports and use those ports.

IMHO I believe that if we can reduce the run time execution time by
assigning a port at the build time. We have to do two file write operations
where one is writing an xml file, which is costly. By assigning two rarely
used ports during build time we eliminate the need to write theses files on
IDE startup to 80-90% , which would improve the start-up time of the IDE.
WDYT?

Further, IMO that way, the failure to write these files OR any
interruptions occurred will result in run-time failures in the IDE, By
reducing the need to write these files always we can reduce that risk.

In this method we will be writing the files only if the previously used
ports are not available during run time (which would be when you start two
IDE instances in the machine most probably, OR else when you are using the
pre-assigned ports for some other operation in the machine).

Shall we have a discussion on this to come to decision as to which approach
to follow?

If the configured port not available, we can just use the available port in
execution class without doing reading and writing to tomcat configuration
file?

Yes in your approach there will be less code since we do not write the
ports during build time, nor we consider which ports are already configured
in the existing che instance. We will always ping for vacant ports during
run time and write the required configuration files, which will be a less
complex approach. But isn't it better to avoid the need to edit
configuration files always if possible?

pros in always writing unused ports to configurations files : no file read
operation to check which ports are already assigned

                  no pre-decided port write operation during build time

                  less code, less complex IDE startup apprpoach

cons in always writing unused ports to configurations files : involves two
file write operations at all instances of IDE startup (xml file and a text
file)

                   higher risk of runtime failures






[1] http://web.mit.edu/rhel-doc/4/RH-DOCS/rhel-sg-en-4/ch-ports.html
[2]
http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?&page=1
[3] http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers



regards
Awanthika
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to