You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 11, 2022. It is now read-only.
This repository is an initial setup to get Python Support for CloudState implemented.
4
+
This repository is an initial setup to get Python Support for [Cloudstate](https://github.com/cloudstateio/cloudstate) implemented.
5
5
6
-
By itself CloudState provides great documentation [why](https://cloudstate.io/#why), [what](https://cloudstate.io/#what) and [how](https://cloudstate.io/#contribute) to contribute and [implement](https://cloudstate.io/docs/developer/language-support/index.html#creating-language-support-libraries) a CloudState language support library. This repository particularly tries to help to get Python support for CloudState started if you don't yet know how things work.
6
+
By itself Cloudstate provides great documentation [why](https://Cloudstate.io/#why), [what](https://cloudstate.io/#what) and [how](https://cloudstate.io/#contribute) to contribute and [implement](https://cloudstate.io/docs/developer/language-support/index.html#creating-language-support-libraries) a Cloudstate language support library. This repository particularly tries to help to get Python support for Cloudstate started if you don't yet know how things work.
7
7
8
8
# Initial Setup
9
9
10
-
The following steps can be steps you would take to implement the CloudState user function support library.
10
+
The following steps can be steps you would take to implement the Cloudstate user function support library.
11
11
Checkboxes that are marked done are steps already done in this repository. The main file to look at is `cloud_state.py`.
12
12
13
-
-[ ] Get the [CloudState](https://github.com/cloudstateio/cloudstate/) repository cloned as well as [this one](https://github.com/marcellanz/cloudstate_python-support/tree/feature/python-support).
14
-
-[ ] Get started to have the TCK of CloudState running and verify their current implementations. You might first read https://cloudstate.io/docs/user/quickstart.html and then https://cloudstate.io/docs/developer/language-support/index.html.
15
-
-[ ] Read and try to understand the CloudState protocol defined by the protocols [protobuf files](https://github.com/cloudstateio/cloudstate/tree/master/protocols/protocol/) (The CloudState protocol is specified through these protobuf files),
13
+
-[ ] Get the [Cloudstate](https://github.com/cloudstateio/cloudstate/) repository cloned as well as [this one](https://github.com/marcellanz/cloudstate_python-support/tree/feature/python-support).
14
+
-[ ] Get started to have the TCK of Cloudstate running and verify their current implementations. You might first read https://cloudstate.io/docs/user/quickstart.html and then https://cloudstate.io/docs/developer/language-support/index.html.
15
+
-[ ] Read and try to understand the Cloudstate protocol defined by the protocols [protobuf files](https://github.com/cloudstateio/cloudstate/tree/master/protocols/protocol/) (The Cloudstate protocol is specified through these protobuf files),
16
16
-[x] Find a gRPC support library of your choice for your language. The gRPC project itself provides [official support](https://packages.grpc.io) with libraries for many languages, but there might be other languages supported by non-official libraries.
17
17
-[x] Copy the *.protobuf files under protocols to your project and compile them with the protoc compiler.
18
18
-[x] Start with the implementation of the `EntityDiscovery` service defined in the entity.proto file.
19
-
- this service is the first service the CloudState proxy is calling to get information about the user function library and also which entity types and concrete entities are registered to be used.
20
-
- the reportError rpc function is helpful during development as the CloudState proxy informs about state and issues it encounters while it communicates with the user function.
19
+
- this service is the first service the Cloudstate proxy is calling to get information about the user function library and also which entity types and concrete entities are registered to be used.
20
+
- the reportError rpc function is helpful during development as the Cloudstate proxy informs about state and issues it encounters while it communicates with the user function.
21
21
-[ ] You may already have your environment prepared tho, but you should install a current version of Python3 and the grpcio-tools module. If you use a dedicated virtual environment you might run:
22
22
-`python3 -m venv cs_env`
23
23
-`./cs_env/bin/pip install grpcio-tools`
24
24
25
-
The CloudState TCK (the Technology Compatibility Kit) lets you validate the compatibility of your implementation. Before you can run the TCK, you have to add a CloudState TCK configuration section for the Python support in the main CloudState project. This configuration is located at `tck/src/it/resources/application.conf` within the main CloudState repository.
25
+
The Cloudstate TCK (the Technology Compatibility Kit) lets you validate the compatibility of your implementation. Before you can run the TCK, you have to add a Cloudstate TCK configuration section for the Python support in the main Cloudstate project. This configuration is located at `tck/src/it/resources/application.conf` within the main Cloudstate repository.
26
26
27
27
Add this section to the TCK configuration to the end of it
28
28
```
@@ -61,7 +61,7 @@ An then start the tck by running its integration tests with `sbt tck/it:test`
61
61
If it successfully run, you should get something like this on your terminal
62
62
63
63
```
64
-
[info] CloudStateTCK:
64
+
[info] CloudstateTCK:
65
65
[info] The TCK for Akka + Python
66
66
[info] - must verify that the user function process responds
67
67
[info] - must verify that an initial GetShoppingCart request succeeds *** FAILED ***
@@ -78,7 +78,7 @@ If it successfully run, you should get something like this on your terminal
78
78
[info] ...
79
79
[info] - must verify that the backend supports the ServerReflection API
80
80
[info] - must verify that the HTTP API of ShoppingCart protocol works *** FAILED ***
81
-
[info] 400 Bad Request was not equal to 200 OK (CloudStateTCK.scala:503)
81
+
[info] 400 Bad Request was not equal to 200 OK (CloudstateTCK.scala:503)
82
82
[info] Run completed in 47 seconds, 185 milliseconds.
2019-10-10 19:33:21.515 DEBUG io.cloudstate.proxy.eventsourced.EventSourcedSupportFactory - Starting EventSourcedEntity for shopping_cart
106
106
```
107
107
108
-
which is the result of the entity spec this minimal of a CloudState user library in `cloud_state.py` returns to the CloudState proxy.
108
+
which is the result of the entity spec this minimal of a Cloudstate user library in `cloud_state.py` returns to the Cloudstate proxy.
109
109
110
110
# Next Steps
111
111
@@ -117,7 +117,7 @@ If you are lost a bit, the following steps might help.
117
117
- After you implemented the Entitiy Discovery service, go ahead and implement the `EventSourced` service defined in `event_sourced.proto`.
118
118
- having this, you should be ready to pass all TCK tests.
119
119
- you most probably have to read certain details out of existing language Shopping Cart implementations as not everything is defined in the protobuf files spec-wise.
120
-
- Implement the protobuf _Any-encoding_ defined by the [CloudState serialization convention](https://cloudstate.io/docs/developer/language-support/serialization.html).
120
+
- Implement the protobuf _Any-encoding_ defined by the [Cloudstate serialization convention](https://cloudstate.io/docs/developer/language-support/serialization.html).
121
121
- Document the language support and the API under `docs/src/main/paradox/user/lang/python`
122
122
- Provide support so that the TCK can build build the language support and run the TCK Shopping Cart example within the main repository.
0 commit comments