You are viewing limited content. For full access, please sign in.

Question

Question

concurrency of user sdk in a web api

SDK
asked on April 11, 2019 Show version history

Hi all,

I need to create a web service (web api.net) with sdk laserfiche that creates a laserfiche document under certain sending parameters (the web api has a full user configured with administrator profile configured), but I have problems logging in due to the number of concurrences of the user configured in the web api (4 concurrences by full named user), that is, when trying to simultaneously enter the session of user 5 to web services, this user is interrupted because the number of concurrences of licenses reaches the limit .

If anyone knows, I'd appreciate the insight. Thanks!

 

1 0

Replies

replied on April 11, 2019

There is no way to avoid the session count limit, so you would have to take a different approach.

Laserfiche offers application licensing, which may be better than trying to use a named user account. Instead of giving the account a license, the application would pass the application key and each session would draw from the available application licenses.

Additionally, although there is a 4 concurrent session limit with licenses, you can have up to 10 concurrent actions per session.

For this reason, our API stays logged into Laserfiche 24/7 with a "session pool" and just randomly assigns one when a request comes in; this way we are making the most out of each session instead of giving each request its own.

2 0
replied on April 11, 2019

Hi Jason, could you please explain me a little bit more about the 'application licensing' figure that you mention in your previous post or please send me a link where i can find information about the right way to use it, configure it or buy it? Thanks for your help!

0 0
replied on April 11, 2019 Show version history

I don't know if licensing information is available other than reaching out to Laserfiche (since it appears you're a VAR).

The official product name of these licenses are

Keyed Concurrent ReadOnly User

Keyed Concurrent Full User

In your case, you would need the Full User version to write documents.

Using them is quite simple, all you need to do is provide an ApplicationID and ApplicationName when creating the session object.

For example,

var session = new Session
{
    ApplicationId = ApplicationId,
    ApplicationName = ApplicationName,
    AutoReconnect = true,
    CanShareLicense = true
};
                
session.LogIn(User, Password, registration);
session.KeepAlive = true;

Once you have the licenses, there is an "Application Key" tab on the main page of LFDS that can be used to access the Id/Key value.

The Name can be anything you want and will be displayed in the active sessions portion of the administration console.

2 0
replied on April 11, 2019

Did you make sure to log out after finished creating the document? I have experienced that sometimes programs do not automatically log out right away after completing, especially with web applications.

I think unless you have higher volume that 5 people would not be logged in with that in the time it takes to create a document, assign meta data data, and maybe upload an image file or a small electronic document. If you are have the program OCR at that point, try having the program not OCR and create a Workflow to OCR to speed up that portion and free up the license sooner.

1 0
replied on April 11, 2019

The api web application is closing all the sessions, but I have problems when there are simulated sessions more than 4, that is to say

if there is a way to clone the user session configured on the web api through the SDK?

0 0
replied on April 11, 2019

What do you mean clone the session?

0 0
replied on April 11, 2019

Get a session from a user who is currently active, that is to say that he has 4 active concurrences and the 5th user obtains the session of any of them.

 

 

0 0
replied on April 11, 2019

Rather than attempting to clone an active session, you're probably better off with the approach we used.

Create user-independent sessions that the application keeps open, or reopens if they get logged out for some reason, and assign one of those when a user request comes in.

Either way you would need to monitor how many connections are active, so this is the more efficient route.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.