Hi,
I need to create a large number of objects from GXDLMSServer, trying to simulate a real metering system. If the servers are set to different ports of the same IP address, can a real DLMS client (Meter Data Colector, for example) communicate with those objects ?
I was really able to do it. But I still have a problem. It worked well for 1000 servers (from ports 4059 to 5058). But our system will have 40.000 (40 thousands) servers/meters. When I instantiate more than 1225 GXDLMSServer objects (with their corresponding ports), GXDLMSDirector communicates with only the first 1225 objects (I also tried with GXDLMSClient). I think I am facing tcp ports congestion. Using netstat prompt command, the assigned ports seem to be listenning, but I can't connect to those "high ports" servers.
Please, do you know a way to solve this? I'm now thinking of:
1) Creating a data concentrator or coordinator. It would receive dlms messages from the client and send them to the correct meter/server.
2) Alternatively, I could keep the servers disconnected from the network. Would it be possible to create a network listener to identify the first connection packet attempt from a client and then switch the correct server on? That would work such as a "server switcher".
You see, the problem here is that I have problems while keeping thousands of listening tcp ports.
Please, I urgently need your comment on this. I've got to make this work.
I'm using wrapper and I think it's a tcp/ip listening problem.
The thousands of servers are created, the console prompt shows the servers being created since the first port. Using netstat command I confirm: the assigned ports have the "listening" status. But actually the dlms client can only connect with the first 1225 servers. When I try to connect to the last server created, for instance, gxdlmsdirector just can't connect, as if the server wasn't listening in that port.
Would that be a restriction of my computer, in particular? My OS is Windows 7.
If you want to implement so many TCP/IP connections you should create server using IOCP.
We have done it, but we do not have example for that at the moment. I suggest that you use Java or C# to implement server pool or then you create own example using IOCP.
I don't want to be boring. But what you think about this: I could implement only few servers (1000, lets say), make them active from ports 2000 to 2999. Each server would "manage" 40 other server objects which would be disconnected (no listening port associated). Then, the client sends packets to the connected server, that would identify the desired disconnected server and load its objects.
If this were possible, I could solve my whole problem. What you think about it?
We are using this functionality in gateways. After GW there are several meters and we are communicating with GW and GW sends packets to right meter. You do not need to create servers after GW. GW can generate data for them. Only problem is that you can connect only one GW at the time. So problem stays.
Instantiations of GXDLMSServer
Hi,
You should create own GXDLMSServer for each port and after that it's working.
BR,
Mikko
Thank you Mikko,
Thank you Mikko,
I was really able to do it. But I still have a problem. It worked well for 1000 servers (from ports 4059 to 5058). But our system will have 40.000 (40 thousands) servers/meters. When I instantiate more than 1225 GXDLMSServer objects (with their corresponding ports), GXDLMSDirector communicates with only the first 1225 objects (I also tried with GXDLMSClient). I think I am facing tcp ports congestion. Using netstat prompt command, the assigned ports seem to be listenning, but I can't connect to those "high ports" servers.
Please, do you know a way to solve this? I'm now thinking of:
1) Creating a data concentrator or coordinator. It would receive dlms messages from the client and send them to the correct meter/server.
2) Alternatively, I could keep the servers disconnected from the network. Would it be possible to create a network listener to identify the first connection packet attempt from a client and then switch the correct server on? That would work such as a "server switcher".
You see, the problem here is that I have problems while keeping thousands of listening tcp ports.
Please, I urgently need your comment on this. I've got to make this work.
BR,
Danilo
GXDLMSServer
Hi,
Is problem on the TCP/IP listening or DLMS part? Are you using HDLC or WRAPPER? We have made apps like this without problems.
BR,
Mikko
I'm using wrapper and I think
I'm using wrapper and I think it's a tcp/ip listening problem.
The thousands of servers are created, the console prompt shows the servers being created since the first port. Using netstat command I confirm: the assigned ports have the "listening" status. But actually the dlms client can only connect with the first 1225 servers. When I try to connect to the last server created, for instance, gxdlmsdirector just can't connect, as if the server wasn't listening in that port.
Would that be a restriction of my computer, in particular? My OS is Windows 7.
GXDLMSServer
Hi,
We can test this tomorrow with 10.000 servers. Are you using Java or C#?
BR,
Mikko
I'm using c++ actually.
I'm using c++ actually.
Glad for your attention.
BR
GXDLMSServer
Hi,
This is good to know. Usually we are making simulator apps like this with C# or java.
BR,
Mikko
GXDLMSServer
Hi,
If you want to implement so many TCP/IP connections you should create server using IOCP.
We have done it, but we do not have example for that at the moment. I suggest that you use Java or C# to implement server pool or then you create own example using IOCP.
BR,
Mikko
Ok Mikko, I appreciate it.
Ok Mikko, I appreciate it.
I don't want to be boring. But what you think about this: I could implement only few servers (1000, lets say), make them active from ports 2000 to 2999. Each server would "manage" 40 other server objects which would be disconnected (no listening port associated). Then, the client sends packets to the connected server, that would identify the desired disconnected server and load its objects.
If this were possible, I could solve my whole problem. What you think about it?
Thanks in advance,
Danilo.
GXDLMSServer
Hi,
We are using this functionality in gateways. After GW there are several meters and we are communicating with GW and GW sends packets to right meter. You do not need to create servers after GW. GW can generate data for them. Only problem is that you can connect only one GW at the time. So problem stays.
BR,
Mikko