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

Determine Serialization/MetaData conversions #16

Open
edwardcapriolo opened this issue Dec 26, 2012 · 2 comments
Open

Determine Serialization/MetaData conversions #16

edwardcapriolo opened this issue Dec 26, 2012 · 2 comments

Comments

@edwardcapriolo
Copy link
Collaborator

Currently on the request side objects go into maps then into json/xml then cassandra.
req.add( IntraOp.setOp("5", "6", "7")); //5
req.add( IntraOp.getOp("5", "6")); //7

But on the response side results are retuned as byte buffers.

x = (List) res.getOpsRes().get(7);
Assert.assertEquals( "7", ByteBufferUtil.string((ByteBuffer) x.get(0).get("value")) );

  1. if we have metadata we should use it meaning, that in intravert server we can convert the bytebuffer to the true object type (string, int) and return that to the client (or maybe the byte buffer at the type)

  2. I want to suggest request side metadata (like assume) this would allow us to do something like

req.add( IntraOp.assumeOp("keyspace1", "columnfamily1", "x", int ));

Also thing we should be able to assume ranges for wide rows

req.add( IntraOp.assumeOp("keyspace1", "columnfamily1", "x", "y", int ));

@zznate
Copy link
Owner

zznate commented Dec 26, 2012

Agreed. With the open back channel via Gossiper listener implementation, we will always have up-to-date meta data for each and every schema change that comes into the system.

We can and should leverage this to perform a substantial amount of client side validation (particularly since we are by-passing ThriftValidation via not going through thrift transport or the "JDBC" stuff on the CQL transport) as well as automatic conversion on return types.

I want to emphasize that doing validation client side is just a massive win all around win.

@edwardcapriolo
Copy link
Collaborator Author

I started the schema branch. There is a simple assume op.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants