title: Web Service vs TCP/IP Sockets (Java) + SQL Connections
body: <p>We are currently are at a stage in our product lifecycle where we are thinking about moving to Web Services.  Our system is written in Java which consists of a number of client and server applications which talk to one another over TCP Sockets and also has in-line SQL to perform data retrieval and updates (yuk! I know) which uses our own SQL Connection class which then uses the java.sql.Connection to connect to a SQL Server database using the Microsoft JDBC driver.  </p>
  
  <p>The applications bind to one another using TCP sockets.  They request data from and push data to one another.  Which works perfectly fine.</p>
  
  <p><strong>Thought</strong></p>
  
  <p>So we are looking at converting all data access and TCP communication to a web service.</p>
  
  <p>The web service would be designed to run on a companies secure internet site.  The idea would be that users could connect their clients to the web service from home - when they are not on the company network - or at work, when they are.  </p>
  
  <p>The client applications would send/recieve the messages to/from the server side applications using the web service.
  The client applications would retrieve and update data in the database using the web service.</p>
  
  <p><strong>Question</strong></p>
  
  <p>I would just like to know what peoples experience is of doing anything with 2 way communication (request and push) over a web service (if possible) and what the thoughts are about doing this.</p>
  
  <p>Converting the data access to a web service seems straight forward enough - I can forsee some issues with performance where large data sets are retrieved in some parts of the system.</p>
  
  <p>I am looking through various reading materials on the matter as it is a while since I have touched web services (using C# and ASP.NET).  Currently reading "Building Web Services with Java™: Making Sense of XML, SOAP, WSDL, and UDDI".  I must admit I thought web services were always stateless but have just read that they are not!</p>
  
  <p>Thanks,</p>
  
  <p>Andez</p>