2. AMF
• Coming soon
RPC
• remote procedure call (RPC) is an inter-process communication that allows a computer program to
cause a subroutine or procedure to execute in another address space without the programmer
explicitly coding the details for this remote interaction.
Serialization
• serialization is the process of converting a data structure or object into a sequence of bits so that it
can be stored in a file or memory buffer, or transmitted across a network connection link to be
"resurrected" later in the same or another computer environment.
RTMP
• RealTime Messaging Protocol (RTMP) is a proprietary protocol developed by Macromedia
for streaming audio, video and data over the Internet, between a Flash player and a server.
RTMPS
• which is RTMPT over a secure SSL connection using HTTPS
AMF - SomeTerms
3. “Action Message Format (AMF) is a compact
binary format that is used to serialize ActionScript
object graphs” From: AMF 3 Specification
Compact
Binary
Serialize and De Serialize
ActionScript
Object
What is AMF
4. • AMF was introduced in Flash Player 6 in 2001
• Remained unchanged until AS2 Flash Player8
•This version of AMF is referred to as AMF0
• In Flash Player 9, Action Script 3.0 – AMF3 with
new data types and optimization
•AMF3 Specification
AMF History
5. Size of AMF Object.
Fast serialization / de serialization.
AMF is parsed directly to an object.
Native Type and custom class support.
Low bandwidth and CPU
•Compared with HTML JSONYAML XML (SOAP)
Send Object By Reference (AMF 3)
Benefits (why use it?)
6. amf vs xml vs ajax
James Ward – RIA Cowboy
jamesward benchmark
AMF/Remoting vs. Web Services Benchmark
Bench Mark
7. No DisplayObject (and descended objects)
Native Types and Custom class.
Compression (zlib)
Pitfalls
8. Binary format
• Hard to read
Complex Backend
• Server errors influence client
• Server side elopers needed
Organization learning curve.
AMF is not the answer for all the problems.
Downsides
9. Client side
•Flash platform – build in support
•Other open source reversed engineered
Servers side:
•Depend on technology (PHP, Java .net, Ruby on
Rails…).
•Depend on platform (Windows Linux Unix).
•Depend on knowledge.
Where to get it
10. AMFEXT PHP Extension.
• Written in C, fast encoding and decoding of AMF0 and AMF3 messages.
• Looking for a new maintainer since July 2008.
• PHP Frameworks.
AMFPHP
• Simple and powerful
• Works since Flash MX 2004
• Optional support for AMFEXT
CakeAMFPHP
• Easy to use with CakePHP, requires AMFEXT
• Development stalled
Servers for PHP
11. SabreAMF
• Server and Client
• PHP5 only
• Compliant to PHP Strict Mode
WebORB for PHP
• Well documented, commercial support available
• Management Console includes Service Browser,Testing and Security Management
• Code Generators forActionScript Remoting, Cairngorm and PureMVC
Zend AMF
• Easy to use with Zend Framework
• PHP is very widespread
• Promoted by Adobe
More for PHP
12. Cold Fusion
• Supports serialization to AMF
• Easy to use
• Supported by Adobe
Could Fusion
13. RED5
• Mainly for Audio- and Video Streaming
• Supports AMF Remoting, too
Blaze Data Services (BlazeDS)
• Open Source (GPLv3)
• Shares codebase (messaging and remoting) with LiveCycle Data Services SE
• Rich set of features
• Supports streaming channels over HTTP
• Includes Tomcat 6 Application Server (easy to deploy)
• LiveCycle Data Services Community Edition
• Certi?ed builds of BlazeDS
• Developer and Enterprise Support
More…
Java
14. PyAMF
• Integration with Python web frameworks like Django, Pylons,Twisted, CherryPy, ...
• Scales well if used with mod_python, mod_wsgi, ...
• Possible to run on Google App Engine
• RTMPy is a protocol forTwisted
• Based on PyAMF
• Implementing RTMP
• Still in development
Python
15. Ruby on Rails
• RubyAMF
• Very easy for Rails Developers to get started
• Flexible and extensible
• Scales well if Rails is used withThin, lighttpd, nginx, Phusion Passenger (mod_rails), ...
WebORB for Rails
• Based on Ruby on Rails
• Tight integration of ActiveRecord
• Commercial support available
RubyIZUMI
• RTMP Server for streaming Flash video/audio (H.264)
• Based on EventMachine (fast single-threaded socket engine)
• Experimental - not ready for production use
Ruby
16. AMF.NET
• Implemented as an HttpHandler, easy to install
• Very simple
WebORB for .NET
• Easy to install (only on Microsoft IIS)
• Commercial support available
FluorineFx
• Supports RTMP
• Template based code generator
• Includes a Service Browser
Blaze Data Services for .NET (BlazeDS.NET) ?????
.NET
17. WebORB
Key Features
• Developer ProductivityTool
• management console, code generation,
• service browser,
• invocation test drive, project templates,
• FlexBuilder plugin, Eclipse plugins,
• command line tools,
• built-in examples
• Multi-Client Support - Flash, Flex, Silverlight, AJAX
• Flash, Flex, Silverlight, AJAX
19. • Video Streaming
• streaming flash video, video broadcast,
• server initiated video,
• video recording, video chat
• Extensibility Features
• custom object serialization,
• abstract argument mapping,
• object factories, invocation chain,
• custom object activation, special attributes,
• security handlers
• Solid Product Roadmap
• always adding new features to increase the value of your investment
WebORB …
20. WebORB installation and configuration
Creating an a flex project
Remoting samples
REAL TIME Massaging (chat application, video
chat application
Client side as method invocation
How to use it
21. WebOrb Plug-in for Flash Builder
WebOrb Dev Den
Tour De Flex
Adobe Developer Connection
android-xmlrpc
• xmlrpc client side library for Android platform
Ajax and Flex Data Loading Benchmarks
AMF 3 Specification
Useful resources
22. Efficiency
• Enhanced User Experience
• Greater User Acceptance
• Helps to save the planet (lower energy consumption)
Ease of Use
• Intuitive way of working with data
• Less hassle, higher quality
• Have more time for creative ideas, or
• Spend more time with your loved ones
AMF is not always the right thing
• Consider alternatives (E4X, SWX, JSON, ...)
• Proof your design by a working prototype
Summery
שלום לכולם
כמה מילים על עצמי
אני לא מעצב אני איש של קוד (UML וכל מיני כאלה)
בתור התחלה היתי רוצה לדעת מול מי אני עומד :
כמה אנשים שעובדים עם פלקס יש כאן
כמה אנשים עובדים עם סרבר סייד?
כמה מייקרוסופטים יש כאן (C# .NET WCF)
עוד שאלה אחרונה שתעביר אותנו למצגת:
מי כאן יודע מה זה AMF מי עבד עם זה בעבר.
מצוין אז נתחיל.
דרך הגב הדילברט כאן כי אמרו לי פעם שכל מצגת חייבת להתחיל ב דילברט (זה
AMF המשך בקרוב על זה כל המצגת[
RPC –
קריאה או הפעלה של פרוצדורה (שיגרה) מרוחקת – בדרך כלל מחשב מרוחק אבל לא חייב
RPC לא רק ל AMF אפשר לעששות את זה גם בדרכים אחרות כמו XML JSON CORBA JAVA .....
SERIALIZATION –
שאלה : משהוא לא יודע מה זה סירילאזישן ?
במילים אחרות : לוקחים אובייקט דוחסים אותו מקבצים אותו שולחים אתו ומגהצים אותו שוב בצד השני
RTMP
חיבור אחד קבוע
ניתן לקבוע את גודל המידע שעובר 64 ביית או 128 ביית
ביית אחד עבור כל חלק – מעט תוספת יחסית ומהיר לפירוק וחיבור
ישנם מספר ערוצים להעברת נתונים (RPC וידאו אודיאו וערןץ נתונים כללי חוץ שידורי)
Sa
RTMPS RTMPT RTMPTS
אותו הדבר רק עם S
אותו דבר עם T ...
עובד באופן אסינכרוני
Binary
Serialize and Desterilize – fast and persisentcy
AMF 3 מכיל גם שיפורים רבים של אופטימיזציה
מכיל גם נתמך מפלש 9 ו AS3
אובייקטים קטנים חשוב ל: יעילות בקידוד ופיענוח של האוביקט – הדבר מתאפשר גם בשל העובדה שהאוביקטים הם בינרים
יש אפשרות גם לקווץ ב ZLIB אבל נזכיר את זה בהמשך.
ביגלל הגודך הסיריאל והפיענוח הם מהירים ויש מעט OVERHEAD לכל התהליך.
בניגוד ל XML JSON ואחרים .
תמיחה מובנת בטיפוסים ובקלסים שנוצרו על ידי המשתמש (רק שצריך לעשות להם איתחול בצד השרת)
אוביקטים כמו מחרוזות מערכים XML ואחרים יכולים להשלח כך.
היתרון המשמעותי הוא שלא צריך שום דמר מיוחד בצד ההלקוח
פחות תעבור (עוד פחות ממה שכבר פחות)
shoot with AMF3 you can pass binary images and SWF files around too
you can pass XML objects within AMF3 so they remain queryable client side as well,.
Now for pure remoting, well that is an AMF thing, for loading models or leaving the result client side queryable, XML with E4X takes the cake. I should note that What is interesting to me is the fact that AMF is easily 10X faster and lighter than SOAP Web Services for server to server and server to client operations. We have all this server iron out there wasting bandwidth and CPU time parsing XML when they could natively serialize objects with less memory and less bandwidth. AMF3 is a perfect spec for it but we need clients and servers for AMF in many languages first. Currently the AMF format is a transmitter/receiver that can only talk to Flash Player and that needs to change.
חיסרון :
לא מציג את הדיספלי ואת כל הובייקטים האחרים שיורשים ממנו
למרות שזה אפשרי אם האוביקטים הם מסוג לא סטנדרטי יש בצד השני אתחול שלהם כשהם אוברים דיסיריאליז.
אומנם תומך וזה אכן חוסך ברוחב פס אבל לוקח זמן לקווץ ולפתוח.
קווץ בינארי הוא פחות יעיל
ביחוד לא ממומלץ להשתמש כשמעבירים נתונים גדולים ודרוש תגובה של REALTIME או כמעט זה
יש כל מיני כלים שיכולים להראות לנו מה יש בפנים ונראה אותם
נכון אבל צריך להערך לזה נכון
יותר קל ממה שזה נראה
The problem with AMF is that the secret sauce and recipe are bottled up at Adobe. Although there are many AMF clones out there, they vary wildly in support for the deeper object types in AMF3 binary. They all sort of taste like New Coke or Generic Cola, it tastes similar but something is missing, it is just not the real thing.
Some full implementation RTMP servers are:
Adobe Flash Media Server,
Adobe LiveCycle Data Services
Amazon S3 & Amazon Cloudfront can stream using RTMP
haXeVideo is a multithread FLV streaming server entirely written using the haXe programming language.
Helix Universal Server from RealNetworks streams live and on-demand RTMP, RTMPS, RTMPE content using RTP encoders for live streams and FLV, F4V, MP4 and 3GP containers for on-demand files.
Onlinelib VCS Video Communication Server (including iPhone Support)
Red5 Open Source Media Server is a reverse-engineered open source project which aims to produce a complete implementation written in Java.
Erlyvideo [4] has wide functionality: not only file streaming, but restreaming of MPEG-TS or Shoutcast to flash clients using RTMP.
Unreal Media Server supports live RTMP streaming, in real-time and buffered modes.
Wowza Media Server
WebORB Integration Server (available for .NET, Java, PHP, and Rails) both commercial and free (some open source) implementations.
OneTeam Media Server has been announced on ProcessOne[5]. A C++ implementation called crtmpserver[6] is also available.
[edit]
Developer Productivity Tools
management console, code
generation, service browser,
invocation test drive, project
templates, FlexBuilder plugin,
Eclipse plugins, command line
tools, built-in examples
Multi-Client Support
Flash, Flex, Silverlight, AJAX
Security
custom authentication, custom
authorization, role-based security,
graphical configuration
Data Management
code generator, full CRUD, client
synchronization, intuitive API,
extensible programming model,
sample test drive
Performance Monitoring
server-side instrumentation
Real-Time Messaging
data push, producer-consumer
model, MSMQ and JMS
integration, remote shared
objects, message broadcast
Video Streaming
streaming flash video, video
broadcast, server initiated video,
video recording, video chat
Extensibility Features
custom object serialization,
abstract argument mapping,
object factories, invocation chain,
custom object activation, special
attributes, security handlers
Solid Product Roadmap – we’re
always adding new features to
increase the value of your
investment