We're Hiring!

multiple connections with the same account?

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

multiple connections with the same account?

Postby bhcho » Fri Dec 16, 2011 7:01 pm

Hi,

I have a question about multiple connections with the same account.

I was importing a 1,000 image batch to OMERO server using 'import' command from omero shell.
for each image importing, my custom bridge submits a python function job into queue.
this python function connects to OMERO server using the same account by
Code: Select all
conn = BlitzGateway(ID, PW, host='localhost', port=int(14064))
conn.connect()

Then this function does the following things
1. do some calculation
2. creates a new OMERO.table (linking to the image)
3. updating a global OMERO.table

after this process is done,
-only 979 images have attached OMERO.table (4 of them have an empty OMERO.table)
-only 892 images are updated to the global OMERO.table

my guess is....
If I submit a job into a queue, there might be multiple connections with the same account. Does this causes any problem?

If I do not use a queue manager and do the process one by one, then everything looks good (even though it takes longer time).

Best,
BK
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Re: multiple connections with the same account?

Postby jmoore » Mon Dec 19, 2011 10:26 am

bhcho wrote:If I submit a job into a queue, there might be multiple connections with the same account. Does this causes any problem?


Multiple connections from one account is fine, but there is a limit to how many connections can be made in a very short period of time. You may have to add a small delay or a retry to let them all connect. Are you seeing any exceptions?

Also, you can share the session, if you'd like, and just use multiple processes; but 1000 simultaneous processes is very likely going to be too much power. Try 4 or 8.

Cheers,
~Josh.
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany


Return to Developer Discussion

Who is online

Users browsing this forum: No registered users and 0 guests