0

I am working on a java web application which implements login/logout and searching facilities. I have just started learning python and have heard that python's dictionary implementation for searching gives good performance benefits. Currently I am using servlet for searching purpose which seems to be a little slow, so how can I use python with my web application for searching purpose at back end and give fast results.

I tried searching about this problem and found this question Java Python Integration. The accepted answer talks about Jython, but I didn't understood much of it since I am a newbee in python. Thank you.

Community
  • 1
  • 1
me_digvijay
  • 5,374
  • 9
  • 46
  • 83
  • Elaborate on what sort of searching functionality do you plan to implement. If you have to search through a large dataset, a python dictionary might not be appopriate. – Ifthikhan Feb 16 '13 at 09:54

1 Answers1

1

Python's dictionary functionality is not going to be any faster than Java's dictionary functionality (HashMap), so (to me at least) it sounds like you are heading down a dead-end if your goal is simply to improve search performance.

However, I've used Python to prototype performance improvements on Java projects by using it to test out new tools in a way that is easier than with Java web apps.

For example, testing the replacement of a complex Lucence based search with one based on the simpler Sphinx Search -- http://sphinxsearch.com/ -- Using Python I could test from the command line alongside the web based one, and modify code quickly and see the results.

Ultimately there was no reason I couldn't have used Sphinx Search from Java, but using Python allowed me to prototype and tune the search without affecting the live web app.

Eric Clack
  • 1,886
  • 1
  • 15
  • 28