#142-mockup-room-service #259

Closed
a24antej wants to merge 0 commits from #142-mockup-room-service into temp-week-2-merge-branch
Collaborator

Har kommit så långt att man kan få fram data till frontend, har exempel View som kan användas för testning

Har kommit så långt att man kan få fram data till frontend, har exempel View som kan användas för testning
a24sakma left a comment
Collaborator

I did briefly review on as I was reading the code for reusing of BookingDbHandler.
I have not run the code on my machine as I have many changes on my local but if someone else can run it then it looks good to me :)

I did briefly review on as I was reading the code for reusing of BookingDbHandler. I have not run the code on my machine as I have many changes on my local but if someone else can run it then it looks good to me :)
@ -0,0 +4,4 @@
using Dapper;
using System.Text.Json;
string connectionString = "Host=PostgreSQL;Port=5432;Database=sensors;Username=postgres;Password=AFnRTQac7e4c";
Collaborator

I have added a environment variable for this in my branch we can reuse that after I have pushed my branch.

I have added a environment variable for this in my branch we can reuse that after I have pushed my branch.
a24sakma marked this conversation as resolved
@ -0,0 +91,4 @@
});
Collaborator

Unused spaces can be removed. 94 to 98

Unused spaces can be removed. 94 to 98
a24antej marked this conversation as resolved
@ -0,0 +15,4 @@
{"bookingNr":"2","building":"C","roomNr":691,"startTime":"2026-04-18T02:15:00","endTime":"2026-04-18T04:45:00"},
{"bookingNr":"1","building":"A","roomNr":462,"startTime":"2026-04-20T23:30:00","endTime":"2026-04-21T00:30:00"}
]
-----------------------------------------
Collaborator

Very good README

Very good README
a24sakma marked this conversation as resolved
@ -0,0 +1,6 @@
@roomBookingApiMockup_HostAddress = http://localhost:5226
GET {{roomBookingApiMockup_HostAddress}}/weatherforecast/
Collaborator

I think this comes when you create the project can be safely removed.
I removed from ParkingService and it works fine: Andras/BoundlessFlowCampus2K@b4b4a06c4d

I think this comes when you create the project can be safely removed. I removed from ParkingService and it works fine: https://git.webug.se/Andras/BoundlessFlowCampus2K/commit/b4b4a06c4d50b98104d1491f4a2a65daacac156c
a24antej marked this conversation as resolved
@ -0,0 +5,4 @@
using System.Data.SQLite;
namespace SensorRead
Collaborator

Shall this not be renamed to
namespace RoomBookingRead

Shall this not be renamed to `namespace RoomBookingRead`
a24antej marked this conversation as resolved
Collaborator

Testing the build:
The docker file one in the roomBookingApiMockup shall be renamed from DockerFIle to Dockerfile otherwise this command does not work: docker build -t roombookingapimockup .

Add this command docker build -t roombookingdbhandler . also in the README of the roomBookingDbHandler even though we have the build script since the current buildScript in linux requires that the image exist at least once then the script works

add this lines to UnixBuild.sh for Linux users: I will send the code below to DM as it here when I paste here it interprets the # as Header :

Before dockerCompose comment

Testing the build: The docker file one in the roomBookingApiMockup shall be renamed from `DockerFIle to Dockerfile `otherwise this command does not work: `docker build -t roombookingapimockup .` Add this command `docker build -t roombookingdbhandler .` also in the README of the roomBookingDbHandler even though we have the build script since the current buildScript in linux requires that the image exist at least once then the script works add this lines to UnixBuild.sh for Linux users: I will send the code below to DM as it here when I paste here it interprets the # as Header : `Before dockerCompose comment`
Collaborator

After adjusting the last comments I'all approve.

After adjusting the last comments I'all approve.
Collaborator

@c24elipe @b24johka @a24antej

It looks good to me now approved 👍!

@c24elipe @b24johka @a24antej It looks good to me now approved 👍!
Collaborator

Tested building the Docker image for roomBookingApiMockup. The build completed successfully without errors.

Tested building the Docker image for roomBookingApiMockup. The build completed successfully without errors.
Collaborator

Tested building the Docker image for roomBookingDbHandler. The build completed successfully without errors.

Tested building the Docker image for roomBookingDbHandler. The build completed successfully without errors.
Collaborator

The test was performed using docker compose up --build.The result shows that booking data is generated,sent via MQTT, received by the middleware, and stored in PostgreSQL.This confirms that the system works correctly.

The test was performed using docker compose up --build.The result shows that booking data is generated,sent via MQTT, received by the middleware, and stored in PostgreSQL.This confirms that the system works correctly.
Collaborator

I tried to verify the room booking flow together with the frontend, but I was not able to fully test the frontend end-to-end. From the logs, roomBookingApiMockup keeps printing "no data to upload waiting...", and roomBookingDbHandler eventually hits a HttpClient.Timeout after 100 seconds.

Additionally, when testing the API through nginx using /api/roombooking/all, it returns 404.

I’m not completely sure if I’m testing this correctly or if there is an issue in the setup, but based on the behavior it seems like the room booking backend is not consistently providing data. Because of that, I couldn’t properly verify the frontend part yet.

I tried to verify the room booking flow together with the frontend, but I was not able to fully test the frontend end-to-end. From the logs, roomBookingApiMockup keeps printing "no data to upload waiting...", and roomBookingDbHandler eventually hits a HttpClient.Timeout after 100 seconds. Additionally, when testing the API through nginx using /api/roombooking/all, it returns 404. I’m not completely sure if I’m testing this correctly or if there is an issue in the setup, but based on the behavior it seems like the room booking backend is not consistently providing data. Because of that, I couldn’t properly verify the frontend part yet.
Author
Collaborator

the backend is set to only provide 4 bookings and the "no data to upload waiting..." is the db handler waiting for potential more data, do not currently know how to work around it because the db hanlder runs in an forever loop.
need to know more how MQTT works before i can come upp with a better solution

the backend is set to only provide 4 bookings and the "no data to upload waiting..." is the db handler waiting for potential more data, do not currently know how to work around it because the db hanlder runs in an forever loop. need to know more how MQTT works before i can come upp with a better solution
Author
Collaborator

when starting the project i used the windowsBuild script, there could be something that you have missed from that.

when starting the project i used the windowsBuild script, there could be something that you have missed from that.
Collaborator

Thanks, I used the build script as well, but I’ll go through it again to make sure I didn’t miss anything

Thanks, I used the build script as well, but I’ll go through it again to make sure I didn’t miss anything
Collaborator

I ran the setup again using WindowsBuild.bat, and now everything works. The booking data shows up in the frontend, so it seems my previous issue was just due to my local setup.I think the issue earlier was that my local setup wasn’t fully initialized correctly.

I ran the setup again using WindowsBuild.bat, and now everything works. The booking data shows up in the frontend, so it seems my previous issue was just due to my local setup.I think the issue earlier was that my local setup wasn’t fully initialized correctly.
Collaborator

A question has been raised regarding this pull request, why would the conf file in entrypoint be changed? we have noticed that the other mockup generator did not change this file.

A question has been raised regarding this pull request, why would the conf file in entrypoint be changed? we have noticed that the other mockup generator did not change this file.
Author
Collaborator

this is to set this as a api(like tempService), this way you can reach it from the frontend like this "http://localhost/api/roombooking/all"

this is to set this as a api(like tempService), this way you can reach it from the frontend like this "http://localhost/api/roombooking/all"
Collaborator

I just want to mention Parking Api also has this changed in the entry point. This is needed in order to communicate with the frontend.
https://git.webug.se/Andras/BoundlessFlowCampus2K/src/branch/team_1_week_1/entryPoint/nginx.conf

~It was just not mentioned in the pr comments. My bad. I can update the comment. It was mentioned on point 7

I just want to mention Parking Api also has this changed in the entry point. This is needed in order to communicate with the frontend. https://git.webug.se/Andras/BoundlessFlowCampus2K/src/branch/team_1_week_1/entryPoint/nginx.conf ~~It was just not mentioned in the pr comments. My bad. I can update the comment.~ It was mentioned on point 7
Collaborator

Sorry! Apperantly we werent up to date with our branch.
We will merge this pull request soon.

Sorry! Apperantly we werent up to date with our branch. We will merge this pull request soon.
b24johka changed target branch from team_1_week_1 to temp-week-2-merge-branch 2026-04-15 09:17:30 +00:00
Collaborator

Manually merged to temp branch

Manually merged to temp branch
b24johka closed this pull request 2026-04-15 11:28:46 +00:00
a22erigr deleted branch #142-mockup-room-service 2026-05-04 12:17:31 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K!259
No description provided.