Results 1 to 2 of 2

Thread: [SOLVED] Is Soap faster than zmmailbox?

  1. #1
    Join Date
    Apr 2011
    Rep Power

    Default [SOLVED] Is Soap faster than zmmailbox?


    I've written a little zimlet that works, but takes a while to run. I suspect I could make it faster by using the SOAP interface instead of a command-line search, but I'm having trouble finding any example zimlets which do something similar to my project. I'm hoping someone can point me toward a zimlet that does the equivalent of a "zmmailbox search" command with SOAP.

    The Zimlet is pretty straightforward. It loads automatically and sends out an ajax request to a jsp script. The JSP builds a zmmailbox search command and runs it using Java's Runtime.exec method. This approach works, but on my test box the command takes about 30 seconds. It'll be a bit snappier on our production server, but if each login of our 10,000ish userbase results in 2 new Java threads and corresponding AJAX requests, I predict a noticeable hit in server performance, so...

    My Question is whether a SOAP (or REST) query would be less resource intensive than a zmmailbox search command, and if so, could someone please point me toward a zimlet that does a similar query. I get the general idea of SOAP, but I'm fuzzy on how exactly I would implement my query in a zimlet.

    I've attached the complete zimlet, in case that helps, or the code is up on github. The jsp file is called 35.jsp. As an aside, is there any way to tell zimbra to recompile JSP when a zimlet is loaded through the ?dev=1 mode? Renaming the file gets a bit tedious after a while.

    Attached Files Attached Files
    Last edited by joechrysler; 04-05-2011 at 07:42 PM.

  2. #2
    Join Date
    Apr 2011
    Rep Power


    Update: I found an example zimlet that does a simple search for incomplete task items using Zimbra's Javascript API. After a little bit of fiddling, I convinced it to run a search on email messages instead of tasks. The new zimlet runs in something like 0.7 seconds and doesn't even cause a blip in server performance. The whole zimlet (all four files of it) is up on github for anyone to peruse, in case it might be helpful to somebody.

Similar Threads

  1. XSD/WSDL Files for the SOAP Server?
    By photoadrian in forum Developers
    Replies: 5
    Last Post: 12-23-2012, 01:32 AM
  2. Jar For Soap Client
    By wcameron in forum Developers
    Replies: 19
    Last Post: 06-03-2009, 02:04 PM
  3. zmzimletctl deploy - ERROR -
    By todd_dsm in forum Administrators
    Replies: 0
    Last Post: 04-02-2009, 01:41 PM
  4. Question on SOAP compatibility
    By Robin Diederen in forum Developers
    Replies: 3
    Last Post: 09-19-2006, 01:26 AM
  5. Bug with preauth mechanism and SOAP headers?
    By Coilcore in forum Developers
    Replies: 3
    Last Post: 07-20-2006, 10:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts