Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Server-Sent Events (SSE) for Real-Time Notifications #344

Open
buddhika75 opened this issue Apr 7, 2024 · 0 comments
Open

Implement Server-Sent Events (SSE) for Real-Time Notifications #344

buddhika75 opened this issue Apr 7, 2024 · 0 comments
Assignees
Milestone

Comments

@buddhika75
Copy link
Member

Objective: Integrate SSE to enable real-time notifications and updates within OpenHIMS, enhancing user experience with immediate data refreshes without the need for manual page reloads.

Requirements:

SSE Servlet Implementation: Create a dedicated servlet to handle SSE connections. This servlet should stream data to clients in a standard SSE format, maintaining an open connection to push updates from the server to the client browser.

Client-Side Handling: Utilise JavaScript's EventSource API to connect to the SSE endpoint. Implement event handlers to process incoming messages and update the UI accordingly.

Integration with JSF/PrimeFaces: Ensure compatibility with existing JSF and PrimeFaces components. Use JavaScript or PrimeFaces' AJAX mechanisms to update the UI based on the data received through SSE.

Security and Performance Considerations: Implement appropriate security measures to protect the SSE endpoint. Evaluate the impact of keeping multiple connections open and optimize for scalability and performance.

Expected Outcomes:

Real-time update capability in OpenHIMS without requiring page refreshes.
Improved user experience through immediate display of notifications and data updates.
Steps for Implementation:

Develop the SSE servlet as per JavaEE standards.
Write client-side JavaScript to connect to the SSE stream and handle incoming events.
Test integration with PrimeFaces components, ensuring seamless UI updates.
Conduct security assessments and performance tuning.
Potential Challenges:

Ensuring cross-browser compatibility of the EventSource API.
Managing server resources to support multiple concurrent SSE connections.
This feature will significantly enhance OpenHIMS by providing dynamic, real-time data to users, crucial for timely decision-making and efficient management within healthcare settings.

@buddhika75 buddhika75 self-assigned this Apr 7, 2024
@buddhika75 buddhika75 added this to the May 2024 milestone Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant