Commit Graph

1081 Commits

Author SHA1 Message Date
Martin Sustrik
9d96e0037a Clean-up of the code related to attaching/detaching engines to sessions.
Session base class now handles the engine events exclusively. It notifies
derived session types using dedicated "attached" and "detached" events.

Couple of bugs was fixed along the way.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-13 10:09:46 +02:00
Martin Sustrik
5ae878b891 Merge branch 'maint'
* maint:
  Add support for RHEL6 in the spec file
2010-10-13 08:01:13 +02:00
Sebastian Otaegui
2568947a71 Add support for RHEL6 in the spec file
Signed-off-by: Sebastian Otaegui <feniix@gmail.com>
2010-10-13 07:59:50 +02:00
Martin Sustrik
954d7f743d Avoid duplicate creation of pipes for a single session
When a session is being closed down its inbound and outbound
pipe pointers are set to null. If (re) connection happens at
that time, session may try to reinistantiate the pipes which
is wrong. This patch allows session to attach pipes only once
in its lifetime.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-12 17:55:09 +02:00
Steven McCoy
c6d74e0a03 Drop PGM parameters to 100mb friendly range.
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
2010-10-12 12:26:21 +02:00
Steven McCoy
5b8af52efc Fix assertion in PGM transports on cancel_timer
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
2010-10-11 17:59:58 +02:00
Martin Sustrik
e168173162 Merge branch 'maint'
* maint:
  configure.in: Do not patch libtool rpath handling
  Fixing the Red Hat packaging
2010-10-11 16:42:10 +02:00
Martin Lucina
57428db898 configure.in: Do not patch libtool rpath handling
For historic reasons (mainly compatbility with really old libtool), configure was
patching libtool to not use rpath in binaries. This breaks (among other things)
correct operation of "make check" since the test binaries may not be run with
the correct shared library version.

Current best practice as seen e.g. at http://wiki.debian.org/RpathIssue suggests
that this is no longer an issue, so I'm removing the code that patches libtool.

Signed-off-by: Martin Lucina <mato@kotelna.sk>
2010-10-11 16:39:48 +02:00
Martin Sustrik
6cd0867f02 Fixing the Red Hat packaging
When adding ZMQ_VERSION macros, I incorrectly removed
the PACKAGE_VERSION macro. Adding it back.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-11 16:32:27 +02:00
Martin Sustrik
f22e85f19f Reverting commit 1d431190f5
The patch was supposed to check that pipe writer sends messages
in atomic fashion. However, it prevented the user to read
half of a message and close the socket.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-11 12:23:18 +02:00
Martin Sustrik
73e7ef37c2 When XREP silently drops message, it does not empty it -- fixed
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-10 09:23:37 +02:00
Christian Gudrian
f5030a93a5 Execute the timers before pollset initialisation.
Since executing the timers might modify the source pollsets we have
to defer the initialisation until after the timers have executed.

Signed-off-by: Christian Gudrian <christian.gudrian@fluidon.com>
2010-10-09 19:19:50 +02:00
Martin Sustrik
318cdd1f24 Merge branch 'maint'
* maint:
  Version macros added

Conflicts:
	builds/msvc/platform.hpp

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-09 08:03:58 +02:00
Martin Sustrik
ef8db789a1 Version macros added
Macro ZMQ_VERSION represents the current version of 0MQ
Macro ZMQ_MAKE_VERSION(major,minor,patch) allows to create
a representation of the specified version.
The versions can be compared using simple <, >, ==, etc.
operators.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-09 07:53:24 +02:00
Martin Lucina
214b56077a Fix missing platform.hpp in zmq_connecter.cpp
Missed testing on Win32

Signed-off-by: Martin Lucina <mato@kotelna.sk>
2010-10-08 22:06:41 +02:00
Martin Sustrik
daf5d3273b More cleanup of session termination process.
Fix in termination of session attached to a REP socket.
Several fixes of session termination in case of disconnection.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-08 21:42:55 +02:00
Martin Lucina
f90c8d957e Scalability improvements for large amounts of connections
Add signaler_sndbuf_size option to config.hpp which allows the user to
increase the size of the send buffer used by the signalling socketpair.

Implement random backoff for reconnection attempts using a primitive
pseudo-random generation to prevent reconnection storms.

Add wait_before_connect option to config.hpp to allow the user to enable
random delay even on initial connect. Default is false for low latency.

Signed-off-by: Martin Lucina <mato@kotelna.sk>
2010-10-08 17:49:40 +02:00
Martin Sustrik
7a685b0f88 Clean-up of session termination process
Specifically, shutdown of child objects is initiated *before* termination
handshake with socket object.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-08 17:23:21 +02:00
Martin Lucina
965fb7755b configure.in: OpenPGM no longer requires pkg-config 2010-10-04 16:22:30 +02:00
Steven McCoy
d62d721f1a configure.in: Add amd64 to OpenPGM supported platforms 2010-10-04 16:14:57 +02:00
Nir Soffer
1d431190f5 make sure that reader does not terminate in the middle of a multipart message 2010-10-02 10:01:18 +02:00
Martin Sustrik
2142b8918a issue 92 -- Assertion failed: inpipe && outpipe (pair.cpp:86) -- fixed 2010-10-01 18:46:32 +02:00
Martin Sustrik
1a6cd59e8b stress test for shutdown process added 2010-10-01 16:03:08 +02:00
Martin Sustrik
2a85cce189 Merge branch 'master' of github.com:zeromq/zeromq2 2010-10-01 13:37:59 +02:00
Martin Sustrik
0bb76b667b assert when xrep socket gets reconnected in the middle of the shutdown -- fixed 2010-10-01 13:37:46 +02:00
Martin Lucina
8f9080ebb9 zmq_poll(): Fix busy-loop if timeout is zero
Fix a case where zmq_poll() (poll-based version) could go off into a busy-loop
if no revents are returned and the timeout passed in is zero.
2010-09-30 15:30:24 +02:00
Martin Sustrik
ac9b05c36b Merge branch 'maint'
* maint:
  zmq_msg_move called on uninitialised message in xrep_t::xrecv -- fixed
2010-09-30 15:12:06 +02:00
Max Wolf
79aea5ffa6 zmq_msg_move called on uninitialised message in xrep_t::xrecv -- fixed 2010-09-30 15:10:47 +02:00
Martin Sustrik
98fa2fa802 fix in XREP's fair queueing mechanism 2010-09-30 14:03:54 +02:00
Martin Sustrik
7881ba1bcd minor whitespace fix 2010-09-30 11:35:14 +02:00
Steven McCoy
eaa925eca7 FreeBSD doesn't define MSG_ERRQUEUE -- now it's defined in 0MQ 2010-09-30 11:33:35 +02:00
Ilja Golshtein
ec2e85919e C++ binding destructors don't throw exceptions 2010-09-30 09:11:51 +02:00
Steven McCoy
d14be62499 more fixes to (e)pgm transport 2010-09-30 09:11:51 +02:00
Steven McCoy
96d85b2098 * Add assertions to check for OpenPGM calls with invalid parameters.
* Assertion to check that pgm_getaddrinfo is actually returning something.
 * Missing pgm_connect call.
 * Typo on TOS causing immediate abort.
 * Placeholder calls for timeouts whilst continuing spin loop functionality.
 * OpenPGM v5 now supports reference counting so remove init checks.
 * Duplicate UDP unicast port setting, requires one unicast and one multicast.
 * Incorrectly set socket rcvbuf size with sndbuf.
 * Replace std::lexicographical_compare of TSI's with long word integer comparisons.
 * pgm_socket_t::receive returns -1 on no data.
2010-09-30 09:11:19 +02:00
Steven McCoy
00cd7d49c7 Upgrade to OpenPGM-5.0.78 2010-09-28 16:35:29 +02:00
Martin Sustrik
10bb9d0405 Dhammika Pathirana was missing from the AUTOHRS file for some reason -- fixed 2010-09-28 15:32:12 +02:00
Gonzalo Diethelm
87beaaa00d ZMQ_TYPE socket option added 2010-09-28 15:27:45 +02:00
Martin Sustrik
6715f9b185 Merge branch 'maint'
* maint:
  crash when closing an ypipe -- fixed
2010-09-28 07:51:59 +02:00
Dhammika Pathirana
c1deb226f4 crash when closing an ypipe -- fixed 2010-09-28 07:46:17 +02:00
Martin Sustrik
f61921d096 REQ socket can die when reply is delivered on wrong unerlying connection -- fixed 2010-09-28 07:39:16 +02:00
Martin Sustrik
16c3884a61 MSVC build fixed 2010-09-27 11:18:21 +02:00
Martin Sustrik
e2f834d294 ZMQ_FD and ZMQ_EVENTS documentation added 2010-09-27 09:53:30 +02:00
Martin Sustrik
30c1cba4e4 latency optimisation for the case where there are no timers 2010-09-27 09:34:00 +02:00
Martin Sustrik
238640a526 timers properly implemented 2010-09-26 21:42:23 +02:00
Martin Sustrik
8d7bf6684c common base for all pollers created; the only thing it handles at the moment is 'load' 2010-09-26 19:22:33 +02:00
Martin Sustrik
cf815e8c78 new interfaces for timers; the implementation is not changed yet 2010-09-26 18:30:03 +02:00
Martin Sustrik
be79a9fbc2 minor beautifications 2010-09-26 18:01:59 +02:00
Martin Sustrik
5dae27d0ed clock_t class added 2010-09-26 16:55:54 +02:00
Martin Sustrik
7d5061798c Merge branch 'maint'
* maint:
  if TSC jumps backwards (in case of migration to a different CPU core) latency peak may occur -- fixed

Conflicts:
	src/app_thread.cpp
2010-09-26 13:36:05 +02:00
Martin Sustrik
9129b79248 if TSC jumps backwards (in case of migration to a different CPU core) latency peak may occur -- fixed 2010-09-26 13:30:33 +02:00