wolkenkit | source CQRS and event-sourcing framework | Microservice library
kandi X-RAY | wolkenkit Summary
kandi X-RAY | wolkenkit Summary
wolkenkit is a CQRS and event-sourcing framework based on Node.js. It empowers you to build and run scalable distributed web and cloud services that process and store streams of domain events. It supports JavaScript and TypeScript, and is available under an open-source license. Additionally, there are also enterprise add-ons. Since it works especially well in conjunction with domain-driven design (DDD), wolkenkit is the perfect backend framework to shape, build, and run web and cloud APIs.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of wolkenkit
wolkenkit Key Features
wolkenkit Examples and Code Snippets
Community Discussions
Trending Discussions on wolkenkit
QUESTION
I am trying to interact with my Wolkenkit application through a Mocha test in Node.
Following the tutorial on client connections, when running the test, I get the following error:
...ANSWER
Answered 2020-Feb-24 at 17:38This error is probably caused by your local self signed certificate. The client is not able to connect to the backend since it does not trust this certificate. You can bypass this check using the process.env.NODE_TLS_REJECT_UNAUTHORIZED
flag like this…
QUESTION
I am currently looking into Wolkenkit by following the tutorial to create a chat application.
After finishing writing the code and I ran sudo yarn wolkenkit start
. This gave me the following error message:
ANSWER
Answered 2020-Feb-24 at 13:24Seems like this could be the same problem described here in this Github issue.
The problem is that due to a change in the start command, we now assume that there must be a read model (which has not yet been defined, if you follow the guide).
If you simply ignore this error, and follow on, the next thing is to define the read model. Once you have done that, you can successfully run wolkenkit start.
QUESTION
I want to use wolkenkit's eventstore and was trying to set up a quick example. But I'm not able to simply output an event stream.
Simplified example:
...ANSWER
Answered 2019-Apr-17 at 17:16According to the documentation of wolkenkit-eventstore, getUnpublishedEventStream
is an async
function, i.e. you have to call it with await
. Otherwise, you don't get a stream back, but a promise (and a promise doesn't have a pipe
function).
So, this line
QUESTION
That container is built when deploying the application.
Looks like its purpose is to share dependencies across modules.
It looks like it is started as a container but nothing is apparently running, a bit like an init container.
Console says it starts/stops that component when using respective wolkenkit start
and wolkenkit stop
command.
On startup:
On shutdown:
When you docker ps
, that container cannot be found:
Can someone explain these components?
...ANSWER
Answered 2019-Apr-05 at 06:37When starting a wolkenkit application, the application is boxed in a number of Docker containers, and these containers are then started along with a few other containers that provide the infrastructure, such as databases, a message queue, ...
The reason why the application is split into several Docker containers is because wolkenkit builds upon the CQRS pattern, which suggests separating the read side of an application from the application's write side, and hence there is one container for the read side, and one for the write side (actually there are a few more, but you get the picture).
Now, since you may develop on an operating system other than Linux, the wolkenkit application may run under a different operating system than when you develop it, as within Docker it's always Linux. This means that the start command can not simply copy over the node_modules
folder into the containers, as they may contain binary modules, which are then not compatible (imagine installing on Windows on the host, but running on Linux within Docker).
To avoid issues here, wolkenkit runs an npm install
when starting the application inside of the containers. The problem now is that if wolkenkit did this in every single container, the start would be super slow (it's not the fastest thing on earth anyway, due to all the Docker building and starting that's happening under the hood). So wolkenkit tries to optimize this as much as possible.
One concept here is to run npm install
only once, inside of a container of its own. This is the node-modules
container you encountered. This container is then linked as a volume to all the containers that contain the application's code. This way you only have to run npm install
once, but multiple containers can use the outcome of this command.
Since this container now contains data, but no code, it only has to be there, it doesn't actually do anything. This is why it gets created, but is not run.
I hope this makes it a little bit clearer, and I was able to answer your question :-)
PS: Please note that I am one of the core developers of wolkenkit, so take my answer with a grain of salt.
QUESTION
I have a server written in Node.js, and a web client running in the browser. The client shall upload and download some files from and to the server. The server is not the one that originally delivers the client, so we have a cross-domain situation here.
The server uses the cors middleware to enable cross-domain requests. Since I am also using a number of custom headers, I use it with a configuration like this:
...ANSWER
Answered 2019-Mar-25 at 20:19Since that code works perfectly fine (both with or without cors), I'm going to assume that you're using an old axios version. onUploadProgress
was added on version 0.14.0
.
If you're using an older version, you can use: progress
instead of onUploadProgress
, or just update to the latest version.
0.14.0 (Aug 27, 2016)
BREAKING Splitting
progress
event handlers intoonUploadProgress
andonDownloadProgress
(#423)
QUESTION
When I run wolkenkit start
on a Windows machine, the command fails and I get the following output:
ANSWER
Answered 2019-Mar-03 at 20:15Actually, we (at the native web, the company behind wolkenkit), ran into this problem as well.
It's actually a problem caused by one of the latest updates for Windows 10. This updated introduced a new feature called "Fast startup" which causes problems for Docker.
See this issue for more details: https://github.com/docker/compose/issues/3277
As a quick fix, you can restart Docker. As a more long term solution, you can disable the "Fast Startup" feature, see https://github.com/docker/for-win/issues/953#issuecomment-342498223
Hope this helps
PS: Please note that I am one of the core developers of wolkenkit.
QUESTION
Can I install wolkenkit without Docker?
I tried to do wolkenkit run but I faced a Docker problem, this is because I use VirtualBox and I am not planning to use Docker at all on my PC.
Can I run blank project without Docker?
...ANSWER
Answered 2018-Dec-24 at 10:49Of course you can, try to install it with npm or yarn, like
npm install wolkenkit
QUESTION
I recently started working with Wolkenkit and I was wondering if there is a possibility of implementing some sort of role concept yet?
I already found Wolkenkit: ACLs for authorization and user roles which is already quite interesting, and gives me a first idea on how to solve that, but at the same time it is not exactly what I need.
In my Use-Case I need a dynamic role concept which can be changed at any time in order to grant and revoke access to certain parts of my application.
Ideally it would be a mechanism that allows me to associate commands and events with multiple roles at run-time. Are there any new approaches on this topic or any examples where this is already done?
Thanks for the help in advance.
...ANSWER
Answered 2018-Dec-08 at 17:35The authorization concept of wolkenkit is based on tokens.
Hence, the simplest thing to do is to have the identity provider add claims for roles, as described in ACLs for authorization and user roles (which is the article you already linked to). This works out of the box, and you do not have to provide and special logic to your wolkenkit applications except to read the token and evaluate its claims. However, this is only suited for static role models, as you'd need to change the identity provider's configuration every time a role assignment changes.
If you require a more dynamic approach, right now unfortunately you are left to your own devices. What you could do is to add a property to your aggregate that contains an array of roles (or user IDs) that you want to be able to access the aggregate. Then, in each command, you would need to check the current user against this array. But still, this means that you have predefined roles, you just could allow or restrict access to aggregate at runtime for specific roles.
If you require an even more dynamic approach, such as making up roles ad-hoc, e.g. to share data with a group that you just want to create at hand, you end up with what we call group-based authorization. Right now, there is no support for this, and AFAIK nobody has yet implemented something like that. Support for this is on the wolkenkit roadmap, but right now unfortunately there is no ETA available (maybe this is something you could contribute to wolkenkit?).
Either way, you need to make sure that your identity provider is configured correctly and wolkenkit is setup accordingly, as described in wolkenkit redirects to Auth0 even when user is logged in.
Disclaimer: I'm one of the core developers of wolkenkit, working at the native web (the company behind wolkenkit), so please take my answer with a grain of salt.
QUESTION
I am trying to use external code inside my writeModels. I tried to use a NPM package by requiring it (const AXIOS = require('axios');
), but afterwards, wolkenkit fails to run/start (I think it times out after the ping).
Is what I am trying to do even possible? I bet a lot of people would love to use NPM packages inside their writeModels (lodash, for example).
ANSWER
Answered 2018-Aug-31 at 15:12So it seems like I am unable to reproduce the error I encountered and it doesn't help that I threw away the changes in a hurry, because i wanted to finish the aggregate.
I can add the packages I want to use by adding them via yarn add
or npm install
, and I can use them by requiring them inside the file:
QUESTION
What would be the best way to implement repetitive tasks in wolkenkit? Let's say I want to import calendar events on a daily basis or fetch data from a server to update some kind of aggregate. What would be the best practice here?
I thought about setting up a timer somewhere that sends commands on a regular basis so that the aggregate's data can be updated, but I am not quite sure about where to put the timer. After searching a bit online I am unsure if this is something I am not supposed to do at all, to be honest.
...ANSWER
Answered 2018-Aug-28 at 05:24Currently there is no built-in mechanism to handle time based scheduling. But you can create a node script that gets data from a server and then uses the client SDK to send commands in order to update aggregates. You can use some kind of scheduling mechanism to run it repetitively, e.g. https://www.npmjs.com/package/node-cron
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install wolkenkit
To build this module use roboter:.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page