FMS Administration Seminar

2,015 views
1,870 views

Published on

Seminar about Flash Media Server (FMS) Administration)

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,015
On SlideShare
0
From Embeds
0
Number of Embeds
12
Actions
Shares
0
Downloads
0
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

FMS Administration Seminar

  1. 2. <ul><li>Introduction to Flash media server </li></ul><ul><li>Understanding configurations </li></ul><ul><li>Scaling options </li></ul>
  2. 3. <ul><li>What is a media server </li></ul><ul><ul><li>Open socket server </li></ul></ul><ul><ul><li>Persistent connection with client </li></ul></ul><ul><ul><li>On that connection </li></ul></ul><ul><ul><ul><li>Stream audio </li></ul></ul></ul><ul><ul><ul><li>Stream video </li></ul></ul></ul><ul><ul><ul><li>Stream text / data </li></ul></ul></ul>
  3. 4. <ul><li>What is flash media server </li></ul><ul><ul><li>Adobe’s media server is called flash media server </li></ul></ul><ul><ul><li>Works with the RTMP protocol </li></ul></ul><ul><ul><li>Flash media streaming server </li></ul></ul><ul><ul><li>Flash media Interactive server </li></ul></ul>
  4. 5. <ul><li>Versions </li></ul><ul><ul><li>1.0 released 9 July 2002 </li></ul></ul><ul><ul><li>1.5 released 27 March 2003 </li></ul></ul><ul><ul><li>2.0 released November 15 2005 </li></ul></ul><ul><ul><ul><li>Renamed to FMS and versions not reset </li></ul></ul></ul><ul><ul><ul><li>New coded On2’s VP6 in flash player 8 for the first time </li></ul></ul></ul><ul><ul><li>3.0 released 4 December 2007 </li></ul></ul><ul><ul><li>3.5 released 13 January 2009 </li></ul></ul><ul><ul><li>3.6 now in beta (closed beta) </li></ul></ul>
  5. 6. <ul><li>Types of servers we have </li></ul><ul><ul><li>RED5 </li></ul></ul><ul><ul><li>WOWza </li></ul></ul>
  6. 7. <ul><li>Special language </li></ul><ul><ul><li>Client side – ActionScript 2/3 (3 preferred) </li></ul></ul><ul><ul><li>Server - Server-Side Media ActionScript </li></ul></ul><ul><ul><li>FMS API </li></ul></ul><ul><ul><ul><li>Predefined functions (application level) </li></ul></ul></ul><ul><ul><ul><ul><li>OnConnect </li></ul></ul></ul></ul><ul><ul><ul><ul><li>OnClientConnect </li></ul></ul></ul></ul><ul><ul><ul><ul><li>And more… </li></ul></ul></ul></ul>
  7. 8. <ul><li>Create video/audio/text chats </li></ul>
  8. 9. <ul><li>Create games </li></ul>
  9. 10. <ul><li>Create games </li></ul>
  10. 11. <ul><li>Create Rich video based application </li></ul>
  11. 12. <ul><li>Create Rich audio applications </li></ul>
  12. 13. <ul><li>Supported OS’s </li></ul><ul><li>Installation of flash media server </li></ul><ul><li>Ports supported / best use </li></ul><ul><li>Connection test – coding example (flex) </li></ul>
  13. 14. <ul><li>Windows </li></ul><ul><ul><li>Windows 2003 </li></ul></ul><ul><ul><li>Windows 2008 </li></ul></ul><ul><ul><li>Windows Vista </li></ul></ul><ul><ul><li>Windows 7 </li></ul></ul><ul><li>Linux </li></ul><ul><ul><li>From 3.X + </li></ul></ul><ul><li>Mac </li></ul><ul><ul><li>No Mac version  </li></ul></ul>
  14. 15. <ul><li>Supported ports (1935, 80) </li></ul><ul><li>Why not use 1935? </li></ul><ul><ul><li>Client firewalls </li></ul></ul><ul><ul><li>Server firewalls </li></ul></ul><ul><ul><li>Routers blocking communications </li></ul></ul><ul><li>Combine with IIS listening on port 80 </li></ul>
  15. 16. <ul><li>Let’s install shall we </li></ul>
  16. 17. package { import flash.net.NetConnection; import flash.display.Sprite; import flash.text.TextField; import flash.events.NetStatusEvent;   public class FMS3Connect extends Sprite { private var nc:NetConnection; private var rtmpNow:String; private var msg:String; private var connectText:TextField; private var posX:Number;   function FMS3Connect () {   nc=new NetConnection(); nc.addEventListener (NetStatusEvent.NET_STATUS,checkConnect); rtmpNow=&quot;rtmpe://192.168.0.11/connect&quot;; //rtmpNow=&quot;rtmpe:/connect&quot;; nc.connect (rtmpNow); } private function checkConnect (event:NetStatusEvent):void { connectText=new TextField(); msg=event.info.code; connectText.width=250; connectText.text=msg; addChild (connectText); posX=connectText.stage.stageWidth; connectText.x=(posX/2)-((msg.length/2)*(6)); connectText.y=175; } } }
  17. 18. <ul><li>Understanding applications </li></ul><ul><ul><li>What are applications </li></ul></ul><ul><ul><li>Why separate applications </li></ul></ul><ul><li>Folder structure – get organized super fast </li></ul><ul><li>File structure inside application </li></ul><ul><li>Main.far / main.asc </li></ul><ul><ul><li>What is a .far file </li></ul></ul><ul><ul><li>How can you edit this file? </li></ul></ul><ul><ul><li>Far utility </li></ul></ul>
  18. 19. <ul><li>Folder/file Structure </li></ul>
  19. 20. <ul><li>Folder special configuration </li></ul><ul><ul><li>When user needs FTP to upload files </li></ul></ul><ul><ul><li>End users uploading mp3 files the FMS should stream. </li></ul></ul><ul><ul><li>DO NOT give access to FMS default folder </li></ul></ul><ul><ul><li>Configuring the XML file </li></ul></ul>
  20. 21. <ul><li>RTMP </li></ul><ul><ul><li>Real-Time Messaging Protocol </li></ul></ul><ul><li>RTMPE </li></ul><ul><ul><li>Real-Time Messaging Protocol (Encrypted) </li></ul></ul><ul><li>RTMPTE (RTMPS) </li></ul><ul><ul><li>Real-Time Messaging Protocol (Encrypted) </li></ul></ul><ul><ul><li>Tunneling over HTTP (T) </li></ul></ul><ul><li>Security best use </li></ul>
  21. 22. <ul><li>RTMP </li></ul><ul><ul><li>proprietary protocol </li></ul></ul><ul><ul><li>Developed by Adobe </li></ul></ul><ul><ul><li>TCP based </li></ul></ul><ul><ul><li>Single persistent connection </li></ul></ul><ul><ul><li>Real time messaging allowed on this connection </li></ul></ul><ul><ul><li>Smooth delivery of audio/video </li></ul></ul><ul><ul><li>Ports: Default  1935 can work on  80 </li></ul></ul><ul><ul><li>Sometimes firewalls blocks this connection (rare) </li></ul></ul>
  22. 23. <ul><li>RTMPT (e, s) </li></ul><ul><ul><li>HTTP based </li></ul></ul><ul><ul><li>Encapsulated and exchanged over HTTP </li></ul></ul><ul><ul><li>Larger packets (include headers) </li></ul></ul><ul><ul><li>Will go through every firewall </li></ul></ul>
  23. 24. <ul><li>What are RSO’s </li></ul><ul><ul><li>Remote shared objects </li></ul></ul><ul><ul><li>Controlled from place X shown on place Y and vice-versa </li></ul></ul><ul><ul><ul><li>private var so:SharedObject; </li></ul></ul></ul><ul><ul><ul><li>var memberName:String= name_txt.text; so.setProperty(&quot;cliName&quot;, memberName); </li></ul></ul></ul>
  24. 25. <ul><li>When to use? </li></ul><ul><ul><li>Remote controlled slide shows </li></ul></ul><ul><ul><li>Text chats </li></ul></ul><ul><ul><li>Mixer applications (DJ’s) </li></ul></ul><ul><ul><li>Live sales site </li></ul></ul><ul><ul><li>Customer service applications </li></ul></ul>
  25. 26. <ul><li>Basic Shared object example (code) </li></ul>
  26. 27. <ul><li>Netstream </li></ul><ul><ul><li>What is a NetStream? </li></ul></ul><ul><ul><ul><li>Packets carrying mule  </li></ul></ul></ul><ul><ul><li>Bundles sending over the NetStream </li></ul></ul><ul><ul><li>Connections Handling… (next slide) </li></ul></ul>
  27. 28. <ul><li>Connections Handling </li></ul>
  28. 29. <ul><li>Flash media server administration console </li></ul><ul><ul><li>Locating it in the start menu </li></ul></ul><ul><ul><li>Set admin password </li></ul></ul>
  29. 30. <ul><li>Flash media server administration console </li></ul>
  30. 31. <ul><li>Configuration XML’s </li></ul>
  31. 32. <ul><li>Configuration XML’s (the old fashioned way) </li></ul><ul><ul><li>Good old notepad / Notepad++ is the IDE </li></ul></ul><ul><ul><li>Great commenting </li></ul></ul><ul><ul><li>High level of customizing the server </li></ul></ul>
  32. 33. <ul><ul><li>FMS.INI </li></ul></ul><ul><ul><ul><li>Admin credentials </li></ul></ul></ul><ul><ul><ul><li>Application Folders </li></ul></ul></ul><ul><ul><ul><li>Host ports </li></ul></ul></ul><ul><ul><ul><li>############################################################### # This section contains configurable parameters in Server.xml # ############################################################### # IP address and port Flash Media Admin Server should listen on </li></ul></ul></ul><ul><ul><ul><li># For example: </li></ul></ul></ul><ul><ul><ul><li># SERVER.ADMINSERVER_HOSTPORT = :1111 </li></ul></ul></ul><ul><ul><ul><li> SERVER.ADMINSERVER_HOSTPORT = :1111 </li></ul></ul></ul>
  33. 34. <ul><li>FMS.INI continues </li></ul><ul><ul><li>Paramaters </li></ul></ul><ul><ul><ul><li><HostPort>${SERVER.ADMINSERVER_HOSTPORT}</HostPort> </li></ul></ul></ul><ul><ul><ul><li>This means the configuration comes from XML </li></ul></ul></ul><ul><ul><ul><li>You can change the FMS.INI or poke your way through to the relevant XML. </li></ul></ul></ul>
  34. 35. <ul><li>Server.xml </li></ul><ul><ul><ul><li>81 different tags for configuration </li></ul></ul></ul><ul><ul><ul><li>One you should care about the most: </li></ul></ul></ul><ul><ul><ul><ul><li><HostPort></HostPort> </li></ul></ul></ul></ul>
  35. 36. <ul><li>Users.xml </li></ul><ul><ul><li>Increase / decrease security </li></ul></ul><ul><ul><li><allow> <deny> tags </li></ul></ul><ul><ul><li>Allow / deny domains </li></ul></ul><ul><ul><ul><li><Allow>www.sandlight.com, 12.34.5.678 </Allow> </li></ul></ul></ul>
  36. 37. <ul><li>Logger.xml </li></ul><ul><ul><li>access.00.log – most recent log (convention) </li></ul></ul><ul><ul><li>Change time of logging </li></ul></ul><ul><ul><li><history> </li></ul></ul><ul><ul><ul><li>Default 5 </li></ul></ul></ul><ul><ul><ul><li>When server reaches access.05.log starts over </li></ul></ul></ul><ul><ul><li><Time> </li></ul></ul><ul><ul><ul><li>Time format – Local / UTC </li></ul></ul></ul>
  37. 38. <ul><li>Adaptor.XML </li></ul><ul><ul><li>Network adaptor configuration (individual) </li></ul></ul><ul><ul><ul><li><HostPortList> </li></ul></ul></ul><ul><ul><ul><li><HostPort> </li></ul></ul></ul><ul><ul><ul><li><Allow> <Deny> </li></ul></ul></ul>
  38. 39. <ul><li>vHost.xml </li></ul><ul><ul><li>Create additional virtual </li></ul></ul><ul><ul><li>hosts using the same server </li></ul></ul>
  39. 40. <ul><li>Cluster in Streaming server </li></ul><ul><li>Load balancing in Interactive server </li></ul><ul><li>FMS Intelligent balancing </li></ul><ul><li>Edge / Origin </li></ul><ul><li>Magic custom created scaling </li></ul>
  40. 42. <ul><li>Exp/Imp URI </li></ul><ul><ul><li>When should you use Explicit/implicit URI </li></ul></ul><ul><li>Traffic Cop </li></ul><ul><ul><li>When should you use it? </li></ul></ul><ul><li>Server Auto Discover </li></ul><ul><li>Client Auto Discover </li></ul>
  41. 44. <ul><li>Server number is unlimited </li></ul><ul><li>Load balancer of your choice </li></ul><ul><li>Horizontal scaling </li></ul>
  42. 46. <ul><li>DB Server </li></ul><ul><ul><li>Sql Server /mySQL / Sqlite3 </li></ul></ul><ul><ul><li>Holds data on servers </li></ul></ul><ul><ul><ul><li>How many servers in cluster </li></ul></ul></ul><ul><ul><ul><li>Allowed connections </li></ul></ul></ul><ul><ul><ul><li>Connected users </li></ul></ul></ul><ul><ul><ul><li>Bandwidth usage </li></ul></ul></ul>
  43. 47. <ul><li>DB Server </li></ul>
  44. 48. <ul><li>HTTP Service </li></ul><ul><ul><li>Connects to the database and watches the data </li></ul></ul><ul><ul><li>Simple HTTP service via REST or SOAP </li></ul></ul><ul><ul><ul><li>WhatIsMyServer():String </li></ul></ul></ul><ul><ul><ul><li>This method return a URI for the client machine </li></ul></ul></ul><ul><ul><ul><li>The client then connects to that URI </li></ul></ul></ul><ul><ul><ul><li>rtmp://server1:1935/ </li></ul></ul></ul>
  45. 49. <ul><li>Http Service </li></ul>
  46. 51. <ul><li>Total Control </li></ul><ul><li>SWF validation </li></ul><ul><li>DB – Come play </li></ul>
  47. 52. <ul><li>Each application has it’s own event bubble </li></ul><ul><li>Event Types: </li></ul><ul><ul><li>OnConnect – When client connects to the application </li></ul></ul><ul><li>OnDisConnect </li></ul><ul><ul><li>Client disconnected from the server </li></ul></ul><ul><li>OnAppStart </li></ul><ul><ul><li>Application initiated (from server or from client) </li></ul></ul><ul><li>Custom events </li></ul><ul><ul><li>Sync, client-data and more… </li></ul></ul>
  48. 53. <ul><li>Inside stream.play(); </li></ul><ul><ul><li>myStream.play(&quot;name&quot;,start,length,reset,remoteConnection, virtualKey) </li></ul></ul><ul><ul><li>application.myStream.get(&quot;serSideStreamName&quot;) </li></ul></ul><ul><ul><li>application.myStream.play(&quot;newProduct&quot;) </li></ul></ul>
  49. 54. <ul><li>Inside stream.play(); </li></ul><ul><ul><li>application.sandStream.get(&quot;sandlight&quot;)//Name if(application.sandStream) { application.sandStream.play(&quot;PepTalk&quot;)//Live application.sandStream.play(&quot;recordedTalk&quot;)//Recorded FLV application.sandStream.play(&quot;mp3:Blues&quot;)//MP3 } </li></ul></ul>
  50. 55. <ul><li>Inside stream.play(); </li></ul><ul><ul><li>Params (Start Param) </li></ul></ul><ul><ul><li>application.sandStream.play(&quot;mp3:flaRock&quot;,-2) </li></ul></ul><ul><ul><li>-2 is default </li></ul></ul><ul><ul><li>Tries to play live first (find?) </li></ul></ul><ul><ul><li>After the live starts to play VOD (find?) </li></ul></ul><ul><ul><li>Creates a stream with the name and listens </li></ul></ul>
  51. 56. <ul><li>Inside stream.play(); </li></ul><ul><ul><li>Params (Start Param) </li></ul></ul><ul><ul><li>application.sandStream.play(&quot;mp3:flaRock&quot;,-2) </li></ul></ul><ul><ul><li>-1 </li></ul></ul><ul><ul><li>Tries to play live first (find?) </li></ul></ul><ul><ul><li>Creates a stream with the name and listens </li></ul></ul>
  52. 57. <ul><li>Inside stream.play(); </li></ul><ul><ul><li>Params (Start Param) </li></ul></ul><ul><ul><li>application.sandStream.play(&quot;mp3:flaRock&quot;,-2) </li></ul></ul><ul><ul><li>0 </li></ul></ul><ul><ul><li>Starts playing the file at the start </li></ul></ul>
  53. 58. <ul><li>Inside stream.play(); </li></ul><ul><ul><li>Params (Length Param) </li></ul></ul><ul><ul><li>application.sandStream.play(&quot;mp3:flaRock&quot;,-2, -1) </li></ul></ul><ul><ul><li>Play from beginnig to end </li></ul></ul><ul><ul><li>If 0 or greater is used then a preview is played </li></ul></ul>
  54. 59. <ul><li>Inside stream.play(); </li></ul><ul><ul><li>Preview? </li></ul></ul><ul><ul><ul><li>When you have a VOD application and you want to let your users play a sneak peak of the application. </li></ul></ul></ul>
  55. 60. <ul><li>Playing mp3 files </li></ul>
  56. 61. <ul><li>Create files </li></ul><ul><li>Read/write to and from files </li></ul><ul><li>Get data on files </li></ul><ul><ul><li>Example application </li></ul></ul><ul><ul><li>Coding… </li></ul></ul>
  57. 63. <ul><ul><li>Yossi Cohen </li></ul></ul><ul><li>[email_address] </li></ul><ul><li>09-8850956, 054-5313092 </li></ul>

×