Broadworks’ OCI-P interface is used when provisioning (i.e. configuring) the complex Broadsoft Broadworks telecommunication platform. Your ERP system might create a new enterprise object for a new customer via OCI-P whereas the customer sets up locations, users, and phone numbers in a self-fullfillment portal.
In all cases, you first need to open a session. I detailed the exact OCI-P login sequence in a past article as several messages are involved.
In this article, I want to raise your attention to another detail, which might be surprising if you have worked with other interfaces before. In Broadworks’ OCI-P interface, a session is bound to the TCP/IP socket. To open a session, you first need to open a network socket using your favorite programming language. Even though you get a session ID, you can only use it on this specific socket. This has several consequences:
- You can’t re-use sockets (no socket pooling) for different sessions.
- You must keep the socket open as long as the session is still needed.
- Requests concerning a single session must be handled by the same application instance.
Especially the last point is a real bumper as you basically got sticky sessions in your application code! Let’s look at a typical web architecture for some customer self service portal to provision Broadworks.
The user interacts with a web portal using his favorite browser. The web portal itself communicates with a custom application backend you wrote. This backend is responsible for communicating with Broadworks and maybe other backend systems.
To scale the web portal, you might want to add or remove instances of Your Backend. However, each open OCI-P session is bound to a specific instance of Your Backend. Technically, there is no way to serialize network sockets to move them and the belonging session to another instance. So while scaling down, you can only shutdown an instance of Your Backend if there are no open sessions left on the server. In reality, this is very unlikely to happen and you could only cancel sessions, which will logout the user in the web portal, too.
So be aware of this behavior! In default configuration, Broadsoft’s Broadworks is using sessions bound to specific TCP/IP sockets. Keep sockets open as long as the session is still valid and make sure to use the correct socket of each session when sending requests.
Get in touch!
Want to learn more? Got questions? Something to add?Contact us!