hazelcast-go-client icon indicating copy to clipboard operation
hazelcast-go-client copied to clipboard

GetDistributedObject Functionality missing

Open djchapm opened this issue 7 years ago • 3 comments

Go version: go version go1.10.1 darwin/amd64 Hazelcast Go Client version: master Hazelcast server version: 3.10 Number of the clients: 1 Cluster size, i.e. the number of Hazelcast cluster members: 1 OS version : OSX

Expected behaviour Non null response on client.GetDistributedObject(string, string) where a remote service is deployed.

Actual behaviour returns null, null. Looks like ProxyManager only allows GetDistributedObject on built-in hz services - I think I'm ending up at the return nil, nil statement at end of method ProxyManager.getProxyByNameSpace.

Steps to reproduce the behaviour Get the hazelcast-code-samples master for Java. under project 'spi/proxy', start Member.java and put a breakpoint after hazelcast instances started and initialized.

Create go code main with: func main() { clientConfig := hazelcast.NewConfig() clientConfig.NetworkConfig().AddAddress("127.0.0.1:5701") client, err := hazelcast.NewClientWithConfig(clientConfig) name := "0counter" serviceName := "CounterService" mp, err := client.GetDistributedObject(serviceName, name) ... here mp and err come back as null. However - over in the console for java proxy project I can see that the method CounterService.createDistributedObject is actually executed successfully which is cool (I added a print stmt there). Just doesn't return the object.

I realize this client is pretty new - I either need something like this where I can plug in a java RemoteService, OR if you completed the SearchPredicate implementation for paging/searching/sorting, I could use that. This RemoteService POC was hoping to work around the problem with golang hazelcast client not being able to page/sort.

djchapm avatar Jul 10 '18 22:07 djchapm

We currently dont have this feature in golang client, which means you can't register your proxy factories to golang client but it should return an error in this case, so I will make sure it returns an error instead of nil, nil.

As for predicates we currently have these built in predicates: https://github.com/hazelcast/hazelcast-go-client/blob/master/core/predicate/predicates.go

SaitTalhaNisanci avatar Jul 11 '18 07:07 SaitTalhaNisanci

For sake of planning/documentation or others having similar issues - can you provide some sort of unofficial target timeframe/roadmap for supporting custom RemoteServices, and paging/sorting predicates?

Also - You have any other suggestions for how I might do this? Objective is to perform a search on very large dataset in hazelcast map, and return a specified page as opposed to the entire map? I can't think of any solution that doesn't require an additional application in Java that does the work outside and then puts it on a queue or something. Many reasons not to do it this way though.

djchapm avatar Jul 11 '18 17:07 djchapm

Hi @djchapm 👋 I'm now monitoring this type of requests closely. Just added the GetDistributedObject support to our backlog. I believe we can ship it in the first half of the year. Thanks!

burakcelebi avatar Feb 11 '19 13:02 burakcelebi

Won't fix, closing

yuce avatar Mar 11 '23 08:03 yuce