EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Lots of windows mobile devices

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
#14793
Posted: 10/25/2010 21:18:11
by Ian  (Basic support level)
Joined: 02/23/2010
Posts: 26

Just curious, company I work for is about to start rolling out 6,000 Windows Mobile devices all running a background app which uses MsgConnect, connecting to a server obviously also running MsgConnect, sending out data payloads (several KB) every 30 minutes...

Does anyone else have experience of this many connections in constant communication between mobile clients and a server?

So far, we've only "tested" using physical devices up to 200 and our packet sniffer says round trips between a console monitor, the server and each mobile device is only 2KB for the most minimal amount of data we send. That's pretty darned impressive... and the speed of the notifications is so far very fast...

Stay tuned as we roll out over the coming Christmas period...
#14798
Posted: 10/26/2010 02:08:18
by Eugene Mayevski (EldoS Corp.)

Yipe! MsgConnect uses thread-per-connection model, which means that for every connection a thread is used. Many concurrent connections means many threads. Each thread has allocated resources (stack space, internal OS records etc.). The biggest problem is stack: eg. Delphi allocates 1 Mb of virtual memory per thread, and this means that you can't even theoretically have more than 2K threads on single system.

I know that MsgConnect was used with about 500 concurrent connections, but the limit is near this number.

Handling thousands of connections would require one of the following:
1) load balancing to multiple servers
2) redesigning the core to handle multiple connections in one threads using IOCP (IO Completion Ports).

Load balancing is something you can do on your side. Redesigning the core is non-trivial and not fast, though possible.


Sincerely yours
Eugene Mayevski
#14806
Posted: 10/26/2010 07:14:12
by Ian  (Basic support level)
Joined: 02/23/2010
Posts: 26

We have an intermediary MsgConnect server that does the balancing and port forwarding to other servers - so far we've gotten to about 400 threads per server instance... still pretty good. We'll be deploying about 500-100 devices at a time over a period - so we can build up and see what happens!

We've also tried an alternative method which is to have the upper limit of threads for the connections, then have the devices connect and disconnect as resources are available - since they are not required to be in constant connection (they dump data periodically) - and this also seems to work well as it sort of emulates what a browser/web server would do...


We're opting to run both and monitor which proves to be the better method...

Meantime, what are your plans for an IOCP version? I've looked at lots of different IOCP implementations and they all seem too simple and not very sophisticated like MsgConnect - the only one comes close is UDAParts' SocketPro...
#14812
Posted: 10/27/2010 03:24:56
by Eugene Mayevski (EldoS Corp.)

Yes, connecting and disconnecting is optimal in your case.

As for IOCP - we have a reference implementation of it, however it's not complete and not stable. The hard part is not IOCP itself, but necessity to modify and test (which is the trickiest part) the code with lots of synchronization. And this is lots of work, which won't pay due to low demand.


Sincerely yours
Eugene Mayevski
#14820
Posted: 10/27/2010 09:12:51
by Ian  (Basic support level)
Joined: 02/23/2010
Posts: 26

Well, if you need help/testing, I can do both - Ive got access to other coders here as well - let me know when you're ready! I have a lot of server configs and variations I can test on! (I'm using c++ version)...
#14826
Posted: 10/28/2010 01:06:18
by Eugene Mayevski (EldoS Corp.)

Testing is only a part of the task - at the moment we don't have time and resources to complete the code in all applicable code packages. And as said this just doesn't pay


Sincerely yours
Eugene Mayevski
#14857
Posted: 10/28/2010 19:09:30
by Ian  (Basic support level)
Joined: 02/23/2010
Posts: 26

If you could point me in what direction you are heading, I can help with code as well as it is in my interest anyway (c++ only though). Perhaps we can collaborate somehow? I can try to help get funding somehow...

Out of curiosity, have you built the library to 64 bit?

Thanks!
#14858
Posted: 10/29/2010 00:54:30
by Eugene Mayevski (EldoS Corp.)

The developer started with C++ codebase, so that one is in beta state now. I will send it to you today or tomorrow.

64-bit -- yes, built and tested on Windows and on Linux.


Sincerely yours
Eugene Mayevski
#14885
Posted: 10/30/2010 18:53:03
by Ian  (Basic support level)
Joined: 02/23/2010
Posts: 26

Cool on both counts!
#15083
Posted: 11/17/2010 18:08:47
by Ian  (Basic support level)
Joined: 02/23/2010
Posts: 26

Any news? Eager to see what you have!

We've compiled now for 64 bit and reducing per thread stack as much as we can and we'll see how far we get with simultaneous connections and threads!
Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.

Reply

Statistics

Topic viewed 14449 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!