Re: [zeromq-dev] (no subject)

2012-07-17 Thread Eric
I regenerated with http://www.crystax.net/en/android/ndk/7, 
now, arm-linux-androideabi-ld libjzmq.so doesn't return any link problem 
(anymore) with Lib STD : Great!
But still same problem in the android application : loadlibrary works with zmq 
and still fails (unsatisfies link error) with jzmq.
Don't understand!
Best regards.
--- En date de : Mer 18.7.12,
 Eric  a écrit :

De: Eric 
Objet: Re: [zeromq-dev] (no subject)
À: "ZeroMQ development list" , vic...@iso3103.net
Date: Mercredi 18 juillet 2012, 1h31

Thanks,
I replaced assign by clear/append. But it still not works...something make me 
feel that I don't have any STD lib available :making a call 
to arm-linux-androideabi-ld libjzmq.so give me this :
/home/xxx/libjzmq.so: undefined reference to `std::basic_ios >::init(std::basic_streambuf >*)'/home/xxx/libjzmq.so: undefined reference to 
`__gnu_cxx::__exchange_and_add(int volatile*, int)'/home/xxx/libjzmq.so: 
undefined reference to 
`std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'/home/xxx/libjzmq.so: 
undefined reference to `std::basic_string, 
std::allocator
 >::basic_string(std::string const&)'/home/xxx/libjzmq.so: undefined reference 
 >to `std::string::compare(char const*) const'/home/xxx/libjzmq.so: undefined 
 >reference to `std::locale::locale()'/home/xxx/libjzmq.so: undefined reference 
 >to `__aeabi_uldivmod'/home/xxx/libjzmq.so: undefined reference to 
 >`std::string::find(char const*, unsigned int, unsigned int) 
 >const'/home/xxx/libjzmq.so: undefined reference to `std::string::append(char 
 >const*)'/home/xxx/libjzmq.so: undefined reference to 
 >`std::__throw_bad_alloc()'/home/xxx/libjzmq.so: undefined reference to 
 >`std::string::assign(std::string const&)'/home/xxx/libjzmq.so: undefined 
 >reference to `vtable for std::basic_stringstreamstd::char_traits, std::allocator >'/home/xxx/libjzmq.so: 
 >undefined reference to `std::basic_string,
 std::allocator >::~basic_string()'/home/xxx/libjzmq.so: undefined 
reference to `std::basic_stringstream, 
std::allocator >::~basic_stringstream()'/home/xxx/libjzmq.so: undefined 
reference to `std::__throw_length_error(char const*)'/home/xxx/libjzmq.so: 
undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base 
const*)'/home/xxx/libjzmq.so: undefined reference to `VTT for 
std::basic_stringstream, std::allocator 
>'/home/xxx/libjzmq.so: undefined reference to `__gnu_cxx::__atomic_add(int 
volatile*, int)'/home/xxx/libjzmq.so: undefined reference to 
`std::string::_Rep::_S_empty_rep_storage'/home/xxx/libjzmq.so: undefined 
reference to `std::ostream& std::ostream::_M_insert(unsigned 
long)'/home/xxx/libjzmq.so:
 undefined reference to `std::ostream::operator<<(int)'/home/xxx/libjzmq.so: 
undefined reference to `std::ios_base::ios_base()'/home/xxx/libjzmq.so: 
undefined reference to `std::string::_M_leak()'/home/xxx/libjzmq.so: undefined 
reference to `std::basic_ostream >& 
std::__ostream_insert >(std::basic_ostream >&, char const*, int)'/home/xxx/libjzmq.so: undefined 
reference to `std::string::_M_mutate(unsigned int, unsigned int, unsigned 
int)'/home/xxx/libjzmq.so: undefined reference to 
`std::locale::~locale()'/home/xxx/libjzmq.so: undefined reference to 
`std::string::clear()'/home/xxx/libjzmq.so: undefined reference to 
`std::__throw_logic_error(char const*)'/home/xxx/libjzmq.so: undefined 
reference to
 `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, 
std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'/home/xxx/libjzmq.so: 
undefined reference to `std::basic_string, 
std::allocator >::basic_string(char const*, std::allocator 
const&)'/home/xxx/libjzmq.so: undefined reference to 
`std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, 
std::_Rb_tree_node_base&)'/home/xxx/libjzmq.so: undefined reference to 
`std::string::_M_leak_hard()'/home/xxx/libjzmq.so: undefined reference to 
`vtable for __cxxabiv1::__vmi_class_type_info'/home/xxx/libjzmq.so: undefined 
reference to `std::basic_string, 
std::allocator >::basic_string(std::string const&, unsigned int, unsigned 
int)'/home/xxx/libjzmq.so: undefined reference to `vtable for
 std::basic_stringbuf, std::allocator 
>'/home/xxx/libjzmq.so: undefined reference to `vtable for 
std::basic_streambuf >'/home/xxx/libjzmq.so: 
undefined reference to `std::basic_string, 
std::allocator >::basic_string(char const*, unsigned int, 
std::allocator const&)'/home/xxx/libjzmq.so: undefined reference to 
`std::ios_base::~ios_base()'/home/xxx/libjzmq.so: undefined reference to 
`__aeabi_uidivmod'/home/xxx/libjzmq.so: undefined reference to `vtable for 
std::basic_ios >'/home/xxx/libjzmq.so: undefined 
reference to `std::basic_istream 
>::~basic_istream()'/home/xxx/libjzmq.so: undefined reference to
 `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'/home/xxx/libjzmq.so: 
undefined reference to `operator delete(void*, std::nothrow_t 
const&)'/home/xxx/libjzmq.so: undefined reference to 
`std::string::_Rep::_S_create(unsigned int, unsigned int, std::allocator 
const

Re: [zeromq-dev] (no subject)

2012-07-17 Thread Eric
Thanks,
I replaced assign by clear/append. But it still not works...something make me 
feel that I don't have any STD lib available :making a call 
to arm-linux-androideabi-ld libjzmq.so give me this :
/home/xxx/libjzmq.so: undefined reference to `std::basic_ios >::init(std::basic_streambuf >*)'/home/xxx/libjzmq.so: undefined reference to 
`__gnu_cxx::__exchange_and_add(int volatile*, int)'/home/xxx/libjzmq.so: 
undefined reference to 
`std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'/home/xxx/libjzmq.so: 
undefined reference to `std::basic_string, 
std::allocator >::basic_string(std::string const&)'/home/xxx/libjzmq.so: 
undefined reference to `std::string::compare(char const*) 
const'/home/xxx/libjzmq.so: undefined reference to 
`std::locale::locale()'/home/xxx/libjzmq.so: undefined reference to 
`__aeabi_uldivmod'/home/xxx/libjzmq.so: undefined reference to 
`std::string::find(char const*, unsigned int, unsigned int) 
const'/home/xxx/libjzmq.so: undefined reference to `std::string::append(char 
const*)'/home/xxx/libjzmq.so: undefined reference to
 `std::__throw_bad_alloc()'/home/xxx/libjzmq.so: undefined reference to 
`std::string::assign(std::string const&)'/home/xxx/libjzmq.so: undefined 
reference to `vtable for std::basic_stringstream, 
std::allocator >'/home/xxx/libjzmq.so: undefined reference to 
`std::basic_string, std::allocator 
>::~basic_string()'/home/xxx/libjzmq.so: undefined reference to 
`std::basic_stringstream, std::allocator 
>::~basic_stringstream()'/home/xxx/libjzmq.so: undefined reference to 
`std::__throw_length_error(char const*)'/home/xxx/libjzmq.so: undefined 
reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base 
const*)'/home/xxx/libjzmq.so: undefined reference to `VTT for 
std::basic_stringstream, std::allocator 
>'/home/xxx/libjzmq.so: undefined reference to `__gnu_cxx::__atomic_add(int 
volatile*, int)'/home/xxx/libjzmq.so: undefined
 reference to `std::string::_Rep::_S_empty_rep_storage'/home/xxx/libjzmq.so: 
undefined reference to `std::ostream& std::ostream::_M_insert(unsigned long)'/home/xxx/libjzmq.so: undefined reference to 
`std::ostream::operator<<(int)'/home/xxx/libjzmq.so: undefined reference to 
`std::ios_base::ios_base()'/home/xxx/libjzmq.so: undefined reference to 
`std::string::_M_leak()'/home/xxx/libjzmq.so: undefined reference to 
`std::basic_ostream >& std::__ostream_insert >(std::basic_ostream >&, 
char const*, int)'/home/xxx/libjzmq.so: undefined reference to 
`std::string::_M_mutate(unsigned int, unsigned int, unsigned 
int)'/home/xxx/libjzmq.so: undefined reference to 
`std::locale::~locale()'/home/xxx/libjzmq.so: undefined reference to 
`std::string::clear()'/home/xxx/libjzmq.so: undefined reference to 
`std::__throw_logic_error(char const*)'/home/xxx/libjzmq.so: undefined
 reference to `std::_Rb_tree_insert_and_rebalance(bool, 
std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, 
std::_Rb_tree_node_base&)'/home/xxx/libjzmq.so: undefined reference to 
`std::basic_string, std::allocator 
>::basic_string(char const*, std::allocator const&)'/home/xxx/libjzmq.so: 
undefined reference to 
`std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, 
std::_Rb_tree_node_base&)'/home/xxx/libjzmq.so: undefined reference to 
`std::string::_M_leak_hard()'/home/xxx/libjzmq.so: undefined reference to 
`vtable for __cxxabiv1::__vmi_class_type_info'/home/xxx/libjzmq.so: undefined 
reference to `std::basic_string, 
std::allocator >::basic_string(std::string const&, unsigned int, unsigned 
int)'/home/xxx/libjzmq.so: undefined reference to `vtable for 
std::basic_stringbuf, std::allocator 
>'/home/xxx/libjzmq.so: undefined reference to `vtable
 for std::basic_streambuf >'/home/xxx/libjzmq.so: 
undefined reference to `std::basic_string, 
std::allocator >::basic_string(char const*, unsigned int, 
std::allocator const&)'/home/xxx/libjzmq.so: undefined reference to 
`std::ios_base::~ios_base()'/home/xxx/libjzmq.so: undefined reference to 
`__aeabi_uidivmod'/home/xxx/libjzmq.so: undefined reference to `vtable for 
std::basic_ios >'/home/xxx/libjzmq.so: undefined 
reference to `std::basic_istream 
>::~basic_istream()'/home/xxx/libjzmq.so: undefined reference to 
`std::_Rb_tree_increment(std::_Rb_tree_node_base*)'/home/xxx/libjzmq.so: 
undefined reference to `operator delete(void*, std::nothrow_t 
const&)'/home/xxx/libjzmq.so: undefined reference to 
`std::string::_Rep::_S_create(unsigned int, unsigned int, std::allocator 
const&)'/home/xxx/libjzmq.so: undefined reference to
 `std::__throw_out_of_range(char const*)'/home/xxx/libjzmq.so: undefined 
reference to `operator new(unsigned int, std::nothrow_t 
const&)'/home/xxx/libjzmq.so: undefined reference to 
`std::string::_Rep::_M_destroy(std::allocator 
const&)'/home/xxx/libjzmq.so: undefined reference to `std::string::append(char 
const*, unsigned int)'
I'll have a look to what is going on with my configuration.
Best regards.
Eric

--- En date de : Mer 18.7.12, Ron Elliott  a écrit :

De: Ron Elliott 
Objet: Re: [zero

[zeromq-dev] syncpub/syncsub example losing messages (ZMQ 3.2.0-rc1, Solaris 11)

2012-07-17 Thread Alex Keahan
ZMQ 3.2.0-rc1 was built with the latest Sun Studio C/C++ compilers,
with CFLAGS and CXXFLAGS=-fast -library=stlport4.

$ uname -a
SunOS xx 5.11 11.0 i86pc i386 i86pc
$ CC -V
CC: Sun C++ 5.12 SunOS_i386 2011/11/16
$ cc -V
cc: Sun C 5.12 SunOS_i386 2011/11/16


The syncpub/syncsub example from the guide was adapted to 3.2.0 (see
the code below).

The original version of syncsub would simply get stuck in zmq_recv().
 I added extra code to detect sequence gaps and break out of the loop
whenever there's a discrepancy; now all syncsubs print "received N
updates" where N is somewhat random.   Slowing down the producer fixes
the problem.   Zmq reports no errors at any point.

As a side note, whenever there is a sequence gap, the next sequence
number received by syncsub appears to come from the start of the next
send() buffer sent by syncpub (confirmed by 'truss syncpub')

Any suggestions?

Alex Keahan


Run as follows:

$ ./syncpub &
$ ./syncsub A &
$ ./syncsub B &

You should see something similar to this:

$ ./syncpub &
[1] 6611
$ Waiting for subscribers

$ ./syncsub A &
[2] 6612
$ ./syncsub B &
[3] 6613
$ Broadcasting messages
Message mismatch: received 'Msg #1266' expected 'Msg #1001'
A: received 1000 updates
Message mismatch: received 'Msg #1266' expected 'Msg #1001'
B: received 1000 updates

[2]-  Done./syncsub A
[3]+  Done./syncsub B


syncpub.c:

#include 
#include 
#include 
#include 

// Wait for 2 subscribers
#define SUBSCRIBERS_EXPECTED 2

int
main(int argc, char *argv[])
{
  void *context = zmq_ctx_new();
  if (context == 0) {
fprintf(stderr, "Error: zmq_ctx_new failed: %s\n", zmq_strerror(errno));
return 1;
  }
  int rc = zmq_ctx_set(context, ZMQ_IO_THREADS, 1);
  if (rc != 0) {
fprintf(stderr, "Error: zmq_ctx_set failed: %s\n", zmq_strerror(errno));
return 2;
  }

  // Socket to talk to clients
  void *publisher = zmq_socket(context, ZMQ_PUB);
  if (publisher == 0) {
fprintf(stderr, "Error: zmq_socket(ZMQ_PUB) failed: %s\n",
zmq_strerror(errno));
return 4;
  }

  rc = zmq_bind (publisher, "tcp://*:5561");
  if (rc != 0) {
fprintf(stderr, "Error: zmq_bind failed: %s\n", zmq_strerror(errno));
return 5;
  }

  // Socket to receive signals
  void *syncservice = zmq_socket (context, ZMQ_REP);
  if (syncservice == 0) {
fprintf(stderr, "Error: zmq_socket(ZMQ_REP) failed: %s\n",
zmq_strerror(errno));
return 6;
  }

  rc = zmq_bind (syncservice, "tcp://*:5562");
  if (rc != 0) {
fprintf(stderr, "Error: zmq_bind failed: %s\n", zmq_strerror(errno));
return 7;
  }

  // Get synchronization from subscribers
  printf ("Waiting for subscribers\n");
  int subscribers = 0;
  while (subscribers < SUBSCRIBERS_EXPECTED) {
char tmp[24];

// - wait for synchronization request
int size = zmq_recv(syncservice, tmp, sizeof(tmp), 0);
if (size < 0) {
  fprintf(stderr, "Error: zmq_recv failed: %s\n", zmq_strerror(errno));
  return 8;
}

// - send synchronization reply
rc = zmq_send(syncservice, "", 0, 0);
if (rc < 0) {
  fprintf(stderr, "Error: zmq_send failed: %s\n", zmq_strerror(errno));
  return 9;
}

subscribers++;
  }
  // Now broadcast exactly 100,000 updates followed by END
  printf ("Broadcasting messages\n");
  int update_nbr;
  for (update_nbr = 0; update_nbr < 10; update_nbr++) {
char buf[24];
int len;
sprintf(buf, "Msg #%d", update_nbr+1);
len = strlen(buf);

int size = zmq_send(publisher, buf, len, 0);
if (size != len) {
  if (errno == EAGAIN) {
update_nbr--;
continue;
  }
  fprintf(stderr, "Error: zmq_send failed: %s\n", zmq_strerror(errno));
  return 10;
}
  }

  int size = zmq_send(publisher, "END", 3, 0);
  if (size != 3) {
fprintf(stderr, "Error: zmq_send failed: %s\n", zmq_strerror(errno));
return 11;
  }

  sleep(10);

  zmq_close(publisher);
  zmq_close(syncservice);
  zmq_term (context);

  return 0;
}


syncsub.c:


#include 
#include 
#include 
#include 

int
main(int argc, char *argv[])
{
  const char *prefix = (argc > 1 ? argv[1] : "");

  void *context = zmq_ctx_new();
  if (context == 0) {
fprintf(stderr, "Error: zmq_ctx_new failed: %s\n", zmq_strerror(errno));
return 1;
  }
  int rc = zmq_ctx_set(context, ZMQ_IO_THREADS, 1);
  if (rc != 0) {
fprintf(stderr, "Error: zmq_ctx_set failed: %s\n", zmq_strerror(errno));
return 2;
  }

  // First, connect our subscriber socket
  void *subscriber = zmq_socket(context, ZMQ_SUB);
  if (subscriber == 0) {
fprintf(stderr, "Error: zmq_socket(ZMQ_SUB) failed: %s\n",
zmq_strerror(errno));
return 4;
  }

  rc = zmq_connect(subscriber, "tcp://localhost:5561");
  if (rc != 0) {
fprintf(stderr, "Error: zmq_connect failed: %s\n", zmq_strerror(errno));
return 5;
  }

  rc = zmq_setsockopt (subscriber, ZMQ_SUBSCRIBE, "", 0);
  if (rc != 0) {
fprintf(stderr, "Error: zmq_setsockopt failed: %s\n", zmq_strerror(errno));
   

Re: [zeromq-dev] (no subject)

2012-07-17 Thread Ron Elliott
perhaps this is an option: http://www.crystax.net/en/android/ndk/7
On Jul 17, 2012 3:48 PM, "Victor Perron"  wrote:

> Same answer as before. I paste it down there.
>
> *Hi,
>
> In that case it seems that you discovered something serious.
> I took a look at it, and indeed the assign() symbol from std::string class
> seems undefined.
> That would mean, Android does _not_ define such a function in its SDK.
>
> Now, the proper way to get around this is a patch to Zeromq 3.x.* *
> You'll have to fix those lines (my guess):
>
> ./src/ipc_listener.cpp:151:filename.assign(addr_);
> ./src/socket_base.cpp:331:*
> *options.last_endpoint.assign (addr_);
> ./src/socket_base.cpp:480:**options.last_endpoint.assign (addr_);
> ./src/tcp_address.cpp:503:**addr_str.assign (name_, delimiter -
> name_);
> ./src/tcp_address.cpp:504:**mask_str.assign (delimiter + 1);
> ./src/tcp_address.cpp:511:**addr_str.assign (name_);
>
> ... and try to compile again. If there are no other undefined symbols,
> that should work.
> That issue did not exist in ZeroMQ 2.2 though, that one didn't make an
> extensive use of std::string.
>
> Keep me updated, we'll see for a pull request when I'll be less busy ;)* *
>
> Best regards,*
> *
>
> *I'll take a look for an acceptable patch tomorrow, if nobody shows up
> with a better suspect/solution of course !
> On Wed, Jul 18, 2012 at 12:35 AM, Eric  wrote:
>
>> Trying to use jzmq under android.
>> I generated using zmq3.x procedure, having to change config.sub and
>> config.guess files but generation is OK and match the scheme on
>> http://www.zeromq.org/build:android.
>>
>> But I always get unsatisfiedlink error when loading library libjzmq
>> (loadlibrary(jzmq)), whereas i'm able to load libzmq without any problem.
>> I've seen other people asking the same question without answer. Searching
>> for hours over the net, no idea, any help would be appreciated!
>>
>> Best regards.
>> Eric
>>
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>>
>
>
> --
> Victor
>
>
> ___
> 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


Re: [zeromq-dev] (no subject)

2012-07-17 Thread Victor Perron
Same answer as before. I paste it down there.

*Hi,

In that case it seems that you discovered something serious.
I took a look at it, and indeed the assign() symbol from std::string class
seems undefined.
That would mean, Android does _not_ define such a function in its SDK.

Now, the proper way to get around this is a patch to Zeromq 3.x.* *
You'll have to fix those lines (my guess):

./src/ipc_listener.cpp:151:filename.assign(addr_);
./src/socket_base.cpp:331:*
*options.last_endpoint.assign (addr_);
./src/socket_base.cpp:480:**options.last_endpoint.assign (addr_);
./src/tcp_address.cpp:503:**addr_str.assign (name_, delimiter -
name_);
./src/tcp_address.cpp:504:**mask_str.assign (delimiter + 1);
./src/tcp_address.cpp:511:**addr_str.assign (name_);

... and try to compile again. If there are no other undefined symbols, that
should work.
That issue did not exist in ZeroMQ 2.2 though, that one didn't make an
extensive use of std::string.

Keep me updated, we'll see for a pull request when I'll be less busy ;)* *

Best regards,*
*

*I'll take a look for an acceptable patch tomorrow, if nobody shows up with
a better suspect/solution of course !
On Wed, Jul 18, 2012 at 12:35 AM, Eric  wrote:

> Trying to use jzmq under android.
> I generated using zmq3.x procedure, having to change config.sub and
> config.guess files but generation is OK and match the scheme on
> http://www.zeromq.org/build:android.
>
> But I always get unsatisfiedlink error when loading library libjzmq
> (loadlibrary(jzmq)), whereas i'm able to load libzmq without any problem.
> I've seen other people asking the same question without answer. Searching
> for hours over the net, no idea, any help would be appreciated!
>
> Best regards.
> Eric
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>


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


[zeromq-dev] (no subject)

2012-07-17 Thread Eric
Trying to use jzmq under android.I generated using zmq3.x procedure, having to 
change config.sub and config.guess files but generation is OK and match the 
scheme on http://www.zeromq.org/build:android.
But I always get unsatisfiedlink error when loading library libjzmq 
(loadlibrary(jzmq)), whereas i'm able to load libzmq without any problem. I've 
seen other people asking the same question without answer. Searching for hours 
over the net, no idea, any help would be appreciated!
Best regards.Eric___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] what are the best practices to send complex objects?

2012-07-17 Thread Ron Elliott
I'm not the OP however would it be possible for you to explain why you
chose MessagePack over ProtoBufs? I currently use ProtoBufs myself and
don't have any issues with it however I think this would be interesting to
know
On Jul 17, 2012 2:18 PM, "Andrzej Dworak"  wrote:

>  Hi,
> I did some extensive testing of serialization libraries (tested C++ and
> Java implementations) more or less 3 months ago. Two products that I liked
> the most were MessagePack and Google Protocol Buffers. For my case, where I
> need to have self-describing serialization, I've chosen MessagePack. The
> requirements were quite high as this is going to be used by one of a core
> systems at CERN to operate LHC and other accelerators. So far no problems
> with MP, it's a great product, well, the same as ZeroMQ :)
> Cheers,
> Andrzej
>
>
>  --
> *From:* zeromq-dev-boun...@lists.zeromq.org [
> zeromq-dev-boun...@lists.zeromq.org] on behalf of aalok sood [
> aa...@ideadevice.com]
> *Sent:* 17 July 2012 12:01
> *To:* ZeroMQ development list
> *Subject:* Re: [zeromq-dev] what are the best practices to send complex
> objects?
>
>  If you are **really** concerned about performance, I suggest you have
> your own protocol that both sides understand.
> This way you send data as it is, the remote side would know how to
> interpret it.
>
>
>
> On Tue, Jul 17, 2012 at 3:27 PM, Cem Karan  wrote:
>
>> I've been playing with MessagePack (http://msgpack.org/) for
>> serialization and BLOSC (http://blosc.pytables.org/trac) for
>> compression.  They seem to work pretty well together.  How fast is fast?
>>  BLOSC is designed to move data around in memory faster than memcpy() is
>> able to do it, and I haven't had any complaints about how fast MessagePack
>> works (OTOH, I'm I/O bound, so I tend not to hit any limits).
>>
>> Thanks,
>> Cem Karan
>>
>> On Jul 17, 2012, at 3:37 AM, anti_tenzor wrote:
>>
>> > Hello, all,
>> >
>> > I'd like to use ZMQ to send complex objects between applications (using
>> > CLRZMQ c# wrapper). Since it is possible to send byte[] arrays only,
>> > I am forced to implement some serialization-deserialization mechanism.
>> >
>> > But the hole idea is to be as fast as possible! So it looks like this
>> > algo should be:
>> > 1. Extremely fast
>> > 2. Produce very compact byte arrays
>> >
>> > Could you please suggest some best practices or libraries (.net), that
>> > meets these requirements?
>> >
>> > How do you send complex ojects via ZMQ in real-life applications?
>> >
>> > Thank you in advance!
>> >
>> > ___
>> > 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 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


Re: [zeromq-dev] what are the best practices to send complex objects?

2012-07-17 Thread Andrzej Dworak
Hi,
I did some extensive testing of serialization libraries (tested C++ and Java 
implementations) more or less 3 months ago. Two products that I liked the most 
were MessagePack and Google Protocol Buffers. For my case, where I need to have 
self-describing serialization, I've chosen MessagePack. The requirements were 
quite high as this is going to be used by one of a core systems at CERN to 
operate LHC and other accelerators. So far no problems with MP, it's a great 
product, well, the same as ZeroMQ :)
Cheers,
Andrzej



From: zeromq-dev-boun...@lists.zeromq.org [zeromq-dev-boun...@lists.zeromq.org] 
on behalf of aalok sood [aa...@ideadevice.com]
Sent: 17 July 2012 12:01
To: ZeroMQ development list
Subject: Re: [zeromq-dev] what are the best practices to send complex objects?

If you are **really** concerned about performance, I suggest you have your own 
protocol that both sides understand.
This way you send data as it is, the remote side would know how to interpret it.



On Tue, Jul 17, 2012 at 3:27 PM, Cem Karan 
mailto:cfkar...@gmail.com>> wrote:
I've been playing with MessagePack (http://msgpack.org/) for serialization and 
BLOSC (http://blosc.pytables.org/trac) for compression.  They seem to work 
pretty well together.  How fast is fast?  BLOSC is designed to move data around 
in memory faster than memcpy() is able to do it, and I haven't had any 
complaints about how fast MessagePack works (OTOH, I'm I/O bound, so I tend not 
to hit any limits).

Thanks,
Cem Karan

On Jul 17, 2012, at 3:37 AM, anti_tenzor wrote:

> Hello, all,
>
> I'd like to use ZMQ to send complex objects between applications (using
> CLRZMQ c# wrapper). Since it is possible to send byte[] arrays only,
> I am forced to implement some serialization-deserialization mechanism.
>
> But the hole idea is to be as fast as possible! So it looks like this
> algo should be:
> 1. Extremely fast
> 2. Produce very compact byte arrays
>
> Could you please suggest some best practices or libraries (.net), that
> meets these requirements?
>
> How do you send complex ojects via ZMQ in real-life applications?
>
> Thank you in advance!
>
> ___
> 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 mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] OS 10.7 Cannot Build with --with-pgm

2012-07-17 Thread Steven McCoy
On 17 July 2012 02:22, Ron Elliott  wrote:

> Using the downloaded stable version 2.2 code I cannot get ZMQ to compile
> with the --with-pgm option. The project is too far along to make the switch
> to v3 so that's not an option atm. Any other solutions or is ZMQ dead for
> me?
>
>
It's a known issue, I have to upgrade my Mac mini from 10.6 to 10.7 to
verify fixing the issue upstream in OpenPGM.

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


[zeromq-dev] OS 10.7 Cannot Build with --with-pgm

2012-07-17 Thread Ron Elliott
Using the downloaded stable version 2.2 code I cannot get ZMQ to compile with 
the --with-pgm option. The project is too far along to make the switch to v3 so 
that's not an option atm. Any other solutions or is ZMQ dead for me?

Error:

Making all in build-staging/openpgm/pgm
...
In file included from ./include/impl/sockaddr.h:38,
 from ./include/impl/notify.h:46,
 from ./include/impl/framework.h:66,
 from thread.c:23:
./include/pgm/in.h:34: error: redefinition of ‘struct group_req’
./include/pgm/in.h:40: error: redefinition of ‘struct group_source_req’
make[2]: *** [libpgm_noinst_la-thread.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

Thanks in advance to anybody that may be able to provide me with some help!
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] ZeroMQ Hello World Perl Example Start Up

2012-07-17 Thread Marko Trajkov
Thanks you. Now is working fine. I didn't understand you at first time.

Kind regards,
Trajkov Marko

On Tue, Jul 17, 2012 at 3:18 PM, Daisuke Maki  wrote:

> Here's a working example using ZMQ::LibZMQ2
>
> https://gist.github.com/3129346
>
> Maybe I wasn't explicit enough, but ZeroMQ.pm is done for. I'm no
> longer going to maintain it. please use ZMQ::LibZMQ2 or ZMQ::LibZMQ3
>
> --d
>
> 2012/7/17 Marko Trajkov :
> > Hi,
> >
> > thanks for replays, I really appreciate it, but I still didn't have
> success
> > in making it working. Server binds on tcp://192.168.109.255:5560 (my
> local
> > address) and client connect to same address, bat they don't communicate.
> > When they try to receive data (recv()->data;) both becomes blocked.
> > In the example, client sends "Hello" but when I use tcpdump to monitor
> all
> > traffic, I don't see that anything was sent.
> >
> > By the way, is it possible to use UDP sockets in ZeroMQ, I don't see that
> > something like this is possible in the guide, only (inproc, ipc, tcp,
> pgm,
> > epgm).
> >
> > Kind Regards,
> >
> > Marko Trajkov
> >
> >
> > On Mon, Jul 16, 2012 at 9:38 AM, Marko Trajkov 
> > wrote:
> >> Hello,
> >>
> >> I am having trouble in running simple Hello World example in Perl. I
> >> installed ZeroMQ and perl module, but when I start perl scripts, they
> are
> >> running without errors but client and server does not exchange messages
> >> (do
> >> not receive messages and does not sends it) everything else is working
> >> without errors. This are example which I am trying to run.
> >>
> >> https://github.com/imatix/zguide/blob/master/examples/Perl/rrclient.pl
> >> https://github.com/imatix/zguide/blob/master/examples/Perl/rrserver.pl
> >>
> >> When client sends "Hello" tcpdump doesn't catch it, so I can conclude
> that
> >> package was not sent. When I manually send package using sendip, server
> >> doesn't received it.
> >>
> >> Please tell me if there is something that I was missing, where I am
> wrong.
> >> I
> >> don't know how to make it working. By the way, I am using zeroMq 2.2,
> >> ubuntu
> >> linux 12.04 and Perl 5.14.2
> >>
> >> Second question: Is there UDP protocol for zeroMQ sockets?
> >>
> >> Kind Regards,
> >>
> >> Marko Trajkov
> >>
> >> __
> > _
> >> 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 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


Re: [zeromq-dev] Socket use from several threads

2012-07-17 Thread Chuck Remes
On Jul 17, 2012, at 9:14 AM, moteus wrote:

> Chuck Remes  chuckremes.com> writes:
> 
>> You should create only ONE context. The context can be passed to each thread;
> any socket you create in a
>> thread should only be used from that thread.
>> 
>> I recommend that you read the guide and the FAQ. These ideas are discussed in
> both places.
>> 
>> cr
>> 
> 
> I don't like to create a socket only for one request.
> (connect=>send/recv=>close)
> But as I understood there is no other way.
> About context - sorry for a silly question :)

Oh, so the threads are short-lived then. In that case, you should create a pool 
of them and have each thread "check out" the socket from the pool when it needs 
to use it and check it back in again when the thread exits. If the pool is 
protected by a mechanism (like a mutex) that employs a full memory barrier, 
then it will be safe.

cr

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


Re: [zeromq-dev] Socket use from several threads

2012-07-17 Thread moteus
Chuck Remes  chuckremes.com> writes:

> You should create only ONE context. The context can be passed to each thread;
any socket you create in a
> thread should only be used from that thread.
> 
> I recommend that you read the guide and the FAQ. These ideas are discussed in
both places.
> 
> cr
> 

I don't like to create a socket only for one request.
(connect=>send/recv=>close)
But as I understood there is no other way.
About context - sorry for a silly question :)





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


Re: [zeromq-dev] ZeroMQ Hello World Perl Example Start Up

2012-07-17 Thread Daisuke Maki
Here's a working example using ZMQ::LibZMQ2

https://gist.github.com/3129346

Maybe I wasn't explicit enough, but ZeroMQ.pm is done for. I'm no
longer going to maintain it. please use ZMQ::LibZMQ2 or ZMQ::LibZMQ3

--d

2012/7/17 Marko Trajkov :
> Hi,
>
> thanks for replays, I really appreciate it, but I still didn't have success
> in making it working. Server binds on tcp://192.168.109.255:5560 (my local
> address) and client connect to same address, bat they don't communicate.
> When they try to receive data (recv()->data;) both becomes blocked.
> In the example, client sends "Hello" but when I use tcpdump to monitor all
> traffic, I don't see that anything was sent.
>
> By the way, is it possible to use UDP sockets in ZeroMQ, I don't see that
> something like this is possible in the guide, only (inproc, ipc, tcp, pgm,
> epgm).
>
> Kind Regards,
>
> Marko Trajkov
>
>
> On Mon, Jul 16, 2012 at 9:38 AM, Marko Trajkov 
> wrote:
>> Hello,
>>
>> I am having trouble in running simple Hello World example in Perl. I
>> installed ZeroMQ and perl module, but when I start perl scripts, they are
>> running without errors but client and server does not exchange messages
>> (do
>> not receive messages and does not sends it) everything else is working
>> without errors. This are example which I am trying to run.
>>
>> https://github.com/imatix/zguide/blob/master/examples/Perl/rrclient.pl
>> https://github.com/imatix/zguide/blob/master/examples/Perl/rrserver.pl
>>
>> When client sends "Hello" tcpdump doesn't catch it, so I can conclude that
>> package was not sent. When I manually send package using sendip, server
>> doesn't received it.
>>
>> Please tell me if there is something that I was missing, where I am wrong.
>> I
>> don't know how to make it working. By the way, I am using zeroMq 2.2,
>> ubuntu
>> linux 12.04 and Perl 5.14.2
>>
>> Second question: Is there UDP protocol for zeroMQ sockets?
>>
>> Kind Regards,
>>
>> Marko Trajkov
>>
>> __
> _
>> 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 mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Socket use from several threads

2012-07-17 Thread Chuck Remes
On Jul 17, 2012, at 6:27 AM, moteus wrote:

> Hi.
> 
> I have some service. 
> Service creates new thread for each request and call function from .dll to
> proceed this request.
> I write only .dll and can not change service.
> What best method to use REQ/REP sockets over inproc and tcp.
> If I understood correctly i have to create new context (tcp) and socket for 
> each
> new thread? Or i can create some pool of sockets and use them at the same time
> only from one thread?

You should create only ONE context. The context can be passed to each thread; 
any socket you create in a thread should only be used from that thread.

I recommend that you read the guide and the FAQ. These ideas are discussed in 
both places.

cr

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


Re: [zeromq-dev] ZeroMQ Hello World Perl Example Start Up

2012-07-17 Thread Marko Trajkov
Hi,

thanks for replays, I really appreciate it, but I still didn't have success
in making it working. Server binds on tcp://192.168.109.255:5560 (my local
address) and client connect to same address, bat they don't communicate.
When they try to receive data (recv()->data;) both becomes blocked.
In the example, client sends "Hello" but when I use tcpdump to monitor all
traffic, I don't see that anything was sent.

By the way, is it possible to use UDP sockets in ZeroMQ, I don't see that
something like this is possible in the guide, only (inproc, ipc, tcp, pgm,
epgm).

Kind Regards,

Marko Trajkov

On Mon, Jul 16, 2012 at 9:38 AM, Marko Trajkov 
wrote:
> Hello,
>
> I am having trouble in running simple Hello World example in Perl. I
> installed ZeroMQ and perl module, but when I start perl scripts, they are
> running without errors but client and server does not exchange messages
(do
> not receive messages and does not sends it) everything else is working
> without errors. This are example which I am trying to run.
>
> https://github.com/imatix/zguide/blob/master/examples/Perl/rrclient.pl
> https://github.com/imatix/zguide/blob/master/examples/Perl/rrserver.pl
>
> When client sends "Hello" tcpdump doesn't catch it, so I can conclude that
> package was not sent. When I manually send package using sendip, server
> doesn't received it.
>
> Please tell me if there is something that I was missing, where I am
wrong. I
> don't know how to make it working. By the way, I am using zeroMq 2.2,
ubuntu
> linux 12.04 and Perl 5.14.2
>
> Second question: Is there UDP protocol for zeroMQ sockets?
>
> Kind Regards,
>
> Marko Trajkov
>
> __
_
> 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] Socket use from several threads

2012-07-17 Thread moteus
Hi.

I have some service. 
Service creates new thread for each request and call function from .dll to
proceed this request.
I write only .dll and can not change service.
What best method to use REQ/REP sockets over inproc and tcp.
If I understood correctly i have to create new context (tcp) and socket for each
new thread? Or i can create some pool of sockets and use them at the same time
only from one thread?

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


[zeromq-dev] help Handling Multiple Sockets

2012-07-17 Thread Kira
Hi,

I try to write a program to handle multiple sockets.

1.
typedef std::vector tPollItemList;
tPollItemList m_oPollItemList;

2. add one entry to m_oPollItemList.
3. call  zmq_poll (&m_oPollItemList[0], m_oPollItemList.size(), -1);

I found revents is always zero i.e.
tItr->revents & ZMQ_POLLIN is always false.

Does anyone know the cause?

Regards,
Kira___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] what are the best practices to send complex objects?

2012-07-17 Thread aalok sood
If you are **really** concerned about performance, I suggest you have your
own protocol that both sides understand.
This way you send data as it is, the remote side would know how to
interpret it.



On Tue, Jul 17, 2012 at 3:27 PM, Cem Karan  wrote:

> I've been playing with MessagePack (http://msgpack.org/) for
> serialization and BLOSC (http://blosc.pytables.org/trac) for compression.
>  They seem to work pretty well together.  How fast is fast?  BLOSC is
> designed to move data around in memory faster than memcpy() is able to do
> it, and I haven't had any complaints about how fast MessagePack works
> (OTOH, I'm I/O bound, so I tend not to hit any limits).
>
> Thanks,
> Cem Karan
>
> On Jul 17, 2012, at 3:37 AM, anti_tenzor wrote:
>
> > Hello, all,
> >
> > I'd like to use ZMQ to send complex objects between applications (using
> > CLRZMQ c# wrapper). Since it is possible to send byte[] arrays only,
> > I am forced to implement some serialization-deserialization mechanism.
> >
> > But the hole idea is to be as fast as possible! So it looks like this
> > algo should be:
> > 1. Extremely fast
> > 2. Produce very compact byte arrays
> >
> > Could you please suggest some best practices or libraries (.net), that
> > meets these requirements?
> >
> > How do you send complex ojects via ZMQ in real-life applications?
> >
> > Thank you in advance!
> >
> > ___
> > 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 mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] what are the best practices to send complex objects?

2012-07-17 Thread Cem Karan
I've been playing with MessagePack (http://msgpack.org/) for serialization and 
BLOSC (http://blosc.pytables.org/trac) for compression.  They seem to work 
pretty well together.  How fast is fast?  BLOSC is designed to move data around 
in memory faster than memcpy() is able to do it, and I haven't had any 
complaints about how fast MessagePack works (OTOH, I'm I/O bound, so I tend not 
to hit any limits).

Thanks,
Cem Karan

On Jul 17, 2012, at 3:37 AM, anti_tenzor wrote:

> Hello, all,
> 
> I'd like to use ZMQ to send complex objects between applications (using 
> CLRZMQ c# wrapper). Since it is possible to send byte[] arrays only,
> I am forced to implement some serialization-deserialization mechanism.
> 
> But the hole idea is to be as fast as possible! So it looks like this 
> algo should be:
> 1. Extremely fast
> 2. Produce very compact byte arrays
> 
> Could you please suggest some best practices or libraries (.net), that 
> meets these requirements?
> 
> How do you send complex ojects via ZMQ in real-life applications?
> 
> Thank you in advance!
> 
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev



smime.p7s
Description: S/MIME cryptographic signature
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] ZeroMQ Hello World Perl Example Start Up

2012-07-17 Thread Daisuke Maki
Hi,

FYI I have gone on to restructure the Perl bindings like so:

   https://github.com/lestrrat/p5-ZMQ/
   # they are also available on CPAN

basically, I moved out the version specific stuff out to ZMQ::LibZMQ2
and ZMQ::LibZMQ3 so that I don't have to put #ifdef s all over the
place.

porting from ZeroMQ to ZMQ::LibZMQ* should be pretty straight forward.
Please let me know if you have problems at
https://github.com/lestrrat/p5-ZMQ/issues

--d

2012/7/17 Marko Trajkov :
> Hello,
>
> I am having trouble in running simple Hello World example in Perl. I
> installed ZeroMQ and perl module, but when I start perl scripts, they are
> running without errors but client and server does not exchange messages (do
> not receive messages and does not sends it) everything else is working
> without errors. This are example which I am trying to run.
>
> https://github.com/imatix/zguide/blob/master/examples/Perl/rrclient.pl
> https://github.com/imatix/zguide/blob/master/examples/Perl/rrserver.pl
>
> When client sends "Hello" tcpdump doesn't catch it, so I can conclude that
> package was not sent. When I manually send package using sendip, server
> doesn't received it.
>
> Please tell me if there is something that I was missing, where I am wrong. I
> don't know how to make it working. By the way, I am using zeroMq 2.2, ubuntu
> linux 12.04 and Perl 5.14.2
>
> Second question: Is there UDP protocol for zeroMQ sockets?
>
> Kind Regards,
>
> Marko Trajkov
>
> ___
> 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


Re: [zeromq-dev] zeromq-dev Digest, Vol 55, Issue 14

2012-07-17 Thread Victor Perron
Hi,

In that case it seems that you discovered something serious.
I took a look at it, and indeed the assign() symbol from std::string class
seems undefined.
That would mean, Android does _not_ define such a function in its SDK.

Now, the proper way to get around this is a patch to Zeromq 3.x.
You'll have to fix those lines (my guess):

./src/ipc_listener.cpp:151:filename.assign(addr_);
./src/socket_base.cpp:331:options.last_endpoint.assign (addr_);
./src/socket_base.cpp:480:options.last_endpoint.assign (addr_);
./src/tcp_address.cpp:503:addr_str.assign (name_, delimiter -
name_);
./src/tcp_address.cpp:504:mask_str.assign (delimiter + 1);
./src/tcp_address.cpp:511:addr_str.assign (name_);

... and try to compile again. If there are no other undefined symbols, that
should work.
That issue did not exist in ZeroMQ 2.2 though, that one didn't make an
extensive use of std::string.

Keep me updated, we'll see for a pull request when I'll be less busy ;)

Best regards,

On Tue, Jul 17, 2012 at 10:09 AM, Sharon Ben-Asher  wrote:

> Hi Victor,
>
> I did follow the instructions in the Build Android wiki.
> I don't know what you mean by "you shouldn't even have generated two
> binaries in the first place " - I have the *exact* directory tree that is
> described in that page for ZeroMQ 3.x.
> The listed directory tree shows two shared object files: libzmq and
> libjzmq.
> The instructions stop after production of zmq.jar, there are no
> instructions on how to embed the product into an APK, which .so files to
> put there, etc.
> I tried to put only libjzmq.so in the apk (under libs/armeabi) with the
> same error.
> I even enlisted our expert APK developer, he tried several configurations
> and file placements, with no avail.
>
> I would like to know which steps you think I did not follow, or otherwise
> what am I missing (no sarcasm intended, I really am at a loss here)
>
> Thanks,
>
> Sharon.
>
>
> -Original Message-
> From: Victor Perron 
> Subject: Re: [zeromq-dev] ZeroMQ for Android: Problem in building the
> Android APK
> To: ZeroMQ development list 
> Message-ID:
>  bz_eqtlm-qf...@mail.gmail.com>
> Content-Type: text/plain; charset="windows-1252"
>
> Hello,
>
> Did you properly follow the directions stated at
> http://www.zeromq.org/build:android ?
> According to those, you shouldn't even have generated two binaries in the
> first place.
> Renaming libzmq.so.3.0.0 into libzmq.so has also almost no chance to work
> the way you want it to work; it does not fix the actual soname which is
> hardcoded to "libzmq.so.3.0.0" in both libs at link time.
>
> I'd advise you to follow the steps at that url, and report any further
> issue you'd have !
>
> Best regards,
>
> On Sun, Jul 15, 2012 at 2:38 PM, Sharon Ben-Asher
> wrote:
>
> >  Hello,
> >
> > ** **
> >
> > I managed to compile the ZeroMQ + Java binding shared objects for
> > ARM.
> >
> > Thias is what file gives me on the two so files 
> >
> > libzmq.so.3.0.0: ELF 32-bit LSB shared object, ARM, version 1 (SYSV),
> > dynamically linked, not stripped
> >
> > libjzmq.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV),
> > dynamically linked, not stripped
> >
> > and of course, I also have zmq.jar
> >
> > now I created a new Android project in Eclipse.
> >
> > Following advice on the net:
> >
> > **?**I placed the two so files udner libs/armeabi (renamed
> > libzmq.so.3.0.0 into libzmq.so)
> >
> > **?**I placed the jar file under libs, and added to the build
> path
> > 
> >
> > **?**Took the tripping sample and called it from main
> activity
> >
> > **?**Compile was successful. However, debugging the apk on a
> > mobile device, I get the following error during System.loadLibrary in
> > the ctor of ZMQ file name:
> > /data/data/com.avgmobilation.zeromq/lib/libjzmq.so
> > Cannot load library: reloc_library[1289]:   157 cannot locate
> > '_ZNSs6assignEPKcj'...
> > and later on this gets translated into an UnsatisfiedLinkError
> >
> > ** **
> >
> > Even tried to build the apk on the linux machine where the so was
> > compiled ? same error.
> >
> > Any help is appreciated?
> >
> > ** **
> >
> > Thanks,
> >
> > ** **
> >
> > Sharon
> >
> > ___
> > zeromq-dev mailing list
> > zeromq-dev@lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> >
> >
>
>
> --
> Victor
> -- next part --
> An HTML attachment was scrubbed...
> URL:
> http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120716/7f00e9dd/attachment-0001.htm
>
> --
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
> End of zeromq-dev Digest, Vol 55, Issue 14
> **
> __

Re: [zeromq-dev] zeromq-dev Digest, Vol 55, Issue 14

2012-07-17 Thread Sharon Ben-Asher
Hi Victor,

I did follow the instructions in the Build Android wiki.
I don't know what you mean by "you shouldn't even have generated two binaries 
in the first place " - I have the *exact* directory tree that is described in 
that page for ZeroMQ 3.x. 
The listed directory tree shows two shared object files: libzmq and libjzmq.
The instructions stop after production of zmq.jar, there are no instructions on 
how to embed the product into an APK, which .so files to put there, etc.
I tried to put only libjzmq.so in the apk (under libs/armeabi) with the same 
error.
I even enlisted our expert APK developer, he tried several configurations and 
file placements, with no avail.

I would like to know which steps you think I did not follow, or otherwise what 
am I missing (no sarcasm intended, I really am at a loss here)

Thanks,

Sharon.


-Original Message-
From: Victor Perron 
Subject: Re: [zeromq-dev] ZeroMQ for Android: Problem in building the
Android APK
To: ZeroMQ development list 
Message-ID:

Content-Type: text/plain; charset="windows-1252"

Hello,

Did you properly follow the directions stated at 
http://www.zeromq.org/build:android ?
According to those, you shouldn't even have generated two binaries in the first 
place.
Renaming libzmq.so.3.0.0 into libzmq.so has also almost no chance to work the 
way you want it to work; it does not fix the actual soname which is hardcoded 
to "libzmq.so.3.0.0" in both libs at link time.

I'd advise you to follow the steps at that url, and report any further issue 
you'd have !

Best regards,

On Sun, Jul 15, 2012 at 2:38 PM, Sharon Ben-Asher
wrote:

>  Hello,
>
> ** **
>
> I managed to compile the ZeroMQ + Java binding shared objects for 
> ARM.
>
> Thias is what file gives me on the two so files 
>
> libzmq.so.3.0.0: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), 
> dynamically linked, not stripped
>
> libjzmq.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), 
> dynamically linked, not stripped
>
> and of course, I also have zmq.jar
>
> now I created a new Android project in Eclipse.
>
> Following advice on the net:
>
> **?**I placed the two so files udner libs/armeabi (renamed
> libzmq.so.3.0.0 into libzmq.so)
>
> **?**I placed the jar file under libs, and added to the build path
> 
>
> **?**Took the tripping sample and called it from main activity
>
> **?**Compile was successful. However, debugging the apk on a
> mobile device, I get the following error during System.loadLibrary in 
> the ctor of ZMQ file name: 
> /data/data/com.avgmobilation.zeromq/lib/libjzmq.so
> Cannot load library: reloc_library[1289]:   157 cannot locate
> '_ZNSs6assignEPKcj'...
> and later on this gets translated into an UnsatisfiedLinkError
>
> ** **
>
> Even tried to build the apk on the linux machine where the so was 
> compiled ? same error.
>
> Any help is appreciated?
>
> ** **
>
> Thanks,
>
> ** **
>
> Sharon
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>


--
Victor
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120716/7f00e9dd/attachment-0001.htm
 

--

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


End of zeromq-dev Digest, Vol 55, Issue 14
**
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] what are the best practices to send complex objects?

2012-07-17 Thread aalok sood
You could look at json. I have been using it quite heavily
for serialization-deserialization, and it does the job quite well.

On Tue, Jul 17, 2012 at 1:07 PM, anti_tenzor  wrote:

> Hello, all,
>
> I'd like to use ZMQ to send complex objects between applications (using
> CLRZMQ c# wrapper). Since it is possible to send byte[] arrays only,
> I am forced to implement some serialization-deserialization mechanism.
>
> But the hole idea is to be as fast as possible! So it looks like this
> algo should be:
> 1. Extremely fast
> 2. Produce very compact byte arrays
>
> Could you please suggest some best practices or libraries (.net), that
> meets these requirements?
>
> How do you send complex ojects via ZMQ in real-life applications?
>
> Thank you in advance!
>
> ___
> 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


Re: [zeromq-dev] what are the best practices to send complex objects?

2012-07-17 Thread Ron Elliott
Not sure about .NET compatibility but check out Google's Protocol Buffers
http://code.google.com/p/protobuf/
On Jul 17, 2012 12:38 AM, "anti_tenzor"  wrote:

> Hello, all,
>
> I'd like to use ZMQ to send complex objects between applications (using
> CLRZMQ c# wrapper). Since it is possible to send byte[] arrays only,
> I am forced to implement some serialization-deserialization mechanism.
>
> But the hole idea is to be as fast as possible! So it looks like this
> algo should be:
> 1. Extremely fast
> 2. Produce very compact byte arrays
>
> Could you please suggest some best practices or libraries (.net), that
> meets these requirements?
>
> How do you send complex ojects via ZMQ in real-life applications?
>
> Thank you in advance!
>
> ___
> 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] what are the best practices to send complex objects?

2012-07-17 Thread anti_tenzor
Hello, all,

I'd like to use ZMQ to send complex objects between applications (using 
CLRZMQ c# wrapper). Since it is possible to send byte[] arrays only,
I am forced to implement some serialization-deserialization mechanism.

But the hole idea is to be as fast as possible! So it looks like this 
algo should be:
1. Extremely fast
2. Produce very compact byte arrays

Could you please suggest some best practices or libraries (.net), that 
meets these requirements?

How do you send complex ojects via ZMQ in real-life applications?

Thank you in advance!

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