Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 proposals #65

Closed
funny-falcon opened this issue May 14, 2018 · 15 comments
Closed

V2 proposals #65

funny-falcon opened this issue May 14, 2018 · 15 comments
Labels
question Further information is requested v2
Milestone

Comments

@funny-falcon
Copy link

Please, write your wishes for v2 version of this library.
Tend to write one wish per comment, so others may vote for them separately.

@funny-falcon
Copy link
Author

Proposal:
usage of context.Context should be at least possible. It certainly ought to be for connection establishmend and lifetime.
Usage of Context for requests is quite debatable. Probably, it will be possible, but will not be primary interface. Or it will be documented, that for performance reason it is better to omit context.

@funny-falcon funny-falcon added v2 question Further information is requested labels May 14, 2018
@funny-falcon
Copy link
Author

Proposal:
Implement schema reloading: on-demand or automatic (will fix #7).

@eaglemoor
Copy link

Add Callback or Listener implementation for response after they come.

@Sulverus
Copy link

  1. Schema autoreload (net.box-like) if not implemented.
  2. Shadring module support. Example:
   import "github.com/dgryski/go-jump"

   // Add optional ShardFunction to client options
   opts := tarantool.Opts{User: "guest", ShardFunction: jump.Hash}
   // Add method ConnectShard
   shardConn, err := tarantool.ConnectShard([]string{"127.0.0.1:3301", "127.0.0.1:3301"}, opts)
   if err != nil {
       fmt.Println("Connection error: %s", err.Error())
   }
   // Shard.insert
   resp, err := shardConn.Insert(999, []interface{}{99999, "BB"})
   if err != nil {
     fmt.Println("Error", err)
     fmt.Println("Code", resp.Code)
   }```

@eaglemoor
Copy link

@Sulverus I think, sharding is a business logic. Not connection library. You can use connections pool and func (p *Pool) Conn(id int) *tarantool.Connection to implement sharding in your code.

@Sulverus
Copy link

Ok. So my vote for schema reloading (it's already implemented in lua netbox and probably in python client)

@bofm
Copy link

bofm commented May 14, 2018

Virtual cursors.

Given an index, an iteration order and a batch size, provide an easy way to lazy-iterate over the indexed data.

@eaglemoor
Copy link

@bofm can you give some examples ?

@eaglemoor
Copy link

v2 add more examples & benchmarks with Docker Tarantool

@funny-falcon
Copy link
Author

funny-falcon commented May 14, 2018

@bofm

Virtual cursors.
Given an index, an iteration order and a batch size, provide an easy way to lazy-iterate over the indexed data.

It could be done by remembering last "key" and issueing next query with "> last_key", if there is an btree index.
Do you recognize, there is no way to make it consistent? ie there will be no any transaction isolation.

I suppose, it could be done as a helper. But not sure. To extract "key" from typed record, a lot of magic should happen. Since there are custom deserializers (DecodeMsgpack), looks like there will be separate user-given function to extract keys.

@funny-falcon
Copy link
Author

btw, everyone is happy with vmihailenco/msgpack ?
Or is there more preffered library across go-tarantool users?

@eaglemoor
Copy link

vmihailenco/msgpack is default native msg pack library, no? But I think we need and support Big.* type :))

@AlekSi
Copy link

AlekSi commented Jul 20, 2018

I wish there were the CHANGELOG.md and tagged releases.

@FZambia
Copy link

FZambia commented Dec 21, 2020

Had a time to experiment with Tarantool, created an opinionated client https://github.com/FZambia/tarantool based on this one - maybe some of its changes will be interesting for v2, sorry for not sending pr @funny-falcon - too many changes, it's pretty hard to imagine there will be a full match in vision.

@oleg-jukovec
Copy link
Collaborator

oleg-jukovec commented Nov 24, 2022

Let me summarize the my ideas:

#7
#129
#136
#211
#235
#236
#237
#238
#239
#240
#241

There are no critical changes in the API here. Some incompatibilities are expected, but it doesn't seem like too much.

I will be glad to any suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested v2
Projects
None yet
Development

No branches or pull requests

8 participants