Code Monkey home page Code Monkey logo

knotx-example-project's Introduction

If you are directed here from https://github.com/Cognifide/knotx or you are looking for Knot.x 1.X version please see this repository Tags, the latest 1.6.0 version code is available here along with the documentation.

Knot.x Logo

http://knotx.io

web integration framework

Knot.x is an open source framework integrating content from different sources like headless or traditional CMS, with systems like CRM, e-commerce or search engines.

The heart of Knot.x is the HTTP Server that uses Fragment Processing to connect many data sources into one customer experience (like HTML, JSON or PDF) in the configurable, reactive, scalable and fault-tolerant way.

Knot.x comes also with a distribution that enables quick start with the framework, is a project structure and supports deployment automation (see the Cookbook and Docker images). With the Starter Kit template project, you can setup your project in a few minutes.

We build Knot.x on top of Vert.x, known as one of the leading toolkits for performant, event-driven applications. It uses asynchronous programming principles which allows it to process a large number of requests using a single thread. Asynchronous programming is a style promoting the ability to write non-blocking code (no thread pools). The platform stays responsive under heavy and varying load and is designed to follow Reactive Manifesto principles.

How to start

See knotx.io for tutorials and examples. See Knot.x Example Project for usage case examples. See Knot.x Starter Kit template project. See https://github.com/Knotx extensions for user and developer documentation.

For more information on Knot.x and where Knot.x fits into the big picture please see http://knotx.io.

Community / Issues

All feature requests and bugs can be filed as issues on GitHub. Do not use Github issues to ask questions, post them on the User Group or Gitter Chat.

GitHub issues labels

Knot.x project have couple of custom labels for issues board (also issues for each repository) to make it easier manage the tickets. Some of them are:

  • configuration - tickets that have impact on Knot.x configuration and deployment.
  • discussion - this is an open discussion over a feature (that e.g. may break compatiblity) - everyone is welcome to participate with comments and ideas.
  • performance - tickets that have impact on system performance, e.g. some improvement.
  • wiki - stuff with documentation e.g. missing documentation or wiki structure update.

Backlog and Releasing

Release Semantic Versioning

Knot.x releases follow Semantic Versioning 2.0.0 guide. Each release has a version number MAJOR.MINOR.PATCH. Those numbers are incremented when:

  • MAJOR version when Knot.x introduce incompatible API changes or major architecture refactoring,
  • MINOR version when Knot.x introduces new complex functionality in a backwards-compatible manner, MINOR dependencies updates (e.g. Vert.x or RxJava), and
  • PATCH version when Knot.x introduces backwards-compatible bug fixes, small improvements or PATCH dependencies updates (e.g. Vert.x or RxJava).

Changes tracking

Knot.x provides two sources of tracking the changes:

  • CHANGELOG.md for each repository, where all notable changes for the module are documented with links to the tickets and detailed description.
  • Upgrade Notes section in the release blog, where all crucial changes that concerns users during the migration (e.g. additional parameters, bugfix and workarounds, API/configuration changes, dependency upgrades like Vert.x or RxJava) are pointed out.

When to migrate

  • MAJOR - new project start or planned migration - migration may require a significant effort.
  • MINOR - if you need some improvements that are in this release, planned migration - migration may require a minor effort.
  • PATCH - as often as possible, no compatibility break, only bugfixes or very small improvements that does not change any system logic - migration should not take any effort.

Bugfixes support and releasing

Knot.x as an Open Source project supports the last MINOR release with bugfixes released regularly as PATCH releases, until the next MINOR or MAJOR release.

Work in progress and milestones

Knot.x roadmap is build of milestones. All MAJOR or MINOR improvements are developed on feature branches that are reviewed and merged to the current milestone/goal-of-milestone branch which is frequently updated with master branch (that contains bugfixes and small improvements that are subject of PATCH releases).

When all milestone goals are finished, MAJOR or MINOR release is announced, milestone branch is merged to master branch and new Knot.x version is released.

We treat master branch as a stable branch that is always ready to release.

Clear milestones, progress and branching

We are working on the next major/minor versions using milestone goals. You may always see the current milestone goal in Knot.x Roadmap board in the Current milestone column. This board contains:

  • Backlog that contains all areas that require some investigation and are candidates for the future milestones.
  • Next milestone - all candidates for the next milestone.
  • Current milestone - tickets representing the goal of the milestone we are currently working at. When all milestone goals are finished, we release the next version of Knot.x.

License

Knot.x is licensed under the Apache License, Version 2.0 (the "License")

knotx-example-project's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

knotx-example-project's Issues

Sample data: sample templates, mocked data sources

Version used

  • knot.x: 1.3.0

Context of the issue/feature

The mvn clean package command builds the example project distribution but it does not contain all dependencies defined in the knotx-stack.json file (like the knotx-mocks module). So the first command to execute is bin/knotx resolve.

The example project should provide both sample temapltes and mocked data sources. It should not be a part of the https://github.com/Cognifide/knotx repository any more.

Appendix

  • Knot.x Stack
  • Knot.x Mocks

Upgrade GraphQL example to Knot.x 2.2.1

Is your feature request related to a problem? Please describe.
Upgrade the GraphQL example (/api-gateway/graphql-api) to the Knot.x 2.2.1.

Describe the solution you'd like
The GraphQL example the following changes:

  • upgrade Gradle to 6.X
  • configure the new Knot.x Gradle Plugins
  • reimplement Actions & Fetchers
  • implement unit tests

Additional context
Please upgrade also the tutorial.

Provide example for security

Is your feature request related to a problem? Please describe.
Example projects should include some samples of implementing authentication.

Describe the solution you'd like
A sample project showing how to handle Basic Auth, JWT Auth and OAuth2 with OpenID

Restructure examples to reflect most common Knot.x use cases

First tutorials concentrate on first steps in Knot.x 2.0. Now we want to categorize those tutorials with typical use cases:

  • API Gateway (getting started, securing existing API, Beautifying existing API etc.)
  • Templating (getting started)
  • Distribution (stack, docker)
  • Configurable Integrations (getting started (simple timeout), circuit breaker)

Describe the solution you'd like
We should restructure examples, the proposal catalogues:

/api-gateway/composing-many-apis (current getting started)
/api-gateway/securing-existing-apis
/template-processing/getting-started
/distribution/getting-started
/distribution/getting-started-with-docker

Additional context
We need to update tutorials.

Sample content with template / service response tips

The current simple page (http://localhost:8092/content/simple.html) shows the final HTML markup (after Knots evaluation) - this means that it displays dynamic content inside Handlebars placeholders.

We need to add tips that can provide:

  • content of fragment coming from the repository (which is not processed through Knots)
  • list of Knots that process the fragment
  • fragment context (which contains dynamic data from data sources).

Add gradle support

Version used

  • knot.x: 1.3.0

Context of the issue/feature

The example project uses Maven, We should also add the Gradle support.

Provide example for GraphQL usage

Is your feature request related to a problem? Please describe.
There is no example of GraphQL usage with !x.

Describe the solution you'd like
Possible implementation revolves around using !x tasks in GraphQL data fetchers.
Requires:

  • java graphql implementation (repo)
  • vertx wrapper of the java graphql (doc)

Java GraphQL provides needed implementation itself while Vert.x wrapper provides HTTP handler for GraphQL.

We can implement graphql handler factory (implementing RoutingHandlerFactory) that would configure GraphQL object and return GraphQLHandler from Vertx. GraphQL schema could be provided via configuration in operations.conf (either as a string or as a path to a file with the schema).

GraphQL uses data fetchers as an integration layer. Each type defined in schema needs to have a data fetcher assigned. In the java implementation it needs to be assigned to the GraphQL object before passing it to the http handler (so fetchers need to be assigned in graphql handler factory). Data fetcher is just an object implementing DataFetcher. The idea is to have it run !x tasks. This way !x is still responsible for providing data from integrations.

FragmentsEngine (directly or indirectly via FragmentsHandler) could be used to process tasks defined in configuration. DataFetcher logic would probably be universal or almost universal. It would be better to have it universal if possible. This way there would be no need for hardcoding any connections between schema types and data fetchers.

Describe alternatives you've considered
If some genericity can be extracted then GraphQL support could be implemented in !x.

Additional context
No context, but here's a cat emoji: ๐Ÿฑ

Check the tutorials with Knot.x `2.1.1-SNAPSHOT`

Is your feature request related to a problem? Please describe.

We need to check the tutorials from sections (we plan to release Knot.x 2.2 soon):

Distribution

Topic Verified
Stack -
Docker -

API Gateway & Web API

Topic Verified
OpenAPI and API Console with Swagger -
Securing your API -
Caching -
API composition -
GraphQL API -

Template Processing

Topic Verified
Getting started -

Additional context
Please add comments with required configuration changes - this should help us with upgrade notes.

CRLF in knotx script

After build project with Maven or Gradle bash execution script (bin/knotx) in acme-stack has CRLF end line instead of LF on Linux environment

TE example with Pebble

Is your feature request related to a problem? Please describe.
The current templating example use Handlebars. We should update the tutorial to use Handlebars and Pebble.

Describe the solution you'd like
Process the page containing two snippets:

  • with Handlebars syntax
  • with Pebble syntax

Please note that we can simply replace TE syntax without data changes.

Additional context

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.