SAP Commerce Cloud currently supports two ways for the service layer to interact with the persistence layer.
- Jalo is our legacy mechanism and is still the default to support backward compatibility.
- Service Layer Direct (SLD) is more efficient and uses fewer resources. It can be used on an as-needed basis in your Java code or when invoking ImpEx.
Find out more about SLD (and its comparison with Jalo) in the following representation.
![This diagram illustrates the differences between the Service Layer Direct and Jalo-based persistence frameworks in terms of write operations within the SAP Commerce Cloud. This diagram illustrates the differences between the Service Layer Direct and Jalo-based persistence frameworks in terms of write operations within the SAP Commerce Cloud.](/service/media/topic/aa01d25d-3d99-47d4-a8a9-3b0f310d9c4c/C4H34B_2405_en-US_media/C4H34B_2405_en-US_images/U8_L5_Img1_Jalo vs SLD.png)
The previous image provides a brief comparison of the traditional Jalo persistence method and the SLD framework pertaining to write operations in SAP Commerce Cloud. The Jalo-based approach involves iterating over numerous heavy persistence objects supported by the cache during write operations. In contrast, the SLD framework collects a set of changes from the models directly and atomically persists them, using JDBC batch writing.
![This diagram illustrates the differences between the Service Layer Direct and Jalo-based persistence frameworks in terms of read operations within the SAP Commerce Cloud. This diagram illustrates the differences between the Service Layer Direct and Jalo-based persistence frameworks in terms of read operations within the SAP Commerce Cloud.](/service/media/topic/aa01d25d-3d99-47d4-a8a9-3b0f310d9c4c/C4H34B_2405_en-US_media/C4H34B_2405_en-US_images/U8_L5_Img2_Jalo vs SLD.png)
Moving on to read operations in the comparison between Jalo and SLD, as illustrated in the previous image, there's a significant difference, performance-wise. SLD caches fewer elements per item read than Jalo, thus providing it with a notable performance advantage.
Considering the benefits of using SLD over Jalo, let's explore further when we can enable SLD for practical use.