Home Help Center

Desing Question

xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
Helow


I developing and and e-comerce Ice application, in same objects i store prx to other object, and whe get from client a object by value the Prx point to the remote server, if i wan to get The objects behind these Prx, I need to do a new call for each object that i want get.

When i get a large collection on of objects by value Ice is to fast. it surprise me gratefuly.

But when i need get a collection of objects that have proxy to other objects and i want get too the other objects, my application make a lot of calls in a short period of time to remote service and this is very more slow.

What can i do to optimice this scenario?

I wan to mantain the proxys to other object beacuse theese objects are reference in many place of the aplication and I think than this is better than replicate the objects by value. because in these case when a object changes I need update all the copys


Thanks in advantage

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    It's difficult for us to make specific design recommendations without more information.

    So your application can supply objects by proxy and by value. Sometimes the client wants to access an object using a proxy, and sometimes the client wants to "import" an object for local processing. The problem is the client can spend a lot of time making individual requests for objects by value. Am I describing your situation correctly?

    Unfortunately, there is no magic in Ice that will make this easier for you. In other words, if you want to make it easier on your client, you will have to build it that way yourself. For example, you could provide an alternate API that allows a collection of objects to be retrieved together: the client supplies a sequence of Ice::Identity values, and the server returns a sequence of objects.

    I'm not sure that helps you very much, but feel free to provide more details and we can try again.

    Take care,
    - Mark
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hello

    Yes Mark you describe ok my scenario.

    I think to do same like you said but using proxys insteasd of Ice::Identity, i prefer using Prx because
    is the reference that i current store in objects.


    I have other question relative to theese problem

    Have Ice a generic form to import an object if i have a Proxy to the object?
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Originally posted by xdm
    I think to do same like you said but using proxys insteasd of Ice::Identity, i prefer using Prx because is the reference that i current store in objects.
    Yes, you can also use proxies, but this will be a little more expensive than only sending the identities.
    I have other question relative to theese problem

    Have Ice a generic form to import an object if i have a Proxy to the object?
    No, there is no built-in way to do that. You have to provide this capability yourself.

    - Mark
Sign In or Register to comment.