cancel
Showing results for 
Search instead for 
Did you mean: 

Local persistence Vs Remote persistence in SAP

Former Member
0 Kudos

Hi All,

Why we remote persistence instead of local persistence in CAF?

Can you please provide any scenario on the same?

In my application, am going to use non sap database.Which one i can go for?

Help me out.

Thanks in advance

Vani

View Entire Topic
former_member206397
Contributor
0 Kudos

Hi,

In a CAF project, we have two options for accessing data. If we want to access data from an external system, we need to use Remote Persistency. That means in your CAF project data will be accessed through CAF external service that may be SAP service or non SAP service.

We have three kinds of service in a CAF project - 1. Entity Service, 2. Application Service. 3.External Service. Entity service is related to CAF Local DB. So if you want to store data in CAF local DB then you will a use Entity service. Even if you want to Use External service and Entity service at the same time that also you can do here. That is called mixed persistency. At thet situation external service will be mapped with entity service. So here remote database and CAF data base both will be involved. If you want to use only remote persistency then you can only access remote service from application service dirrectly, not required to involve entity service that means you are not involving CAF local DB.

If you have more query please let me know.

Thanks

Chandan

Former Member
0 Kudos

Hi chandan,

thanks for your reply.

I have gone thru all these services related topics.

my problem is what to choose?

any pros and cons when using remote/local persistence?(any difference)

how can i give complex queries while using .local persistence?

My application involves complex queries.

In one thread it was given that local persistence is used only for storing data alone and remote is for involving CRUD methods.is it true?

this is the link /people/ashutosh.rastogi/blog/2006/11/24/when-to-use-which-caf-service

former_member206397
Contributor
0 Kudos

Hi,

There are two options for using service in CAF.

If you want to store data or access data from CAF local DB then only you will go for CAF Entity service. But you also have the requirement to write your custom business logic. You know that within entity service there are no area to write business logic. At that situation you need to involve application service also which will be wrapper of your entity service. Then within the application service you can write your custom business logic to interact with your CAF local DB.

So the scenarion will be like

Remote Data

--->

CAF External Service

->

Entity Service

->

Application Service

CAF DB

But if you don't require to use CAF local DB suppose all of your data will come from other backend system(such as R/3, BI, non SAP system) then you need not to involve CAF local DB so not require to use CAF entity service. Then you can dirrectily use that external service from application service and within application service you can write your custom business logic.

|Remote Data| --->| CAF External Service|->|Application Service|.

But as per SAP's recomendation if you want to access CAF service from out side of CAF (like as Web Dynpro), do not directly access entity service. Then you need to access through application service. That means if you have entity service then also you need to create appplication service as a wrapper of your entity service.

So now as per your requirement you need to take the decision. If you have any problem please let me know your exact requirement in details, I will try to solve it.

Thanks

Chandan

Former Member
0 Kudos

Hi chandan,

My application is all about idea submission,edit idea, search idea.

which one is most suited, remote persistence or local persistence?

Thanks

Vani

former_member4529
Active Contributor
0 Kudos

Hi Vani,

The thumb rule is if the business object you are using in the composite applications exists in backend then you should use remote persistance. Otherwise if it's not existing in the backend and a new business object created for your application then use local persistance.

Thanks,

Dipankar