You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Chris Chabot (JIRA)" <ji...@apache.org> on 2008/03/02 16:56:50 UTC

[jira] Created: (SHINDIG-103) New PHP Shindig gadget server code

New PHP Shindig gadget server code
----------------------------------

                 Key: SHINDIG-103
                 URL: https://issues.apache.org/jira/browse/SHINDIG-103
             Project: Shindig
          Issue Type: Improvement
          Components: Gadgets Server - PHP
            Reporter: Chris Chabot
            Assignee: Brian McCallister


This patch completely replaces the old code in the php directory of the shindig project, and replaces it with a port of the java shindig code.

The java code used is from a checkout from February the 14th, this because keeping track of the changes while porting and testing would have gotten in the way of completing the first release in a timely fashion.

It implements the structure and workings from the java server and includes:
- Gadget server
- Proxy service
- JS service

The maIn differences from the Java branch are:
- Different caching engine (abstracted base class, sample file implementation included)
- Different gadget rendering work flow (no multithreading in PHP)
- No enum's or name spaced classes in php, so their top level classes now
- Locale class to emulate the Java's Locale class
- Somewhat servlet like event handling to stay close to the Java's structure


Missing is the RPC feature, some custom speedups to get it closer to the Java's speed (it's about 40% slower right now, but that gap might be fixed later on), and a better logging / error reporting structure, it now only has a basic DEBUG flag in the config, which if set, causes it to dump debug backtrace's on errors.

It's also missing Caja support, since that is Java only at the moment. Maybe somewhere in the future we'll have a command line version available that we can use.

It also contains a copy of the features directory structure (so that it doesn't break on updates from the Java side of things, changes will have to be implemented before you can copy over the new version) and a copy of the sample container (minus the Caja options), so that people can test it directly.




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Created: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Akash Xavier <ak...@gmail.com>.
Chris,
prefixing http:// still shows blank.

On Sun, Mar 2, 2008 at 9:52 AM, Akash Xavier <ak...@gmail.com> wrote:

> Chris,
> Anyway, I have taken a totally different method of creating a container
> and gadget server. I am still working on it. I'll open-source the code when
> its finished so that if we can combine those ideas. I'll post here when the
> container is fully running. I m going implement it in my social networking
> tool. So guys can also get a preview of how it works in a real environment.
>
>
> On Sun, Mar 2, 2008 at 9:46 AM, Chris Chabot <ch...@xs4all.nl> wrote:
>
> > Which is pretty much the same as i get when i run that gadget
> > (prefixing it with http:// is a good thing btw) in the java shindig
> > gadget server
> >
> > The patch is meant to be applied to the shindig source dir, so you
> > could apply it by doing:
> >
> > # svn checkout <shindig repo url>
> > # cd shindig/php
> > # patch -p1 < [patth to the patch]/php-shindig.patch
> >
> > Keep in mind, as i wrote, its based on a checkout from feb 14th, so it
> > should have the exact same functioning as it ... there's still some
> > new features to catch up on, and some iGoogle features (like finance
> > etc) will never work on a shindig gadget server, so if you could
> > please for now focus the bug reports for now on what is different from
> > the java branch, or patches for funcitonality it's still missing, i'd
> > very much appreciate it :)
> >
> >        -- Chris
> >
> > On Mar 2, 2008, at 6:36 PM, Akash Xavier wrote:
> >
> > > Chris,
> > > I tried this gadget. It displays nithing
> > >
> > http://shindig.chabotc.com/gadgets/ifr?url=delicious-bookmarks.googlecode.com/svn/trunk/delicious.xml
> > > Its a del.icio.us gadget
> > >
> > > On Sun, Mar 2, 2008 at 9:31 AM, Akash Xavier
> > > <ak...@gmail.com> wrote:
> > >
> > >> Yeah
> > >> Thanks for updating it Chris.
> > >> Before u msged back, I was excited to see a working version and hence
> > >> downloaded the patch file and was trying to open it. I opened the
> > >> patch file
> > >> in mozilla firefox on my local server, but couldnt extract it.  :)
> > >> Thanks.... I am now directly downloading it  :)
> > >>
> > >>
> > >> On Sun, Mar 2, 2008 at 9:26 AM, Chris Chabot <ch...@xs4all.nl>
> > >> wrote:
> > >>
> > >>> Ps if you want to run it locally, just download
> > >>> http://chabotc.com/php-shindig.tar.gz
> > >>> , untar, copy files to your web root, and point your browser to
> > >>> it ...
> > >>> deploying it rly is quite simple ;)
> > >>>
> > >>> On Mar 2, 2008, at 6:19 PM, Chris Chabot wrote:
> > >>>
> > >>>> That hosted demo version of it wasn't updated to the latest code
> > >>>> yet, and was also in the old location (without the /gadgets part,
> > >>>> which i've now added because there might be a social part soon
> > >>>> too).
> > >>>> I've just updated this and made a opensocial-0.7 feature with an
> > >>>> opensocial-reference dependency, so the compliancetest should
> > >>>> function correctly now:
> > >>>>
> > >>>>
> > >>>
> > http://shindig.chabotc.com/gadgets/ifr?url=http://opensocial-resources.googlecode.com/svn/tests/trunk/compliancetests.xml
> > >>>>
> > >>>> Keep in mind it doesn't really do 'social' yet, and it also doesn't
> > >>>> have the port from the social part of the java branch yet either
> > >>>> (since this was made after the feb 14th checkout which i based my
> > >>>> work on). So while it'll load ok, it wont really do very much yet,
> > >>>> just render the gadget, proxy the remote calls if any, and that's
> > >>>> it
> > >>>> until the social part has been written too.
> > >>>>
> > >>>>      -- Chris
> > >>>>
> > >>>> On Mar 2, 2008, at 5:42 PM, Akash Xavier wrote:
> > >>>>
> > >>>>> Chris,
> > >>>>>
> > >>>>> I tested the code on your site with the compliance gadget.
> > >>>>>
> > >>>
> > http://shindig.chabotc.com/ifr/?url=http://opensocial-resources.googlecode.com/svn/tests/trunk/compliancetests.xml
> > >>>>>
> > >>>>> It shows an error "Error. Unsupported feature(s): opensocial-0.7"
> > >>>>>
> > >>>>> Wondering whether u uploaded the latest version to the site too??
> > >>>>>
> > >>>>> On Sun, Mar 2, 2008 at 8:38 AM, Akash Xavier
> > >>>>> <ak...@gmail.com> wrote:
> > >>>>>
> > >>>>>> Chris,
> > >>>>>> Is it running on your site chabotc.com? (you posted a link
> > >>>>>> sometime ago)
> > >>>>>>
> > >>>>>>
> > >>>>>> On Sun, Mar 2, 2008 at 8:06 AM, Chris Chabot <ch...@xs4all.nl>
> > >>>>>> wrote:
> > >>>>>>
> > >>>>>>> Hey Guys,
> > >>>>>>>
> > >>>>>>> As you can see the patch for the new php shindig gadget server
> > >>>>>>> has
> > >>>>>>> landed. I've tested this server with all the simple gadgets i
> > >>>>>>> could
> > >>>>>>> get my hands on, and with sample containers, and it seems to
> > >>>>>>> behave
> > >>>>>>> identical to the java shindig server now (the one from feb 14th
> > >>>>>>> that
> > >>>>>>> is, what i based my porting efforts on).
> > >>>>>>>
> > >>>>>>> It's still missing a few things, including a good bit of extra
> > >>>>>>> documentation for all the classes etc, once this patch has been
> > >>>>>>> accepted i'll file bug reports for all the todo's that i have
> > >>>>>>> open,
> > >>>>>>> and desirable fixes/changes/etc, so that other people could
> > >>>>>>> easily get
> > >>>>>>> started on collaborating and expanding on this.
> > >>>>>>>
> > >>>>>>> When the patch has gone thru some basic review and is included
> > >>>>>>> in
> > >>>>>>> the
> > >>>>>>> svn repo, i would like to also apply for commit access to it.
> > >>>>>>> What
> > >>>>>>> would be the procedure for this?
> > >>>>>>>
> > >>>>>>> Look forward to your feedback!
> > >>>>>>>
> > >>>>>>>     -- Chris
> > >>>>>>>
> > >>>>>>> On Mar 2, 2008, at 4:56 PM, Chris Chabot (JIRA) wrote:
> > >>>>>>>
> > >>>>>>>> New PHP Shindig gadget server code
> > >>>>>>>> ----------------------------------
> > >>>>>>>>
> > >>>>>>>>              Key: SHINDIG-103
> > >>>>>>>>              URL:
> > >>> https://issues.apache.org/jira/browse/SHINDIG-103
> > >>>>>>>>          Project: Shindig
> > >>>>>>>>       Issue Type: Improvement
> > >>>>>>>>       Components: Gadgets Server - PHP
> > >>>>>>>>         Reporter: Chris Chabot
> > >>>>>>>>         Assignee: Brian McCallister
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>> This patch completely replaces the old code in the php
> > >>>>>>>> directory
> > >>>>>>>> of
> > >>>>>>>> the shindig project, and replaces it with a port of the java
> > >>>>>>>> shindig
> > >>>>>>>> code.
> > >>>>>>>>
> > >>>>>>>> The java code used is from a checkout from February the 14th,
> > >>>>>>>> this
> > >>>>>>>> because keeping track of the changes while porting and testing
> > >>>>>>>> would
> > >>>>>>>> have gotten in the way of completing the first release in a
> > >>>>>>>> timely
> > >>>>>>>> fashion.
> > >>>>>>>>
> > >>>>>>>> It implements the structure and workings from the java server
> > >>>>>>>> and
> > >>>>>>>> includes:
> > >>>>>>>> - Gadget server
> > >>>>>>>> - Proxy service
> > >>>>>>>> - JS service
> > >>>>>>>>
> > >>>>>>>> The maIn differences from the Java branch are:
> > >>>>>>>> - Different caching engine (abstracted base class, sample file
> > >>>>>>>> implementation included)
> > >>>>>>>> - Different gadget rendering work flow (no multithreading in
> > >>>>>>>> PHP)
> > >>>>>>>> - No enum's or name spaced classes in php, so their top level
> > >>>>>>>> classes now
> > >>>>>>>> - Locale class to emulate the Java's Locale class
> > >>>>>>>> - Somewhat servlet like event handling to stay close to the
> > >>>>>>>> Java's
> > >>>>>>>> structure
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>> Missing is the RPC feature, some custom speedups to get it
> > >>>>>>>> closer to
> > >>>>>>>> the Java's speed (it's about 40% slower right now, but that gap
> > >>>>>>>> might be fixed later on), and a better logging / error
> > >>>>>>>> reporting
> > >>>>>>>> structure, it now only has a basic DEBUG flag in the config,
> > >>>>>>>> which
> > >>>>>>>> if set, causes it to dump debug backtrace's on errors.
> > >>>>>>>>
> > >>>>>>>> It's also missing Caja support, since that is Java only at the
> > >>>>>>>> moment. Maybe somewhere in the future we'll have a command line
> > >>>>>>>> version available that we can use.
> > >>>>>>>>
> > >>>>>>>> It also contains a copy of the features directory structure (so
> > >>>>>>>> that
> > >>>>>>>> it doesn't break on updates from the Java side of things,
> > >>>>>>>> changes
> > >>>>>>>> will have to be implemented before you can copy over the new
> > >>>>>>>> version) and a copy of the sample container (minus the Caja
> > >>>>>>>> options), so that people can test it directly.
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>> --
> > >>>>>>>> This message is automatically generated by JIRA.
> > >>>>>>>> -
> > >>>>>>>> You can reply to this email to add a comment to the issue
> > >>>>>>>> online.
> > >>>>>>>
> > >>>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>> --
> > >>>>>> Akash Xavier
> > >>>>>> akashmanohar@gmail.com
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> --
> > >>>>> Akash Xavier
> > >>>>> akashmanohar@gmail.com
> > >>>
> > >>>
> > >>
> > >>
> > >> --
> > >> Akash Xavier
> > >> akashmanohar@gmail.com
> > >>
> > >
> > >
> > >
> > > --
> > > Akash Xavier
> > > akashmanohar@gmail.com
> >
> >
>
>
> --
> Akash Xavier
> akashmanohar@gmail.com
>



-- 
Akash Xavier
akashmanohar@gmail.com

Re: [jira] Created: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Akash Xavier <ak...@gmail.com>.
Chris,
Anyway, I have taken a totally different method of creating a container and
gadget server. I am still working on it. I'll open-source the code when its
finished so that if we can combine those ideas. I'll post here when the
container is fully running. I m going implement it in my social networking
tool. So guys can also get a preview of how it works in a real environment.

On Sun, Mar 2, 2008 at 9:46 AM, Chris Chabot <ch...@xs4all.nl> wrote:

> Which is pretty much the same as i get when i run that gadget
> (prefixing it with http:// is a good thing btw) in the java shindig
> gadget server
>
> The patch is meant to be applied to the shindig source dir, so you
> could apply it by doing:
>
> # svn checkout <shindig repo url>
> # cd shindig/php
> # patch -p1 < [patth to the patch]/php-shindig.patch
>
> Keep in mind, as i wrote, its based on a checkout from feb 14th, so it
> should have the exact same functioning as it ... there's still some
> new features to catch up on, and some iGoogle features (like finance
> etc) will never work on a shindig gadget server, so if you could
> please for now focus the bug reports for now on what is different from
> the java branch, or patches for funcitonality it's still missing, i'd
> very much appreciate it :)
>
>        -- Chris
>
> On Mar 2, 2008, at 6:36 PM, Akash Xavier wrote:
>
> > Chris,
> > I tried this gadget. It displays nithing
> >
> http://shindig.chabotc.com/gadgets/ifr?url=delicious-bookmarks.googlecode.com/svn/trunk/delicious.xml
> > Its a del.icio.us gadget
> >
> > On Sun, Mar 2, 2008 at 9:31 AM, Akash Xavier
> > <ak...@gmail.com> wrote:
> >
> >> Yeah
> >> Thanks for updating it Chris.
> >> Before u msged back, I was excited to see a working version and hence
> >> downloaded the patch file and was trying to open it. I opened the
> >> patch file
> >> in mozilla firefox on my local server, but couldnt extract it.  :)
> >> Thanks.... I am now directly downloading it  :)
> >>
> >>
> >> On Sun, Mar 2, 2008 at 9:26 AM, Chris Chabot <ch...@xs4all.nl>
> >> wrote:
> >>
> >>> Ps if you want to run it locally, just download
> >>> http://chabotc.com/php-shindig.tar.gz
> >>> , untar, copy files to your web root, and point your browser to
> >>> it ...
> >>> deploying it rly is quite simple ;)
> >>>
> >>> On Mar 2, 2008, at 6:19 PM, Chris Chabot wrote:
> >>>
> >>>> That hosted demo version of it wasn't updated to the latest code
> >>>> yet, and was also in the old location (without the /gadgets part,
> >>>> which i've now added because there might be a social part soon
> >>>> too).
> >>>> I've just updated this and made a opensocial-0.7 feature with an
> >>>> opensocial-reference dependency, so the compliancetest should
> >>>> function correctly now:
> >>>>
> >>>>
> >>>
> http://shindig.chabotc.com/gadgets/ifr?url=http://opensocial-resources.googlecode.com/svn/tests/trunk/compliancetests.xml
> >>>>
> >>>> Keep in mind it doesn't really do 'social' yet, and it also doesn't
> >>>> have the port from the social part of the java branch yet either
> >>>> (since this was made after the feb 14th checkout which i based my
> >>>> work on). So while it'll load ok, it wont really do very much yet,
> >>>> just render the gadget, proxy the remote calls if any, and that's
> >>>> it
> >>>> until the social part has been written too.
> >>>>
> >>>>      -- Chris
> >>>>
> >>>> On Mar 2, 2008, at 5:42 PM, Akash Xavier wrote:
> >>>>
> >>>>> Chris,
> >>>>>
> >>>>> I tested the code on your site with the compliance gadget.
> >>>>>
> >>>
> http://shindig.chabotc.com/ifr/?url=http://opensocial-resources.googlecode.com/svn/tests/trunk/compliancetests.xml
> >>>>>
> >>>>> It shows an error "Error. Unsupported feature(s): opensocial-0.7"
> >>>>>
> >>>>> Wondering whether u uploaded the latest version to the site too??
> >>>>>
> >>>>> On Sun, Mar 2, 2008 at 8:38 AM, Akash Xavier
> >>>>> <ak...@gmail.com> wrote:
> >>>>>
> >>>>>> Chris,
> >>>>>> Is it running on your site chabotc.com? (you posted a link
> >>>>>> sometime ago)
> >>>>>>
> >>>>>>
> >>>>>> On Sun, Mar 2, 2008 at 8:06 AM, Chris Chabot <ch...@xs4all.nl>
> >>>>>> wrote:
> >>>>>>
> >>>>>>> Hey Guys,
> >>>>>>>
> >>>>>>> As you can see the patch for the new php shindig gadget server
> >>>>>>> has
> >>>>>>> landed. I've tested this server with all the simple gadgets i
> >>>>>>> could
> >>>>>>> get my hands on, and with sample containers, and it seems to
> >>>>>>> behave
> >>>>>>> identical to the java shindig server now (the one from feb 14th
> >>>>>>> that
> >>>>>>> is, what i based my porting efforts on).
> >>>>>>>
> >>>>>>> It's still missing a few things, including a good bit of extra
> >>>>>>> documentation for all the classes etc, once this patch has been
> >>>>>>> accepted i'll file bug reports for all the todo's that i have
> >>>>>>> open,
> >>>>>>> and desirable fixes/changes/etc, so that other people could
> >>>>>>> easily get
> >>>>>>> started on collaborating and expanding on this.
> >>>>>>>
> >>>>>>> When the patch has gone thru some basic review and is included
> >>>>>>> in
> >>>>>>> the
> >>>>>>> svn repo, i would like to also apply for commit access to it.
> >>>>>>> What
> >>>>>>> would be the procedure for this?
> >>>>>>>
> >>>>>>> Look forward to your feedback!
> >>>>>>>
> >>>>>>>     -- Chris
> >>>>>>>
> >>>>>>> On Mar 2, 2008, at 4:56 PM, Chris Chabot (JIRA) wrote:
> >>>>>>>
> >>>>>>>> New PHP Shindig gadget server code
> >>>>>>>> ----------------------------------
> >>>>>>>>
> >>>>>>>>              Key: SHINDIG-103
> >>>>>>>>              URL:
> >>> https://issues.apache.org/jira/browse/SHINDIG-103
> >>>>>>>>          Project: Shindig
> >>>>>>>>       Issue Type: Improvement
> >>>>>>>>       Components: Gadgets Server - PHP
> >>>>>>>>         Reporter: Chris Chabot
> >>>>>>>>         Assignee: Brian McCallister
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> This patch completely replaces the old code in the php
> >>>>>>>> directory
> >>>>>>>> of
> >>>>>>>> the shindig project, and replaces it with a port of the java
> >>>>>>>> shindig
> >>>>>>>> code.
> >>>>>>>>
> >>>>>>>> The java code used is from a checkout from February the 14th,
> >>>>>>>> this
> >>>>>>>> because keeping track of the changes while porting and testing
> >>>>>>>> would
> >>>>>>>> have gotten in the way of completing the first release in a
> >>>>>>>> timely
> >>>>>>>> fashion.
> >>>>>>>>
> >>>>>>>> It implements the structure and workings from the java server
> >>>>>>>> and
> >>>>>>>> includes:
> >>>>>>>> - Gadget server
> >>>>>>>> - Proxy service
> >>>>>>>> - JS service
> >>>>>>>>
> >>>>>>>> The maIn differences from the Java branch are:
> >>>>>>>> - Different caching engine (abstracted base class, sample file
> >>>>>>>> implementation included)
> >>>>>>>> - Different gadget rendering work flow (no multithreading in
> >>>>>>>> PHP)
> >>>>>>>> - No enum's or name spaced classes in php, so their top level
> >>>>>>>> classes now
> >>>>>>>> - Locale class to emulate the Java's Locale class
> >>>>>>>> - Somewhat servlet like event handling to stay close to the
> >>>>>>>> Java's
> >>>>>>>> structure
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> Missing is the RPC feature, some custom speedups to get it
> >>>>>>>> closer to
> >>>>>>>> the Java's speed (it's about 40% slower right now, but that gap
> >>>>>>>> might be fixed later on), and a better logging / error
> >>>>>>>> reporting
> >>>>>>>> structure, it now only has a basic DEBUG flag in the config,
> >>>>>>>> which
> >>>>>>>> if set, causes it to dump debug backtrace's on errors.
> >>>>>>>>
> >>>>>>>> It's also missing Caja support, since that is Java only at the
> >>>>>>>> moment. Maybe somewhere in the future we'll have a command line
> >>>>>>>> version available that we can use.
> >>>>>>>>
> >>>>>>>> It also contains a copy of the features directory structure (so
> >>>>>>>> that
> >>>>>>>> it doesn't break on updates from the Java side of things,
> >>>>>>>> changes
> >>>>>>>> will have to be implemented before you can copy over the new
> >>>>>>>> version) and a copy of the sample container (minus the Caja
> >>>>>>>> options), so that people can test it directly.
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> --
> >>>>>>>> This message is automatically generated by JIRA.
> >>>>>>>> -
> >>>>>>>> You can reply to this email to add a comment to the issue
> >>>>>>>> online.
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> Akash Xavier
> >>>>>> akashmanohar@gmail.com
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> Akash Xavier
> >>>>> akashmanohar@gmail.com
> >>>
> >>>
> >>
> >>
> >> --
> >> Akash Xavier
> >> akashmanohar@gmail.com
> >>
> >
> >
> >
> > --
> > Akash Xavier
> > akashmanohar@gmail.com
>
>


-- 
Akash Xavier
akashmanohar@gmail.com

Re: [jira] Created: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Chris Chabot <ch...@xs4all.nl>.
Which is pretty much the same as i get when i run that gadget  
(prefixing it with http:// is a good thing btw) in the java shindig  
gadget server

The patch is meant to be applied to the shindig source dir, so you  
could apply it by doing:

# svn checkout <shindig repo url>
# cd shindig/php
# patch -p1 < [patth to the patch]/php-shindig.patch

Keep in mind, as i wrote, its based on a checkout from feb 14th, so it  
should have the exact same functioning as it ... there's still some  
new features to catch up on, and some iGoogle features (like finance  
etc) will never work on a shindig gadget server, so if you could  
please for now focus the bug reports for now on what is different from  
the java branch, or patches for funcitonality it's still missing, i'd  
very much appreciate it :)

	-- Chris

On Mar 2, 2008, at 6:36 PM, Akash Xavier wrote:

> Chris,
> I tried this gadget. It displays nithing
> http://shindig.chabotc.com/gadgets/ifr?url=delicious-bookmarks.googlecode.com/svn/trunk/delicious.xml
> Its a del.icio.us gadget
>
> On Sun, Mar 2, 2008 at 9:31 AM, Akash Xavier  
> <ak...@gmail.com> wrote:
>
>> Yeah
>> Thanks for updating it Chris.
>> Before u msged back, I was excited to see a working version and hence
>> downloaded the patch file and was trying to open it. I opened the  
>> patch file
>> in mozilla firefox on my local server, but couldnt extract it.  :)
>> Thanks.... I am now directly downloading it  :)
>>
>>
>> On Sun, Mar 2, 2008 at 9:26 AM, Chris Chabot <ch...@xs4all.nl>  
>> wrote:
>>
>>> Ps if you want to run it locally, just download
>>> http://chabotc.com/php-shindig.tar.gz
>>> , untar, copy files to your web root, and point your browser to  
>>> it ...
>>> deploying it rly is quite simple ;)
>>>
>>> On Mar 2, 2008, at 6:19 PM, Chris Chabot wrote:
>>>
>>>> That hosted demo version of it wasn't updated to the latest code
>>>> yet, and was also in the old location (without the /gadgets part,
>>>> which i've now added because there might be a social part soon  
>>>> too).
>>>> I've just updated this and made a opensocial-0.7 feature with an
>>>> opensocial-reference dependency, so the compliancetest should
>>>> function correctly now:
>>>>
>>>>
>>> http://shindig.chabotc.com/gadgets/ifr?url=http://opensocial-resources.googlecode.com/svn/tests/trunk/compliancetests.xml
>>>>
>>>> Keep in mind it doesn't really do 'social' yet, and it also doesn't
>>>> have the port from the social part of the java branch yet either
>>>> (since this was made after the feb 14th checkout which i based my
>>>> work on). So while it'll load ok, it wont really do very much yet,
>>>> just render the gadget, proxy the remote calls if any, and that's  
>>>> it
>>>> until the social part has been written too.
>>>>
>>>>      -- Chris
>>>>
>>>> On Mar 2, 2008, at 5:42 PM, Akash Xavier wrote:
>>>>
>>>>> Chris,
>>>>>
>>>>> I tested the code on your site with the compliance gadget.
>>>>>
>>> http://shindig.chabotc.com/ifr/?url=http://opensocial-resources.googlecode.com/svn/tests/trunk/compliancetests.xml
>>>>>
>>>>> It shows an error "Error. Unsupported feature(s): opensocial-0.7"
>>>>>
>>>>> Wondering whether u uploaded the latest version to the site too??
>>>>>
>>>>> On Sun, Mar 2, 2008 at 8:38 AM, Akash Xavier
>>>>> <ak...@gmail.com> wrote:
>>>>>
>>>>>> Chris,
>>>>>> Is it running on your site chabotc.com? (you posted a link
>>>>>> sometime ago)
>>>>>>
>>>>>>
>>>>>> On Sun, Mar 2, 2008 at 8:06 AM, Chris Chabot <ch...@xs4all.nl>
>>>>>> wrote:
>>>>>>
>>>>>>> Hey Guys,
>>>>>>>
>>>>>>> As you can see the patch for the new php shindig gadget server  
>>>>>>> has
>>>>>>> landed. I've tested this server with all the simple gadgets i  
>>>>>>> could
>>>>>>> get my hands on, and with sample containers, and it seems to  
>>>>>>> behave
>>>>>>> identical to the java shindig server now (the one from feb 14th
>>>>>>> that
>>>>>>> is, what i based my porting efforts on).
>>>>>>>
>>>>>>> It's still missing a few things, including a good bit of extra
>>>>>>> documentation for all the classes etc, once this patch has been
>>>>>>> accepted i'll file bug reports for all the todo's that i have  
>>>>>>> open,
>>>>>>> and desirable fixes/changes/etc, so that other people could
>>>>>>> easily get
>>>>>>> started on collaborating and expanding on this.
>>>>>>>
>>>>>>> When the patch has gone thru some basic review and is included  
>>>>>>> in
>>>>>>> the
>>>>>>> svn repo, i would like to also apply for commit access to it.  
>>>>>>> What
>>>>>>> would be the procedure for this?
>>>>>>>
>>>>>>> Look forward to your feedback!
>>>>>>>
>>>>>>>     -- Chris
>>>>>>>
>>>>>>> On Mar 2, 2008, at 4:56 PM, Chris Chabot (JIRA) wrote:
>>>>>>>
>>>>>>>> New PHP Shindig gadget server code
>>>>>>>> ----------------------------------
>>>>>>>>
>>>>>>>>              Key: SHINDIG-103
>>>>>>>>              URL:
>>> https://issues.apache.org/jira/browse/SHINDIG-103
>>>>>>>>          Project: Shindig
>>>>>>>>       Issue Type: Improvement
>>>>>>>>       Components: Gadgets Server - PHP
>>>>>>>>         Reporter: Chris Chabot
>>>>>>>>         Assignee: Brian McCallister
>>>>>>>>
>>>>>>>>
>>>>>>>> This patch completely replaces the old code in the php  
>>>>>>>> directory
>>>>>>>> of
>>>>>>>> the shindig project, and replaces it with a port of the java
>>>>>>>> shindig
>>>>>>>> code.
>>>>>>>>
>>>>>>>> The java code used is from a checkout from February the 14th,  
>>>>>>>> this
>>>>>>>> because keeping track of the changes while porting and testing
>>>>>>>> would
>>>>>>>> have gotten in the way of completing the first release in a  
>>>>>>>> timely
>>>>>>>> fashion.
>>>>>>>>
>>>>>>>> It implements the structure and workings from the java server  
>>>>>>>> and
>>>>>>>> includes:
>>>>>>>> - Gadget server
>>>>>>>> - Proxy service
>>>>>>>> - JS service
>>>>>>>>
>>>>>>>> The maIn differences from the Java branch are:
>>>>>>>> - Different caching engine (abstracted base class, sample file
>>>>>>>> implementation included)
>>>>>>>> - Different gadget rendering work flow (no multithreading in  
>>>>>>>> PHP)
>>>>>>>> - No enum's or name spaced classes in php, so their top level
>>>>>>>> classes now
>>>>>>>> - Locale class to emulate the Java's Locale class
>>>>>>>> - Somewhat servlet like event handling to stay close to the  
>>>>>>>> Java's
>>>>>>>> structure
>>>>>>>>
>>>>>>>>
>>>>>>>> Missing is the RPC feature, some custom speedups to get it
>>>>>>>> closer to
>>>>>>>> the Java's speed (it's about 40% slower right now, but that gap
>>>>>>>> might be fixed later on), and a better logging / error  
>>>>>>>> reporting
>>>>>>>> structure, it now only has a basic DEBUG flag in the config,  
>>>>>>>> which
>>>>>>>> if set, causes it to dump debug backtrace's on errors.
>>>>>>>>
>>>>>>>> It's also missing Caja support, since that is Java only at the
>>>>>>>> moment. Maybe somewhere in the future we'll have a command line
>>>>>>>> version available that we can use.
>>>>>>>>
>>>>>>>> It also contains a copy of the features directory structure (so
>>>>>>>> that
>>>>>>>> it doesn't break on updates from the Java side of things,  
>>>>>>>> changes
>>>>>>>> will have to be implemented before you can copy over the new
>>>>>>>> version) and a copy of the sample container (minus the Caja
>>>>>>>> options), so that people can test it directly.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> This message is automatically generated by JIRA.
>>>>>>>> -
>>>>>>>> You can reply to this email to add a comment to the issue  
>>>>>>>> online.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Akash Xavier
>>>>>> akashmanohar@gmail.com
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Akash Xavier
>>>>> akashmanohar@gmail.com
>>>
>>>
>>
>>
>> --
>> Akash Xavier
>> akashmanohar@gmail.com
>>
>
>
>
> -- 
> Akash Xavier
> akashmanohar@gmail.com


Re: [jira] Created: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Akash Xavier <ak...@gmail.com>.
Chris,
I tried this gadget. It displays nithing
http://shindig.chabotc.com/gadgets/ifr?url=delicious-bookmarks.googlecode.com/svn/trunk/delicious.xml
Its a del.icio.us gadget

On Sun, Mar 2, 2008 at 9:31 AM, Akash Xavier <ak...@gmail.com> wrote:

> Yeah
> Thanks for updating it Chris.
> Before u msged back, I was excited to see a working version and hence
> downloaded the patch file and was trying to open it. I opened the patch file
> in mozilla firefox on my local server, but couldnt extract it.  :)
> Thanks.... I am now directly downloading it  :)
>
>
> On Sun, Mar 2, 2008 at 9:26 AM, Chris Chabot <ch...@xs4all.nl> wrote:
>
> > Ps if you want to run it locally, just download
> > http://chabotc.com/php-shindig.tar.gz
> > , untar, copy files to your web root, and point your browser to it ...
> > deploying it rly is quite simple ;)
> >
> > On Mar 2, 2008, at 6:19 PM, Chris Chabot wrote:
> >
> > > That hosted demo version of it wasn't updated to the latest code
> > > yet, and was also in the old location (without the /gadgets part,
> > > which i've now added because there might be a social part soon too).
> > > I've just updated this and made a opensocial-0.7 feature with an
> > > opensocial-reference dependency, so the compliancetest should
> > > function correctly now:
> > >
> > >
> > http://shindig.chabotc.com/gadgets/ifr?url=http://opensocial-resources.googlecode.com/svn/tests/trunk/compliancetests.xml
> > >
> > > Keep in mind it doesn't really do 'social' yet, and it also doesn't
> > > have the port from the social part of the java branch yet either
> > > (since this was made after the feb 14th checkout which i based my
> > > work on). So while it'll load ok, it wont really do very much yet,
> > > just render the gadget, proxy the remote calls if any, and that's it
> > > until the social part has been written too.
> > >
> > >       -- Chris
> > >
> > > On Mar 2, 2008, at 5:42 PM, Akash Xavier wrote:
> > >
> > >> Chris,
> > >>
> > >> I tested the code on your site with the compliance gadget.
> > >>
> > http://shindig.chabotc.com/ifr/?url=http://opensocial-resources.googlecode.com/svn/tests/trunk/compliancetests.xml
> > >>
> > >> It shows an error "Error. Unsupported feature(s): opensocial-0.7"
> > >>
> > >> Wondering whether u uploaded the latest version to the site too??
> > >>
> > >> On Sun, Mar 2, 2008 at 8:38 AM, Akash Xavier
> > >> <ak...@gmail.com> wrote:
> > >>
> > >>> Chris,
> > >>> Is it running on your site chabotc.com? (you posted a link
> > >>> sometime ago)
> > >>>
> > >>>
> > >>> On Sun, Mar 2, 2008 at 8:06 AM, Chris Chabot <ch...@xs4all.nl>
> > >>> wrote:
> > >>>
> > >>>> Hey Guys,
> > >>>>
> > >>>> As you can see the patch for the new php shindig gadget server has
> > >>>> landed. I've tested this server with all the simple gadgets i could
> > >>>> get my hands on, and with sample containers, and it seems to behave
> > >>>> identical to the java shindig server now (the one from feb 14th
> > >>>> that
> > >>>> is, what i based my porting efforts on).
> > >>>>
> > >>>> It's still missing a few things, including a good bit of extra
> > >>>> documentation for all the classes etc, once this patch has been
> > >>>> accepted i'll file bug reports for all the todo's that i have open,
> > >>>> and desirable fixes/changes/etc, so that other people could
> > >>>> easily get
> > >>>> started on collaborating and expanding on this.
> > >>>>
> > >>>> When the patch has gone thru some basic review and is included in
> > >>>> the
> > >>>> svn repo, i would like to also apply for commit access to it. What
> > >>>> would be the procedure for this?
> > >>>>
> > >>>> Look forward to your feedback!
> > >>>>
> > >>>>      -- Chris
> > >>>>
> > >>>> On Mar 2, 2008, at 4:56 PM, Chris Chabot (JIRA) wrote:
> > >>>>
> > >>>>> New PHP Shindig gadget server code
> > >>>>> ----------------------------------
> > >>>>>
> > >>>>>               Key: SHINDIG-103
> > >>>>>               URL:
> > https://issues.apache.org/jira/browse/SHINDIG-103
> > >>>>>           Project: Shindig
> > >>>>>        Issue Type: Improvement
> > >>>>>        Components: Gadgets Server - PHP
> > >>>>>          Reporter: Chris Chabot
> > >>>>>          Assignee: Brian McCallister
> > >>>>>
> > >>>>>
> > >>>>> This patch completely replaces the old code in the php directory
> > >>>>> of
> > >>>>> the shindig project, and replaces it with a port of the java
> > >>>>> shindig
> > >>>>> code.
> > >>>>>
> > >>>>> The java code used is from a checkout from February the 14th, this
> > >>>>> because keeping track of the changes while porting and testing
> > >>>>> would
> > >>>>> have gotten in the way of completing the first release in a timely
> > >>>>> fashion.
> > >>>>>
> > >>>>> It implements the structure and workings from the java server and
> > >>>>> includes:
> > >>>>> - Gadget server
> > >>>>> - Proxy service
> > >>>>> - JS service
> > >>>>>
> > >>>>> The maIn differences from the Java branch are:
> > >>>>> - Different caching engine (abstracted base class, sample file
> > >>>>> implementation included)
> > >>>>> - Different gadget rendering work flow (no multithreading in PHP)
> > >>>>> - No enum's or name spaced classes in php, so their top level
> > >>>>> classes now
> > >>>>> - Locale class to emulate the Java's Locale class
> > >>>>> - Somewhat servlet like event handling to stay close to the Java's
> > >>>>> structure
> > >>>>>
> > >>>>>
> > >>>>> Missing is the RPC feature, some custom speedups to get it
> > >>>>> closer to
> > >>>>> the Java's speed (it's about 40% slower right now, but that gap
> > >>>>> might be fixed later on), and a better logging / error reporting
> > >>>>> structure, it now only has a basic DEBUG flag in the config, which
> > >>>>> if set, causes it to dump debug backtrace's on errors.
> > >>>>>
> > >>>>> It's also missing Caja support, since that is Java only at the
> > >>>>> moment. Maybe somewhere in the future we'll have a command line
> > >>>>> version available that we can use.
> > >>>>>
> > >>>>> It also contains a copy of the features directory structure (so
> > >>>>> that
> > >>>>> it doesn't break on updates from the Java side of things, changes
> > >>>>> will have to be implemented before you can copy over the new
> > >>>>> version) and a copy of the sample container (minus the Caja
> > >>>>> options), so that people can test it directly.
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> --
> > >>>>> This message is automatically generated by JIRA.
> > >>>>> -
> > >>>>> You can reply to this email to add a comment to the issue online.
> > >>>>
> > >>>>
> > >>>
> > >>>
> > >>> --
> > >>> Akash Xavier
> > >>> akashmanohar@gmail.com
> > >>
> > >>
> > >>
> > >>
> > >> --
> > >> Akash Xavier
> > >> akashmanohar@gmail.com
> >
> >
>
>
> --
> Akash Xavier
> akashmanohar@gmail.com
>



-- 
Akash Xavier
akashmanohar@gmail.com

Re: [jira] Created: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Akash Xavier <ak...@gmail.com>.
Yeah
Thanks for updating it Chris.
Before u msged back, I was excited to see a working version and hence
downloaded the patch file and was trying to open it. I opened the patch file
in mozilla firefox on my local server, but couldnt extract it.  :)
Thanks.... I am now directly downloading it  :)

On Sun, Mar 2, 2008 at 9:26 AM, Chris Chabot <ch...@xs4all.nl> wrote:

> Ps if you want to run it locally, just download
> http://chabotc.com/php-shindig.tar.gz
> , untar, copy files to your web root, and point your browser to it ...
> deploying it rly is quite simple ;)
>
> On Mar 2, 2008, at 6:19 PM, Chris Chabot wrote:
>
> > That hosted demo version of it wasn't updated to the latest code
> > yet, and was also in the old location (without the /gadgets part,
> > which i've now added because there might be a social part soon too).
> > I've just updated this and made a opensocial-0.7 feature with an
> > opensocial-reference dependency, so the compliancetest should
> > function correctly now:
> >
> >
> http://shindig.chabotc.com/gadgets/ifr?url=http://opensocial-resources.googlecode.com/svn/tests/trunk/compliancetests.xml
> >
> > Keep in mind it doesn't really do 'social' yet, and it also doesn't
> > have the port from the social part of the java branch yet either
> > (since this was made after the feb 14th checkout which i based my
> > work on). So while it'll load ok, it wont really do very much yet,
> > just render the gadget, proxy the remote calls if any, and that's it
> > until the social part has been written too.
> >
> >       -- Chris
> >
> > On Mar 2, 2008, at 5:42 PM, Akash Xavier wrote:
> >
> >> Chris,
> >>
> >> I tested the code on your site with the compliance gadget.
> >>
> http://shindig.chabotc.com/ifr/?url=http://opensocial-resources.googlecode.com/svn/tests/trunk/compliancetests.xml
> >>
> >> It shows an error "Error. Unsupported feature(s): opensocial-0.7"
> >>
> >> Wondering whether u uploaded the latest version to the site too??
> >>
> >> On Sun, Mar 2, 2008 at 8:38 AM, Akash Xavier
> >> <ak...@gmail.com> wrote:
> >>
> >>> Chris,
> >>> Is it running on your site chabotc.com? (you posted a link
> >>> sometime ago)
> >>>
> >>>
> >>> On Sun, Mar 2, 2008 at 8:06 AM, Chris Chabot <ch...@xs4all.nl>
> >>> wrote:
> >>>
> >>>> Hey Guys,
> >>>>
> >>>> As you can see the patch for the new php shindig gadget server has
> >>>> landed. I've tested this server with all the simple gadgets i could
> >>>> get my hands on, and with sample containers, and it seems to behave
> >>>> identical to the java shindig server now (the one from feb 14th
> >>>> that
> >>>> is, what i based my porting efforts on).
> >>>>
> >>>> It's still missing a few things, including a good bit of extra
> >>>> documentation for all the classes etc, once this patch has been
> >>>> accepted i'll file bug reports for all the todo's that i have open,
> >>>> and desirable fixes/changes/etc, so that other people could
> >>>> easily get
> >>>> started on collaborating and expanding on this.
> >>>>
> >>>> When the patch has gone thru some basic review and is included in
> >>>> the
> >>>> svn repo, i would like to also apply for commit access to it. What
> >>>> would be the procedure for this?
> >>>>
> >>>> Look forward to your feedback!
> >>>>
> >>>>      -- Chris
> >>>>
> >>>> On Mar 2, 2008, at 4:56 PM, Chris Chabot (JIRA) wrote:
> >>>>
> >>>>> New PHP Shindig gadget server code
> >>>>> ----------------------------------
> >>>>>
> >>>>>               Key: SHINDIG-103
> >>>>>               URL: https://issues.apache.org/jira/browse/SHINDIG-103
> >>>>>           Project: Shindig
> >>>>>        Issue Type: Improvement
> >>>>>        Components: Gadgets Server - PHP
> >>>>>          Reporter: Chris Chabot
> >>>>>          Assignee: Brian McCallister
> >>>>>
> >>>>>
> >>>>> This patch completely replaces the old code in the php directory
> >>>>> of
> >>>>> the shindig project, and replaces it with a port of the java
> >>>>> shindig
> >>>>> code.
> >>>>>
> >>>>> The java code used is from a checkout from February the 14th, this
> >>>>> because keeping track of the changes while porting and testing
> >>>>> would
> >>>>> have gotten in the way of completing the first release in a timely
> >>>>> fashion.
> >>>>>
> >>>>> It implements the structure and workings from the java server and
> >>>>> includes:
> >>>>> - Gadget server
> >>>>> - Proxy service
> >>>>> - JS service
> >>>>>
> >>>>> The maIn differences from the Java branch are:
> >>>>> - Different caching engine (abstracted base class, sample file
> >>>>> implementation included)
> >>>>> - Different gadget rendering work flow (no multithreading in PHP)
> >>>>> - No enum's or name spaced classes in php, so their top level
> >>>>> classes now
> >>>>> - Locale class to emulate the Java's Locale class
> >>>>> - Somewhat servlet like event handling to stay close to the Java's
> >>>>> structure
> >>>>>
> >>>>>
> >>>>> Missing is the RPC feature, some custom speedups to get it
> >>>>> closer to
> >>>>> the Java's speed (it's about 40% slower right now, but that gap
> >>>>> might be fixed later on), and a better logging / error reporting
> >>>>> structure, it now only has a basic DEBUG flag in the config, which
> >>>>> if set, causes it to dump debug backtrace's on errors.
> >>>>>
> >>>>> It's also missing Caja support, since that is Java only at the
> >>>>> moment. Maybe somewhere in the future we'll have a command line
> >>>>> version available that we can use.
> >>>>>
> >>>>> It also contains a copy of the features directory structure (so
> >>>>> that
> >>>>> it doesn't break on updates from the Java side of things, changes
> >>>>> will have to be implemented before you can copy over the new
> >>>>> version) and a copy of the sample container (minus the Caja
> >>>>> options), so that people can test it directly.
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> This message is automatically generated by JIRA.
> >>>>> -
> >>>>> You can reply to this email to add a comment to the issue online.
> >>>>
> >>>>
> >>>
> >>>
> >>> --
> >>> Akash Xavier
> >>> akashmanohar@gmail.com
> >>
> >>
> >>
> >>
> >> --
> >> Akash Xavier
> >> akashmanohar@gmail.com
>
>


-- 
Akash Xavier
akashmanohar@gmail.com

Re: [jira] Created: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Chris Chabot <ch...@xs4all.nl>.
Ps if you want to run it locally, just download http://chabotc.com/php-shindig.tar.gz 
, untar, copy files to your web root, and point your browser to it ...  
deploying it rly is quite simple ;)

On Mar 2, 2008, at 6:19 PM, Chris Chabot wrote:

> That hosted demo version of it wasn't updated to the latest code  
> yet, and was also in the old location (without the /gadgets part,  
> which i've now added because there might be a social part soon too).  
> I've just updated this and made a opensocial-0.7 feature with an  
> opensocial-reference dependency, so the compliancetest should  
> function correctly now:
>
> http://shindig.chabotc.com/gadgets/ifr?url=http://opensocial-resources.googlecode.com/svn/tests/trunk/compliancetests.xml
>
> Keep in mind it doesn't really do 'social' yet, and it also doesn't  
> have the port from the social part of the java branch yet either  
> (since this was made after the feb 14th checkout which i based my  
> work on). So while it'll load ok, it wont really do very much yet,  
> just render the gadget, proxy the remote calls if any, and that's it  
> until the social part has been written too.
>
> 	-- Chris
>
> On Mar 2, 2008, at 5:42 PM, Akash Xavier wrote:
>
>> Chris,
>>
>> I tested the code on your site with the compliance gadget.
>> http://shindig.chabotc.com/ifr/?url=http://opensocial-resources.googlecode.com/svn/tests/trunk/compliancetests.xml
>>
>> It shows an error "Error. Unsupported feature(s): opensocial-0.7"
>>
>> Wondering whether u uploaded the latest version to the site too??
>>
>> On Sun, Mar 2, 2008 at 8:38 AM, Akash Xavier  
>> <ak...@gmail.com> wrote:
>>
>>> Chris,
>>> Is it running on your site chabotc.com? (you posted a link  
>>> sometime ago)
>>>
>>>
>>> On Sun, Mar 2, 2008 at 8:06 AM, Chris Chabot <ch...@xs4all.nl>  
>>> wrote:
>>>
>>>> Hey Guys,
>>>>
>>>> As you can see the patch for the new php shindig gadget server has
>>>> landed. I've tested this server with all the simple gadgets i could
>>>> get my hands on, and with sample containers, and it seems to behave
>>>> identical to the java shindig server now (the one from feb 14th  
>>>> that
>>>> is, what i based my porting efforts on).
>>>>
>>>> It's still missing a few things, including a good bit of extra
>>>> documentation for all the classes etc, once this patch has been
>>>> accepted i'll file bug reports for all the todo's that i have open,
>>>> and desirable fixes/changes/etc, so that other people could  
>>>> easily get
>>>> started on collaborating and expanding on this.
>>>>
>>>> When the patch has gone thru some basic review and is included in  
>>>> the
>>>> svn repo, i would like to also apply for commit access to it. What
>>>> would be the procedure for this?
>>>>
>>>> Look forward to your feedback!
>>>>
>>>>      -- Chris
>>>>
>>>> On Mar 2, 2008, at 4:56 PM, Chris Chabot (JIRA) wrote:
>>>>
>>>>> New PHP Shindig gadget server code
>>>>> ----------------------------------
>>>>>
>>>>>               Key: SHINDIG-103
>>>>>               URL: https://issues.apache.org/jira/browse/SHINDIG-103
>>>>>           Project: Shindig
>>>>>        Issue Type: Improvement
>>>>>        Components: Gadgets Server - PHP
>>>>>          Reporter: Chris Chabot
>>>>>          Assignee: Brian McCallister
>>>>>
>>>>>
>>>>> This patch completely replaces the old code in the php directory  
>>>>> of
>>>>> the shindig project, and replaces it with a port of the java  
>>>>> shindig
>>>>> code.
>>>>>
>>>>> The java code used is from a checkout from February the 14th, this
>>>>> because keeping track of the changes while porting and testing  
>>>>> would
>>>>> have gotten in the way of completing the first release in a timely
>>>>> fashion.
>>>>>
>>>>> It implements the structure and workings from the java server and
>>>>> includes:
>>>>> - Gadget server
>>>>> - Proxy service
>>>>> - JS service
>>>>>
>>>>> The maIn differences from the Java branch are:
>>>>> - Different caching engine (abstracted base class, sample file
>>>>> implementation included)
>>>>> - Different gadget rendering work flow (no multithreading in PHP)
>>>>> - No enum's or name spaced classes in php, so their top level
>>>>> classes now
>>>>> - Locale class to emulate the Java's Locale class
>>>>> - Somewhat servlet like event handling to stay close to the Java's
>>>>> structure
>>>>>
>>>>>
>>>>> Missing is the RPC feature, some custom speedups to get it  
>>>>> closer to
>>>>> the Java's speed (it's about 40% slower right now, but that gap
>>>>> might be fixed later on), and a better logging / error reporting
>>>>> structure, it now only has a basic DEBUG flag in the config, which
>>>>> if set, causes it to dump debug backtrace's on errors.
>>>>>
>>>>> It's also missing Caja support, since that is Java only at the
>>>>> moment. Maybe somewhere in the future we'll have a command line
>>>>> version available that we can use.
>>>>>
>>>>> It also contains a copy of the features directory structure (so  
>>>>> that
>>>>> it doesn't break on updates from the Java side of things, changes
>>>>> will have to be implemented before you can copy over the new
>>>>> version) and a copy of the sample container (minus the Caja
>>>>> options), so that people can test it directly.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> This message is automatically generated by JIRA.
>>>>> -
>>>>> You can reply to this email to add a comment to the issue online.
>>>>
>>>>
>>>
>>>
>>> --
>>> Akash Xavier
>>> akashmanohar@gmail.com
>>
>>
>>
>>
>> -- 
>> Akash Xavier
>> akashmanohar@gmail.com


Re: [jira] Created: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Chris Chabot <ch...@xs4all.nl>.
That hosted demo version of it wasn't updated to the latest code yet,  
and was also in the old location (without the /gadgets part, which  
i've now added because there might be a social part soon too). I've  
just updated this and made a opensocial-0.7 feature with an opensocial- 
reference dependency, so the compliancetest should function correctly  
now:

http://shindig.chabotc.com/gadgets/ifr?url=http://opensocial-resources.googlecode.com/svn/tests/trunk/compliancetests.xml

Keep in mind it doesn't really do 'social' yet, and it also doesn't  
have the port from the social part of the java branch yet either  
(since this was made after the feb 14th checkout which i based my work  
on). So while it'll load ok, it wont really do very much yet, just  
render the gadget, proxy the remote calls if any, and that's it until  
the social part has been written too.

	-- Chris

On Mar 2, 2008, at 5:42 PM, Akash Xavier wrote:

> Chris,
>
> I tested the code on your site with the compliance gadget.
> http://shindig.chabotc.com/ifr/?url=http://opensocial-resources.googlecode.com/svn/tests/trunk/compliancetests.xml
>
> It shows an error "Error. Unsupported feature(s): opensocial-0.7"
>
> Wondering whether u uploaded the latest version to the site too??
>
> On Sun, Mar 2, 2008 at 8:38 AM, Akash Xavier  
> <ak...@gmail.com> wrote:
>
>> Chris,
>> Is it running on your site chabotc.com? (you posted a link sometime  
>> ago)
>>
>>
>> On Sun, Mar 2, 2008 at 8:06 AM, Chris Chabot <ch...@xs4all.nl>  
>> wrote:
>>
>>> Hey Guys,
>>>
>>> As you can see the patch for the new php shindig gadget server has
>>> landed. I've tested this server with all the simple gadgets i could
>>> get my hands on, and with sample containers, and it seems to behave
>>> identical to the java shindig server now (the one from feb 14th that
>>> is, what i based my porting efforts on).
>>>
>>> It's still missing a few things, including a good bit of extra
>>> documentation for all the classes etc, once this patch has been
>>> accepted i'll file bug reports for all the todo's that i have open,
>>> and desirable fixes/changes/etc, so that other people could easily  
>>> get
>>> started on collaborating and expanding on this.
>>>
>>> When the patch has gone thru some basic review and is included in  
>>> the
>>> svn repo, i would like to also apply for commit access to it. What
>>> would be the procedure for this?
>>>
>>> Look forward to your feedback!
>>>
>>>       -- Chris
>>>
>>> On Mar 2, 2008, at 4:56 PM, Chris Chabot (JIRA) wrote:
>>>
>>>> New PHP Shindig gadget server code
>>>> ----------------------------------
>>>>
>>>>                Key: SHINDIG-103
>>>>                URL: https://issues.apache.org/jira/browse/SHINDIG-103
>>>>            Project: Shindig
>>>>         Issue Type: Improvement
>>>>         Components: Gadgets Server - PHP
>>>>           Reporter: Chris Chabot
>>>>           Assignee: Brian McCallister
>>>>
>>>>
>>>> This patch completely replaces the old code in the php directory of
>>>> the shindig project, and replaces it with a port of the java  
>>>> shindig
>>>> code.
>>>>
>>>> The java code used is from a checkout from February the 14th, this
>>>> because keeping track of the changes while porting and testing  
>>>> would
>>>> have gotten in the way of completing the first release in a timely
>>>> fashion.
>>>>
>>>> It implements the structure and workings from the java server and
>>>> includes:
>>>> - Gadget server
>>>> - Proxy service
>>>> - JS service
>>>>
>>>> The maIn differences from the Java branch are:
>>>> - Different caching engine (abstracted base class, sample file
>>>> implementation included)
>>>> - Different gadget rendering work flow (no multithreading in PHP)
>>>> - No enum's or name spaced classes in php, so their top level
>>>> classes now
>>>> - Locale class to emulate the Java's Locale class
>>>> - Somewhat servlet like event handling to stay close to the Java's
>>>> structure
>>>>
>>>>
>>>> Missing is the RPC feature, some custom speedups to get it closer  
>>>> to
>>>> the Java's speed (it's about 40% slower right now, but that gap
>>>> might be fixed later on), and a better logging / error reporting
>>>> structure, it now only has a basic DEBUG flag in the config, which
>>>> if set, causes it to dump debug backtrace's on errors.
>>>>
>>>> It's also missing Caja support, since that is Java only at the
>>>> moment. Maybe somewhere in the future we'll have a command line
>>>> version available that we can use.
>>>>
>>>> It also contains a copy of the features directory structure (so  
>>>> that
>>>> it doesn't break on updates from the Java side of things, changes
>>>> will have to be implemented before you can copy over the new
>>>> version) and a copy of the sample container (minus the Caja
>>>> options), so that people can test it directly.
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> This message is automatically generated by JIRA.
>>>> -
>>>> You can reply to this email to add a comment to the issue online.
>>>
>>>
>>
>>
>> --
>> Akash Xavier
>> akashmanohar@gmail.com
>
>
>
>
> -- 
> Akash Xavier
> akashmanohar@gmail.com


Re: [jira] Created: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Akash Xavier <ak...@gmail.com>.
Chris,

I tested the code on your site with the compliance gadget.
http://shindig.chabotc.com/ifr/?url=http://opensocial-resources.googlecode.com/svn/tests/trunk/compliancetests.xml

It shows an error "Error. Unsupported feature(s): opensocial-0.7"

Wondering whether u uploaded the latest version to the site too??

On Sun, Mar 2, 2008 at 8:38 AM, Akash Xavier <ak...@gmail.com> wrote:

> Chris,
> Is it running on your site chabotc.com? (you posted a link sometime ago)
>
>
> On Sun, Mar 2, 2008 at 8:06 AM, Chris Chabot <ch...@xs4all.nl> wrote:
>
> > Hey Guys,
> >
> > As you can see the patch for the new php shindig gadget server has
> > landed. I've tested this server with all the simple gadgets i could
> > get my hands on, and with sample containers, and it seems to behave
> > identical to the java shindig server now (the one from feb 14th that
> > is, what i based my porting efforts on).
> >
> > It's still missing a few things, including a good bit of extra
> > documentation for all the classes etc, once this patch has been
> > accepted i'll file bug reports for all the todo's that i have open,
> > and desirable fixes/changes/etc, so that other people could easily get
> > started on collaborating and expanding on this.
> >
> > When the patch has gone thru some basic review and is included in the
> > svn repo, i would like to also apply for commit access to it. What
> > would be the procedure for this?
> >
> > Look forward to your feedback!
> >
> >        -- Chris
> >
> > On Mar 2, 2008, at 4:56 PM, Chris Chabot (JIRA) wrote:
> >
> > > New PHP Shindig gadget server code
> > > ----------------------------------
> > >
> > >                 Key: SHINDIG-103
> > >                 URL: https://issues.apache.org/jira/browse/SHINDIG-103
> > >             Project: Shindig
> > >          Issue Type: Improvement
> > >          Components: Gadgets Server - PHP
> > >            Reporter: Chris Chabot
> > >            Assignee: Brian McCallister
> > >
> > >
> > > This patch completely replaces the old code in the php directory of
> > > the shindig project, and replaces it with a port of the java shindig
> > > code.
> > >
> > > The java code used is from a checkout from February the 14th, this
> > > because keeping track of the changes while porting and testing would
> > > have gotten in the way of completing the first release in a timely
> > > fashion.
> > >
> > > It implements the structure and workings from the java server and
> > > includes:
> > > - Gadget server
> > > - Proxy service
> > > - JS service
> > >
> > > The maIn differences from the Java branch are:
> > > - Different caching engine (abstracted base class, sample file
> > > implementation included)
> > > - Different gadget rendering work flow (no multithreading in PHP)
> > > - No enum's or name spaced classes in php, so their top level
> > > classes now
> > > - Locale class to emulate the Java's Locale class
> > > - Somewhat servlet like event handling to stay close to the Java's
> > > structure
> > >
> > >
> > > Missing is the RPC feature, some custom speedups to get it closer to
> > > the Java's speed (it's about 40% slower right now, but that gap
> > > might be fixed later on), and a better logging / error reporting
> > > structure, it now only has a basic DEBUG flag in the config, which
> > > if set, causes it to dump debug backtrace's on errors.
> > >
> > > It's also missing Caja support, since that is Java only at the
> > > moment. Maybe somewhere in the future we'll have a command line
> > > version available that we can use.
> > >
> > > It also contains a copy of the features directory structure (so that
> > > it doesn't break on updates from the Java side of things, changes
> > > will have to be implemented before you can copy over the new
> > > version) and a copy of the sample container (minus the Caja
> > > options), so that people can test it directly.
> > >
> > >
> > >
> > >
> > > --
> > > This message is automatically generated by JIRA.
> > > -
> > > You can reply to this email to add a comment to the issue online.
> >
> >
>
>
> --
> Akash Xavier
> akashmanohar@gmail.com




-- 
Akash Xavier
akashmanohar@gmail.com

Re: [jira] Created: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Akash Xavier <ak...@gmail.com>.
Chris,
Is it running on your site chabotc.com? (you posted a link sometime ago)

On Sun, Mar 2, 2008 at 8:06 AM, Chris Chabot <ch...@xs4all.nl> wrote:

> Hey Guys,
>
> As you can see the patch for the new php shindig gadget server has
> landed. I've tested this server with all the simple gadgets i could
> get my hands on, and with sample containers, and it seems to behave
> identical to the java shindig server now (the one from feb 14th that
> is, what i based my porting efforts on).
>
> It's still missing a few things, including a good bit of extra
> documentation for all the classes etc, once this patch has been
> accepted i'll file bug reports for all the todo's that i have open,
> and desirable fixes/changes/etc, so that other people could easily get
> started on collaborating and expanding on this.
>
> When the patch has gone thru some basic review and is included in the
> svn repo, i would like to also apply for commit access to it. What
> would be the procedure for this?
>
> Look forward to your feedback!
>
>        -- Chris
>
> On Mar 2, 2008, at 4:56 PM, Chris Chabot (JIRA) wrote:
>
> > New PHP Shindig gadget server code
> > ----------------------------------
> >
> >                 Key: SHINDIG-103
> >                 URL: https://issues.apache.org/jira/browse/SHINDIG-103
> >             Project: Shindig
> >          Issue Type: Improvement
> >          Components: Gadgets Server - PHP
> >            Reporter: Chris Chabot
> >            Assignee: Brian McCallister
> >
> >
> > This patch completely replaces the old code in the php directory of
> > the shindig project, and replaces it with a port of the java shindig
> > code.
> >
> > The java code used is from a checkout from February the 14th, this
> > because keeping track of the changes while porting and testing would
> > have gotten in the way of completing the first release in a timely
> > fashion.
> >
> > It implements the structure and workings from the java server and
> > includes:
> > - Gadget server
> > - Proxy service
> > - JS service
> >
> > The maIn differences from the Java branch are:
> > - Different caching engine (abstracted base class, sample file
> > implementation included)
> > - Different gadget rendering work flow (no multithreading in PHP)
> > - No enum's or name spaced classes in php, so their top level
> > classes now
> > - Locale class to emulate the Java's Locale class
> > - Somewhat servlet like event handling to stay close to the Java's
> > structure
> >
> >
> > Missing is the RPC feature, some custom speedups to get it closer to
> > the Java's speed (it's about 40% slower right now, but that gap
> > might be fixed later on), and a better logging / error reporting
> > structure, it now only has a basic DEBUG flag in the config, which
> > if set, causes it to dump debug backtrace's on errors.
> >
> > It's also missing Caja support, since that is Java only at the
> > moment. Maybe somewhere in the future we'll have a command line
> > version available that we can use.
> >
> > It also contains a copy of the features directory structure (so that
> > it doesn't break on updates from the Java side of things, changes
> > will have to be implemented before you can copy over the new
> > version) and a copy of the sample container (minus the Caja
> > options), so that people can test it directly.
> >
> >
> >
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
>
>


-- 
Akash Xavier
akashmanohar@gmail.com

Re: [jira] Created: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Chris Chabot <ch...@xs4all.nl>.
Hey Guys,

As you can see the patch for the new php shindig gadget server has  
landed. I've tested this server with all the simple gadgets i could  
get my hands on, and with sample containers, and it seems to behave  
identical to the java shindig server now (the one from feb 14th that  
is, what i based my porting efforts on).

It's still missing a few things, including a good bit of extra  
documentation for all the classes etc, once this patch has been  
accepted i'll file bug reports for all the todo's that i have open,  
and desirable fixes/changes/etc, so that other people could easily get  
started on collaborating and expanding on this.

When the patch has gone thru some basic review and is included in the  
svn repo, i would like to also apply for commit access to it. What  
would be the procedure for this?

Look forward to your feedback!

	-- Chris

On Mar 2, 2008, at 4:56 PM, Chris Chabot (JIRA) wrote:

> New PHP Shindig gadget server code
> ----------------------------------
>
>                 Key: SHINDIG-103
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-103
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Gadgets Server - PHP
>            Reporter: Chris Chabot
>            Assignee: Brian McCallister
>
>
> This patch completely replaces the old code in the php directory of  
> the shindig project, and replaces it with a port of the java shindig  
> code.
>
> The java code used is from a checkout from February the 14th, this  
> because keeping track of the changes while porting and testing would  
> have gotten in the way of completing the first release in a timely  
> fashion.
>
> It implements the structure and workings from the java server and  
> includes:
> - Gadget server
> - Proxy service
> - JS service
>
> The maIn differences from the Java branch are:
> - Different caching engine (abstracted base class, sample file  
> implementation included)
> - Different gadget rendering work flow (no multithreading in PHP)
> - No enum's or name spaced classes in php, so their top level  
> classes now
> - Locale class to emulate the Java's Locale class
> - Somewhat servlet like event handling to stay close to the Java's  
> structure
>
>
> Missing is the RPC feature, some custom speedups to get it closer to  
> the Java's speed (it's about 40% slower right now, but that gap  
> might be fixed later on), and a better logging / error reporting  
> structure, it now only has a basic DEBUG flag in the config, which  
> if set, causes it to dump debug backtrace's on errors.
>
> It's also missing Caja support, since that is Java only at the  
> moment. Maybe somewhere in the future we'll have a command line  
> version available that we can use.
>
> It also contains a copy of the features directory structure (so that  
> it doesn't break on updates from the Java side of things, changes  
> will have to be implemented before you can copy over the new  
> version) and a copy of the sample container (minus the Caja  
> options), so that people can test it directly.
>
>
>
>
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Kevin Brown <et...@google.com>.
On Mon, Mar 3, 2008 at 10:38 AM, Chris Chabot (JIRA) <ji...@apache.org>
wrote:

>
> I'll fix up the copied-features issue and some other little things and
> re-submit a patch. That doesn't mean other things wont be picked up and in
> fact there's bound to be a few small bugs hiding in it too, but since a good
> few people wanted to see this included sooner rather then later, i won't
> block submitting it on having everything completely done. If we get it good
> enough for initial inclusion other people can start looking at it and maybe
> contribute where possible too.


Like I said -- the other stuff is just suggestions. The copied features
issue is the only one I'd consider holding off applying the patch for.

W.I.P. (work in progress), i also felt that some re-factoring would be a
> good thing to do next, however as a few people suggested on the mailing
> list, it's better to submit a patch now and get the ball rolling then to
> wait for it to be completely Done(Tm).


Agreed.


> Since when i began this i had no idea how the java server worked, i just
> jumped in somewhere in the middle and trusted in the fact that by reading
> the java base line per line a bigger picture of what it did exactly would
> appear; Fortunately that worked, so i'm in a lot better position now to
> start making bigger changes to it; (Zen mode) To deviate from the way you
> must first know the way right? :)
>
> Documentation is in the same line something i wanted to leave until i
> would have a much clearer picture of what was what, else it would've become
> a byte filler and not something sensible


Fair enough :)


> - define() is horribly slow for no good reason in PHP
>
> - include_once is also horribly slow for no good reason
>
> Actually to my best knowledge the performance impact of include_once was
> fixed somewhere in the php 5.1 era, however i do realize as i'm writing
> this, that some people might still be stuck there, so i'll fix it up for
> that case.


Unfortunately, this isn't the case when you use APC or Zend Cache, because
it prevents several important optimizations from taking place. Anyway, it's
a performance issue and as such should probably be ignored until it actually
proves to be a problem.



> - Have you considered using __autoload
>
>
> I truly love the new magic functions in php 5, however i've found in the
> past that the performance of __autoload is completely horrific, i'll see how
> it behaves now with php 5.2, if it improved any it is a good option,
> otherwise if its still as bad as it was, i'd rather not :)


I haven't used PHP since the early 5.2 release (about a year ago), and then
autoload behavior seemed pretty reasonable for a medium sized site. When I
was at yahoo we generally avoided it, but there were some improvements made
recently. It's worth an experiment, I suppose, but I wouldn't change all my
code just for it :)

Re: [jira] Commented: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Kevin Brown <et...@google.com>.
Good work, Chris. It's much appreciated.

Everyone should be aware that in order to make this work, we had to make one
minor adjustment to syndicator configuration handling (at least for the
default config). It looks like my tests weren't thorough, and PHP DOES
complain about trailing commas. You can safely leave them in if you like for
your own syndicator configurations, but for the time being the default
syndicator config won't use them.

We came up with a workaround for comments in there as well.

On Wed, Mar 5, 2008 at 12:11 PM, Paul Lindner <pl...@hi5.com> wrote:

> Hi Chris, I've committed the patch for SHINDIG-103.
>
> We should definitely get you commit access.  To get started
> please fill out the contributor license agreement found here:
>
>  http://www.apache.org/licenses/
>
> Then we can work on sponsoring you then getting you commit access.
>
> On 3/5/08 9:36 AM, "Chris Chabot" <ch...@xs4all.nl> wrote:
>
> > So far no protests it seems :)
> >
> > Of course I'm not sitting still on this side and have a few bug fixes,
> > reworked some of the proxy code (curl_multi acting up in a funky way),
> > a re-factoring of the gadget / view / spec bit ready, plus implemented
> > a few more of Kevin's suggestions, so i have a next patch ready
> > already, and I'm currently unsure what to do with it, being able to
> > diff against the main branch and submit bug's with patches would be
> > easier, commit access would be easier still and uncomplicate my life a
> > whole lot :)
> >
> > -- Chris
> >
> > On Mar 4, 2008, at 2:20 PM, Cassie wrote:
> >
> >>
> >> Without the copied directory, which you have fixed, I propose we
> >> patch this.
> >> Anybody not in favor of patching?
> >
>
>


-- 
~Kevin

Re: [jira] Commented: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Cassie <do...@apache.org>.
Okay, let's submit it. I would do it right this second but I am heading home
and don't want to chance screwing everything up. (In Zurich right now) If
none of the US based committers gets to it today I will do it tomorrow
morning.

- Cassie


On Wed, Mar 5, 2008 at 6:36 PM, Chris Chabot <ch...@xs4all.nl> wrote:

> So far no protests it seems :)
>
> Of course I'm not sitting still on this side and have a few bug fixes,
> reworked some of the proxy code (curl_multi acting up in a funky way),
> a re-factoring of the gadget / view / spec bit ready, plus implemented
> a few more of Kevin's suggestions, so i have a next patch ready
> already, and I'm currently unsure what to do with it, being able to
> diff against the main branch and submit bug's with patches would be
> easier, commit access would be easier still and uncomplicate my life a
> whole lot :)
>
>        -- Chris
>
> On Mar 4, 2008, at 2:20 PM, Cassie wrote:
>
> >
> > Without the copied directory, which you have fixed, I propose we
> > patch this.
> > Anybody not in favor of patching?
>
>

Re: [jira] Commented: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Chris Chabot <ch...@xs4all.nl>.
Hey Guys,

I've just received confirmation that they have received my signed  
ICLA, and have it on file now.

	-- Chris


On Mar 5, 2008, at 9:11 PM, Paul Lindner wrote:

> Hi Chris, I've committed the patch for SHINDIG-103.
>
> We should definitely get you commit access.  To get started
> please fill out the contributor license agreement found here:
>
>  http://www.apache.org/licenses/
>
> Then we can work on sponsoring you then getting you commit access.
>

Re: [jira] Commented: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Chris Chabot <ch...@xs4all.nl>.
Hey Paul,

I'll have it signed and faxed to the apache foundation tomorrow  
morning, being totally digital does have a downside when it comes to  
paperwork :)

I'll file a new bug report with my recent improvements and fixes  
tomorrow too, seems to be the way until the commit access is sorted.

Thanks for the commit! And thanks Kevin for the help with integrating  
the stuff!

	-- Chris

On Mar 5, 2008, at 9:11 PM, Paul Lindner wrote:

> Hi Chris, I've committed the patch for SHINDIG-103.
>
> We should definitely get you commit access.  To get started
> please fill out the contributor license agreement found here:
>
>  http://www.apache.org/licenses/
>
> Then we can work on sponsoring you then getting you commit access.
>
> On 3/5/08 9:36 AM, "Chris Chabot" <ch...@xs4all.nl> wrote:
>
>> So far no protests it seems :)
>>
>> Of course I'm not sitting still on this side and have a few bug  
>> fixes,
>> reworked some of the proxy code (curl_multi acting up in a funky  
>> way),
>> a re-factoring of the gadget / view / spec bit ready, plus  
>> implemented
>> a few more of Kevin's suggestions, so i have a next patch ready
>> already, and I'm currently unsure what to do with it, being able to
>> diff against the main branch and submit bug's with patches would be
>> easier, commit access would be easier still and uncomplicate my  
>> life a
>> whole lot :)
>>
>> -- Chris
>>
>> On Mar 4, 2008, at 2:20 PM, Cassie wrote:
>>
>>>
>>> Without the copied directory, which you have fixed, I propose we
>>> patch this.
>>> Anybody not in favor of patching?
>>


Re: [jira] Commented: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Paul Lindner <pl...@hi5.com>.
Hi Chris, I've committed the patch for SHINDIG-103.

We should definitely get you commit access.  To get started
please fill out the contributor license agreement found here:

  http://www.apache.org/licenses/

Then we can work on sponsoring you then getting you commit access.

On 3/5/08 9:36 AM, "Chris Chabot" <ch...@xs4all.nl> wrote:

> So far no protests it seems :)
> 
> Of course I'm not sitting still on this side and have a few bug fixes,
> reworked some of the proxy code (curl_multi acting up in a funky way),
> a re-factoring of the gadget / view / spec bit ready, plus implemented
> a few more of Kevin's suggestions, so i have a next patch ready
> already, and I'm currently unsure what to do with it, being able to
> diff against the main branch and submit bug's with patches would be
> easier, commit access would be easier still and uncomplicate my life a
> whole lot :)
> 
> -- Chris
> 
> On Mar 4, 2008, at 2:20 PM, Cassie wrote:
> 
>> 
>> Without the copied directory, which you have fixed, I propose we
>> patch this.
>> Anybody not in favor of patching?
> 


Re: [jira] Commented: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Chris Chabot <ch...@xs4all.nl>.
So far no protests it seems :)

Of course I'm not sitting still on this side and have a few bug fixes,  
reworked some of the proxy code (curl_multi acting up in a funky way),  
a re-factoring of the gadget / view / spec bit ready, plus implemented  
a few more of Kevin's suggestions, so i have a next patch ready  
already, and I'm currently unsure what to do with it, being able to  
diff against the main branch and submit bug's with patches would be  
easier, commit access would be easier still and uncomplicate my life a  
whole lot :)

	-- Chris

On Mar 4, 2008, at 2:20 PM, Cassie wrote:

>
> Without the copied directory, which you have fixed, I propose we  
> patch this.
> Anybody not in favor of patching?


Re: [jira] Commented: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Cassie <do...@apache.org>.
On Tue, Mar 4, 2008 at 2:49 PM, Chris Chabot <ch...@xs4all.nl> wrote:

> Hey Cassie
>
> To solve some of the out-of-tree issues with some files like the rpc
> html's and container scripts, i've made the FilesServlet.php class
> which serves <basepath>/files from the <shindig_root>/javascript
> directory. It also has the same /js functionality as the java version,
> so that _should_ make the 2 identical as far as all the features,
> sample containers and demo's go, which should give us the flexibility
> to make everything work with both the java and php versions.
>
> The only other thing, apart from the opensocial-0.7 feature that
> depends on the localhost:8080, are the javascript/container/
> sample?.html files, would be it possible to make the use current
> document host instead of a hard coded localhost:8080 assumption? I
> think that would finish making everything work together as they should


Fantastic!
Something like this definitely seems possible. Would you go ahead and file a
bug for it?


>
>        -- Chris
>
> On Mar 4, 2008, at 2:20 PM, Cassie wrote:
>
> > It will absolutely be configurable. I think if the opensocial-0.7
> > feature is
> > the only thing that is wrong, then don't worry too much.. because it
> > isn't
> > exactly right for the java based server either :)
>
>

Re: [jira] Commented: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Kevin Brown <et...@google.com>.
On Tue, Mar 4, 2008 at 5:49 AM, Chris Chabot <ch...@xs4all.nl> wrote:

> Hey Cassie
>
> To solve some of the out-of-tree issues with some files like the rpc
> html's and container scripts, i've made the FilesServlet.php class
> which serves <basepath>/files from the <shindig_root>/javascript
> directory. It also has the same /js functionality as the java version,
> so that _should_ make the 2 identical as far as all the features,
> sample containers and demo's go, which should give us the flexibility
> to make everything work with both the java and php versions.
>
> The only other thing, apart from the opensocial-0.7 feature that
> depends on the localhost:8080, are the javascript/container/
> sample?.html files, would be it possible to make the use current
> document host instead of a hard coded localhost:8080 assumption? I
> think that would finish making everything work together as they should


This is just text, not reality. In reality they use ../../. I think Paul
already removed the lines referencing localhost:8080.


>
>
>        -- Chris
>
> On Mar 4, 2008, at 2:20 PM, Cassie wrote:
>
> > It will absolutely be configurable. I think if the opensocial-0.7
> > feature is
> > the only thing that is wrong, then don't worry too much.. because it
> > isn't
> > exactly right for the java based server either :)
>
>


-- 
~Kevin

Re: [jira] Commented: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Chris Chabot <ch...@xs4all.nl>.
Hey Cassie

To solve some of the out-of-tree issues with some files like the rpc  
html's and container scripts, i've made the FilesServlet.php class  
which serves <basepath>/files from the <shindig_root>/javascript  
directory. It also has the same /js functionality as the java version,  
so that _should_ make the 2 identical as far as all the features,  
sample containers and demo's go, which should give us the flexibility  
to make everything work with both the java and php versions.

The only other thing, apart from the opensocial-0.7 feature that  
depends on the localhost:8080, are the javascript/container/ 
sample?.html files, would be it possible to make the use current  
document host instead of a hard coded localhost:8080 assumption? I  
think that would finish making everything work together as they should

	-- Chris

On Mar 4, 2008, at 2:20 PM, Cassie wrote:

> It will absolutely be configurable. I think if the opensocial-0.7  
> feature is
> the only thing that is wrong, then don't worry too much.. because it  
> isn't
> exactly right for the java based server either :)


Re: [jira] Commented: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Cassie <do...@apache.org>.
It will absolutely be configurable. I think if the opensocial-0.7 feature is
the only thing that is wrong, then don't worry too much.. because it isn't
exactly right for the java based server either :)

Without the copied directory, which you have fixed, I propose we patch this.
Anybody not in favor of patching?

- Cassie



On Mon, Mar 3, 2008 at 8:53 PM, Kevin Brown <et...@google.com> wrote:

> On Mon, Mar 3, 2008 at 11:32 AM, Chris Chabot (JIRA) <ji...@apache.org>
> wrote:
>
> > One example of how the 'features' tree completely depends on the Java
> > shindig version is the URL's in the features (localhost:8080), which
> won't
> > work with the php version.
>
>
> The only reference to localhost:8080 I can find is in Cassie's new
> opensocial-0.7 implementation. grep -r 'localhost:8080' trunk/ shows this
> to
> be the case today.
>
> Also it completely depends on the features that have been commited to the
> > java version, such as the new opensocial-0.7 feature includes
> > communication with the http://localhost:8080/gadgets/socialdata servlet
>
>
> The opensocial feature should be configurable. I'm sure it will be by the
> time the opensocial-0.7 feature is ready for production use. It would be
> trivial to add a syndicator config block for this feature to address this.
>

Re: [jira] Commented: (SHINDIG-103) New PHP Shindig gadget server code

Posted by Kevin Brown <et...@google.com>.
On Mon, Mar 3, 2008 at 11:32 AM, Chris Chabot (JIRA) <ji...@apache.org>
wrote:

> One example of how the 'features' tree completely depends on the Java
> shindig version is the URL's in the features (localhost:8080), which won't
> work with the php version.


The only reference to localhost:8080 I can find is in Cassie's new
opensocial-0.7 implementation. grep -r 'localhost:8080' trunk/ shows this to
be the case today.

Also it completely depends on the features that have been commited to the
> java version, such as the new opensocial-0.7 feature includes
> communication with the http://localhost:8080/gadgets/socialdata servlet


The opensocial feature should be configurable. I'm sure it will be by the
time the opensocial-0.7 feature is ready for production use. It would be
trivial to add a syndicator config block for this feature to address this.

[jira] Commented: (SHINDIG-103) New PHP Shindig gadget server code

Posted by "Chris Chabot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574656#action_12574656 ] 

Chris Chabot commented on SHINDIG-103:
--------------------------------------

Hey Kevin, 

First of all, thanks for taking the time to dive into this!

I'll fix up the copied-features issue and some other little things and re-submit a patch. That doesn't mean other things wont be picked up and in fact there's bound to be a few small bugs hiding in it too, but since a good few people wanted to see this included sooner rather then later, i won't block submitting it on having everything completely done. If we get it good enough for initial inclusion other people can start looking at it and maybe contribute where possible too.

Here's my reactions to the individual points:

- Don't copy the features / javascript directories.

Main reason why i went with this initially was because i saw a lot of changes going on there (syndication, escaping of fields etc), and i didn't have the time to track completely what this meant for the porting effort, so i copied the branch to have a known-to-work base to work on. I'll rectify the situation and re-submit a patch.

- In general, documentation is lacking. 
- I wouldn't go out of my way to emulate Java too much in PHP

W.I.P. (work in progress), i also felt that some re-factoring would be a good thing to do next, however as a few people suggested on the mailing list, it's better to submit a patch now and get the ball rolling then to wait for it to be completely Done(Tm). 

Since when i began this i had no idea how the java server worked, i just jumped in somewhere in the middle and trusted in the fact that by reading the java base line per line a bigger picture of what it did exactly would appear; Fortunately that worked, so i'm in a lot better position now to start making bigger changes to it; (Zen mode) To deviate from the way you must first know the way right? :)

Documentation is in the same line something i wanted to leave until i would have a much clearer picture of what was what, else it would've become a byte filler and not something sensible

- define() is horribly slow for no good reason in PHP
- include_once is also horribly slow for no good reason

Actually to my best knowledge the performance impact of include_once was fixed somewhere in the php 5.1 era, however i do realize as i'm writing this, that some people might still be stuck there, so i'll fix it up for that case.

- You don't need null checks when you're already doing empty() tests. empty() will always return true for null values. 
- equals methods are generally unnecessary in PHP

I went a bit overboard on some literal code porting, i'll fix that up in the re-factoring too.

- Have you considered using __autoload 

I truly love the new magic functions in php 5, however i've found in the past that the performance of __autoload is completely horrific, i'll see how it behaves now with php 5.2, if it improved any it is a good option, otherwise if its still as bad as it was, i'd rather not :)

- Your use of a single main entry point is definitely the right way to go. One huge benefit that this has (aside from obvious architectural ones) is that you could actually just include all classes at the top level. 

I'll probably put those in the 'servlets' (gadget, js, proxy) since not everything requires the same libs, but its a good idea indeed to prevent the include_once penalty for older installations.

- SimpleXML allows you to access attributes as $element['foo'].

I'll check it out and see if i can't spare some code there.

- You can replace Substitutions::substituteType with the following: 

Great idea

- You can get the unmodified request headers in PHP using getallheaders 

Haven't made my mind up yet about being apache dependent or not; The fun thing about php is that is is a extremely diverse landscape, however i do think it's probably unlikely (from my opinionated perspective) that someone would run PHP on a windows box to host a gadget server, so maybe some apache dependencies is ok to do ..






> New PHP Shindig gadget server code
> ----------------------------------
>
>                 Key: SHINDIG-103
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-103
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Gadgets Server - PHP
>            Reporter: Chris Chabot
>            Assignee: Brian McCallister
>         Attachments: php-shindig.patch
>
>
> This patch completely replaces the old code in the php directory of the shindig project, and replaces it with a port of the java shindig code.
> The java code used is from a checkout from February the 14th, this because keeping track of the changes while porting and testing would have gotten in the way of completing the first release in a timely fashion.
> It implements the structure and workings from the java server and includes:
> - Gadget server
> - Proxy service
> - JS service
> The maIn differences from the Java branch are:
> - Different caching engine (abstracted base class, sample file implementation included)
> - Different gadget rendering work flow (no multithreading in PHP)
> - No enum's or name spaced classes in php, so their top level classes now
> - Locale class to emulate the Java's Locale class
> - Somewhat servlet like event handling to stay close to the Java's structure
> Missing is the RPC feature, some custom speedups to get it closer to the Java's speed (it's about 40% slower right now, but that gap might be fixed later on), and a better logging / error reporting structure, it now only has a basic DEBUG flag in the config, which if set, causes it to dump debug backtrace's on errors.
> It's also missing Caja support, since that is Java only at the moment. Maybe somewhere in the future we'll have a command line version available that we can use.
> It also contains a copy of the features directory structure (so that it doesn't break on updates from the Java side of things, changes will have to be implemented before you can copy over the new version) and a copy of the sample container (minus the Caja options), so that people can test it directly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-103) New PHP Shindig gadget server code

Posted by "Chris Chabot (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Chabot updated SHINDIG-103:
---------------------------------

    Attachment: php-shindig_v2.patch

Version 2 of the new php code, diffed against the shindig root since it also changes the config/syndicator.js file, so apply with:

# cd shindig
# patch -p1 < [path_to_patch]/php-shindig_v2.patch

Changes from the previous patch:

- Uses the global features directory (it assumes it's location in ../../features

- Made a quick FilesServlet that serves files from ../../javascript, so that /files/<filename> works correctly, and thus http://shindig/gadgets/files/samplecontainer/samplecontainer.html actually works, and is served from the shindig root, this was mainly born from the issue that the default syndicator.js config refers to files/container/rpc.js, and we really do want an out-of-the-box working experiance here. (A better solution would be a mod_alias Alias of course, i'll add a note later that it's really for demo proposes only)

- replaced config defines by a config array (propper class comming later, no measurable performance differences though), and added settings for features, syndicator.js and javascript locations.

- added basic work-around-support for syndicator.js configuration, will be expanded into a proper implementation later 

- Removed all the include_once references and implemented the __autoload super function for now (no measurable performance impact under Zend Platform (formally known as Zend Cache) so i guess it's good enough for now

- Added the Apache license to the files under src/http that were still missing it

Other issues will still be resolved, but this completely integrates the php version into the main tree, including using all it's resources directly instead of having local copies.



> New PHP Shindig gadget server code
> ----------------------------------
>
>                 Key: SHINDIG-103
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-103
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Gadgets Server - PHP
>            Reporter: Chris Chabot
>            Assignee: Brian McCallister
>         Attachments: php-shindig.patch, php-shindig_v2.patch
>
>
> This patch completely replaces the old code in the php directory of the shindig project, and replaces it with a port of the java shindig code.
> The java code used is from a checkout from February the 14th, this because keeping track of the changes while porting and testing would have gotten in the way of completing the first release in a timely fashion.
> It implements the structure and workings from the java server and includes:
> - Gadget server
> - Proxy service
> - JS service
> The maIn differences from the Java branch are:
> - Different caching engine (abstracted base class, sample file implementation included)
> - Different gadget rendering work flow (no multithreading in PHP)
> - No enum's or name spaced classes in php, so their top level classes now
> - Locale class to emulate the Java's Locale class
> - Somewhat servlet like event handling to stay close to the Java's structure
> Missing is the RPC feature, some custom speedups to get it closer to the Java's speed (it's about 40% slower right now, but that gap might be fixed later on), and a better logging / error reporting structure, it now only has a basic DEBUG flag in the config, which if set, causes it to dump debug backtrace's on errors.
> It's also missing Caja support, since that is Java only at the moment. Maybe somewhere in the future we'll have a command line version available that we can use.
> It also contains a copy of the features directory structure (so that it doesn't break on updates from the Java side of things, changes will have to be implemented before you can copy over the new version) and a copy of the sample container (minus the Caja options), so that people can test it directly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-103) New PHP Shindig gadget server code

Posted by "Chris Chabot (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Chabot updated SHINDIG-103:
---------------------------------

    Attachment: php-shindig.patch

A massive 1.1 mb patch file. Apply with:

# cd shindig/php
# patch -p1 < /path/to/file/php-shindig.patch

> New PHP Shindig gadget server code
> ----------------------------------
>
>                 Key: SHINDIG-103
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-103
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Gadgets Server - PHP
>            Reporter: Chris Chabot
>            Assignee: Brian McCallister
>         Attachments: php-shindig.patch
>
>
> This patch completely replaces the old code in the php directory of the shindig project, and replaces it with a port of the java shindig code.
> The java code used is from a checkout from February the 14th, this because keeping track of the changes while porting and testing would have gotten in the way of completing the first release in a timely fashion.
> It implements the structure and workings from the java server and includes:
> - Gadget server
> - Proxy service
> - JS service
> The maIn differences from the Java branch are:
> - Different caching engine (abstracted base class, sample file implementation included)
> - Different gadget rendering work flow (no multithreading in PHP)
> - No enum's or name spaced classes in php, so their top level classes now
> - Locale class to emulate the Java's Locale class
> - Somewhat servlet like event handling to stay close to the Java's structure
> Missing is the RPC feature, some custom speedups to get it closer to the Java's speed (it's about 40% slower right now, but that gap might be fixed later on), and a better logging / error reporting structure, it now only has a basic DEBUG flag in the config, which if set, causes it to dump debug backtrace's on errors.
> It's also missing Caja support, since that is Java only at the moment. Maybe somewhere in the future we'll have a command line version available that we can use.
> It also contains a copy of the features directory structure (so that it doesn't break on updates from the Java side of things, changes will have to be implemented before you can copy over the new version) and a copy of the sample container (minus the Caja options), so that people can test it directly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-103) New PHP Shindig gadget server code

Posted by "Chris Chabot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574695#action_12574695 ] 

Chris Chabot commented on SHINDIG-103:
--------------------------------------

One example of how the 'features' tree completely depends on the Java shindig version is the URL's in the features (localhost:8080), which won't work with the php version.

Also it completely depends on the features that have been commited to the java version, such as the new opensocial-0.7 feature includes communication with the http://localhost:8080/gadgets/socialdata servlet

In other words, as it stands currently, using the 'default' features tree will most likely break the out-of-the-box experience for the php version, and will have to include a rather sizely README file to explain all the changes one has to make to use the features.

Now I'm not suggesting we should slow down development on any part, far from it, but i hope you can also understand my dilemma and why i choose initially to copy it

> New PHP Shindig gadget server code
> ----------------------------------
>
>                 Key: SHINDIG-103
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-103
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Gadgets Server - PHP
>            Reporter: Chris Chabot
>            Assignee: Brian McCallister
>         Attachments: php-shindig.patch
>
>
> This patch completely replaces the old code in the php directory of the shindig project, and replaces it with a port of the java shindig code.
> The java code used is from a checkout from February the 14th, this because keeping track of the changes while porting and testing would have gotten in the way of completing the first release in a timely fashion.
> It implements the structure and workings from the java server and includes:
> - Gadget server
> - Proxy service
> - JS service
> The maIn differences from the Java branch are:
> - Different caching engine (abstracted base class, sample file implementation included)
> - Different gadget rendering work flow (no multithreading in PHP)
> - No enum's or name spaced classes in php, so their top level classes now
> - Locale class to emulate the Java's Locale class
> - Somewhat servlet like event handling to stay close to the Java's structure
> Missing is the RPC feature, some custom speedups to get it closer to the Java's speed (it's about 40% slower right now, but that gap might be fixed later on), and a better logging / error reporting structure, it now only has a basic DEBUG flag in the config, which if set, causes it to dump debug backtrace's on errors.
> It's also missing Caja support, since that is Java only at the moment. Maybe somewhere in the future we'll have a command line version available that we can use.
> It also contains a copy of the features directory structure (so that it doesn't break on updates from the Java side of things, changes will have to be implemented before you can copy over the new version) and a copy of the sample container (minus the Caja options), so that people can test it directly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SHINDIG-103) New PHP Shindig gadget server code

Posted by "Paul Lindner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Lindner resolved SHINDIG-103.
----------------------------------

    Resolution: Fixed

Patch applied..

Committed revision 633998.

> New PHP Shindig gadget server code
> ----------------------------------
>
>                 Key: SHINDIG-103
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-103
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Gadgets Server - PHP
>            Reporter: Chris Chabot
>            Assignee: Brian McCallister
>         Attachments: php-shindig.patch, php-shindig_v2.patch
>
>
> This patch completely replaces the old code in the php directory of the shindig project, and replaces it with a port of the java shindig code.
> The java code used is from a checkout from February the 14th, this because keeping track of the changes while porting and testing would have gotten in the way of completing the first release in a timely fashion.
> It implements the structure and workings from the java server and includes:
> - Gadget server
> - Proxy service
> - JS service
> The maIn differences from the Java branch are:
> - Different caching engine (abstracted base class, sample file implementation included)
> - Different gadget rendering work flow (no multithreading in PHP)
> - No enum's or name spaced classes in php, so their top level classes now
> - Locale class to emulate the Java's Locale class
> - Somewhat servlet like event handling to stay close to the Java's structure
> Missing is the RPC feature, some custom speedups to get it closer to the Java's speed (it's about 40% slower right now, but that gap might be fixed later on), and a better logging / error reporting structure, it now only has a basic DEBUG flag in the config, which if set, causes it to dump debug backtrace's on errors.
> It's also missing Caja support, since that is Java only at the moment. Maybe somewhere in the future we'll have a command line version available that we can use.
> It also contains a copy of the features directory structure (so that it doesn't break on updates from the Java side of things, changes will have to be implemented before you can copy over the new version) and a copy of the sample container (minus the Caja options), so that people can test it directly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-103) New PHP Shindig gadget server code

Posted by "Kevin Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574302#action_12574302 ] 

Kevin Brown commented on SHINDIG-103:
-------------------------------------

Hi Chris,

So far this looks pretty good. Looking at the GadgetSpecParser implementation reminded me of all the things I actually love about PHP, and looking at the stuff you had to do to deal with the lack of namespacing reminded me of the things I hate :) 

Does anyone know if there's a condensed patch format that would make this patch easier to look at? Specifically, I want something that will make all of the file removal lines not include every single line from the original file. The patch would probably be about half as big if it weren't for that.

I've got a few comments. 

- Don't copy the features / javascript directories. This will make maintenance and compatibility between the php and java implementations very difficult. For all intents and purposes, features/ should be considered a separate project, and anything implemented in features/ should be language-neutral. This is the only change that I'd consider a requirement for submitting this patch -- everything else is just suggestion.

- In general, documentation is lacking. I'm not sure I would have been able to figure out what was going on here if I weren't already very familiar with the Java side of things. This is a common failing in many parts of the Java code as well, but I'm working to rectify that very soon. Did you have plans to add this later?

- I wouldn't go out of my way to emulate Java too much in PHP. The programming paradigms are so fundamentally different that what makes good sense in Java is frequently a bad idea in PHP, and vice versa. Beyond that, the current Java code isn't really ideal from an architectural standpoint anyway, and significant refactoring is coming down the pipeline relatively soon. Specifically, I'd avoid emulating GadgetSpec/ GadgetView / Gadget -- they're just plain badly implemented, and we don't have an excuse for that other than time constraints. Additionally, our XML parsers are confined by Java's horrible XML handling capabilities, whereas PHP has the brilliant SimpleXML extension. Do what makes sense in PHP rather than trying to maintain a class for class port. We have all kinds of specifications and standards to ensure compatibility :) I wouldn't go rewriting anything now, of course, but don't feel obligated to try to work the same way as the Java code -- focus on complying with the spec and everything else will follow.

Some additional suggestions (feel free to use or ignore these as you like -- the way I see it, whoever writes the code dictates design choices):

- define() is horribly slow for no good reason in PHP, and it prevents many optimizations from happening when apc or zend cache are enabled -- you can probably get some significant performance improvements by replacing your current configuration mechanism with a single array, and then just include this file in your scripts that need configuration (even better -- wrap it in a configuration class).

- include_once is also horribly slow for no good reason (noticing a theme here?) when using APC. If you can avoid it, try just using include -- and don't use the parens.  include is a language construct, not a function call.

- You don't need null checks when you're already doing empty() tests. empty() will always return true for null values.

- equals methods are generally unnecessary in PHP, since the default == operator does a value comparison anyway, and it's recursive. The one caveat would be if you have infinite recursion in your references. See http://www.php.net/manual/en/language.oop5.object-comparison.php

- Have you considered using __autoload to ensure that dependencies are pulled in exactly once? There's a small performance hit for using it, but it makes maintenance quite a bit easier. 

- Your use of a single main entry point is definitely the right way to go. One huge benefit that this has (aside from obvious architectural ones) is that you could actually just include all classes at the top level. This allows for huge performance gains when APC or other opcode caches are used.

- SimpleXML allows you to access attributes as $element['foo'], so you don't have to call $element->attributes['foo']. This might simplify some of your logic in the spec parser.

- You can replace Substitutions::substituteType with the following: 
   return str_replace(array_keys($this->substitutions[type]), array_values($this->substitutions[$type])); 
byte-by-byte parsing of the body makes sense in Java, but it yields poor performance in PHP. You'd want to store the keys as __<TYPE>_<key>__ to make this work, of course.

- You can get the unmodified request headers in PHP using getallheaders whenever you're running inside of apache. I suppose there are people using PHP without apache, but I think other assumptions you make require it. You could also probably just make requests to the "open" proxy use mod_proxy as well.

> New PHP Shindig gadget server code
> ----------------------------------
>
>                 Key: SHINDIG-103
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-103
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Gadgets Server - PHP
>            Reporter: Chris Chabot
>            Assignee: Brian McCallister
>         Attachments: php-shindig.patch
>
>
> This patch completely replaces the old code in the php directory of the shindig project, and replaces it with a port of the java shindig code.
> The java code used is from a checkout from February the 14th, this because keeping track of the changes while porting and testing would have gotten in the way of completing the first release in a timely fashion.
> It implements the structure and workings from the java server and includes:
> - Gadget server
> - Proxy service
> - JS service
> The maIn differences from the Java branch are:
> - Different caching engine (abstracted base class, sample file implementation included)
> - Different gadget rendering work flow (no multithreading in PHP)
> - No enum's or name spaced classes in php, so their top level classes now
> - Locale class to emulate the Java's Locale class
> - Somewhat servlet like event handling to stay close to the Java's structure
> Missing is the RPC feature, some custom speedups to get it closer to the Java's speed (it's about 40% slower right now, but that gap might be fixed later on), and a better logging / error reporting structure, it now only has a basic DEBUG flag in the config, which if set, causes it to dump debug backtrace's on errors.
> It's also missing Caja support, since that is Java only at the moment. Maybe somewhere in the future we'll have a command line version available that we can use.
> It also contains a copy of the features directory structure (so that it doesn't break on updates from the Java side of things, changes will have to be implemented before you can copy over the new version) and a copy of the sample container (minus the Caja options), so that people can test it directly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.