Communicating with external applications over TCP/IP socket /websockets using gateway scripts

I have this communication between Ignition server and my application written as module in JAVA using TCP sockets, However as far as the API's for SQLTagManager in JAVA are bit cumbersome whereas Jython tag-libraries are quite easy to use. Hence I am trying to try the Python approach for the connection between Ignition & module as well.

But as you said I should try best of both worlds i.e. JAVA for socket communication and Python for back-end integration with tags etc. Its the interface between JAVA & Python that that I am lost. I am trying to read some documentation at http://www.jython.org/jythonbook/en/1.0/JythonAndJavaIntegration.html correct me if am on right track.