Re: [zeromq-dev] I've written a completely new C# API for ZeroMQ

2010-12-21 Thread Vinicius Chiele
Great job Alex, your implementation is very clean and simple, I liked it.

Vinicius Chiele

2010/12/21 Alex Forster a...@alexforster.com

 I have quite a few gripes with clrzmq and clrzmq2, and NZMQ is incomplete
 in several areas, so over a few weekends this past month I've written a new
 C# API for ZeroMQ based on the 2.0.10 release of zmq.h.

 ZeroMQ Interop v0.8.190.10354 (beta)
 http://zeromq.codeplex.com

 * Feature-complete
 * MIT licensed
 * Targeted at both Microsoft and Mono .NET 2.0 CLRs (though it does require
 a 3.5 compatible compiler, basically for lambda syntax)
 * Includes binaries for both 32 and 64bit platforms (without any #ifdefs)

 Here's an example using Pub/Sub sockets-

 // Set up a publisher.

 var publisher *=* new *ZmqPublishSocket* {
  Identity *=* *Guid**.**NewGuid*()*.**ToByteArray*(),
  RecoverySeconds *=* 10
 };

 publisher*.**Bind*( address: tcp://127.0.0.1:9292 );

 // Set up a subscriber.

 var subscriber *=* new *ZmqSubscribeSocket*();

 subscriber*.**Connect*( address: tcp://127.0.0.1:9292 );

 subscriber*.**Subscribe*( prefix:  ); // subscribe to all messages

 // Add a handler to the subscriber's OnReceive event

 subscriber*.**OnReceive* *+=* () *=* {

 *String* message;
  subscriber*.**Receive*( out message, nonblocking: true );

 *Console**.**WriteLine*( message );
 };

 // Publish a message to all subscribers.

 publisher*.**Send*( Hello world! );


 A few things that make this sample stand out from the other two ZeroMQ C#
 libraries-

 * There's no need to manage your ZeroMQ context; it's taken care of on a
 per-AppDomain basis using refcounting.
 * There is no message object because it provides no added benefit in C#.
 Messages are simply Byte[]s, with overloads throughout the API that accept
 Strings.
 * First-class support for .NET events programming, implemented using
 zmq_poll() (but that's completely transparent to the user).

 I'd love some feedback. I'm just starting to use it in a project I'm
 working on, and so far it all seems to be working smoothly and at high
 throughput, but I'm releasing it as beta because I don't feel that it has
 enough real-world experience yet.

 Alex Forster

 ___
 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] ZeroMQ on Windows Server 2008

2010-12-07 Thread Vinicius Chiele
I was using ZeroMQ on Windows Server 2008 R2 and everything was going very
well, It was very fast, around 15 000 messages per second. But when it ran
on Windows Server 2008 (Not R2), the ZeroMQ was very, very slow. Somewhere
around 90 messages per second.

I've used their own examples of ZeroMQ to do these tests.

So, I tried to make a copy of files between the machines and was very fast.

Is this a bug?

Machines:
2 Processor Xeon (4 core each) 2.2 Ghz
32 Gb RAM
Network 1 Gb
Without Antivirus

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