Hi, so I don’t have a lot of time but I gonna try to summarise the situation
when we talk about
RTMFP in relation to Redtamarin
here the few things to take into account
- Flash Player and AIR have a client implementation
Redtamarin need to replicate that client implementation
but also need to provide a server implementation (kind of like MonaServer)
- it is mainly connection over sockets but using a specific communication protocols
that is: RTMP, RTMPE, RTMPT, RTMPTE, RTMS, RTMFP
- even before trying to implement those or one of those we need few other things to be working first
so those other things that need to be working first, here the list in order of priority
- an event loop
- an event system (that work with that event loop)
SecureSocket class that can use SSL/TLS
- being able to serialize/deserialize AMF packets, AMF0 and AMF3
- and HTTP library that can parse/generate HTTP Requests/Responses
- other libraries to parse RTMP, and other protocols
currently in Redtamarin
- we figured out the event loop and event system
it still need some work, especially to be able to send/receive events between workers
- and we are in the middle of implementing core API classes in
- in short we will have a
flash.net::Socket class that will work the same as Flash or AIR
but we will also have a
shell.network::TCPSocket that will work slightly differently,
this in order to implement
sendToURL() also in
- internally we need URL and HTTP libraries also to make things
sendToURL() works (basically an HTTP POST reusing sockets)
- the source code of AVMplus already provide an AMF3 serializer/deserializer
but we still need to work on it to also support AMF0 as some protocols negociate a connection first in AMF0 and then transition to AMF3
let’s say you will probably have all that in v0.4.2
then in a next iteration we plan to implement LocalConnection and at the same time shared memory low level functions (POSIX and System V)
- the goal of
LocalConnection is to be able to communicate between Redtamarin and Flash/AIR
LocalConnection use shared memory but in a very preservative way
and because we have bigger needs for other projects we will also implements some
SharedMemory class that can do a lot , for example
- be able to reserve a block of memory
- send/receive data from/to it with semaphore
- be able to serialize/deserialize to it with AMF3
- goal be able to build your own little Redis/MemCached supporting AS3 types
in yet another iteration we will look into implementing SSL/TLS, probably linking to openSSL library, and that will allow us to implement something like
SecureSocket class and other encryption utilities.
In parallel of all that you will see popup few AS3 libraries reusing those Redtamarin native API
ftplib, etc. that will allow to implement your own HTTP client or server, and hopefully will also be able to evolve to support HTTPS.
After these kind of libraries, you will see popup something related to AMF, think AMFPHP but implemented in AS3/Redtamarin.
And after all that, we will then finally be able to start to work
The NetConnection class creates a two-way connection between a client and a server.
The NetStream class opens a one-way streaming channel over a NetConnection.
- on RTMP and RTMFP
between the RFC and other implementations build our own libraries that can talk with those specific protocols
With that then the same way we can have an “AMF server” that works like AMFPHP,
we then be able to have a “RTMFP server” that works like MonaServer or other similar servers
So yeah it looks a bit complicated like that but we are forced to do the basic steps before being able to implement NetConnection and/or RTFMP properly
for example: if you don’t have an event system well it will be difficult, if you don’t have solid socket implementations, it gonna be very difficult, and same if you don’t a solid HTTP library, it does not help, etc.
we don’t want to rush those
But while all that is evolving, and yeah probably slowly, we also add core stuff that will help later
that Run-Time Compiler gonna allow us and others to do very magic things in Redtamarin
so for example, when it comes to sockets and being able to do things asynchronously (because you don’t want your main event loop to choke) it will be very useful to be able to write dynamically small AS3 code that will be directly compiled and ran into a worker (so running on a separate thread)
it will allow to do Promise, perhaps even coroutines to a certain extent
without the need to plan it in advance and pre-compile some codes to
all dynamic, all in memory
Same for other stuff like the shared memory, it will not have the limitation of 40KB that you have in
LocalConnection, and for servers it will allow to “talk over memory between different processes” in nanoseconds instead of milliseconds.
There is a 40 kilobyte limit to the amount of data you can pass as parameters to this command. If
send() throws an
ArgumentError but your syntax is correct, try dividing the
send() requests into multiple commands, each with less than 40K of data.
So yeah we could take shortcuts and focus only on RTMFP and only build little essentials to get there faster, but that’s not the strategy we decided to take.
But RTMFP is definitively on our radar, and yes it is possible to implement it,
we just need solid core components (either native or libraries) and that will take time.