How to protect Python source from modification

Frank Millman frank at chagford.com
Wed Sep 14 02:48:46 EDT 2005


Magnus Lycka wrote:

[snip lots of interesting stuff]

>
> > There is the question of where state should be maintained. If on the
> > server, I would have to keep all the client/server connections open,
> > and maintain the state of all the sessions, which would put quite a
> > load on the server.
>
> Really? How many users do you imagine? How would you plan to organize
> your servers? One process per connection, one thread per connection or
> asynchronous processing in one thread as in Twisted or asyncore? Perhaps
> you should have a look at Twisted ot asyncore?
>

I was thinking of one thread per connection. How many users? I would be
ecstatic if I got a 20-user system working. However, I know from
experience that these things can mushroom, especially if there are no
licence fees involved, so it can easily be more.

Actually I should just get it working, and then monitor performance as
the number of users increases. I am sure there will be many things I
can do if it starts to slow down.

> > This raises the question of whether I should even bother with a gui
> > client, or bite the bullet and only have a browser based front end.
> > Judging from recent comments about new technologies such as Ajax, a lot
> > of the disadvantages have been overcome, so maybe this is the way to
> > go.
>
> It's still a big difference, isn't it? Have you seen a web based
> accounting system that you thought was good enough?
>

Actually no <g>

> > It would be a shame to scrap all the effort I have put into my
> > wxPython-based front end. On the other hand, it would be pointless to
> > continue with an approach that is never going to give me what I want.
> > Any advice which helps to clarify my thinking will be much appreciated.
>
> A wxPython client and a Twisted server might well be a useful combo. If
> you have well written Python modules for validating data etc, you might
> just run them in both client and server to achieve instant feedback on
> the client without lowering the security bar.
>

I have seen Twisted mentioned many times in this ng, but I have no idea
what it actually does. Can someone tell me in simple terms what
advantage it might give me over a multi-threaded socket server program.
I have (just now) reread the intro to the asyncore module, and it says
"this strategy can seem strange and complex, especially at first". This
describes my present situation exactly :-)

Many thanks for the valuable comments.

Frank




More information about the Python-list mailing list