cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way in the Node.js Cloud SDK to use session cookies?

gregorw
Active Contributor

Hello SAP Cloud SDK for Node.JS Experts,

a while ago I've posted the question Slow response times when calling SAP Business One (B1) Service Layer with CAP. In addition to the answer from mariatrinidad.martinezgea we've got the following answer from SAP Support:

"I just discussed this with someone from Business One to learn more about the problem.

From the discussion in SAP answers i also learned, that the authentication is done for every call to the B1 system. I also learned that the session keeps alive for 30mins, and after that the authentication is slower again, until the new session in B1 has been established.

So from CAP point of view a possible solution would be to keep the session alive with heartbeat requests every 25mins (or even longer intervals like 29mins if the interval scheduler is accurate enough). If you keep the session alive, with a heartbeat request then there will be no slow requests anymore as long as the session gets random requests and stays active.

We actually also do something similiar with our hana layer, there we use generic-pool and keep multiple connections in the pool and if one times out it is just reconnected, so it can be reused when needed.

This however you have to do in a custom implementation and is nothing, that we can offer generically."

Is there an option to solve that via the SAP Cloud SDK?

Best regards
Gregor

artemkovalov
Employee
Employee

Hi gregorw,

Thanks for the good question. Talking of cookies, do you mean some in memory session cookie to know the timestamp of the last sent request? I'm not sure if we're doing that. We have to check.

Also, as it might be a bit of an investigation I'd recommend always opening an issue in our GitHub repository for better support and tracking than answers.sap.com has to offer.

Would it be Ok for you to create an issue there? I helps us to see it on the board and even post back a pull request if that's a solution 🙂

Best,
Artem

gregorw
Active Contributor
0 Kudos

Hi Arthem,

thank you for the quick reply. I've created the issue:

Is there a way in the Node.js Cloud SDK to use session cookies? #946

Best regards
Gregor

Accepted Solutions (1)

Accepted Solutions (1)

Junjie
Advisor
Advisor
0 Kudos

Since the issue is created in the OS repo, this question will be treated as "duplicated". Please find the updates by checking the issue.

Answers (0)