msgbartop
Various ramblings-on, mostly about Red5
msgbarbottom

01 Oct 08 Red5 Admin

I just spent many hours trying to get the Admin (demo) application working properly; it was quite painful. Trying to get JNDI and Spring to cooperate in an Embedded Tomcat instance is not what I call fun, but I have it working alright for now. There still seem to be some underlying classloader issues in the server, because I cannot self-contain the web applications. No matter how I configure the server or application, there are always jars that must be in the shared lib directory; if anyone has any experience with this I would love to hear it.  So without further rambling, here are the steps to take to get it working:

1. Obtain the admin war or use my archive

2. Unzip the archive into the webapps directory (red5/webapps/admin)

3. Move the following jars to your shared lib directory (red5/lib)

  • derby-10.4.2.0.jar
  • jasper-el-6.0.18.jar
  • el-api.jar
  • simple-jndi-0.11.4.1.jar
  • spring-jdbc-2.5.5.jar
  • spring-orm-2.5.5.jar
  • spring-tx-2.5.5.jar

4. Restart Red5

5. Go to http://localhost:5080/admin/register.html to add new users

I hope this helps those of you new to red5, since I know it can be difficult to get things going at times. :)

Here is my test version zipped for your convenience: admin_10012008.zip (1.02Mb)


View this Post in: Chinese(S) Chinese(T) French Arabic Bulgarian Croatian Czech Danish Dutch Finnish German Greek Hindi Italian Japanese Korean Norwegian Polish Portuguese Romanian Russian Spanish Swedish

Tags: , , , , , , , , ,

28 Sep 08 Tomcat connectors

In Red5, you have pretty much full access to manipulate the embedded Tomcat engine via Spring. With that being said I would like to give details on how to change the http connector between two available options; there are several other options, but I'll only be covering NIO and BIO. First a quick explanation of these two options:

  • BIO - Blocking Input / Output, this has been around since the beginning of internet time. It uses one thread per socket connnection to handle requests.
  • NIO - Non-blocking Input / Output, this has been available in the JDK since 1.4. It uses a single thread to handle many socket connections.
In most cases, you should find NIO to be much faster and more able to handle a lot more connections than BIO will. The default connector was set to NIO until today when I switched it to BIO to prevent problems with Unix-based systems (OSX / Linux).
The configuration of Tomcat in Red5 for HTTP, RTMPT, and RTMPS is nearly identical so you may apply the configuration items below to any of the embedded servers. To configure with a BIO connector, locate the connector section and change the constructor arg value:

<property name="connector">
  <bean class="org.apache.catalina.connector.Connector">
    <constructor-arg type="java.lang.String" value="org.apache.coyote.http11.Http11Protocol" />
    <property name="port"><value>80</value></property>
    <property name="redirectPort"><value>443</value></property>
    <property name="enableLookups"><value>false</value></property>
  </bean>
</property>

To use the NIO connector simply change the constructor arg as shown below:

<property name="connector">
  <bean class="org.apache.catalina.connector.Connector">
    <constructor-arg type="java.lang.String" value="org.apache.coyote.http11.Http11NioProtocol" />
    <property name="port"><value>80</value></property>
    <property name="redirectPort"><value>443</value></property>
    <property name="enableLookups"><value>false</value></property>
  </bean>
</property>


View this Post in: Chinese(S) Chinese(T) French Arabic Bulgarian Croatian Czech Danish Dutch Finnish German Greek Hindi Italian Japanese Korean Norwegian Polish Portuguese Romanian Russian Spanish Swedish

Tags: , , , , , , , ,