• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

FMS and Java servlet

Guest
Nov 05, 2009 Nov 05, 2009

Copy link to clipboard

Copied

Hello!

Is there any way to connect Java servlet to FMS?

I would like to send comand from servlet via HTTP to FMS?

(Something like communication to Flash media server using administration API)

The best way for me would be connecting (writing) to SharedObjects, but I would be happy with any connection at all.

(I read some about ColdFusion, but there would be too much modification on my servlet.)

There must be some simple way, but I just can't figure it out.

Some help would be appreciated. Thank you.

Dejan

Views

2.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Nov 06, 2009 Nov 06, 2009

Does  your servlet architecture allow you to listen for connections on the java side and maintain stateful socket connections, or is it HTTP GET/POST only? Although FMS can't listen for connections other than RTMP, it can initiate a stateful connection with another service.

It seems to me that the optimal solution would be to have the FMS application open a socket connection to the servlet onAppStart (see the XMLSocket class in the server side actionscript docs). If the servlet doesn't support it

...

Votes

Translate

Translate
Guest
Nov 05, 2009 Nov 05, 2009

Copy link to clipboard

Copied

Depending on your needs, you may be able to use the broadcastMsg method of the admin service API.

If you need to get data back from an FMS application instance, you'll need the application instance to initiate requests to your servlet. FMS can't listen for and process HTTP requests, other than to proxy them to an HTTP server.

If you can describe the required interaction between the servlet and the FMS app, perhaps I can offer more advice.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 06, 2009 Nov 06, 2009

Copy link to clipboard

Copied

Thank you very much for your answer.

We were thinking about broadcastMsg method of the service admin API, but we don't know if this is optimal solution in our case.

What we need is some kind of ability to write from our system (java+servlet) via HTTP to FMS's shared objects. After data is stored in objects, clients are invoked by onSync function.

On the way back (communication from client -->FMS-->system) we also need optimal solution for interaction between FMS and the system.

I also attached  RSiTV.pdf file in which I described the topology of the system.

Thank you again for all your solutions.

--------------------------------------

Dejan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 06, 2009 Nov 06, 2009

Copy link to clipboard

Copied

Does  your servlet architecture allow you to listen for connections on the java side and maintain stateful socket connections, or is it HTTP GET/POST only? Although FMS can't listen for connections other than RTMP, it can initiate a stateful connection with another service.

It seems to me that the optimal solution would be to have the FMS application open a socket connection to the servlet onAppStart (see the XMLSocket class in the server side actionscript docs). If the servlet doesn't support it, it might make better sense to refacor the servlet. Otherwise, you may be stuck with something like this:

1. Servlet invokes broadcastMsg on the admin service

2. The servlet gets a nondescriptive success/error result.

3. Admin service dispatches the message to the FMS application

4. The FMS application updates the shared object (you'd handle this in your server side AS).

5. somewhere in the data the serlet sent, there will be data the FMS app needs to send a message back to the servlet (url, whatever)

6. The FMS app makes an http request of the servlet, and sends whatever data you need sent.

That's a lot of processing for updating some values in a shared object, and since you mentioned there will be a lot of these events happening, it might be a strain on the admin system (and might pose serious challenges if/when you need to scale the application).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 08, 2009 Nov 08, 2009

Copy link to clipboard

Copied

LATEST

Thank you for the excellent advice - sockets.

Thank you again, have a nice day.

Dejan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines