Is there a plan to add MilvusClientV2 interface just like MilvusClient?
- If we have Interface, We can user dynamic proxy to add some extra features ,eg. failover/monitor/trace/health check ;
- other sdk support this features ,eg. lettuce、jedis、mybatis ;
Hope to add this features
can you give us a more detailed example?
Take Lettuce SDK as a example:
we use proxy+redis pattern; maybe a redis cluster has 100 proxy instances ; Client create more than 100 connection, so we need balance request to those connections ,meanwhile we are consistent with RedisAsyncCommands's API so
- user has Delegated Obj, maybe called: redisDelegated;
- user execute some query , eg: redisDelegated.set(), redisDelegated.get()
- we need use dynamic proxy to keep user's request balance to all connections
Pseudo code
RedisAsyncCommands commands = Proxy.newProxyInstance(RedisAsyncCommands.getClassLoader(), new Class[]{RedisAsyncCommands.class, new InvocationHandler(){
// 1. get random connection
// 2. monitor/ktrace
// 3. health check
}})
commands.set(key,value)
commands.get(key)
Did I make myself clear?
Thanks for the classification. So it's essentially a command control system that allows you to execute commands via reflection.
yeah, If the MilvusClientV2 has interfaces that can allow users do some extra features via reflection ; It'll be more user-friendly