agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feed[Pljava-dev] Best way to pass intermediate state
4+ messages / 0 participants
[nested] [flat]
* [Pljava-dev] Best way to pass intermediate state
@ 2006-09-15 14:42
2006-09-21 13:51 ` [Pljava-dev] Best way to pass intermediate state
0 siblings, 1 reply; 4+ messages in thread
From: @ 2006-09-15 14:42 UTC (permalink / raw)
Hi,
I'm currently thinking about implementing Aggregates in pljava. What's
the best way to pass a complex intermediate state between the different
iterations and the finalizing functions?
I'd like to avoid repeated de/re-serialization of the objects into an
official PostgreSQL data type due to efficiency reasons.
Thanks,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20060915/ee69ee7b/attachment.bin;
^ permalink raw reply [nested|flat] 4+ messages in thread
* [Pljava-dev] Best way to pass intermediate state
2006-09-15 14:42 [Pljava-dev] Best way to pass intermediate state
@ 2006-09-21 13:51 `
2006-09-22 08:22 ` [Pljava-dev] Best way to pass intermediate state
0 siblings, 1 reply; 4+ messages in thread
From: @ 2006-09-21 13:51 UTC (permalink / raw)
Hi, all,
Markus Schaber wrote:
> I'm currently thinking about implementing Aggregates in pljava. What's
> the best way to pass a complex intermediate state between the different
> iterations and the finalizing functions?
>
> I'd like to avoid repeated de/re-serialization of the objects into an
> official PostgreSQL data type due to efficiency reasons.
As no ideas were offered here, I'm currently thinking about saving the
intermediate states in some kind of global hashed variable.
For the cleanup work, in case the query is aborted in the middle (and so
the finishing function is never called), is there any way I can register
a hook that gets called on commit / rollback of the current
(sub)transaction?
Thanks,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20060921/da7263d7/attachment.bin;
^ permalink raw reply [nested|flat] 4+ messages in thread
* [Pljava-dev] Best way to pass intermediate state
2006-09-15 14:42 [Pljava-dev] Best way to pass intermediate state
2006-09-21 13:51 ` [Pljava-dev] Best way to pass intermediate state
@ 2006-09-22 08:22 `
2006-09-22 09:18 ` [Pljava-dev] Best way to pass intermediate state
0 siblings, 1 reply; 4+ messages in thread
From: @ 2006-09-22 08:22 UTC (permalink / raw)
Take a look at whats offered by the
org.postgresql.pljava.SessionManager. It has a static method that
returns a Session object. This object can store arbitrary objects as
attributes. The difference between the Session and a normal Map, is that
the stuff stored in the Session is under transaction control. A rollback
disregards changes made since last commit. The Session object will also
allow you to add listeners for transactions and savepoints.
Kind Regards,
Thomas Hallgren
Markus Schaber wrote:
> Hi, all,
>
> Markus Schaber wrote:
>
>
>> I'm currently thinking about implementing Aggregates in pljava. What's
>> the best way to pass a complex intermediate state between the different
>> iterations and the finalizing functions?
>>
>> I'd like to avoid repeated de/re-serialization of the objects into an
>> official PostgreSQL data type due to efficiency reasons.
>>
>
> As no ideas were offered here, I'm currently thinking about saving the
> intermediate states in some kind of global hashed variable.
>
> For the cleanup work, in case the query is aborted in the middle (and so
> the finishing function is never called), is there any way I can register
> a hook that gets called on commit / rollback of the current
> (sub)transaction?
>
> Thanks,
> Markus
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at gborg.postgresql.org
> http://gborg.postgresql.org/mailman/listinfo/pljava-dev
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* [Pljava-dev] Best way to pass intermediate state
2006-09-15 14:42 [Pljava-dev] Best way to pass intermediate state
2006-09-21 13:51 ` [Pljava-dev] Best way to pass intermediate state
2006-09-22 08:22 ` [Pljava-dev] Best way to pass intermediate state
@ 2006-09-22 09:18 `
0 siblings, 0 replies; 4+ messages in thread
From: @ 2006-09-22 09:18 UTC (permalink / raw)
Hi, Thomas,
Thomas Hallgren wrote:
> Take a look at whats offered by the
> org.postgresql.pljava.SessionManager. It has a static method that
> returns a Session object. This object can store arbitrary objects as
> attributes. The difference between the Session and a normal Map, is that
> the stuff stored in the Session is under transaction control. A rollback
> disregards changes made since last commit. The Session object will also
> allow you to add listeners for transactions and savepoints.
Thanks, that's exactly what I was looking for.
Regards,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20060922/c358af41/attachment.bin;
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2006-09-22 09:18 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-09-15 14:42 [Pljava-dev] Best way to pass intermediate state
2006-09-21 13:51 `
2006-09-22 08:22 `
2006-09-22 09:18 `
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox