edwinvw / dapr-traffic-control Goto Github PK
View Code? Open in Web Editor NEWSimple sample application for experimenting with dapr.
License: Apache License 2.0
Simple sample application for experimenting with dapr.
License: Apache License 2.0
This issue is not relevant for the demonstration of dapr concepts, it's just a business logic issue.
When a vehicle changes the lane between the first and the second cam, the actor falsely believes there is a lost vehicle. This may never happen in a simulation but in the real world.
See this code.
Also, vehicles that change lanes will never be fined if they are too fast.
Maybe you could mention this in a code comment for others who stumble upon this. Or you find a solution to correctly handle this case for a more realistic implementation.
os:mac 11.4
docker:3.4.0
minikube:v1.21.0
kubectl version ๏ผ
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.1", GitCommit:"5e58841cce77d4bc13713ad2b91fa0d961e69192", GitTreeState:"clean", BuildDate:"2021-05-12T14:18:45Z", GoVersion:"go1.16.4", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.7", GitCommit:"132a687512d7fb058d0f5890f07d4121b3f0a2e2", GitTreeState:"clean", BuildDate:"2021-05-12T12:32:49Z", GoVersion:"go1.15.12", Compiler:"gc", Platform:"linux/amd64"}
Exec lifecycle hook ([/daprd --wait]) for Container "daprd" in Pod "finecollectionservice-7d966fc9b-bs8dk_dapr-trafficcontrol(56b568ca-672e-4f46-aa24-0f21c6fce0ec)" failed - error: command '/daprd --wait' exited with 137: , message: ""
Back-off restarting failed container
thanks
Describe the bug
I receive the following error message:
mqttws31.min.js:36 WebSocket connection to 'ws://127.0.0.1:9001/mqtt' failed:
This results in nothing (green screen) been shown in the Visual Simulation and the above error in the Browser Console
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The visual simulation should run
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please share as much info as possible):
Additional context
I've never run Mosquitto before and may not have run anything using Websockets before.
The TargetFramework in the csproj files is net8.0.
The Dockerfile uses dotnet/sdk:7.0-bullseye-slim
These two are incompatible.
Steps to reproduce the behavior:
Expected behavior
A new image should be created.
Error Message
=> CACHED [build-env 3/6] COPY TrafficControlService.csproj ./ 0.0s
=> ERROR [build-env 4/6] RUN dotnet restore 1.3s
------
> [build-env 4/6] RUN dotnet restore:
#0 1.187 Determining projects to restore...
#0 1.201 /usr/share/dotnet/sdk/7.0.406/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(160,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0. Either target .NET 7.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. Download the .NET SDK from https://aka.ms/dotnet/download [/app/TrafficControlService.csproj]
------
Dockerfile:6
--------------------
4 | # Copy necessary files and restore as distinct layer
5 | COPY TrafficControlService.csproj ./
6 | >>> RUN dotnet restore
7 |
8 | # Copy everything else and build
--------------------
ERROR: failed to solve: process "/bin/sh -c dotnet restore" did not complete successfully: exit code: 1
**Environment **
I'm trying to run the system under AKS.
Here's the error I'm getting from the finecollectionservice:
containerID: containerd://3bb5ed001e3b75716e00a3f10b6959ff27c5bfa84025a495f44927a403070983
image: docker.io/daprio/daprd:1.2.2
imageID: docker.io/daprio/daprd@sha256:264d268d06e26525c93c58bc62ad4c0bdcddf205d125f11fc4dbe5d31dd4646d
lastState:
terminated:
containerID: containerd://3bb5ed001e3b75716e00a3f10b6959ff27c5bfa84025a495f44927a403070983
exitCode: 1
finishedAt: "2021-07-02T19:16:48Z"
reason: Error
startedAt: "2021-07-02T19:16:48Z"
name: daprd
ready: false
restartCount: 4
started: false
state:
waiting:
message: back-off 1m20s restarting failed container=daprd pod=finecollectionservice-7dd9f66584-ngqzc_dapr-trafficcontrol(f19a93dd-46ff-49b1-b2e8-de54a69e8452)
reason: CrashLoopBackOff
image: {MY ACR}/dapr-trafficcontrol/finecollectionservice:1.0
imageID: ""
lastState: {}
name: finecollectionservice
ready: false
restartCount: 0
started: false
state:
waiting:
message: Back-off pulling image "{MY ACR}/dapr-trafficcontrol/finecollectionservice:1.0"
reason: ImagePullBackOff
I have configured my Azure Container Registry to have a credential to enable my AKS to pull images from it (role acrpull).
then added
imagePullSecrets:
Have you seen this type of issue before?
Do you have some extra documentation on how to run the system under AKS?
Thanks!!
Hi Edwin,
Thanks for this great sample.
For me everything works fine when running selfhosted, however when I want to deploy to K8s
using the start.ps1, I see the following messages :
unable to recognize "dapr-config.yaml": no matches for kind "Configuration" in version "dapr.io/v1alpha1"
unable to recognize "pubsub-rabbitmq.yaml": no matches for kind "Component" in version "dapr.io/v1alpha1"
unable to recognize "state-redis.yaml": no matches for kind "Component" in version "dapr.io/v1alpha1"
unable to recognize "email.yaml": no matches for kind "Component" in version "dapr.io/v1alpha1"
unable to recognize "entrycam.yaml": no matches for kind "Component" in version "dapr.io/v1alpha1"
unable to recognize "exitcam.yaml": no matches for kind "Component" in version "dapr.io/v1alpha1"
The pods and all other stuff gets deployed to k8s, only no dapr components.
I have the following dapr version
CLI version: 1.5.0
Runtime version: 1.5.0
Windows machine running docker desktop
Any ideas ? Thanks !
While trying to get this working on AKS, I noticed that in the mosquitto manifest, you have imagepullpolicy set to 'Never'.
This will prevent the cluster from EVER pulling the image.
Describe the bug
When I run TrafficControlService using powershell or command line , the service exits.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
When I run TrafficControlService using powershell or command line , the service exits.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please share as much info as possible):
FCS.txt
TCS.txt
VRS.txt
I was following DaprCon and Traffic application worked until I put Actors.
Now TrafficControl receives msgs fromSimulation but FineCollectionService and VehicleRegistrationService don't.
Tried also
https://github.com/EdwinVW/dapr-traffic-control
I'm trying to monitor metrics using Prometheus and Grafana in self-hosted mode, but I encountered some unexpected behaviors
What I did:
--metrics-port
for each service to a specific portResult
Any idea what I've done wrong or what I'm missing?
Screenshots:
Prometheus
Dapr Sidecar Dashboard
Dapr System Services Dashboard
When running the environment locally on windows the maildev container's ports are not mapped properly. I resolved the issue by changing the port mapping in the start-maildev.ps1 file to
docker run -d -p 4000:1080 -p 4025:1025 --name dtc-maildev maildev/maildev:latest
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expected the web app to be displayed in the browser.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please share as much info as possible):
Additional context
Add any other context about the problem here.
Hi!
I am new to Dapr and I was checking your Actor example, to compare it with Orleans.
There is probably a small mistake when you update the state. As you create a new instance of VehicleState
, I think you have to replace the state with this new instance.
dapr-traffic-control/src/TrafficControlService/Actors/VehicleActor.cs
Lines 50 to 53 in 491facb
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.