[Twisted-Python] Question on new code development
I am in the process of building an interactive game server and client with the client code written in Java and I have a couple of questions. I am hoping to be up and running with a prototype in the next month. My plans incluse the use of Twisted framework as I'm very comfortable in Python as well as Java. My first question is, should I be looking at the new Twisted 2.0 for development or stick with 1.3 and plan on upgrading to 2.0 later. Secondly, would using and/or building upon TwistedJava for the communications between the Java clients and my Twisted server code be a good direction to take? Thanks, -- Bill Krueger <bill.krueger@comcast.net>
On Fri, 2005-01-21 at 09:50 -0600, Bill Krueger wrote:
My first question is, should I be looking at the new Twisted 2.0 for development or stick with 1.3 and plan on upgrading to 2.0 later.
They are compatible in the ways relevant to you, so I'd start with 1.3.
Secondly, would using and/or building upon TwistedJava for the communications between the Java clients and my Twisted server code be a good direction to take?
Well... it works. But I'm not putting much effort into maintaining TwistedJava these days. On the other hand if you find a serious bug I will fix it. How complex and varied is the data you will be sending back and forth?
On Fri, 2005-01-21 at 11:22 -0500, Itamar Shtull-Trauring wrote:
On Fri, 2005-01-21 at 09:50 -0600, Bill Krueger wrote:
My first question is, should I be looking at the new Twisted 2.0 for development or stick with 1.3 and plan on upgrading to 2.0 later.
They are compatible in the ways relevant to you, so I'd start with 1.3.
Good, that makes it easier.
Secondly, would using and/or building upon TwistedJava for the communications between the Java clients and my Twisted server code be a good direction to take?
Well... it works. But I'm not putting much effort into maintaining TwistedJava these days. On the other hand if you find a serious bug I will fix it.
How complex and varied is the data you will be sending back and forth?
The data is composed of interactive text streams, Java types/classes (representing mouse movements, etc) and binary data (jpg/png type data). I can convert the data to a "neutral" format (such as xdr) and build communication data structures to encapsulate it if needed but if the TwistedJava code does this already I'm that much further ahead. Keeping the data streams in a Java native format "seems" like a good way to go but the Python code will need to use the data as well and I'm not that far along with what the difference between a Java String and Python String (repeat this for each Java native type) are.
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Thanks, -- Bill Krueger <bill.krueger@comcast.net>
On Fri, 2005-01-21 at 14:54 -0600, Bill Krueger wrote:
The data is composed of interactive text streams, Java types/classes (representing mouse movements, etc) and binary data (jpg/png type data). I can convert the data to a "neutral" format (such as xdr) and build communication data structures to encapsulate it if needed but if the TwistedJava code does this already I'm that much further ahead. Keeping the data streams in a Java native format "seems" like a good way to go but the Python code will need to use the data as well and I'm not that far along with what the difference between a Java String and Python String (repeat this for each Java native type) are.
TwistedJava will do the expected conversion by default (so e.g. String to unicode string in python, ArrayList to list, Integer from/to python int, etc..). It's lossy going from Python to Java though (can't make Java ints, only Integers with the default objects,), so you'll need to write some custom code to create java arrays, but not too much.
On Fri, 2005-01-21 at 16:31 -0500, Itamar Shtull-Trauring wrote:
On Fri, 2005-01-21 at 14:54 -0600, Bill Krueger wrote:
[..snip..]
but the Python code will need to use the data as well and I'm not that far along with what the difference between a Java String and Python String (repeat this for each Java native type) are.
TwistedJava will do the expected conversion by default (so e.g. String to unicode string in python, ArrayList to list, Integer from/to python int, etc..). It's lossy going from Python to Java though (can't make Java ints, only Integers with the default objects,), so you'll need to write some custom code to create java arrays, but not too much.
Ok, good. I'll do some playing around with it this weekend using our Java client prototype. Thanks for the help, I'll let you know how it progresses.
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
-- Bill Krueger <bill.krueger@comcast.net>
Hi Bill (and everyone), You might be interested to know that there's a Java package called Netty (http://gleamynode.net/dev/projects/netty2/) that is very similar in principle to Twisted, in that it allows you to write network clients and servers in an efficient, event-based way. I'm using it and have found it very good - pretty simple to use and has been very reliable for me so far. The scope of Netty isn't as large as Twisted, but the core of it is very similar. You might also like to read this paragraph on the future of Netty before you start: http://gleamynode.net/dev/forum/viewtopic.php?t=87. Regards, Jon -----Original Message----- From: twisted-python-bounces@twistedmatrix.com [mailto:twisted-python-bounces@twistedmatrix.com]On Behalf Of Bill Krueger Sent: 21 January 2005 15:50 To: twisted-python@twistedmatrix.com Subject: [Twisted-Python] Question on new code development I am in the process of building an interactive game server and client with the client code written in Java and I have a couple of questions. I am hoping to be up and running with a prototype in the next month. My plans incluse the use of Twisted framework as I'm very comfortable in Python as well as Java. My first question is, should I be looking at the new Twisted 2.0 for development or stick with 1.3 and plan on upgrading to 2.0 later. Secondly, would using and/or building upon TwistedJava for the communications between the Java clients and my Twisted server code be a good direction to take? Thanks, -- Bill Krueger <bill.krueger@comcast.net> _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
participants (3)
-
Bill Krueger
-
Itamar Shtull-Trauring
-
Jon Blower