OSGI platform and multithreading

2 views
Skip to first unread message

Lance Norskog

unread,
Sep 7, 2008, 11:15:16 PM9/7/08
to imgse...@googlegroups.com

Does the imgdb server .so file support multi-threaded use?
1) Can we search with two threads simultaneously?
2) Can we index on one thread and search with other threads?
3) Can we index with two different threads simultaneously?
4) and also search in another two threads?

The imgdb package includes an "Activator.java" file for OSGI. Have you used this? Does multi-threaded use work under the OSGI platform?

Thanks!

Lance Norskog


Ricardo Niederberger Cabral

unread,
Sep 26, 2008, 7:45:16 AM9/26/08
to imgse...@googlegroups.com
Hi,

1) yes
2) probably won't crash but may provide wrong results or ignore images
currently being added
3) no
4) no

These limitations on imgdb.so were one of the key reasons for choosing
Twisted as the python networking library used for exposing the API at
imgdb.so for remote clients. Twisted is aynchronous and event-based so
all remote requests are handled on a single-thread. Making imgdb.so
network-based through this model seemed to me the simplest way to
scale it up without dealing with the complicatioins of multithreading
on C++ code.

I was able to get imgdb.so working under the Equinox OSGi container on
a Linux machine (there are a few issues on different platforms) but
never got around to documenting how to build and wrap it properly or
improving the build files. This was a pre-requisite for building the
Eclipse RCP version of imgSeek which I have stopped working on years
ago. For making imgdb.so working inside the multithreaded world of
complex GUI applications, I'd wrap it on a Java POJO and resort to
Java's thread handling and synchronization mechanisms.

--
Ricardo Niederberger Cabral
http://www.imgseek.net/
ricardo.cabral at imgseek.net
skype: rnc000

Reply all
Reply to author
Forward
0 new messages