Java Socket Server Essentials -


To implement the production level Java socket server, what do I know should be possible?

For now, get a basic code structure using the server socket and the socket core core java.net package has gone. The server is waiting for a customer and prepares a new bag for it.
I was wondering if this is the way to go or there are other issues that I have to consider before code launch in the wild.

There are some limited things in which I have thought with my limited knowledge and experience:

  1. Customer Resources that Detect and Issue Customer Consumption
  2. Connection pooling, is it necessary or should I paste it with the existing design?
  3. Server monitoring, logging and error recovery etc.
  4. Go with the prepared frameworks like Apache Mina .. ??

What is your experience to say? ...

I think it depends on your usage cases. But some thoughts:

The framework created is a good way to go as you have found, there are so many things to consider here. Look down Some possibilities (which implement very different strategies) provide live (discovery-based retrieval-oriented computing framework) or money systems (which provide a separate client / server decupling and transaction - JMS and / or AMQP-based) )

P> Pooling is a major issue that will prevent your server from halting on many clients' faces. Can you use Java?

How can you monitor this server? Can you use JMX and? If you can, then I suggest that this is a good first step way.

What happens when your server is down? Does your client have the ability to reconnect automatically? Retry your excellent requests? Is this a good idea to try a request again (i.e. this is idempotent)?

What are you transporting between the customer and the server? Are they serialing Java classes? If so, have you made sure that a simple recompile of a server is not required by the client's recompile (via serialVersionUid s) if you are transferring strings and byte arrays ( A common scenario), then do customers and servers use the same character encoding? If you are confused about encoding, then read the deceptively named file.encoding through the property and (possibly) apply the same client / server encoding.

Anytime with distributed computing, consider Peter Deutsche.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -