RE: How to link between internal IDs and SS Client
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Macromedia Flash Server > RE: How to link between internal IDs and SS Client




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    RE: How to link between internal IDs and SS Client  
Pritham Shetty


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-15-05 07:45 AM

One of the things you can use to correlate client connection with access
log is to add url encoded params to rtmp uri or your play string

For example rtmp://<server>/app/inst?user=3Dxyz

Similarly you can use NetStream.play( "foo?user=3Dxyz" );

You can log : connect, disconnect, play stop events and also configure
logger to log specific fields, uri, uri-stem or uri-query, etc. Refer to
documentation or logger.xml for list of all the fields and events you
can log.

One simple scheme you can use is to have a counter in your instance and
return this to the client as part of connect response. Use this id as
param in your play request.

Here is an undocumented api that allows you to get the client id=20

function Result()
{
this.onResult =3D function( id ){
trace( "Client ID " + id );
}
}

// returns the client id associated by the server for this client.
nc.call("@getClientID", new Result() );


On notification to script on play publish events it is a scalability
issue. In an edge-origin deployment scenario origin can become a
bottleneck if it needs to coordinate all requests.


Pritham.







-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.
org] On Behalf Of Brian
Lesser
Sent: Wednesday, December 14, 2005 7:28 PM
To: FlashComm Mailing List
Subject: Re: [FlashComm] How to link between internal IDs and SS Client
/Netstream objects ?

FWIW, I don't know of any simple and foolproof way to match up a live=20
client object in server side AS with the client information available in

the logs or admin api. Some people have requested that the internal=20
client id FCS uses be available as a property of the client object. I=20
think that's a great idea but don't think it is available in FMS 2.=20
There might be something new in the FMS 2 admin API or access.dll that=20
might help but I haven't come across it.

I also think that when a client starts playing or publishing data of any

kind you should be able to get an event in server-side AS (if you want=20
to) and even prohibit the request if you want to. However, it might be a

resource hog.

At any rate, I recommend you file a request for this as exposing the=20
internal id in the client object makes so much sense and "seems" like=20
such a simple thing.

http://www.macromedia.com/cfusion/m...name=3Dwishform

Yours truly,
-Brian

lti-1a8g-LMbKfuCQv7pBDgjK7y7TUQ@public.gmane.org wrote:

> Hi,
>
> I'm trying to use efficiently the different convenient methods=20
> provided on the server side : getUserStats, getLiveStreamStats, and so

> on.
> The idea is to be able, whenenever a client disconnect or stops=20
> reading a live stream, to be able to know for how long he played the=20
> live stream.
>
> getLiveStreamStats ( proto: getLiveStreamStats(|/app_instance/|,=20
> |/stream_name/|) ) returns an object with two properties :
> -----------------quote-----------------------------------------------
>    + publisher, Object; publisher statistics. The object has the=20
> following properties:
>            * |name|: String; the name of the published live stream.
>            * |time|: Date object; time that the stream was published.=20
> This property is a duplicate of |publish_time| and exists for=20
> backwards compatibility.
>            * |type|: String; the type of stream for the publisher. The

> value is |"publishing"|.
>            * |client|: Number; the client ID of the publisher.
>            * |stream_id|: Number; the stream ID of the publisher.
>            * |publish_time|: Date object; time that the stream was=20
> published.
>            * |client_type|: String; the string type of the publishing=20
> client.
>            * |publish_time|: Date object; time that the stream was=20
> published.
>    + subscribers, Array of subscriber statistics. The array contains a

> |subscriber| property that is an object containing the following=20
> properties:
>            * |client|: Number; user ID.|
>      * subscribe_time|: Date object; the time that the user subscribed

> to the stream.
> -----------------quote-----------------------------------------------
>
> Here's the problem : how to link between a server side Client object,=20
> with all the interesting properties (agent, ip, referrer, etc...) and=20
> its Client ID ?
> Of course, if in "Programming FCS", and on many tutorials, there is=20
> info on "how to generate a unique client ID", may'be the answer is=20
> just : there isn't, but damn! it's so stupid. And it looks like it has

> not been *fixed* in FMS 2.
>
> When I see what Speedera has achieved, I wonder if they :
> a) paid extra bucks to get a decent documentation
> b) paid extra bucks to get Macromedia to build a specific version of
FCS
> c) reverse engineered FCS and added the functionnalities themselves.
>
> PS: <rant time> Considering my past monthes' recurrent problems on=20
> Speedera network,  a) & c) are highly improbable. Or the people who=20
> build the Speedera solution died in a plane crash. Or get fired=20
> monthes ago.
> I'm highly supportive to the ahem ... two ? people left which looks=20
> like they know something about the infrastructure of their=20
> services.</rant time>
>
>
>
>
>
> =3D-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =3D-----------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm



--=20
 ________________________________________
______________________________
Brian Lesser
Assistant Director, Teaching and Technology Support
Computing and Communications Services
Ryerson University
350 Victoria St.
Toronto, Ontario                   Phone: (416) 979-5000 ext. 6835
M5B 2K3                            Fax: (416) 979-5220
Office: AB48D                      E-mail: blesser-6s6ziW1YCwCw5LPnMra/2Q@pu
blic.gmane.org
(Enter through LB66)               Web: http://www.ryerson.ca/~blesser
 ________________________________________
______________________________


=3D-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=3D-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:36 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register