Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #50896

Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)

From Jorgen Grahn <grahn+nntp@snipabacken.se>
Newsgroups comp.lang.python
Subject Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project)
Date 2013-07-19 11:25 +0000
Message-ID <slrnkui8h5.2m9.grahn+nntp@frailea.sa.invalid> (permalink)
References <1f3e15e8-bbd3-457c-85f4-c5f251b3e744@googlegroups.com> <mailman.4823.1374123184.3114.python-list@python.org> <432d1377-8421-479d-a560-962158de2e15@googlegroups.com> <mailman.4827.1374128723.3114.python-list@python.org>

Show all headers | View raw


On Thu, 2013-07-18, Chris Angelico wrote:
...
> You can certainly do your server-side programming directly in Python;
> in fact, I recommend it for this task. There's no reason to use HTTP,
> much less a web framework (which usually consists of a structured way
> to build HTML pages, plus a bunch of routing and stuff, none of which
> you need). All you need is a simple structure for separating one
> message from another.

> I would recommend either going MUD/TELNET style
> and ending each message with a newline, or prefixing each message with
> its length in octets. Both ways work very nicely; newline-termination
> allows you to use a MUD client for debugging, which I find very
> convenient

It's definitely the way to go.  It's not just MUDs -- a lot of
Internet protocols work that way.  Netcat is one popular client for
talking to/debugging/testing such servers.  No doubt MUD clients too,
but last time I did such stuff was in 1993, and I think I used telnet
...

In fact, I'd design the protocol before starting to write code.  Or
better, steal some existing chat protocol.  Like a subset of IRC.


There's also another question in the original posting that bothers me:
paraphrased "do I need to learn database programming to manage users"?
No!  Unix does fine with plain-text files.

Managing credentials (understanding cryptography, setting up a support
organization for resetting lost passwords ...) is non-trivial though,
so try to do without such things at first.  It's not obvious that you
should need an account for an experimental chat, anyway.

/Jorgen

-- 
  // Jorgen Grahn <grahn@  Oo  o.   .     .
\X/     snipabacken.se>   O  o   .

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Aseem Bansal <asmbansal2@gmail.com> - 2013-07-17 21:36 -0700
  Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) vikash agrawal <vikashagrawal1990@gmail.com> - 2013-07-18 10:22 +0530
    Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Aseem Bansal <asmbansal2@gmail.com> - 2013-07-17 23:11 -0700
      Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Chris Angelico <rosuav@gmail.com> - 2013-07-18 16:25 +1000
        Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Aseem Bansal <asmbansal2@gmail.com> - 2013-07-17 23:36 -0700
          Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Andrew Berg <robotsondrugs@gmail.com> - 2013-07-18 01:49 -0500
            Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Aseem Bansal <asmbansal2@gmail.com> - 2013-07-18 00:05 -0700
              Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Chris Angelico <rosuav@gmail.com> - 2013-07-18 17:13 +1000
                Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Aseem Bansal <asmbansal2@gmail.com> - 2013-07-18 00:29 -0700
                Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Chris Angelico <rosuav@gmail.com> - 2013-07-18 17:34 +1000
                Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Aseem Bansal <asmbansal2@gmail.com> - 2013-07-18 00:48 -0700
                Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Chris Angelico <rosuav@gmail.com> - 2013-07-18 17:52 +1000
                Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Aseem Bansal <asmbansal2@gmail.com> - 2013-07-18 01:10 -0700
                Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Chris Angelico <rosuav@gmail.com> - 2013-07-18 18:37 +1000
                Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) aseem bansal <aseembansal@ymail.com> - 2013-07-18 01:04 -0700
                Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Terry Reedy <tjreedy@udel.edu> - 2013-07-18 13:04 -0400
                Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Serhiy Storchaka <storchaka@gmail.com> - 2013-07-18 20:55 +0300
                Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Grant Edwards <invalid@invalid.invalid> - 2013-07-18 18:02 +0000
                Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Owen Marshall <o@owenmarshall.invalid> - 2013-07-18 18:19 +0000
                Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Michael Torrie <torriem@gmail.com> - 2013-07-18 16:40 -0600
                Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Owen Marshall <o@owenmarshall.invalid> - 2013-07-19 00:54 +0000
          Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Chris Angelico <rosuav@gmail.com> - 2013-07-18 16:49 +1000
        Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Grant Edwards <invalid@invalid.invalid> - 2013-07-18 13:00 +0000
        Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Jorgen Grahn <grahn+nntp@snipabacken.se> - 2013-07-19 11:25 +0000
          Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Chris Angelico <rosuav@gmail.com> - 2013-07-19 21:56 +1000
  Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) "Eric S. Johansson" <esj@harvee.org> - 2013-07-18 01:39 -0400
    Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Aseem Bansal <asmbansal2@gmail.com> - 2013-07-17 22:50 -0700
  Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Chris Angelico <rosuav@gmail.com> - 2013-07-18 16:15 +1000
  Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Michael Torrie <torriem@gmail.com> - 2013-07-18 16:34 -0600
  Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Jake Angulo <jake.angulo@gmail.com> - 2013-07-19 17:10 +1000
  Re: What does it take to implement a chat system in Python (Not asking for code just advice before I start my little project) Chris Angelico <rosuav@gmail.com> - 2013-07-19 17:17 +1000

csiph-web