Re: [zeromq-dev] Android support in 2.1 master

2011-08-11 Thread Martin Sustrik
IIRC, configure should produce an error saying: such and such platform
not supported. Take the platform name as reported and create a new
section in configure.in, check the sections for other platforms and do
something similar. One of the commands there IIRC is to define
appropriate ZMQ_HAVE_* macro.

Martin

On 10/8/2011, Pieter Hintjens p...@imatix.com wrote:

Hi all,

I've committed a full build environment for Android, extending the
work done by Ghislain Putois on http://www.zeromq.org/distro:android.
These changes were done by Bill Roberts.

The Android build patches are on 2.1 master now, I'll port them to 2.2
and 3.0 as well.

There are a few code patches to handle functions that Android doesn't
support. Mikko, I've no idea how to get a ZMQ_HAVE_ANDROID macro
defined, so it's using __ANDROID__ for now.

-Pieter
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] choosing the right 0MQ pattern

2011-08-11 Thread jimy
Hi all
I am newbie and looking for the right 0mq pattern that suits my use case

Case (C# / Windows)
9 clients (Alpha) each client per machine(windows)
3 serveurs (VWapServer)-Windows
1 market data feed serveur (FeedServer) provided by Fidessa

each VWapServer is connected to Feedserver via OpenAccess connection)
an alpha client could talk to any VWapServer.

here is the flow.
1- a client sends to VWapSer an order(pricelimit, trade, trading period)
2- the VWapServer forwards this order to the Fesedserver.
3- during the trading period, as soon as a matching trade occurs in the 
market,it is sent to the VWapServer.
4- the VWapServer calculates the price and volume and sends the result to the 
Client.

NB: 
a)- the VWapServer will not wait for the end period to send the result to the 
client, but everytime Fidessa sends a matching trades
b)- the client can send 10.000 orders a day
c)- an API provided by Fidessa will be used between VWapServer and FeddServer

Constrainst: this is a realtime application and information received too late 
is useless for trader.
what I am looking for is the right OMQ pattern to choose.

Best regard.

___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Android support in 2.1 master

2011-08-11 Thread Pieter Hintjens
On Thu, Aug 11, 2011 at 10:05 AM, Martin Sustrik sust...@250bpm.com wrote:

 IIRC, configure should produce an error saying: such and such platform
 not supported. Take the platform name as reported and create a new
 section in configure.in, check the sections for other platforms and do
 something similar. One of the commands there IIRC is to define
 appropriate ZMQ_HAVE_* macro.

Thanks. There's no native building on Android, only cross-compilation.
I'd tried adding a section in configure.in, but I've no idea how to
get configure to use it. --build and --host don't do it.

-Pieter
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Android support in 2.1 master

2011-08-11 Thread Mikko Koppanen
On Thu, Aug 11, 2011 at 4:28 PM, Pieter Hintjens p...@imatix.com wrote:
 Thanks. There's no native building on Android, only cross-compilation.
 I'd tried adding a section in configure.in, but I've no idea how to
 get configure to use it. --build and --host don't do it.

Hi,

what do you mean --build and --host won't do it? You should be able to
cross-compile using autotools by setting up android cross-compilation
toolchain and using correct --host.

-- 
Mikko Koppanen
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Android support in 2.1 master

2011-08-11 Thread Pieter Hintjens
On Thu, Aug 11, 2011 at 5:34 PM, Mikko Koppanen
mikko.koppa...@gmail.com wrote:

 what do you mean --build and --host won't do it? You should be able to
 cross-compile using autotools by setting up android cross-compilation
 toolchain and using correct --host.

That's what I assumed, but adding an 'android' target and then using
'--host android' just gives:

checking host system type... Invalid configuration `android': machine
`android' not recognized
configure: error: /bin/bash config/config.sub android failed

This is what I added to configure.in:

+*android*)
+AC_DEFINE(ZMQ_HAVE_ANDROID, 1, [Have Android OS])
+AC_CHECK_LIB(rt, sem_init)
+;;

-Pieter
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Android support in 2.1 master

2011-08-11 Thread Mikko Koppanen
On Thu, Aug 11, 2011 at 4:48 PM, Pieter Hintjens p...@imatix.com wrote:
 On Thu, Aug 11, 2011 at 5:34 PM, Mikko Koppanen
 mikko.koppa...@gmail.com wrote:

 what do you mean --build and --host won't do it? You should be able to
 cross-compile using autotools by setting up android cross-compilation
 toolchain and using correct --host.

 That's what I assumed, but adding an 'android' target and then using
 '--host android' just gives:

 checking host system type... Invalid configuration `android': machine
 `android' not recognized
 configure: error: /bin/bash config/config.sub android failed


Hi,

after running ./autogen.sh try updating config/config.sub and
config/config.guess with

http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
http://git.savannah.gnu.org/cgit/config.git/plain/config.guess

and check for linux-android* in the configure.in.

-- 
Mikko Koppanen
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Delivering private messages to subscribed clients

2011-08-11 Thread Colgate, Gil
I am experiencing an assert waking up from sleep, on windows, which I thought 
was fixed in 2.1.7, which is why I upgraded to it.
But it still occurs. Tracing indicates our code does not deliberately call to 
reattach the pipes, but it occurs somehow in zeromq.

Does anyone know why?

Xrep.cpp
void zmq::xrep_t::xattach_pipes (reader_t *inpipe_, writer_t *outpipe_,
const blob_t peer_identity_)
{
if (outpipe_) {

outpipe_-set_event_sink (this);

//  TODO: What if new connection has same peer identity as the old one?
outpipe_t outpipe = {outpipe_, true};
bool ok = outpipes.insert (outpipes_t::value_type (
peer_identity_, outpipe)).second;
zmq_assert (ok);

if (terminating) {
register_term_acks (1);
outpipe_-terminate ();
}

___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Strange problem with lua-zmq on Windows

2011-08-11 Thread Ross Andrews

 Try the attached C version of those scripts to help narrow down where the
 problem is.  I have only tested the code on Linux, but it should be simple
 to
 compile it on Windows.


I don't have a Windows system handy (sorry, I am at a conference all week)
but I tried reproducing this on a Mac. Here's what I found:

Running zmq 2.1.7 and the Neopallium lua-zmq, on OSX 10.7, it still breaks,
but at least I get an error this time:

Too many open files
rc == 0 (mailbox.cpp:375)
Abort trap: 6

If I remove the outer loop and just run it for 50 sockets, then I get this:

Assertion failed: nbytes == sizeof (command_t) (mailbox.cpp:194)
Abort trap: 6

(but weirdly, it seems to actually work, it just prints that out afterward).

Here's the great part: I get the exact same results running the C version
that Robert Jakabosky posted. That pretty well narrows it down to a ZMQ
issue rather than a lua-zmq issue, and we even have a line number now. Cool!
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev