List Info

Thread: Suggest we cache the SDO model somehow




Re: Suggest we cache the SDO model somehow
country flaguser name
United Kingdom
2007-06-05 07:20:24
Graham Charters wrote:

> I mentioned the proxies as one of the two areas where
we need to keep
> the interface clean (the other was SDO).  I mentioned
SDO because the
> "cache" appears to be on the SDO interface in
Matthew's example code
> (unless I've misunderstood).

No, you haven't misunderstood, I just haven't quite grasped
why adding a 
  property to the extension would be a problem (actually I
think it 
would for various reasons have to be an object rather than a
pure array 
as originally proposed to Matthew - sorry for misleading you
- but 
that's irrelevant to this question). It doesn't affect the 
SDO_DataObject interface.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "phpsoa" group.
To post to this group, send email to phpsoagooglegroups.com
To unsubscribe from this group, send email to
phpsoa-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Suggest we cache the SDO model somehow
country flaguser name
United States
2007-06-05 07:51:31
Ah, I think I have misunderstood, and it's the subtle (at
least to my
brain) distinction between SDO and SDO_DataObject.  What do
you mean
by "adding a property to the extension"?  I'm not
aware of an
interface we expose called "SDO" so jumped to the
conclusion that this
was the SDO_DataObject.  Why would this not be on the
SDO_DAS_XML?

On 5 Jun, 13:20, Caroline Maynard <c...php.net> wrote:
> Graham Charters wrote:
> > I mentioned the proxies as one of the two areas
where we need to keep
> > the interface clean (the other was SDO).  I
mentioned SDO because the
> > "cache" appears to be on the SDO
interface in Matthew's example code
> > (unless I've misunderstood).
>
> No, you haven't misunderstood, I just haven't quite
grasped why adding a
>   property to the extension would be a problem
(actually I think it
> would for various reasons have to be an object rather
than a pure array
> as originally proposed to Matthew - sorry for
misleading you - but
> that's irrelevant to this question). It doesn't affect
the
> SDO_DataObject interface.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "phpsoa" group.
To post to this group, send email to phpsoagooglegroups.com
To unsubscribe from this group, send email to
phpsoa-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Suggest we cache the SDO model somehow
country flaguser name
United Kingdom
2007-06-05 07:55:44
Matthew, one more thing I'd like to add to this discussion,
which struck 
me as I was listening to Brian Shire's excellent
presentation at php|tek 
(http://tekr
at.com/wp/talks/phptek2007/apcfacebook.pdf). There are 
already several caching solutions for php, in particular
APC, also 
memcache and some proprietary ones, including Zend's. APC is
mature and 
very configurable. So IMHO when SCA needs to cache some
data, it should 
be checking to see if something suitable is installed, and
exploiting 
it, not inventing something unnecessarily.

I realise this won't help directly with the problem here,
because the 
model must be cached within the SDO extension rather than in
SCA, 
because of the Tuscany dependency, but I just wanted to
record this in 
case it's useful in the future.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "phpsoa" group.
To post to this group, send email to phpsoagooglegroups.com
To unsubscribe from this group, send email to
phpsoa-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Suggest we cache the SDO model somehow
country flaguser name
United Kingdom
2007-06-05 08:23:42
Graham Charters wrote:
> Ah, I think I have misunderstood, and it's the subtle
(at least to my
> brain) distinction between SDO and SDO_DataObject. 
What do you mean
> by "adding a property to the extension"?  I'm
not aware of an
> interface we expose called "SDO" so jumped to
the conclusion that this
> was the SDO_DataObject.  Why would this not be on the
SDO_DAS_XML?

Actually I agree, I think it would be better for the cache
to be a 
static property of the SDO_DAS_XML class rather than an
extension 
global. Still doesn't affect the SDO_DataObject interface,
though.

So, if you do :
   php --rc SDO_DAS_XML

it would appear in that currently empty array :
   - Static properties [0] { }


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "phpsoa" group.
To post to this group, send email to phpsoagooglegroups.com
To unsubscribe from this group, send email to
phpsoa-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Suggest we cache the SDO model somehow
country flaguser name
United Kingdom
2007-06-05 08:51:43
Bad form to reply to my own post, but just after I sent it I
saw this 
thread in the internals mailing list: 
ht
tp://thread.gmane.org/gmane.comp.php.devel/43094

so we shouldn't use APC to cache SCA objects without giving
some thought 
to how they get serialized. That's probably not too
surprising.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "phpsoa" group.
To post to this group, send email to phpsoagooglegroups.com
To unsubscribe from this group, send email to
phpsoa-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Suggest we cache the SDO model somehow
country flaguser name
United States
2007-06-07 10:18:04
I wonder what happened to the post I just sent....

... forget the words I said last time, since Caroline said
it had to
be an object not an array I proposed the following
interface:

$key = // calculate this in some way based on the xsd or
xsds to be
used.
if (SDO::cache->containsKey($key)) {
  $das = SDO::cache->get($key);
} else {
  $das = SDO_DAS_XML::create(<path to the xsd>);
  SDO::cache->put($das, $key);
}



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "phpsoa" group.
To post to this group, send email to phpsoagooglegroups.com
To unsubscribe from this group, send email to
phpsoa-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-10] [11-20] [21-26]

about | contact  Other archives ( Real Estate discussion Medical topics )