[Red5] Red5 "Transactions"?

Tyler Kocheran rfkrocktk at gmail.com
Tue Jan 20 15:24:31 PST 2009


And I raise my hand to volunteer for managing AMF stuff, especially since I
work with it so much ;)

On Tue, Jan 20, 2009 at 3:23 PM, Tyler Kocheran <rfkrocktk at gmail.com> wrote:

> Are we really lacking at all in AMF serialization? My primary use of Red5
> is for serving up interactive data via remoting calls, Hibernate, and
> SharedObjects, and I have had little or no real problems with things
> relating to AMF itself, usually just me trying to do stuff that's dumb. What
> do you see, Paul, that we don't? :)
>
> With that said, I'd be more than happy to look into GraniteDS and see if
> anything is viable to Red5's AMF library. If I'm going to get to work on
> porting GDS to Red5DS, I'll do a compatibility report summing up things that
> would have to change to integrate data services into Red5. We could work out
> some flexible extension points for Red5 so a data service library could be
> attached if needed, and left alone if no data service is needed by the
> developer.
>
> On Tue, Jan 20, 2009 at 3:06 PM, Mondain <mondain at gmail.com> wrote:
>
>> Since we dont "technically" have an active maintainer for our AMF 0/3
>> stuff anymore, I think it would be nice to have a library like Granite ds
>> handling our AMF processes.
>> Paul
>>
>>
>> On Tue, Jan 20, 2009 at 9:38 AM, Tyler Kocheran <rfkrocktk at gmail.com>wrote:
>>
>>> Very intriguing. I'm very interested in Red5DS now :P
>>> Granite handles lazy loading from the client-side, believe it or not. I
>>> downloaded their latest release, they've got quite a few interesting things
>>> that I've already done included in their library... :-|
>>> Anyway, I'm taking notes of all of this stuff. If anyone is legitimately
>>> interested in starting Red5DS with me, email me so we can get to work on it
>>> ;)
>>>
>>>
>>> On Tue, Jan 20, 2009 at 3:59 AM, Nick Giamouris <n.giamouris at gmail.com>wrote:
>>>
>>>> It is not a good idea to rely on lazy loading after the data service
>>>> call has executed. Your service method should fetch all associations needed
>>>> for serialization. However, if you still prefer the convenience of lazy
>>>> loading have a look at this:
>>>>
>>>>
>>>> http://www.jdocs.com/spring/2.5.2/org/springframework/orm/hibernate3/support/OpenSessionInViewFilter.html
>>>>
>>>> That's for servlets, but you could easily come up with an implementation
>>>> for Red5 remoting calls.
>>>>
>>>> 2009/1/18 Tyler Kocheran <rfkrocktk at gmail.com>
>>>>
>>>> Anyone interested in starting Red5DataServices? I'm game :-)
>>>>>
>>>>> On 1/17/09, Tyler Kocheran <rfkrocktk at gmail.com> wrote:
>>>>> > Thanks so much for the link. I'm really hoping that GDS can be ported
>>>>> > to an RTMP server, I'll look into it.
>>>>> >
>>>>> > On 1/17/09, devon girard <dsgirard at gmail.com> wrote:
>>>>> >> little out of my league here, but the GDS team seems to be putting a
>>>>> lot
>>>>> >> of
>>>>> >> effort into transparent hibernate/flex integration:
>>>>> >>
>>>>> >>
>>>>> http://www.graniteds.org/confluence/pages/viewpage.action?pageId=229378
>>>>> >>
>>>>> >> ... though something tells me you're already well aware of their
>>>>> efforts
>>>>> >> ;)
>>>>> >>
>>>>> >> On Sat, Jan 17, 2009 at 1:43 PM, Tyler Kocheran <
>>>>> rfkrocktk at gmail.com>
>>>>> >> wrote:
>>>>> >>
>>>>> >>> Yeah I use Hibernate transactions regularly, but the problem is
>>>>> that I'm
>>>>> >>> sending my objects back to Flash serialized over AMF. This screws
>>>>> things
>>>>> >>> up,
>>>>> >>> especially with Sessions, since you can't really close your session
>>>>> after
>>>>> >>> you've returned a result back to Flash. What I'm proposing is kind
>>>>> of
>>>>> >>> like
>>>>> >>> AOP, but more like pre and postprocessors for remoting calls. My
>>>>> data
>>>>> >>> model
>>>>> >>> is completely based off of sending IExternalizable objects back and
>>>>> forth
>>>>> >>> to
>>>>> >>> and from Flash which are stored Hibernate entities on the server
>>>>> side.
>>>>> >>>
>>>>> >>> Consider an interface IRemotingCallPreprocessor. It would be
>>>>> responsible
>>>>> >>> for doing any major work before a remoting call is executed. For
>>>>> example,
>>>>> >>> let's consider Hibernate. It would be really nice if you could
>>>>> attach a
>>>>> >>> Session object to the remoting call thread and not have to worry
>>>>> about
>>>>> >>> closing it. In the course of a "transaction" (namely a remoting
>>>>> call),
>>>>> >>> the
>>>>> >>> IRemotingCallPreprocessor would be invoked first, and could pull a
>>>>> >>> Session
>>>>> >>> out and bind it to the thread. After the "transaction/remoting
>>>>> call" has
>>>>> >>> successfully invoked, a IRemotingCallPostprocessor interface
>>>>> instance
>>>>> >>> would
>>>>> >>> be responsible for doing cleanup work, eg: closing the Session.
>>>>> >>>
>>>>> >>> Normally, it's really hard to close a session, especially if it has
>>>>> >>> associations that are lazily fetched, since returning things to
>>>>> Flash is
>>>>> >>> just like returning things from any method in Java. What makes it
>>>>> hard is
>>>>> >>> that objects are serialized after the method has returned, and
>>>>> presumably
>>>>> >>> after you've closed your Session. Collections which are lazily
>>>>> initiated
>>>>> >>> will die when this happens beecause they'll scream "THERE'S NO
>>>>> SESSION
>>>>> >>> AHHH!!" This kind of makes things harder to do. You're basically
>>>>> forced
>>>>> >>> to
>>>>> >>> make all entities eagerly fetch associations, whether they're sent
>>>>> back
>>>>> >>> to
>>>>> >>> flash or not, which is kind of a bummer.
>>>>> >>>
>>>>> >>> If I can implement these pre/post processors, they'd be pretty
>>>>> helpful
>>>>> >>> for
>>>>> >>> doing odd jobs like this one. Another application for them is
>>>>> security,
>>>>> >>> and
>>>>> >>> a number of other things. If there's a better way to do this and I
>>>>> sound
>>>>> >>> totally stupid, let me know cause I just want to get all this fixed
>>>>> :)
>>>>> >>>
>>>>> >>>
>>>>> >>> On Sat, Jan 17, 2009 at 12:40 PM, Mondain <mondain at gmail.com>
>>>>> wrote:
>>>>> >>>
>>>>> >>>> I've used transactions in red5 with hibernate but it sounds like
>>>>> you are
>>>>> >>>> trying to do something else. So I am not sure how to respond. I
>>>>> think
>>>>> >>>> you
>>>>> >>>> may want to look at a project called btr for transaction
>>>>> references.
>>>>> >>>>
>>>>> >>>> Paul
>>>>> >>>>
>>>>> >>>> On Jan 17, 2009 12:18 PM, "Tyler Kocheran" <rfkrocktk at gmail.com>
>>>>> wrote:
>>>>> >>>>
>>>>> >>>> Ok, well I guess I'll just get started then :P
>>>>> >>>> I suppose that I'll just implement some Spring magic to make all
>>>>> beans
>>>>> >>>> implementing a specific interface be registered as pre/post RMI
>>>>> >>>> processors.
>>>>> >>>> Where should I register the postprocessor beans?
>>>>> >>>>
>>>>> >>>> On Fri, Jan 16, 2009 at 2:13 PM, Tyler Kocheran <
>>>>> rfkrocktk at gmail.com>
>>>>> >>>> wrote: > > Does Red5 have any...
>>>>> >>>>
>>>>> >>>> _______________________________________________
>>>>> >>>> Red5 mailing list
>>>>> >>>> Red5 at osflash.org
>>>>> >>>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>>>> >>>>
>>>>> >>>>
>>>>> >>>> _______________________________________________
>>>>> >>>> Red5 mailing list
>>>>> >>>> Red5 at osflash.org
>>>>> >>>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>>>> >>>>
>>>>> >>>>
>>>>> >>>
>>>>> >>>
>>>>> >>> --
>>>>> >>> And do this, knowing the time, that now it is high time to awake
>>>>> out of
>>>>> >>> sleep;
>>>>> >>> for now our salvation is nearer than when we first believed.
>>>>> >>>
>>>>> >>> _______________________________________________
>>>>> >>> Red5 mailing list
>>>>> >>> Red5 at osflash.org
>>>>> >>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>>>> >>>
>>>>> >>>
>>>>> >>
>>>>> >
>>>>> > --
>>>>> > Sent from my mobile device
>>>>> >
>>>>> > And do this, knowing the time, that now it is high time to awake out
>>>>> of
>>>>> > sleep;
>>>>> > for now our salvation is nearer than when we first believed.
>>>>> >
>>>>>
>>>>> --
>>>>> Sent from my mobile device
>>>>>
>>>>> And do this, knowing the time, that now it is high time to awake out of
>>>>> sleep;
>>>>> for now our salvation is nearer than when we first believed.
>>>>>
>>>>> _______________________________________________
>>>>> Red5 mailing list
>>>>> Red5 at osflash.org
>>>>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Red5 mailing list
>>>> Red5 at osflash.org
>>>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>>>
>>>>
>>>
>>>
>>> --
>>> And do this, knowing the time, that now it is high time to awake out of
>>> sleep;
>>> for now our salvation is nearer than when we first believed.
>>>
>>> _______________________________________________
>>> Red5 mailing list
>>> Red5 at osflash.org
>>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>>
>>>
>>
>>
>> --
>> http://gregoire.org/
>> http://osflash.org/red5
>>
>> _______________________________________________
>> Red5 mailing list
>> Red5 at osflash.org
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>
>>
>
>
> --
> And do this, knowing the time, that now it is high time to awake out of
> sleep;
> for now our salvation is nearer than when we first believed.
>



-- 
And do this, knowing the time, that now it is high time to awake out of
sleep;
for now our salvation is nearer than when we first believed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/red5_osflash.org/attachments/20090120/65cd4d11/attachment.html>


More information about the Red5 mailing list