Skip to content

[Route Planner Agent] New websocket connection to smart traffic agent#2007

Open
krish918 wants to merge 4 commits intoopen-edge-platform:mainfrom
krish918:routeagent/websocket-client
Open

[Route Planner Agent] New websocket connection to smart traffic agent#2007
krish918 wants to merge 4 commits intoopen-edge-platform:mainfrom
krish918:routeagent/websocket-client

Conversation

@krish918
Copy link
Contributor

@krish918 krish918 commented Mar 3, 2026

Description

This PR introduces a websockets client based connection to multiple Smart Traffic Intersection agents. It contains design changes and refactoring required to replace the previous gradio based polling logic to asyncio based non-blocking calls at regular intervals.

Fixes # (issue)

Any Newly Introduced Dependencies

NA

How Has This Been Tested?

Verified end to end integrated with 3 smart traffic intersection agents.

Checklist:

  • I agree to use the APACHE-2.0 license for my code changes.
  • I have not introduced any 3rd party components incompatible with APACHE-2.0.
  • I have not included any company confidential information, trade secret, password or security token.
  • I have performed a self-review of my code.

krish918 added 4 commits March 3, 2026 11:48
Signed-off-by: Krishna Murti <krishna.murti@intel.com>
- New websockets endpoints
- New default location list setup to allow placeholders
- Minor refactoring of logger code

Signed-off-by: Krishna Murti <krishna.murti@intel.com>
- Replaced polling logic with concurrently running calls and checks for asyncio queue
- Removed logic of calling agentic workflow for finding direct route
	- direct route is shown immediately once current source and destination are selected
- New setup to get direct route and a loop running in main event thread to get optimized route
- Added new QueueItem schema for Queue content
- Update RouteService to make all methods async
- Added logic to destroy map_parser objects once not needed
- Moved CSS part from the main.py UI to a separate file
- Added new events, removed ununsed components, async capabilities to UI

Signed-off-by: Krishna Murti <krishna.murti@intel.com>
Signed-off-by: Krishna Murti <krishna.murti@intel.com>
},
{
"host": "http://localhost:8083"
"host": "ws://localhost:8083"
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe in future the ws:// can be removed and handled internally. Also the api_host can be a direct list having list of Intersection Endpoints

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants