ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexWebSphere Message Broker SupportHow are ESQL files compiled?

Post new topicReply to topic
How are ESQL files compiled? View previous topic :: View next topic
Author Message
nick12
PostPosted: Tue Jan 14, 2020 5:38 am Post subject: How are ESQL files compiled? Reply with quote

Novice

Joined: 14 Jan 2020
Posts: 14

Is there any public information disclosed on how ESQL files get executed? Are they compiled to jvm bytecode? Are they compiled to native machine code? Is it run with an interpreter? Is it an interpreter with a JIT compiler? Does it just get transpiled to java? When does the compilation step happen? How long does it take? Are there any open source implementations of a way to run ESQL?

Also, does anyone have some non definitive personal experience with C# vs java vs ESQL performance?
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jan 14, 2020 7:59 am Post subject: Re: How are ESQL files compiled? Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25920
Location: Texas, USA

nick12 wrote:
Is there any public information disclosed on how ESQL files get executed?


No.

nick12 wrote:
Are they compiled to jvm bytecode?


No, they don't run in the JVM.

nick12 wrote:
Are they compiled to native machine code?


No

nick12 wrote:
Is it run with an interpreter?


Yes

nick12 wrote:
Is it an interpreter with a JIT compiler?


No

nick12 wrote:
Does it just get transpiled to java?


No; still doesn't run in the JVM

nick12 wrote:
When does the compilation step happen?


It doesn't

nick12 wrote:
How long does it take?


It doesn't

nick12 wrote:
Are there any open source implementations of a way to run ESQL?


No. ESQL is a proprietary language that only exists inside WMB / IIB / ACE

nick12 wrote:
Also, does anyone have some non definitive personal experience with C# vs java vs ESQL performance?


All of the compute languages within IIB / ACE have no discernable performance difference. The different languages exist principally to support developers comfortable in one language or another.

The principle cause of poor performance is poor code. It's as easy to write bad code inside IIB / ACE as it is in another other hosting language.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
nick12
PostPosted: Tue Jan 14, 2020 8:12 am Post subject: Reply with quote

Novice

Joined: 14 Jan 2020
Posts: 14

Well, sure, specially if we're talking web services, architecture is probably even more important. Regardless, I was just curious. If you decide to write a zip deflate decompressor in esql, knowing it is interpreted, I would guess it would be far slower than an equivalent implementation in C# or java. Regardless, I would not expect anyone to be doing anything like that.

Thanks for your answers!
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jan 14, 2020 8:20 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25920
Location: Texas, USA

nick12 wrote:
Well, sure, specially if we're talking web services, architecture is probably even more important.


Remember that a lot of thing you think of as code are not. Web service, in your example, are handled entirely by the IIB / ACE software and the user code in ESQL / Java or a Mapping node have no play in this. All of the socket and HTTP handshake is inside the IBM runtime and is not accessible to the user except through the configuration setting provided.

nick12 wrote:
Regardless, I was just curious.


Fair point.

nick12 wrote:
If you decide to write a zip deflate decompressor in esql, knowing it is interpreted, I would guess it would be far slower than an equivalent implementation in C# or java. Regardless, I would not expect anyone to be doing anything like that.


No. ESQL is a transformation & mapping language. The zip example you quote is the classic example use case for ESQL calling out to a Java procedure to perform a function.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
nick12
PostPosted: Tue Jan 14, 2020 8:27 am Post subject: Reply with quote

Novice

Joined: 14 Jan 2020
Posts: 14

> ESQL is a transformation & mapping language

Yes, I would think it a given that doing simple operations that are dwarfed in execution time by other things (such as I/O). I was asking in relation to computationally expensive tasks. Knowing it is interpreted, falling back for those to a more performant language is only logical.

Thank you!
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jan 14, 2020 8:36 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25920
Location: Texas, USA

nick12 wrote:
I was asking in relation to computationally expensive tasks. Knowing it is interpreted, falling back for those to a more performant language is only logical.


Include these in the benchmark test you mention in another thread. You may be surprised at the speed of ESQL in use cases you'd think it would perform badly.

Also remember to factor in the ease of development, maintainability and so forth.

Likewise if you have an integration with such a high performance requirement that milliseconds matter to that level, you may want to abandon IIB / ACE entirely and roll your own on a different platform.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
timber
PostPosted: Tue Jan 14, 2020 2:37 pm Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1097

Everything Vitor said is correct.

In addition to that, my advice is always to use ESQL for standard mapping/transformation/enrichment/routing tasks. If you need to implement a complex algorithm (esp. one that does not interact very much with the IIB message tree) then it's' not wrong to call out to Java from ESQL.

Don't fall into the trap of using Java instead of ESQL though. ESQL can do things that Java cannot when manipulating the message tree, and it's usually easier in ESQL too (once you've got the hang of the syntax).
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportHow are ESQL files compiled?
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.