After a short Gitter discussion with @pvlugter and @sleipnir, I open this issue for discussion (attached is the gitter exchanges for context).
In short, the issue is to evolve the TCK so that a language support library implementation can be verified.
I think the topic is too broad to capture it in one issue and I propose to discuss it here and then create actionable issues out of it. I list here suggested topics and existing related issues.
Suggested Objectives
- Evolve the TCK for all state models defined by the Cloudstate Protocol.
- Enhance or adapt the TCK Shopping Cart Example to include other state models as explanatory as possible. This might not be exhaustive in terms of TCK completeness, but still have a use case that is easy to understand, and also can be an example how to use the state models. I'm not sure if this is that important for the TCK.
- Define synthetic entities and interactions so that the Cloudstate Protocol can be verified by the TCK. These entities have to be provided then by each support library so that the TCK can run against them.
- Let support libraries execute the TCK within their repositories, preferable without the need of a JVM to be installed or a SBT dependency => a Docker based approach might be feasible.
- Maybe, existing tests of the proxy can be used to guide the synthetic tests defined.
- Perhaps for the future and a low priority for now: the TCK currently runs as "Akka + <name_of_language>'"; how would the TCK test a reference implementation of the proxy.
Related Issues
Related discussion (Gitter, May 11th)
@marcellanz : I think it may be time to extend the TCK for other state models like CRDTs, Stateless, KV, Eventing, <name_any> for Cloudstate. I come to a point where I'd like to verify an implementation and can't. The TCK so far was a great enabler getting started with EventSourcing.
There is tck/src/ with the Shopping Cart example. How should we model the TCK around other state models? While the proxy itself has many synthetic test cases (AFAIKS) the TCK shopping cart is a nice and illustrative example, should we find such an example for other types too, or perhaps expand on the shopping cart?
With a few language support libraries in different states existing, and new coming, we also might better have the TCK before they are complete.
@sleipnir: I think we should do a lot of things in several steps (parallel or not) at TCK. I have illustrated this need several times and I agree with you. So my thinking is divided like this?
- The TCK must be less than a selected docker image and accept the necessary parameters to run the tests easily, without depending on the entire Cloudstate project.
- We must expand the TCK and the shopping cart example, there is a reference somewhere in the list that can be used (HotItems) for example to test "forwards and effects" that are not currently supported in the TCK.
- We must include (with shoppingcart or another) a test for statelessness (a simple request/response would be enough in this case).
- A basic example for CRDT should be included at first and then expanded to more complex examples. I also think it would be a good way to test the various types of CRDT independently, that way we could have a compatibility matrix supporting in supported idioms more granular.
@pvlugter: Yes, please open an issue, if it doesn't exist already, with everything we need for the TCK. And we have #216 for supporting the TCK in the language supports.
I'm personally not sure whether having the TCK based on examples, like shopping cart, or just artificial tests is better. Possibly a combination in the end? Simple synthetic test cases to get full coverage, plus examples that demonstrate the main use cases.
After a short Gitter discussion with @pvlugter and @sleipnir, I open this issue for discussion (attached is the gitter exchanges for context).
In short, the issue is to evolve the TCK so that a language support library implementation can be verified.
I think the topic is too broad to capture it in one issue and I propose to discuss it here and then create actionable issues out of it. I list here suggested topics and existing related issues.
Suggested Objectives
Related Issues
Related discussion (Gitter, May 11th)