For Programmers: Free Programming Magazines  


Home > Archive > PerlTk > April 2004 > Is Perl/Tk robust enough?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Is Perl/Tk robust enough?
Robert

2004-04-27, 1:51 am

I would like to create an application (similar to HP OpenView) for
monitoring routers. As the netork being monitored scales up (100's of
routers) would Perl/Tk be robust enough to handle it?

Trying to get a grasp on Perl/Tk's reach I guess.

Robert
$_@_.%_

2004-04-27, 1:51 am


Robert <catcher@linuxmail.org> wrote in message-id:
<Q46dndCxWIX34hDdRVn-hg@adelphia.com>
>
>I would like to create an application (similar to HP OpenView) for
>monitoring routers. As the netork being monitored scales up (100's of
>routers) would Perl/Tk be robust enough to handle it?
>
>Trying to get a grasp on Perl/Tk's reach I guess.
>
>Robert


Depends.. wont be if you want to do it on W32.. no threads =(
Basically its got to be a one process thing.


Robert

2004-04-27, 1:51 am

$_@_.%_ wrote:

> Robert <catcher@linuxmail.org> wrote in message-id:
> <Q46dndCxWIX34hDdRVn-hg@adelphia.com>
>
>
>
> Depends.. wont be if you want to do it on W32.. no threads =(
> Basically its got to be a one process thing.
>
>

Hmmm, I hadn't thought of that. Nor did I know Perl was thread limited
on Windows. That is good to know anyway. :-)
Marc Dashevsky

2004-04-27, 1:51 am

In article <YumdnZ9lNI5FLBDdRVn-tA@adelphia.com>, catcher@linuxmail.org
says...
> $_@_.%_ wrote:
>
> Hmmm, I hadn't thought of that. Nor did I know Perl was thread limited
> on Windows. That is good to know anyway. :-)


AFAIK, fairly recent perl is not thread-limited on Windows. I also
believe that you can use Tk in a perl script with threads, but the
use of Tk must take place in only one thread.

--
Marc Dashevsky -- Put "usenet" in Subject if you want me to read e-mail.
http://MarcDashevsky.com
Jeff Hobbs

2004-04-27, 1:51 am

$_@_.%_ wrote:

> Robert <catcher@linuxmail.org> wrote in message-id:
> <Q46dndCxWIX34hDdRVn-hg@adelphia.com>
>
[color=darkred]
> Depends.. wont be if you want to do it on W32.. no threads =(
> Basically its got to be a one process thing.


There is nothing wrong with using either Tk or Perl on Win32.
ActivePerl is built thread-enabled on Win32 by default, and
includes Tk as a built-in component. Tk works just fine in
this environment - but you must restrict yourself to using Tk
in only one interpter (thread). However, that's nothing
unusual with UI - the UI operates in one thread while you can
have many worker threads processing stuff.

--
Jeff Hobbs
http://www.ActiveState.com/, a division of Sophos
sandor

2004-04-27, 5:11 am

Define "robust enough". Perl/tk is designed to provide a GUI for
mostly form based applications. I've seen a few screenshots of HP
OpenView and think you may be able to make something close to it, but
how close is close enough? Most of the widgets I saw in OpenView are
available in perl/tk. There may be some that are not (you'll have to
make your own by combining existing widgets). If you need something
that is cross-platform, perl/tk is a pretty good choice. Java is OK,
but it's pretty slow and hard to script. I settled on perl/tk after
looking at quite a few other options. In the end, I went with perl/tk
because I like programming in perl more than I liked programming in
Java (my second choice for a cross-platform GUI). My advice: stick to
the language you like and the GUI that comes with it.
Robert

2004-04-27, 7:45 am

sandor wrote:
> Define "robust enough". Perl/tk is designed to provide a GUI for
> mostly form based applications. I've seen a few screenshots of HP
> OpenView and think you may be able to make something close to it, but
> how close is close enough? Most of the widgets I saw in OpenView are
> available in perl/tk. There may be some that are not (you'll have to
> make your own by combining existing widgets). If you need something
> that is cross-platform, perl/tk is a pretty good choice. Java is OK,
> but it's pretty slow and hard to script. I settled on perl/tk after
> looking at quite a few other options. In the end, I went with perl/tk
> because I like programming in perl more than I liked programming in
> Java (my second choice for a cross-platform GUI). My advice: stick to
> the language you like and the GUI that comes with it.

It is not going to to have quite as many features as OpenView. But I
think I have enough of an answer to go on. I too like programming in
Perl more than Java and have been itchin' to use Perl/Tk. :-)
Kurt Jaeger

2004-04-27, 12:14 pm

Hi!

>I would like to create an application (similar to HP OpenView) for
>monitoring routers. As the netork being monitored scales up (100's of
>routers) would Perl/Tk be robust enough to handle it?


Take a modular approach, e.g. gui-frontend/middleware/database backend/snmp
backend for the display components, the application specific parts and
snmp collectors.

If you do so, then, yes, I think, it would be stable enough.

--
MfG/Best regards, Kurt Jaeger 16 years to go !
LF.net GmbH fon +49 711 90074-23 pi@LF.net
Ruppmannstr. 27 fax +49 711 90074-33
D-70565 Stuttgart mob +49 171 3101372
Ala Qumsieh

2004-04-27, 12:14 pm

sandor wrote:
> Define "robust enough". Perl/tk is designed to provide a GUI for
> mostly form based applications.


Just curious. What do you mean by "form based applications"? And, what
is a non-form based application, and how is pTk not suited for it?

--Ala

Dean Arnold

2004-04-27, 1:09 pm

Robert <catcher@linuxmail.org> wrote in message-id:
<Q46dndCxWIX34hDdRVn-hg@adelphia.com>
>
>I would like to create an application (similar to HP OpenView) for
>monitoring routers. As the netork being monitored scales up (100's of
>routers) would Perl/Tk be robust enough to handle it?
>
>Trying to get a grasp on Perl/Tk's reach I guess.
>
>Robert



1) I wouldn't get too lathered up about the threads issue, there are plenty
of alternatives available for nonblocking I/O that will work fine on Win32,
esp. assuming you're using UDP based SNMP as your primary datasource/sink.

2) I'd recommend using the newest pTk (804.027); there may still be
a few bugs in the darker corners, but (IMO and current experience)
it looks/feels more robust/feature rich than the prior version.

3) Not certain what the "forms based" context is; I've developed a pretty
elaborate IDE with pure perl and pTk (database stored procedure and script
builder/debugger w/ drag/drop, schema browsers, ad hoc query, query monitor,
lots of async event handling, etc) wo/ using threads, tho I hope to migrate
to threads RSN.

4) Keep to a decoupled MVC architecture as much as possible. In my own
experience,
its easy to start very "organically" w/ pTk, mingling app logic and
presentation
in the same modules (actually, thats part of its appeal, for quick/easy gui
apps and
rapid prototyping). That approach will bite you - hard - if/when you scale
up your functionality.
E.g., don't put your app logic into -command closures!

Good luck,
Dean Arnold
Presicient Corp.
www.presicient.com


psyshrike

2004-04-28, 2:58 pm

Robert <catcher@linuxmail.org> wrote in message news:<Q46dndCxWIX34hDdRVn-hg@adelphia.com>...
> I would like to create an application (similar to HP OpenView) for
> monitoring routers. As the netork being monitored scales up (100's of
> routers) would Perl/Tk be robust enough to handle it?
>
> Trying to get a grasp on Perl/Tk's reach I guess.
>
> Robert


I would say this depends on how many of the features you want from an
Openview type system. If you are just hacking up a monitoring tool
that run one executable per host monitored, Perl/Tk would be a great
choice. If you just want to monitor a few OID's accross a hundred
machines, it would also be a great choice.

If you want a full SNMP OID database, and loads of GUI metaphores for
host data, Like circuit maps, drill down interfaces and the like you
are going to run into problems with speed and (As I have read but not
tested) memory leaks in the Canvas object.

I am using it on a medium sized project and have been mostly
satisified. There are some fit and finish issues, particularly on
Win32. An interactive monitoring system would not be completely out
of scope for Perl/Tk, but it would be painfull IMHO.

If you are looking at a one-off project, I would try to adapt existing
CLI monitoring and set/get scripts, and then write the GUI to invoke
those scripts on command. This kind of quick and dirty solution is the
more the realm of Perl/Tk, than is a full blown coding project IMHO.

-FWIW
-Matt
Robert

2004-04-28, 6:53 pm

psyshrike wrote:
> I would say this depends on how many of the features you want from an
> Openview type system. If you are just hacking up a monitoring tool
> that run one executable per host monitored, Perl/Tk would be a great
> choice. If you just want to monitor a few OID's accross a hundred
> machines, it would also be a great choice.
>
> If you want a full SNMP OID database, and loads of GUI metaphores for
> host data, Like circuit maps, drill down interfaces and the like you
> are going to run into problems with speed and (As I have read but not
> tested) memory leaks in the Canvas object.
>
> I am using it on a medium sized project and have been mostly
> satisified. There are some fit and finish issues, particularly on
> Win32. An interactive monitoring system would not be completely out
> of scope for Perl/Tk, but it would be painfull IMHO.
>
> If you are looking at a one-off project, I would try to adapt existing
> CLI monitoring and set/get scripts, and then write the GUI to invoke
> those scripts on command. This kind of quick and dirty solution is the
> more the realm of Perl/Tk, than is a full blown coding project IMHO.
>
> -FWIW
> -Matt


To start with I want to create an XML file with pertinent information
(name, ip address, etc.). The program will read that file, create icons
on a canvas (using the name from the XML file) and be either red or
green should me up or down status. I may add a right click functionality
to do some other things but that should make me happy for now. :-)

Robert
psyshrike

2004-04-29, 7:22 pm

>
> To start with I want to create an XML file with pertinent information
> (name, ip address, etc.). The program will read that file, create icons
> on a canvas (using the name from the XML file) and be either red or
> green should me up or down status. I may add a right click functionality
> to do some other things but that should make me happy for now. :-)
>
> Robert


That would be pretty easy once you've decided what exactly you want to
monitor and what MIBS those are in and how to interpret the data. I
would just make a few GIFS representing states, and then swap them
back and forth on a button instead of using canvas. Then grid the
buttons in a Pane. Much easier than using Canvas, if all you have to
do is show state.

I think the monitoring part will be harder than the GUI part on such a
project. I have only lightly worked with SNMP, and found it could be a
huge mess in multivendor networks.

I actually wrote a protocol specification to replace SNMP, but never
had the time to actually write the code for it. It was called DVMP
(Distance Vectored Monitoring Protocol). Its sort of like SNMP
enbedded in RIP2 frames. It negates the requirement for having a
monitoring server completely, by placing a shared monitoring table on
every device on the network.

Anywho, best of luck on your project.

-Matt
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com