Enhancement #2196

Enhancement #2195: Implement Spread connection pooling

Spread connection pooling for informers [Java]

Added by J. Wienke about 9 years ago. Updated about 8 years ago.

Status:ResolvedStart date:03/11/2015
Priority:NormalDue date:
Assignee:J. Wienke% Done:

100%

Category:Java
Target version:rsb-0.12

Associated revisions

Revision c1f14b19
Added by J. Wienke about 9 years ago

Extract spread connection options into SpreadOptions

Creates a new class SpreadOptions which contains all options used to
specify the properties of a connection to the spread daemon and uses
this class instead of separate arguments or Properties instances.

This prepares to use the connection properties as keys in maps for later
sharing of connections.

refs #2196

Revision 19367f99
Added by J. Wienke about 9 years ago

Make SpreadWrapper an interface

Makes SpreadWrapper and interface and moves the existing implementation
to SpreadWrapperImpl. This allows to implement facade classes, which is
necessary for the connection pooling.

  • SpreadFactory: Use SpreadWrapperImpl instead of interface for new
    instances
  • SpreadInPushConnector: Pass through some exceptions specified by the
    Activatable interface which previously had been
    explicitly masked by SpreadWrapperImpl
  • SpreadOutConnector: likewise
  • SpreadWrapper: Converted to interface
  • SpreadWrapperImpl: old SpreadWrapper implementation. Also removed some
    unused methods.
  • Utilities: Use SpreadWrapperImpl

refs #2196

Revision 9a5e604d
Added by J. Wienke about 9 years ago

Implement connection pooling for outgoing connections

This commit adds spread connection pooling for outgoing connection by
reusing existing connections inside SpreadFactory. The effective
activation and deactivation of the underlying connection is now
implemented via reference counting of activate and deactivate calls so
that the first user of a connection activates it and the last leaving
user effectively deactivates it.

  • RefCountingSpreadWrapper: new SpreadWrapper facade implementation
    which does the reference counting for
    multiple users of an underlying
    SpreadWrapper instance.
  • SpreadFactory: Cache SpreadWrapper instances based on their
    SpreadOptions to reuse them for outgoing connections
  • SpreadOutConnector: Decouple the activation state from the underlying
    SpreadWrapper instance since the reference
    counting might actually leave a connection open
    after a call to deactivate

refs #2196

Revision 20e3e516
Added by J. Wienke about 9 years ago

Extract spread connection options into SpreadOptions

Creates a new class SpreadOptions which contains all options used to
specify the properties of a connection to the spread daemon and uses
this class instead of separate arguments or Properties instances.

This prepares to use the connection properties as keys in maps for later
sharing of connections.

refs #2196

Revision be6538b0
Added by J. Wienke about 9 years ago

Make SpreadWrapper an interface

Makes SpreadWrapper and interface and moves the existing implementation
to SpreadWrapperImpl. This allows to implement facade classes, which is
necessary for the connection pooling.

  • SpreadFactory: Use SpreadWrapperImpl instead of interface for new
    instances
  • SpreadInPushConnector: Pass through some exceptions specified by the
    Activatable interface which previously had been
    explicitly masked by SpreadWrapperImpl
  • SpreadOutConnector: likewise
  • SpreadWrapper: Converted to interface
  • SpreadWrapperImpl: old SpreadWrapper implementation. Also removed some
    unused methods.
  • Utilities: Use SpreadWrapperImpl

refs #2196

Revision c7737c02
Added by J. Wienke about 9 years ago

Implement connection pooling for outgoing connections

This commit adds spread connection pooling for outgoing connection by
reusing existing connections inside SpreadFactory. The effective
activation and deactivation of the underlying connection is now
implemented via reference counting of activate and deactivate calls so
that the first user of a connection activates it and the last leaving
user effectively deactivates it.

  • RefCountingSpreadWrapper: new SpreadWrapper facade implementation
    which does the reference counting for
    multiple users of an underlying
    SpreadWrapper instance.
  • SpreadFactory: Cache SpreadWrapper instances based on their
    SpreadOptions to reuse them for outgoing connections
  • SpreadOutConnector: Decouple the activation state from the underlying
    SpreadWrapper instance since the reference
    counting might actually leave a connection open
    after a call to deactivate

refs #2196

Revision acb98f27
Added by J. Wienke about 9 years ago

Use the same connection for all SpreadOutConnectors

refs #2196

History

#1 Updated by J. Wienke about 9 years ago

  • % Done changed from 0 to 30

Connection pooling for informers is implemented in this branch now.

#2 Updated by J. Wienke about 9 years ago

  • Subject changed from Implement java spread connection pooling to Implement java spread connection pooling for informers

#3 Updated by J. Wienke about 9 years ago

  • % Done changed from 30 to 90

#4 Updated by J. Wienke about 9 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100

#5 Updated by J. Moringen about 8 years ago

  • Subject changed from Implement java spread connection pooling for informers to Spread connection pooling for informers [Java]

Also available in: Atom PDF