Wowza Community

Web service on Wowza Server?

Is it possible to write a web service and deploy it to the wowza server? If yes, can you provide some guidance as to how it would fit the server architecture? I’m looking at a way to query the wowza server from a client/server app. I know I can write a module that accesses remote web services, but don’t know how to write a module that would serve as a web service (if it is feasible). Perhaps you can suggest an approach other than web services.

Thanks.

Why not try creating a DB module for wowza and store whatever data you want there and query the DB instead of a Wowza web service in your client / server app?

Since you can get the latest information via the onConnect etc methods it would be live or am i wrong in assuming you just want wowza info like current users for an App etc ?

John Kane :cool:

www.blueface.ie

My suggested approach would be to use Apache Axis. The problem is where to hook it into the server. One approach would be to use the onAppStart and onAppStop event method handlers. You could fire up an Apache Axis Web Services API each time an application is started and stopped. You can stop an application from being unloaded by setting the application timeout (Application/ApplicationTimeout) to 0 in VHost.xml. Then once the application is started it will keep running.

Can you use this hook for now to get your web service started. Let me consider a better way of starting these types of applications on server start. It would be a lot cleaner.

Charlie

I wish I had time to dig into this more deeply right now but here are a couple of suggestions on approaches:

oh cool :slight_smile:

Well you could integrate https://jax-ws.dev.java.net/ or something like it, into one of your wowza modules. Or even use one of the apache projects to use apache to expose your wowza functionality ?

I’ve never tried it unfortunately so i can’t be the voice of experience :frowning: but if you want the help, you’d be welcome to the hand.

John Kane

www.blueface.ie

Thanks John for your comment.

I agree with you that the DB option is a valid one; however, we would prefer not to rely on a database to synchronize these two apps since these two apps might be maintained by different groups or even different companies.

I would prefer to pass the parameters either by having the J2EE call a web service on the Wowza Server (still don’t know if it is possible) or, have a Wowza module call a web service when a new connection is established to validate the session ID (I know it is possible, I have done that). Still, I’m interested to know whether I can deploy a web service on the Wowza Server.

Thanks Charlie.

Does Wowza Media Server have a built-in HTTP server? If not, how would you integrate Axis into the existing server? Maybe I’m missing something…

see the discussion & notes at:

http://www.wowza.com/forums/showthread.php?t=682&page=2&highlight=web+service

I wish I had time to dig into this more deeply right now but here are a couple of suggestions on approaches:

  • Use the MX4J library to expose the JMX/RMI management API as SOAP:

    http://mx4j.sourceforge.net/docs/ch03s20.html#N105F7

    You could then use MBean/JMX to expose your custom API through this same interface.

  • Integrate a Java servlet container into the Wowza Pro server and use Axis to expose your API. You can use the Wowza Pro module OnAppStart/OnAppStop interface to kick off a new Thread that would run either Tomcat or something smaller like Winstone.

    http://winstone.sourceforge.net/

  • There is a stand-alone http server that is part of Axis. It sounds like its not production quality but it might be enough.

    http://ws.apache.org/axis/java/apiDocs/org/apache/axis/transport/http/SimpleAxisServer.html

    Again, this sounds cool. I would love to help put together a prototype but I am swamped. Once you choose an approach, let me know. I will support you any way I can.

    Charlie

    hi,

    I am a .net dev with C# experience we are running wowza to for live streaming and vod streaming. We are working on a media app that is available at appstore, google play and works on some other platforms like roku, boxee etc.

    We have this requirement that one client can view stream (from wowza) on one device at any given point of time. for example if person is viewing stream on googletv when they try to run our app on boxee they should be able to watch stream on boxee only and googletv session/connection should be automatically destroy. We figure out wowza module will be one way to go but if we want our .net code to instruct wowza server to destroy a user’s session we need some sort of wowza rest api/web service.

    Any suggestion to achieve above web service wrapping wowza functions? Solution should be for production use. Our server is normally have connections between 200 to 300.