Ruby Client and Odysseus without delay

User avatar
Marco Grawunder
Posts: 272
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: Ruby Client and Odysseus without delay

Post by Marco Grawunder » Tue Jul 29, 2014 9:45 pm

Steffenadensis wrote:To change every Client isn't an option :)
Could you please explain what do you mean with this?

Steffenadensis
Posts: 31
Joined: Tue Jul 29, 2014 11:42 am

Re: Ruby Client and Odysseus without delay

Post by Steffenadensis » Wed Jul 30, 2014 12:00 am

The Ruby Client which i posted was just a test how Odysseus act when there are larger TCP Frames, until know i tested Odysseus mostly with an Arduino with Ethernet Shild as Source and there was no Problem, because the Arduino which i used sends small frames like just one String in a Frame. So there was a discussion in my Company how Odysseus work with much faster Streams like bigger Tcp Frames, like they are in the real Field. It is about measurement data from different sources around the world of photovoltaic plants. So it is not an Option to update/change the Sources/Clients.
Kind regards

T. Steffen

Operating system: Debian GNU/Linux 7.6 (wheezy)

User avatar
Marco Grawunder
Posts: 272
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: Ruby Client and Odysseus without delay

Post by Marco Grawunder » Wed Jul 30, 2014 8:17 am

Ok, but when using CSV protocol there must be a marker (== newline), that separates elements from each other. Else another protocol handler must be developed.

Steffenadensis
Posts: 31
Joined: Tue Jul 29, 2014 11:42 am

Re: Ruby Client and Odysseus without delay

Post by Steffenadensis » Wed Jul 30, 2014 3:33 pm

So i tested it and iam not shure, but with this code:

Ruby:

Code: Select all

require 'socket'

hostname = 'localhost'
port = 4000

connection = TCPSocket.new(hostname, port)
i = 0
20.times {
	begin
		connection.print "Str/2323/dsd/234/Hallo/2.4/12345678986/" + i.to_s + "\n"
		#connection.puts "Str/2323/dsd/234/Hallo/2.4/12345678986/" + i.to_s + "/"
		i+=1
	rescue Exception=>e
		puts "counlt not send"
		connection.close
	end
}
Odysseus:

Code: Select all

Ruby := ACCESS({source='source',
wrapper='GenericPush',
transport='TcpServer',
protocol='simplecsv',
dataHandler='Tuple',
options=[['port', '4000'], ['delimiter','/']],
schema=[
['a','STRING'],
['b','INTEGER'],
['c','STRING'],
['d','INTEGER'],
['e','STRING'],
['f','FLOAT'],
['g','LONG'],
['h','LONG']
]})
It do not display 20 times the string.
Odysseus always show me the Tuple with i == 19..., so the last one.
(With connection.puts it is the same)

So do i need to write my own handler, which is able to map over the whole stream? Or is this a Problem about the simple/csv Handler?
.
Kind regards

T. Steffen

Operating system: Debian GNU/Linux 7.6 (wheezy)

User avatar
Marco Grawunder
Posts: 272
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: Ruby Client and Odysseus without delay

Post by Marco Grawunder » Wed Jul 30, 2014 4:16 pm

I can reproduce it ... strange.

User avatar
Marco Grawunder
Posts: 272
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: Ruby Client and Odysseus without delay

Post by Marco Grawunder » Wed Jul 30, 2014 4:24 pm

Ok. Found the bug :oops: Error in Refactoring ...

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest