[Twisted-Python] Network newbie
I have been wondering how I could develop a python application which would make it easy for users of this application to share small amounts of textual information over the Internet. The information is not confidential but I would like to ensure that it is coming from and generated by the application in question using ssl. I want it to be easy for users of the application to identify and communicate with other users of the application. What type of network am I talking about here? I have plenty of programming experience, but not much network programming experience. Any advice would be appreciated. thanks Brian Duffy -- Duff
I think you need to define your application functionality a little more. You could be describing anything from a web app that implements a pasteboard, to a web service shuffling JSON objects around or anything in between. -J On Wed, Apr 7, 2010 at 2:36 PM, Brian Duffy <brduffy@gmail.com> wrote:
I have been wondering how I could develop a python application which would make it easy for users of this application to share small amounts of textual information over the Internet. The information is not confidential but I would like to ensure that it is coming from and generated by the application in question using ssl. I want it to be easy for users of the application to identify and communicate with other users of the application. What type of network am I talking about here? I have plenty of programming experience, but not much network programming experience. Any advice would be appreciated. thanks Brian Duffy
-- Duff
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Thanks Jason, Okay, lets say that two users are using this hypothetical application. Each user has some files on his/her system that were installed locally (as part of the installation or from disk or whatever). Lets assume that both users have the same files for the sake of this discussion. The application stores some unique identifiers for each of these files. From a high level point of view I would like the users to be able to send a list of identifiers to another user of the system over the internet to indicate which documents to view and in what order. There may also be some additional textual data involved to represent segues between the files to be viewed. Being new to network programming I am not sure what the simplest way is to accomplish the task. The nature of the data being communicated is not confidential but I would like to be reasonably sure that the data is being generated and sent from the application and user in question. How will users identify themselves to others for communication. I would like a user to be able to tell another user what his "address" is and have that user be able to enter that address into the application and use it whenever he wishes to send that particular user a sequence of id's and text to be parsed by the application. I suppose the application will be acting as both server and client. Any thoughts? Thanks again Brian On Wed, Apr 7, 2010 at 4:53 PM, Jason J. W. Williams < jasonjwwilliams@gmail.com> wrote:
I think you need to define your application functionality a little more. You could be describing anything from a web app that implements a pasteboard, to a web service shuffling JSON objects around or anything in between.
-J
I have been wondering how I could develop a python application which would make it easy for users of this application to share small amounts of textual information over the Internet. The information is not confidential but I would like to ensure that it is coming from and generated by the application in question using ssl. I want it to be easy for users of the application to identify and communicate with other users of the application. What type of network am I talking about here? I have plenty of
On Wed, Apr 7, 2010 at 2:36 PM, Brian Duffy <brduffy@gmail.com> wrote: programming
experience, but not much network programming experience. Any advice would be appreciated. thanks Brian Duffy
-- Duff
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
-- Duff
Sounds like a peer-to-peer model and you need to use an SSL factory for your protocols. The rest...authentication etc is really something for you to put together. -J On Wed, Apr 7, 2010 at 3:31 PM, Brian Duffy <brduffy@gmail.com> wrote:
Thanks Jason, Okay, lets say that two users are using this hypothetical application. Each user has some files on his/her system that were installed locally (as part of the installation or from disk or whatever). Lets assume that both users have the same files for the sake of this discussion. The application stores some unique identifiers for each of these files. From a high level point of view I would like the users to be able to send a list of identifiers to another user of the system over the internet to indicate which documents to view and in what order. There may also be some additional textual data involved to represent segues between the files to be viewed. Being new to network programming I am not sure what the simplest way is to accomplish the task. The nature of the data being communicated is not confidential but I would like to be reasonably sure that the data is being generated and sent from the application and user in question. How will users identify themselves to others for communication. I would like a user to be able to tell another user what his "address" is and have that user be able to enter that address into the application and use it whenever he wishes to send that particular user a sequence of id's and text to be parsed by the application. I suppose the application will be acting as both server and client. Any thoughts? Thanks again Brian
On Wed, Apr 7, 2010 at 4:53 PM, Jason J. W. Williams <jasonjwwilliams@gmail.com> wrote:
I think you need to define your application functionality a little more. You could be describing anything from a web app that implements a pasteboard, to a web service shuffling JSON objects around or anything in between.
-J
On Wed, Apr 7, 2010 at 2:36 PM, Brian Duffy <brduffy@gmail.com> wrote:
I have been wondering how I could develop a python application which would make it easy for users of this application to share small amounts of textual information over the Internet. The information is not confidential but I would like to ensure that it is coming from and generated by the application in question using ssl. I want it to be easy for users of the application to identify and communicate with other users of the application. What type of network am I talking about here? I have plenty of programming experience, but not much network programming experience. Any advice would be appreciated. thanks Brian Duffy
-- Duff
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
-- Duff
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Hi Brian,
I suppose the application will be acting as both server and client. Any thoughts?
For the network part you're certainly describing a P2P model. These applications are essentially text messaging each other various bits of info. Keep in mind with P2P stuff - it's notoriously hard to be *really* P2P without having some element of centrality/servers. The reason is that what seems like simple communication between two computers on the internet really goes through firewalls and Nats and cable modems and what not. The internet - or rather the Internet as its commonly referred to - is really a collection of public hubs (websites, mail servers, etc.) which users traverse through their layers of NATs and firewalls to get to. Usually only ports 80 and 443 (HTTP and HTTPS) are open on these NATs and firewalls, hence why you don't see a proliferation of other random protocols and applications, besides a handful. Skype or Kazaa are P2P systems that use a hybrid approach of relaying via central, publicly accessible "supernodes" which are promoted on the fly. Anyway, most people take the easy way out and have one or more servers sitting somewhere that their clients connect to. Not that the P2P problem isn't fun ;-) Here's one of many solutions: get one or more publicly available servers, and stick some XMPP software (twisted.words, Punjab, ejabberd, whatever). Turn on SSL. Now you have a secure, centralized communications system. Reza -- Reza Lotun mobile: +44 (0)7521 310 763 email: rlotun@gmail.com work: reza@tweetdeck.com twitter: @rlotun
On Apr 7, 2010, at 6:35 PM, Reza Lotun wrote:
Here's one of many solutions: get one or more publicly available servers, and stick some XMPP software (twisted.words, Punjab, ejabberd, whatever). Turn on SSL. Now you have a secure, centralized communications system.
Another solution, if you want to go down the "real P2P" route, is to start maintaining Divmod Vertex <http://divmod.org/trac/wiki/DivmodVertex> - it's a pretty good proof of concept, and solves many of the really hard problems (especially NAT traversal), but it will definitely need to be fixed up if you want to deploy it in a real-world application.
Hello Brian, You can start with one server and one client on each side. If privacy is not a concern for your application, you don't need to encrypt the data over SSL. The easiest to use is a basic LineReceiver and a line sender. Next, you can use JSON if you want to send more than text. Look at the examples ! TIP: The sender might tell the other peer on which port its receiver is listening. a 2010/4/8 Glyph Lefkowitz <glyph@twistedmatrix.com>:
On Apr 7, 2010, at 6:35 PM, Reza Lotun wrote:
Here's one of many solutions: get one or more publicly available servers, and stick some XMPP software (twisted.words, Punjab, ejabberd, whatever). Turn on SSL. Now you have a secure, centralized communications system.
Another solution, if you want to go down the "real P2P" route, is to start maintaining Divmod Vertex <http://divmod.org/trac/wiki/DivmodVertex> - it's a pretty good proof of concept, and solves many of the really hard problems (especially NAT traversal), but it will definitely need to be fixed up if you want to deploy it in a real-world application.
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
-- Alexandre Quessy http://alexandre.quessy.net/
participants (5)
-
Alexandre Quessy
-
Brian Duffy
-
Glyph Lefkowitz
-
Jason J. W. Williams
-
Reza Lotun