Scenarios

When you use the Service Layer API, you may perform one, or both, of the following scenarios:
- Resource-intensive operations, which require long processing times at different layers. For example, creating marketing documents with huge line items or performing $batch operations or login operations.
- High Concurrency, which means performing short but more simultaneous requests from different Service Layer users. For example, the end user loading the page which fires several GET requests to retrieve information.
Service Layer Dependencies

To efficiently develop, implement, maintain, and troubleshoot Service Layer, you must have a clear understanding of the Service Layer dependencies so that you can apply the best approach for your scenario.
- Service Layer landscape
Service Layer is the central point of interaction for various applications. The following list outlines some of the applications that interact with the Service Layer:
- Job service - Alert and Scheduling
- Electronic Document Service (EDS)
- SAP Business One, Web client
- SAP Business One Integration (B1i) scenarios using Service Layer
- Mobile service
- All partner add-ons using Service Layer
- Requests handled by Service Layer
Service Layer is dependent on the OBServer for business logic. Processing a request depends on the following factors:
- The type of requests - (GET/PATCH/DELETE/POST)
- The complexity of the request
- The objects used in the request, for example, Documents, Items, Production Order, Picklists, Activity, and Contacts.
- The number of lines processed in the requests.
- The number of serial numbers and batch numbers processed.
- The number of bin locations processed.
- Total requests - Total number of requests processed by Service Layer.
- Concurrency - Number of simultaneous requests processed by Service Layer.
- Impact due to database response
The database response time strongly influences how the request is processed. The database response time depends on the following factors:
- The size of the database.
- The nsumber of rows on the table you are operating.
- The number of other concurrent processes which could generate database activity. For example, other add-ons, SAP Business One Desktop Client, reports, and alerts.
- The customization on the database, such as a huge number of UDF, UDT, UDO.
- Notification logics in notification procedures.