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

[FLINK-18979][docs] Update docs to better emphasize remote functions #132

Closed
wants to merge 5 commits into from

Conversation

sjwiesman
Copy link
Contributor

No description provided.

docs/index.md Outdated
**Stateful Functions** is an open source framework that reduces the complexity of building and orchestrating distributed stateful applications at scale.
It brings together the benefits of stream processing with Apache Flink® and Function-as-a-Service (FaaS) to provide a powerful abstraction for the next generation of event-driven architectures.
**Stateful Functions** is a framework, developed under the umbrella of Apache Flink, that makes it simple to build **consistent stateful serverless applications**.
It is designed to work with modern architectures, like stateless Kubernetes deployments or popular event-driven FaaS platforms like AWS Lambda, KNative, etc.,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
It is designed to work with modern architectures, like stateless Kubernetes deployments or popular event-driven FaaS platforms like AWS Lambda, KNative, etc.,
It is designed to work with modern architectures, like cloud-native deployments or popular event-driven FaaS platforms like AWS Lambda, KNative, etc.,

This was my other idea for this sentence, I'd like to hear what people like more

Copy link
Contributor

Choose a reason for hiding this comment

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

Stateless k8s deployments, IMO, would probably catch people a bit confused from a first read.
Overall, I always had the feeling that due to how the project is named "Stateful Functions", every time we use the term "stateless" we are in a bit of risk of misguiding readers who don't fully understand the context the term is used in.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree with Gordon here. What about stating the problem this solves, instead? Or, briefly mentioning why state is such an issue in this kind of applications.

docs/index.md Outdated
@@ -23,16 +23,16 @@ specific language governing permissions and limitations
under the License.
-->

**Stateful Functions** is an open source framework that reduces the complexity of building and orchestrating distributed stateful applications at scale.
It brings together the benefits of stream processing with Apache Flink® and Function-as-a-Service (FaaS) to provide a powerful abstraction for the next generation of event-driven architectures.
**Stateful Functions** is a framework, developed under the umbrella of Apache Flink, that makes it simple to build **consistent stateful serverless applications**.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
**Stateful Functions** is a framework, developed under the umbrella of Apache Flink, that makes it simple to build **consistent stateful serverless applications**.
**Stateful Functions** is a framework, developed under the umbrella of Apache Flink, that simplifies building distributed stateful applications.

Other possible first sentence

Copy link
Contributor

Choose a reason for hiding this comment

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

I personally like the first version more, and have been using that tag line a lot in recent talks / current work-in-progress blog posts. However, I'm also not sure if the first version is "down-scoping" the project as well.

I'd leave this to @igalshilman / @StephanEwen though, as it seems like more a question of how we want the project to be pitched moving forward.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just my two more cents:
From how I read the changes in the PR, it seems like the overall goal is to make remote functions / the "Flink as DB" mode more prominent and the main focus of the project.

In that sense, I would vote for **... makes it simple to build consistent stateful serverless applications as that seems to be more coherent with the goal.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think here we're going from concepts people can relate to to a mouthful of buzzwords, to be honest. "Stateful serverless" is good to create hype for conferences and such, but I don't think the people who might use StateFun will relate to that more than to "this is like if you bring what's good in stateful stream processing and FaaS together".

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, I wouldn't break the main sentence; the Flink part could be attached at the end, so you get an uninterrupted definition of what StateFun is.

"Stateful Functions is a framework that makes it simple to build consistent stateful serverless applications, developed under the umbrella of Apache Flink."

@tzulitai
Copy link
Contributor

While you're at it, once we've reached consensus of the updated contents of the homepage, could you update the README.mds (at root and under statefun-python-sdk) as well?

docs/index.md Outdated
@@ -23,16 +23,16 @@ specific language governing permissions and limitations
under the License.
-->

**Stateful Functions** is an open source framework that reduces the complexity of building and orchestrating distributed stateful applications at scale.
It brings together the benefits of stream processing with Apache Flink® and Function-as-a-Service (FaaS) to provide a powerful abstraction for the next generation of event-driven architectures.
**Stateful Functions** is a framework, developed under the umbrella of Apache Flink, that makes it simple to build **consistent stateful serverless applications**.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think here we're going from concepts people can relate to to a mouthful of buzzwords, to be honest. "Stateful serverless" is good to create hype for conferences and such, but I don't think the people who might use StateFun will relate to that more than to "this is like if you bring what's good in stateful stream processing and FaaS together".

docs/index.md Outdated
@@ -23,16 +23,16 @@ specific language governing permissions and limitations
under the License.
-->

**Stateful Functions** is an open source framework that reduces the complexity of building and orchestrating distributed stateful applications at scale.
It brings together the benefits of stream processing with Apache Flink® and Function-as-a-Service (FaaS) to provide a powerful abstraction for the next generation of event-driven architectures.
**Stateful Functions** is a framework, developed under the umbrella of Apache Flink, that makes it simple to build **consistent stateful serverless applications**.
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, I wouldn't break the main sentence; the Flink part could be attached at the end, so you get an uninterrupted definition of what StateFun is.

"Stateful Functions is a framework that makes it simple to build consistent stateful serverless applications, developed under the umbrella of Apache Flink."

docs/index.md Outdated
**Stateful Functions** is an open source framework that reduces the complexity of building and orchestrating distributed stateful applications at scale.
It brings together the benefits of stream processing with Apache Flink® and Function-as-a-Service (FaaS) to provide a powerful abstraction for the next generation of event-driven architectures.
**Stateful Functions** is a framework, developed under the umbrella of Apache Flink, that makes it simple to build **consistent stateful serverless applications**.
It is designed to work with modern architectures, like stateless Kubernetes deployments or popular event-driven FaaS platforms like AWS Lambda, KNative, etc.,
Copy link
Contributor

Choose a reason for hiding this comment

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

Agree with Gordon here. What about stating the problem this solves, instead? Or, briefly mentioning why state is such an issue in this kind of applications.

docs/index.md Outdated
Which one is the best for you depends on your goals and prior experience.
Whether you prefer a more theoretical or a practical approach, we hope you’ll find this section helpful.
It brings together the benefits of Apache Flink®, streaming semantics for processing large datasets with low latency and bounded resource constraints,
along with a runtime for modeling stateful entities that supports location transparency, concurrency, scaling, and resiliency.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
along with a runtime for modeling stateful entities that supports location transparency, concurrency, scaling, and resiliency.
along with a runtime for modeling stateful entities that supports location transparency, concurrency, scaling, and resilience.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

-1 I think its "resiliency"

@morsapaes
Copy link
Contributor

morsapaes commented Aug 18, 2020

If we're changing the docs, should we also change the webpage in the Flink website? So that things are coherent.

@sjwiesman
Copy link
Contributor Author

I've pushed an update to the home page. @tzulitai Yes I will update the README's after we reach consensus.

@sjwiesman
Copy link
Contributor Author

@morsapaes yes, we can as a follow up.

@sjwiesman
Copy link
Contributor Author

@tzulitai / @morsapaes when you get a chance I've updated the homepage based on the above discussion.

Copy link
Contributor

@morsapaes morsapaes left a comment

Choose a reason for hiding this comment

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

Looks really good, @sjwiesman! Left minor suggestions to remove some small inconsistencies.

docs/index.md Outdated
**Stateful Functions** is an open source framework that reduces the complexity of building and orchestrating distributed stateful applications at scale.
It brings together the benefits of stream processing with Apache Flink® and Function-as-a-Service (FaaS) to provide a powerful abstraction for the next generation of event-driven architectures.
Stateful Functions is an API that simplifies the building of **distributed stateful applications** with a **runtime built for serverless architectures**.
It brings together the benefits of stateful stream processing, the processing of large datasets with low latency and bounded resource constraints,
Copy link
Contributor

Choose a reason for hiding this comment

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

This confuses me a bit because of punctuation (🙄). Is "the processing of large datasets with low latency and bounded resource constraints" the unfold of "the benefits of stateful stream processing" or do you mean it as a separate "benefit"?

Other than that, I really like the rephrasing!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, yeah I'll try something

@@ -25,3 +25,109 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

Stateful Functions applications are composed of one or more modules.
A module is a bundle of functions that are loaded by the runtime and available to be messaged.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
A module is a bundle of functions that are loaded by the runtime and available to be messaged.
A module is a bundle of functions that are loaded by the runtime and become available to be messaged.

A module is a bundle of functions that are loaded by the runtime and available to be messaged.
Functions from all loaded modules are multiplexed and free to message each other arbitrarily.

Stateful Functions supports two types of modules: Embedded and Remote.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Stateful Functions supports two types of modules: Embedded and Remote.
Stateful Functions supports two types of modules: Remote and Embedded.

Copy link
Contributor

Choose a reason for hiding this comment

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

To keep up with the order you used below.

Comment on lines 47 to 48
``meta`` contains auxillary information about the module.
The ``spec`` describes the functions contained within the module and defines their persisted values.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
``meta`` contains auxillary information about the module.
The ``spec`` describes the functions contained within the module and defines their persisted values.
The ``meta`` section contains auxiliary information about the module; while ``spec`` describes the functions contained within the module and defines their persisted values.

### Defining Functions

``module.spec.functions`` declares a list of ``function`` objects that are implemented by the remote module.
A ``function`` is described via a number of properties.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
A ``function`` is described via a number of properties.
A ``function`` is described via a number of properties:


* ``function.meta.kind``
* The protocol used to communicate with the remote function.
* Supported Values - ``http``
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Supported Values - ``http``
* Supported values: ``http``

Copy link
Contributor

Choose a reason for hiding this comment

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

Making these consistent (more below).

* The function type, defined as ``<namespace>/<name>``.
* ``function.spec.endpoint``
* The endpoint at which the function is reachable.
* Supported schemes are: ``http``, ``https``.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Supported schemes are: ``http``, ``https``.
* Supported schemes: ``http``, ``https``.

* Default for `expireAfter` - 0, meaning that state expiration is disabled.
* ``function.spec.maxNumBatchRequests``
* The maximum number of records that can be processed by a function for a particular ``address`` before invoking backpressure on the system.
* Default - 1000
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Default - 1000
* Default: 1000

* Default - 1000
* ``function.spec.timeout``
* The maximum amount of time for the runtime to wait for the remote function to return before failing.
* Default - 1 min
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Default - 1 min
* Default: 1 min

Comment on lines 103 to 105
This module type only supports JVM based languages and are defined by implementing the ``StatefulFunctionModule`` interface.
Embedded modules offer a single configuration method where stateful functions bind to the system based on their [function type]({{ site.baseurl }}/concepts/logical.html#function-address).
Runtime configurations are available through the ``globalConfiguration``, which is the union of all configurations in the applications ``flink-conf.yaml`` under the prefix ``statefun.module.global-config`` and any command line arguments passed in the form ``--key value``.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
This module type only supports JVM based languages and are defined by implementing the ``StatefulFunctionModule`` interface.
Embedded modules offer a single configuration method where stateful functions bind to the system based on their [function type]({{ site.baseurl }}/concepts/logical.html#function-address).
Runtime configurations are available through the ``globalConfiguration``, which is the union of all configurations in the applications ``flink-conf.yaml`` under the prefix ``statefun.module.global-config`` and any command line arguments passed in the form ``--key value``.
This module type only supports JVM-based languages and is defined by implementing the ``StatefulFunctionModule`` interface.
Embedded modules offer a single configuration method where stateful functions bind to the system based on their [function type]({{ site.baseurl }}/concepts/logical.html#function-address).
Runtime configurations are available through the ``globalConfiguration``, which is the union of all configurations in the applications ``flink-conf.yaml`` under the prefix ``statefun.module.global-config``, and any command line arguments passed in the form ``--key value``.

@sjwiesman
Copy link
Contributor Author

Thanks for the review @morsapaes . I've addressed your feedback and also updated the README's in a seperate commit. I'm going on vacation next week so I went ahead and squashed my fixup commits.

@tzulitai
Copy link
Contributor

LGTM, merging. Thanks @sjwiesman!

@tzulitai tzulitai closed this in c483184 Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants