Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Conversation

@achille-roussel
Copy link
Contributor

Hey guys, this is a work in progress on refactoring the internals of the library to get a more solid support for transactions than we had until now. The idea is to have a low-level abstraction representing a client or server connection which exposes building block operations on top of which we'll be able to power the higher level APIs currently exposed by the package.

Support for basic commands and transactions on the client side is implemented right now. I'm still in the process of adding more tests, especially for the failure cases of redis transactions which not very consistent.

I've tried to document as much as possible but because of the short time frame it may still be a little rough, parallel with the redis documentation on the request/response and transactions if anything seems a bit obscure, at a high level here are the additions:

  • redis.Conn is the abstraction of the network connection
  • redis.TxArgs is a new type which allows the program to iterate over each response to requests that are part of a transaction

This is also going to be the foundations for the work I'll be doing tomorrow to focus on the PUB/SUB case.

command.go Outdated
Args Args
}

/*
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still working on the server-side API for reading commands which is why this block of code is commented out.

@Pryz
Copy link
Contributor

Pryz commented Jul 12, 2017

that's a lot of changes !

I say : merge it ! I trust the tests :)

@achille-roussel achille-roussel merged commit f32fbbe into master Jul 12, 2017
@achille-roussel achille-roussel deleted the refactor-for-transactions branch July 12, 2017 23:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants