I want to know if it's possible to implement the SIP stack outside the servlet container and interact between them with an interface. I want to have SIP transactions and dialogs for the first part and can host the servlet inside the servlet container like Tomcat.
Whenever a SIP request comes, the first part receives it, parses it, SIP transaction and dialog will be created, the servlet and application which should be invoked is chosen and the the message is sent to the servlet container through an interface. Then the servlet that is hosted in the servlet container is invoked and creates a response. Then the response goes back to the first part and will be sent to the destination.
Any idea how to accomplish this stack?
Related
I am designing a microservice architecture, using a database per service pattern.
Following the example of Order Service and Shipping Service, when a user makes an HTTP REST request to the Order Service, this one fires an event to notify shipping service. All this happens asynchronously. So, what happens with the user experience? I mean, the user needs an immediate response from the HTTP request. How can I handle this scenario?
All this happens asynchronously. So, What happen with the user experience? I mean, the user needs an immediately response from the HTTP request. How can I handle this scenario?
Respond as soon as you have stored the request.
Part of the point of microservices is that you have a system composed of independently deployable elements that do not require coordination.
If you want a system that is reliable even though the services don't have 100% uptime, then you need to have some form of durable message storage so that the sender and the receiver don't need to be running at the same time.
Therefore, your basic pattern for data from the outside is that the information from the incoming HTTP request is copied, not directly into a running service, but instead into the message store, to be processed by the service at some later time.
In other words, your REST API is a facade in front of your storage, not in front of the service itself.
The actor model may be a useful analogy; information moves around by copying messages into different inboxes, and are later consumed by the subscribing actor.
From the perspective of the client, the HTTP response is an acknowledgement that the request has been received and recognized as valid. Think "thank you for your order, we'll send you an email when your purchase is ready for pick up."
On the web, we would include in the response links to other useful resources; click here to see the status of your order, click there to see your history of recent orders, and so on.
I have a DataSnap server (Delphi) which currently has one server class, with HTTP Basic Authentication implemented via the TDSAuthenticationManager.OnUserAuthenticate event. What I want to do next is add a second server class, but the methods in this one will not require any authentication. I can't see how I can link the new server class to a different authentication manager, without running it on a separate TDSServer component. So my question is how can I write code in the TDSAuthenticationManager.OnUserAuthenticate event to check which server class is being invoked? Is there maybe a data item in TDSSession that I can examine? Or is there a better way?
hi following a tut at https://mobicents.ci.cloudbees.com/job/Mobicents-SipServlets-Release/lastSuccessfulBuild/artifact/documentation/html_single/index.html#getting-started-with-MSS-Tomcat-AS7 i can make a call between 2 sofphones which both say they have registered but in mobicents click2call server page no information is displayed and it states "No registered users. Please register at least two SIP User Agents." which couldint be the case if i can make and take calls anyone have any idea why this would happen.
By default Mobicents SIP Servlets uses the following application by default https://code.google.com/p/sipservlets/wiki/HTML5WebRTCVideoApplication
If you want to change the default application, go to the Mobicents SIP Servlets management console http://127.0.0.1:8080/sip-servlets-management and change the application routing so the default application that receives the INVITE and REGISTER. More on default application routing (DAR) management at https://mobicents.ci.cloudbees.com/job/Mobicents-SipServlets-Release/lastSuccessfulBuild/artifact/documentation/html_single/index.html#sssicar-SIP_Servlets_Server-Application-Router
Summary
Is there a way to programmatically call REST URLs setup in JBoss via RESTEasy so that the programmatic method call actually drills down through the REST processor to find/execute the correct endpoint?
Background
We have an application that has ~20 different REST endpoints and we have set the application up to receive data from other federated peers. To cut down on cross network HTML requests, the peer site sends a bulk of requests to the server, and the receiving server needs to act upon the URL it receives. Example data flow:
Server B --> [Bulk of requests sent via HTTP/Post] --> Server A breaks list down to individual URLs --> [Begin Processing]
The individual URLs are REST URLs that the receiving server is familiar with.
Possible Solutions
Have the receiving server read through the URLs it receives, and call the management beans directly
The downside here is that we have to write additional processing code to decode the URL strings that are received.
The upside to this approach is that there is no ambiguity as to what happens
Have the receiving server execute the URL on itself
The receiving server could reform the URL to be http://127.0.0.1:8080/rest/..., and make a HTTP request on itself.
The downside here is that the receiving server could have to make a lot of HTTP requests upon itself (it's already somewhat busy processing "real" requests from the outside world)
Preferred: Have the receiving server access the main RESTEasy bean somehow and feed it the request.
Sort of combo of 1 & 2, without the manual processing of 1 or the HTTP requests involved with 2.
Technology Stack
JBoss 6.0.0 AS (2010 release) / Java 6
RESTEasy
How does webserver know the browser no longer requires response. Say for example:
Client/browser sends a request
Web server is processing
Client/browser moved to another page
When a new request comes from the client, does server kills the previous thread?
Each client request is bound with the browser's response :
Client/browser sends a request (request1)
Web server is processing
Client/browser moved to another page (request2)
Web server is processing
Web server returns response1
Client/browser ignores response1 (it is waiting response for its last request)
Web server returns response2
Client/browser displays response2
Clicking on several links at the same time will several generate requests, which will be time-consuming for the server. The browser will do the ignoring-irrelevant-response job.
To answer your first question, it can't know unless you implement a service to kill old server processes. That's why web servers have a timeout parameter.