[Zope-dev] Using Zope in a client-server system

Itai Tavor itavor@bigpond.net.au
Fri, 3 Mar 2000 19:31:22 +1100


Michel Pelletier wrote:

>  Itai Tavor wrote:
>>
>>  Hi,
>>
>>  I need to design sales center system containing a server and
>>  salesperson workstations. I thought it would be a good idea to build
>>  the system around Zope, for several reasons:
>>
>>  - With Zope on the server and a standard web browser on the
>>  workstations, a lot of low level work is already done for me and I
>>  can focus on high level issues such as UI and application logic.
>
>  Yup.
>
>>  - Easy connectivity to an SQL database.
>
>  Yup.
>
>>  - DTML code chunks and Python Methods should be easier to manage than
>>  1000's of lines of Java or VB code.
>
>  Yup.
>
>>  - Easy to install and update the product and to manage and debug it
>>  through the web.
>
>  Yup.
>
>>  - It would be easy to create new ways to view the data - for example,
>>  a WAP version to send sales statistics to managers out of the office.
>
>  Yup.
>
>>  There are a couple of features that I am not sure how to implement though:
>>
>>  - I need to display constantly-updating information on the
>>  workstations. I could do this by reloading the window every second,
>>  but that seems ugly - I'd like to only update certain fields, which I
>>  can do using layers and JavaScript, but I need to get the updated
>>  data from the server. I guess that can be done with Java, but I'd
>>  like to keep the system simple - a browser with HTML and JavaScript
>>  only on the client side, DTML, Zope with Python Methods, and External
>>  Methods, and an SQL database on the server, no Java or any other
>>  complications.
>
>  Ah, well, you see you've hit one of the disadvantages of using a
>  stateless protocol like HTTP to solve your problem.  There is no good
>  general purpose solution that I know of to address this issue.

HTTP not being bi-directional is a bigger problem than it being 
stateless... I planned to use a session product that will identify 
each workstation and keep a record of exactly what is happening on 
it. But the biggest problem is that the browser / web server setup is 
client event driven.

>>  - I also need to push data to the workstations - based on events
>>  detected at the server, I need to bring up a message on a
>>  workstation, and remove it in response to another event. I really
>>  don't want to refresh a frame every second for this, and I also would
>>  hate to have to write a Java applet to do it.
>
>  This is the identical problem to the one above.
>
>>  Any comments or suggestions regarding the above problems, the choice
>>  of Zope for this project, or the project in general would be
>>  appreciated.
>
>  If you want to go far enough, you can try and use XML-RPC (also,
>  stateless, but not client-bound to a certain model) and something like
>  wxPython to build your own GUI that can at least mantain some sort of
>  persistent or bi-directional communication between your clients and
>  servers.  But this is a big task.

Programming my own GUI is already farther than I'd like to go... and 
if I do, would it still be a good idea to use Zope on the server 
side? If I use Zope, wouldn't I still have to use HTTP? How otherwise 
can I get the client to communicate with the server? (Complete 
ignorance of XML-RPC implied here.)

>  I think if you maybe rethink your problem you can compromise on
>  something that does not require the server pushing data to the client.

Yeah, without actually failing to deliver any of the features the 
client is expecting... the only way I can think of is simply to 
reload certain frames every second... seems like a very ugly solution.

I need to quote on time and cost for this project, and to do that I 
have to figure out the tools I'd be using. I'm sure a Zope/web 
browser solution will be the quickest, but if I go that way and get 
stuck, I won't be in a very enviable position. I'm sure that most 
programmers would immediately start coding Java or VB at this 
point... am I making a mistake trying to apply Zope to a task it's 
not good for?

Itai
--
Itai Tavor                      -- "Je sautille, donc je suis."    --
itavor@vic.bigpond.net.au       --               - Kermit the Frog --
-- "What he needs now is understanding... and a confederate victory" --
-- Dr. Jacobi, Twin Peaks         --