Using web.py for network appliance, should I bother with a real web server?

107 views
Skip to first unread message

Dan Shechter

unread,
Oct 9, 2012, 7:48:14 AM10/9/12
to we...@googlegroups.com
Hi All,

I have a network appliance I am developing which has CLI written in python (cmd).

I want to add a web interface. 

I plan to use ajax only, which means that the browser will get static pages and use ajax (via RESTful web service over SSL) to retrieve data to populate the pages. 

But not only users will use the web service, I expect any other application to use it to retrieve data using RESTful web services over SSL.

Here is my question:

Since _very_ few users will be using the web UI, I don't expect much load. Do I need to bother to use a real web server or can I just use the built in web server which is used for development?

Thanks, Dan

Alec Taylor

unread,
Oct 9, 2012, 8:05:52 AM10/9/12
to we...@googlegroups.com
You mention very few users.

I'm guessing also very little data?

Can we get some concrete figures?!
> --
> You received this message because you are subscribed to the Google Groups
> "web.py" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/webpy/-/HKI_uu3Z6CMJ.
> To post to this group, send email to we...@googlegroups.com.
> To unsubscribe from this group, send email to
> webpy+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/webpy?hl=en.

Dan Shechter

unread,
Oct 9, 2012, 9:53:12 AM10/9/12
to we...@googlegroups.com
On average 1 RESTful transaction per minute.

The maximal transaction will send 400K bytes. On average I expect to send about 100K of data per transaction.

Alec Taylor

unread,
Oct 10, 2012, 8:32:58 AM10/10/12
to we...@googlegroups.com
Wow!

With that little use you'll be fine with web.py's server, or even
http://docs.python.org/library/basehttpserver.html
> --
> You received this message because you are subscribed to the Google Groups
> "web.py" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/webpy/-/abBRfxvZ2ZwJ.

Shannon Cruey

unread,
Oct 10, 2012, 1:06:37 PM10/10/12
to we...@googlegroups.com
Agreed.  We're using the web.py built in server for a pretty robust multiuser application and so far have had no problems.  Some pages perform as many as 10 ajax requests to populate the page.

Dan Shechter

unread,
Oct 11, 2012, 5:59:23 AM10/11/12
to we...@googlegroups.com
Thank you all.

I'll use the built in server.

Now since all of the pages will be static (dynamic content wil be ajaxed), any suggestions regarding how to handle this?

I think to redirect /index.html to /static/index.html and make all internal link relative to /static.

What do you think?

Shannon Cruey

unread,
Oct 11, 2012, 10:34:21 AM10/11/12
to we...@googlegroups.com
for this I'm using web.py templates, but only for one specific purpose - a shared header and footer.  So all my pages are in templates and rendered via the render() function.  Aside from that difference I'm like you... all pages are static and content is ajax.

--
You received this message because you are subscribed to the Google Groups "web.py" group.
To view this discussion on the web visit https://groups.google.com/d/msg/webpy/-/Tp91LXY4dGIJ.
Reply all
Reply to author
Forward
0 new messages