View
219
Download
3
Tags:
Embed Size (px)
Citation preview
NETConductor Getting Started
Covered•Installation requirements•NETConductor installation•NETConductor license files•Starting the DataTier in client•Starting the DataTier in NAS•Accessing MiddleTier•How does it work?•How fast is it?•Invoker
On to installation requirements.
Installation requirements• The following slides show the requirements that must be
installed before the NETConductor can be installed !
NAV Database Server• NETConductor requires a NAV Database Server both
Native and SQL servers are supported
Dynamics NAV Server
NAV
Dynamics NAV Server
NAV Application Server• For production we suggest NAV Application Server but a
NAV Client is fine for initial setup and testing.
NAV NAS
NAS
Dynamics NAV Server
Internet Information Service (IIS)•NETConductor requires Internet Information Service
NAV NAS
NAS IIS
IIS
.NET Framework 2.0•In order for the installation and execution of the NETConductor, the .NET Framework must be properly installed on all machines where the NETConductor is going to be running.
Dynamics NAV Server
NAV NAS
NAS IIS
IIS
Microsoft .NETFramework 2.0
Microsoft .NETFramework 2.0
On to NETConductor installations.
NETConductor installation•The following slides describe what application components are installed when the two NETConductor installation wizards are run.
NETConductor DataTier being installed.•When installed, the DataTier registers an OCX that is then started by the NAS.
Dynamics NAV Server
NAV NAS
NAS IIS
IIS
Microsoft .NETFramework 2.0
Microsoft .NETFramework 2.0
DT
DataTier Wizard•You start the installation of the DataTier by double-clicking on the .msi file, located on the distribution media.
• %DistributionMedia%\NETC_XXX\DataTier\NETConductorDT.msi
DataTier Wizard Page 1
The start page of the NETConductor DT installation wizard !
Press ‘Next’
Select folder for OCX and accompanied files !
DataTier Wizard Page 2
You should always select ‘Everyone’ so that any Windows user can start the
DataTier !
This is the folder where the OCX and
accompanied files will be stored. Just use the
default !
Press ‘Next’
DataTier Wizard Page 3
Page to indicate that the installation is about to start !
Press ‘Next’
DataTier Wizard Progress
Installation is currently underway !
The installer will wait a bit to start
with and then run through the progress bar a
couple of times–just be patient !
DataTier Wizard Reminder
Remember that you have to install license files !
This is a small Readme file just to
notify the developer that he must have a
valid rdn.rlf and fin.flf files to use the
NETConductor DataTier.
Press ‘Next’
DataTier Wizard Complete
You are done !
Press ‘Close’
NETConductor DataTier installed !•To complete the DataTier installationyou have to load the DataTier .fob file into NAV.
• C:\Program Files\Rue de Net\NETConductor\DT\fobs
Dynamics NAV Server
NAV NAS
NAS IIS
IIS
Microsoft .NETFramework 2.0
Microsoft .NETFramework 2.0
DT
NB: If running with SQL Server, you need to re-compile the objectsin the fob, because the Session table (2000000009) is different !
Dynamics NAV Server
NAV NAS
NAS IIS
IIS
Microsoft .NETFramework 2.0
Microsoft .NETFramework 2.0
NETConductor MiddleTier being installed.•When installed, the MiddleTier createsWeb Services that are hosted by the IIS.
DT MT
MiddleTier Wizard•You start the installation of the MiddleTier by double-clicking on the .msi file, located on the distribution media.
• %DistributionMedia%\NETC_XXX\MiddleTier\NETConductorMT.msi
MiddleTier Wizard Page 1
The start page of the NETConductor MT installation wizard !
Press ‘Next’
MiddleTier Wizard Page 2
License file directories (can later be found in Web.config) !
Location of the rdn.rlf file. Defaults to the
installation directory of the DataTier
(convenient when both are installed on the
same machine)
Location of the fin.flf file. Again, defaults to the
installation directory of the DataTier.
Press ‘Next’
When using the NETConductor
operations, without providing a DataTier, this is the DataTier that will be used.
MiddleTier Wizard Page 3
Press ‘Next’
This is the directory to install the
MiddleTier to. This means that
you access it using a URL like: http://localhost/NETConductor.
This is the site onto which you want to install the MiddleTier.
Usually this is the “Default Web
Site” but you may have configured
your IIS with other sites that
you may want to use for the MiddleTier.
MiddleTier Wizard Page 4
Page to indicate that the installation is about to start !
Press ‘Next’
MiddleTier Wizard Progress Page 5
Installation is currently underway !
The installer will wait a bit to start
with and then run through the progress bar a
couple of times –just be patient !
MiddleTier Wizard Reminder Page 6
Remember that you have to install license files !
Press ‘Next’
This is a small Readme file just to
notify the developer that he must have a
valid rdn.rlf and fin.flf files to use the
NETConductor MiddleTier.
MiddleTier Wizard Complete Page 7
You are done !
Press ‘Close’
NETConductor MiddleTier installed !•Both tiers of the NETConductor have now been installed. Before you can use the NETConductor you have to install license files !
Dynamics NAV Server
NAV NAS
NAS IIS
IIS
Microsoft .NETFramework 2.0
Microsoft .NETFramework 2.0
DT MT
On to NETConductor license files.
NETConductor license files•The following slides show how the license files are loaded by the DataTier and the MiddleTier.
NETConductor DataTier license file !•When the DataTier is started, directories are given, in which it searches for the rdn.rlf and fin.flf license-files.
rdn.rlf
fin.flfLocation storedin NAV
Dynamics NAV Server
NAV NAS
NAS IIS
IIS
Microsoft .NETFramework 2.0
Microsoft .NETFramework 2.0
DT MT
The DataTier will not start without valid license files !
– C:\Program Files\Rue de Net\NETConductor\DT– C:\Program Files\Rue de Net\NETConductor\DT\CFront370
rdn.rlf
fin.flfLocation storedin NAV
rdn.rlf
fin.flfLocation storedin Web.config
NETConductor MiddleTier license file !•The MiddleTier uses a Web.config configuration file to store the directories used to find the rdn.rlf and fin.flf.
Dynamics NAV Server
NAV NAS
NAS IIS
IIS
Microsoft .NETFramework 2.0
Microsoft .NETFramework 2.0
DT MT
– C:\Program Files\Rue de Net\NETConductor\DT– C:\Program Files\Rue de Net\NETConductor\DT\CFront370
Same as for the DataTier !
rdn.rlf
fin.flfLocation storedin NAV
rdn.rlf
fin.flfLocation storedin Web.config
NETConductor MiddleTier license file !•You can verify the validity of the MiddleTier license file using a browser.
Dynamics NAV Server
NAV NAS
NAS IIS
IIS
Microsoft .NETFramework 2.0
Microsoft .NETFramework 2.0
DT MT
Browser
License should have ‘Valid’=True and ‘Expired’=False !
– http://localhost/NETConductor/Configs.asmx/GetLicense
On to starting the DataTier in client.
Starting DataTier in client•The following slides show, first, how to start the DataTier in a NAV Client.•The next section will then show how to start it in a NAV Application Server.
NETConductor DataTier being started.•To start with you want to run the DataTier in a NAV client because then you can see errors and respond to them more quickly.•You must remember to have a NAV Database running and you must have loaded the .fob file of the DataTier into that database.•When you are ready, you start by runningForm 84920 NETConductor
NB: If running with SQL Server, you need to re-compile the objectsin the fob, because the Session table (2000000009) is different !
Form 84920 NETConductor Create Config.
Just leave the ID empty and press enter to create a
new DataTier configuration.
Form 84920 NETConductor Create Config.
Your new configuration,
with ID NC0001, has now been created and
many default values have
automatically been entered.
The configuration has been given a
default description that
you should change to your
liking.
Form 84920 NETConductor DataTier
When the DataTier is
running it will accept TCP/IP connections, from Middle-Tiers, on this
port. Only one DataTier can be
accepting connections on
each port on each machine.
Each DataTier has a service-name that the
MiddleTier uses to hook up with
it. Many running
DataTiers can have the same
service-name, in which case the MiddleTier will
do load-balancing
between them (in a Round-
Robin fasion)
Form 84920 NETConductor DataTier
The ‘Base Path’ is the location of
license files, configuration and
log files.
Calculated location of the
rdn.rlf file based on the given ‘Base Path’.
Form 84920 NETConductor XMLSpecifies the
limit on records in a response
from the NETConductor.
The nodes in the XML reply can
either have their original names or
simply use the names Record or
Field.
XSD Schemas can be included
inline or externally.
Value format can be local NAV or
Universal. Verbosity
settings specify how detailed the xml reply will be.
These are presets for XML settings.
Form 84920 NETConductor MailWhen the DataTier is
running and a call is made into a CodeUnit (for
example) an error may be raised. If
this happens when running the
DataTier in a client, it will
simply open up the well-known
ERROR dialog. But if running in a NAS
the ERROR is written into the Windows Event
Log. Now, by indicating a Mail Server here, an
administrator can get an e-mail on every such error.
Ask your administrator for
the machine name of the
SMTP server on you local
network. When you have the SMTP server
name or IP, you can check if the SMTP is running by using ‘telnet servername 25’
in a DOS command
prompt. If there is no server
running on the machine you will
get an error. Otherwise, you
will have a connection.
Form 84920 NETConductor MailThis text will be
the subject of the e-mail if an error
occurs. It is therefore
convenient to have a string that
identifies this DataTier from others (even
though the e-mail body will contain
the complete configuration of the DataTier as
well as the request being
made when the error occured)
The address, from whom the
error e-mails will be sent.
The addresses, to whom the error e-mails will be sent,
can be either simple e-mail
addresses or they can contain
display names.
Form 84920 NETConductor DataTier
When the DataTier is
running it can do logging of
requests. If checked, the log-
file will be created in the
directory indicated by ‘Base Path’.
NETConductor DataTier being started.
•When you have created a valid configuration (like the NC0001 described before) you can start the DataTier.
Form 84920 NETConductor Starting ...
Press ‘Start’
Form 84920 NETConductor Started !
When the DataTier is
successfully started it will open up this
message dialog when running in
a NAV client.
Form 84920 NETConductor Started !This indicates
whether a session is online or not.
If the DataTiers are running on other machines you can also see on what
machines they are running.
The DataTiers send a heartbeat to
indicate that they are alive/online.
This shows the time of the last heartbeat.
Number of requests processed by the
DataTier.Number of records
returned by the DataTier.
On to starting the DataTier in NAS.
Starting DataTier in NAS•The following slides show how to start the DataTier in a NAV Application Server.
NETConductor DataTier being started.
•When running the DataTier in a client it will stop running upon every ERROR or CONFIRM that is being made by code that is run through it.•To prevent this you should run the DataTier in a NAS. In this case all the ERROR, CONFIRM, TESTFIELD, DIALOG and other GUI usage will produce an error that is sent back to the client, stored in the Windows Event Log and possibly sent via e-mail to the administrators of the NETConductor.•However, before the DataTier can be started from a NAS, you need to make a few NAV code changes...
CodeUnit 1 ApplicationManagementWhen the NAS is
starting it will run this NASHandler function.
The default implementation of
these functions vary a bit between NAV
versions, so you will have to add the
following code by hand ...
CodeUnit 1 ApplicationManagement Add Code
This added code will start the
DataTier described in the given
DataTier configuration. A typical startup
parameter for the NAS will then be
NETC:NC0001
When the NAS is starting it will run this NASHandler function.
The default implementation of
these functions vary a bit between NAV
versions, so you will have to add the
following code by hand ...
Notice that you should understand
this code and not just insert it blindly.
CodeUnit 1 ApplicationManagement Local Var.
Then before you can save and compile the CodeUnit you have
to create the NETConductor local
variable.It is of type
‘CodeUnit 84920 NETConductor’
NETConductor DataTier Starting ...
•Now that the code changes have been done you are ready to start the NAS. This is done using the Application Server Manager ...
NETConductor DataTier Starting ...
The Application Server Manager can be found
in the ‘Start’ menu.
NAV Application Server Manager
The Application Server Manager gets started and you need to start by adding
your newly installed NAS into the console.
This is done by selecting theNew->Application Server from
the pop-up menu.
NAV Application Server Manager
The New NAV Application Server dialog requests you to provide the
‘Service Name’ of the NAS.
The ‘Service Name’ can be read from the Services console. Pick up
the CLASSIC or SQL name depending on your configuration.
NAV Application Server Manager
When the newly added NAS is then selected it’s parameters
need to be provided.
NAV Application Server ManagerDatabase Server Name is the
name of the NAV Database Server. Remember that DataTier only
works when a database server is installed.
When using the NETConductor the Database is left empty unless you
are running an SQL based NAV.
The company name.
NAV Application Server Manager
According to our coding in CodeUnit 1 ApplicationManagement, the Start-Up Parameter should start with ‘NETC:’ to start a DataTier. After the NETC: there is the ID of the DataTier configuration
to use.
Select the Net Type.
Select the Object Cache Size.
NAV Application Server Manager
When all parameters have been provided then you press the ‘Start Service’ button to
start the service ...
Windows Event Logs and Viewer
If the NAS and DataTier start normally then three information events will be written
into the Windows Event Log. If there are errors more event logs may be written. Some of those errors may be ...
NAS Windows Logon
NAS Uses a given Windows username and password to
logon to the given NAV Database Server. If you are
having problems with the NAS logging on then right-click the
service in the Services console and select properties. Then change the account and remember to add it into the
Windows Logon in the database as well.
If you want to be absolutely sure that your NAS (including the NET Conductor) restarts upon every
incident, then you should open up the ‘Recovery’ tab and set the
recovery options. If the NETConductor unexpectedly goes down (and is then automatically restarted) it will start by sending an email to the Administrators to notify of the unexpected restart.
This email is not sent if the NETConductor is shut down
normally using the Start/Stop service.
•If you forget to put the fin.flf license file into the directory of the NAV Application Server then you may get errors saying that the license doesn’t allow C/Front.
NAV Application Server License
NAV Application Server Started!
When the NAS is successfully started, the console will show ‘Started’ in the Service Status. However, you should
remember to check the Windows Event Viewer for errors as the NAS might start but show errors anyway.
On to accessing the MiddleTier.
Accessing MiddleTier•In the following slides we will look at some of the many services provided by the MiddleTier.•We will be using a browser interface (HTTP access).•During development of .NET applications developers can also use the SOAP protocol for access, but that is outside the scope of this guide.
NETConductor MiddleTier accessed.• You can access the MiddleTier using a browser.
Dynamics NAV Server
NAV NAS
NAS IIS
IIS
Microsoft .NETFramework 2.0
Microsoft .NETFramework 2.0
DT MT
Browser
http://localhost/NETConductor
NETConductor MiddleTier accessed.• You can access the MiddleTier using a browser.
Browser
This is a page that provides direct access to many of the
services provided by the NETConductor
License information
List of found DataTiers
The NETConductor Web Service
Direct access to certain NETConductor Web Service
Operations
Lets start by taking a look at the Config. Web Service
NETConductor Config. Web Service
All of the pages used for HTTP access to the NETConductor Web
Service contain a description.
Each of the operations of the Web Service are listed.
With a description of the operation.
NETConductor MiddleTier accessed.• You can access the MiddleTier using a browser.
Browser
Lets take a look at the Basics NETConductor Web Service.
NETConductor Basics Web Service
Lets try out the SelectFromTable operation.
SelectFromTable Operation
Service Name can be left empty, then the default one is used.
Number of the NAV table to get the information from
Sorting (a comma separated string of field numbers). If not
given the primary key is used for sorting the resulting records.
SelectFromTable OperationFiltering is of the format:
fieldnum1=“filter1”,fieldnum2=“filter2”
This is a list of fields to return. Empty list returns no fields but ‘*’ means
return all fields. Why not change this to “8,9” because both of those fields exist
in table 210.
from and to, required, indicate the number of the records to return. 0 and
0 will return all records fulfilling the given filter.
This is a list of fields to calculate. If left empty then no calculated fields get calculated; ‘*’ means calculate all
returned.
8,9
SelectFromTable OperationVerbosity level must be given from 0-9
By giving definition=true then the definition of the table is added at the top
of the reply.
Press ‘Invoke’ when ready.
SelectFromTable ReplySet
All calls to NETConductor will return XML of a similar format.
Always one ‘ReplySet’ Node.
Containing several ‘Reply’ Nodes, possibly of different types: RecordSet, String, Hashtable.
‘Reply’ of type ‘RecordSet’ contains a list of records, all with the node name similar to the
name of the table.
Such nodes will then contain a list of nodes, one for each column being returned.
NETConductor Basics Web Service
Next, lets try out the RunCodeUnit operation.
RunCodeUnit Operation
Number of the NAV CodeUnit to run.
Parameters should be of the format: “Name1”=“Value1”,”Name2”=“Value2”
Press ‘Invoke’ when ready.
Service Name can be left empty, then the default one is used.
RunCodeUnit ReplySet
This ‘ReplySet’ contains several ‘Reply’ nodes of different
types.
On to how does it work?
How does it work?•The following slides show how a typical request for data from a CodeUnit execution runs through the MiddleTier and then DataTier.
1) A client sends a request to MiddleTier•The request contains the name of the DataTier service to execute the command.
Dynamics NAV Server
NAV NAS
NAS IIS
IIS
Microsoft .NETFramework 2.0
Microsoft .NETFramework 2.0
DT MT.NET
basedclient
RunCodeUnit 84922Service name CRONUS.DT
•Looking for DataTier service name = CRONUS.DT•Static locations of DataTiersread from the Web.config file.
Web.configstatic locations
of DataTiers
Location storedin Web.config
2) MiddleTier looks for a DataTier
Dynamics NAV Server
NAV NAS
NAS IIS
IIS
Microsoft .NETFramework 2.0
Microsoft .NETFramework 2.0
DT MT.NET
basedclient
RunCodeUnit 84922Service name CRONUS.DT
•Looking for DataTier service name = CRONUS.DT•MiddleTier broadcasts onto port 8932 in search of DataTiers, unless the Web.config contains “Broadcast” = “False”
Location storedin Web.config
2) MiddleTier looks for a DataTier
Dynamics NAV Server
NAV NAS
NAS IIS
IIS
Microsoft .NETFramework 2.0
Microsoft .NETFramework 2.0
DT MT.NET
basedclient
CRONUS.DT?8932
Web.configstatic locations
of DataTiers
RunCodeUnit 84922Service name CRONUS.DT
•DataTier responds !
2) MiddleTier looks for a DataTier
Location storedin Web.config
Dynamics NAV Server
NAV NAS
NAS IIS
IIS
Microsoft .NETFramework 2.0
Microsoft .NETFramework 2.0
DT MT.NET
basedclient
CRONUS.DT?8932
Web.configstatic locations
of DataTiers
RunCodeUnit 84922Service name CRONUS.DTI do!
•A connection is made !•In this case there is only one DataTier to select from so the MiddleTier will select this one.
2) MiddleTier looks for a DataTier
Dynamics NAV Server
NAV NAS
NAS IIS
IIS
Microsoft .NETFramework 2.0
Microsoft .NETFramework 2.0
DT MT.NET
basedclient
CRONUS.DTRunCodeUnit 84922Service name CRONUS.DT
If there were more DataTiers providing the CRONUS.DT servicethen the MiddleTier would select one in a Round Robin fashion !
3) Selected DataTier executes the CodeUnit•The request to run the CodeUnit is sent to the selected DataTier.
Dynamics NAV Server
NAV NAS
NAS IIS
IIS
Microsoft .NETFramework 2.0
Microsoft .NETFramework 2.0
DT MT.NET
basedclient
CRONUS.DTRunCodeUnit 84922Service name CRONUS.DT
RunCodeUnit 84922
3) Selected DataTier executes the CodeUnit•The DataTier then runs the CodeUnit in NAV.
Dynamics NAV Server
NAV NAS
NAS IIS
IIS
Microsoft .NETFramework 2.0
Microsoft .NETFramework 2.0
DT MT.NET
basedclient
CRONUS.DTRunCodeUnit 84922Service name CRONUS.DT
RunCodeUnit 84922RunCodeUnit84922
4) The CodeUnit returns a RecordSet•When the CodeUnit has a RecordSet to send back it returns “RecordRef” to the DataTier.
Dynamics NAV Server
NAV NAS
NAS IIS
IIS
Microsoft .NETFramework 2.0
Microsoft .NETFramework 2.0
DT MT.NET
basedclient
CRONUS.DTRecordRef
5) The DataTier fetches the data from NAV•The DataTier uses it’s C/Front connection to fetch the data of the “RecordRef”.
Dynamics NAV Server
NAV NAS
NAS IIS
IIS
Microsoft .NETFramework 2.0
Microsoft .NETFramework 2.0
DT MTCRONUS.DTRecordRef
.NETbasedclient
6) The DataTier then wraps the data in XML•This is done in the fastest native way possible.
Dynamics NAV Server
NAV NAS
NAS IIS
IIS
Microsoft .NETFramework 2.0
Microsoft .NETFramework 2.0
DT MT.NET
basedclient
CRONUS.DTRecordRef
Other reply types, like strings and hashtables, don’t use theC/Front connection. Such replies are put directly into the XML!
7) DataTier sends XML back to the MiddleTier•This is done over the same connection as before.
Dynamics NAV Server
NAV NAS
NAS IIS
IIS
Microsoft .NETFramework 2.0
Microsoft .NETFramework 2.0
DT MT.NET
basedclient
CRONUS.DTRecordRefXML
8) MiddleTier forwards the XML to client
XML
Dynamics NAV Server
NAV NAS
NAS IIS
IIS
Microsoft .NETFramework 2.0
Microsoft .NETFramework 2.0
DT MT.NET
basedclient
CRONUS.DTRecordRefXML
On to how fast is it?
How fast is it?•The following slides report the results of a single stress test that provided some speed results as well.•Note that the following results may not appear on your site for a number of different reasons, including machine and network configurations.•However, the results give a clear indication that the latency in NETConductor is not a problem in most scenarios.
The setup of the NETConductor•For the experiment, NAV and the NETConductor are setup as shown in the following diagram:
NAV NativeDB 3.70.A (Build 16172)
CRONUS Company
NAV NAS
NAS 3.70.B (Build 19516) IIS 5.0
IIS
Microsoft .NET Framework 1.1.4322 (Rev. 2032 SP 1)
DT MT.NET
basedclient
NETConductor 2.10
Server,2 x 800 MHz CPU,1GByte memory,W2K-SP4
RunCodeUnit that returnsrecords from G/L Entry
Workstation, 1 x 3.4 GHz CPU, 1GByte memory, XP-SP2
The .NET based client randomly requests differentnumber of records and fields from NAV.
Raw data of the test requests
0
100
200
300
400
500
600
700
800
900
1000
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 11000
Record Fields
Tim
e
Amount of data requested from NAV. This number is the multiplication of requested Records and
Fields.
The number of
milliseconds the request
took.
Requesting 1000
records of 1 field is not
the same as requesting 1
record of 1000 fields.
Time Report in 3D
10 30 50
70
90
110
130
150
170
190
210
230
250
4
12
20
28
360
100
200
300
400
500
600
700
800
900
1000
900-1000
800-900
700-800
600-700
500-600
400-500
300-400
200-300
100-200
0-100
Records
Fields
Time
The slope of the requests
of small records is
small.
The slope of the requests
of larger records is
larger.
Requesting 250 records of different
sizes has the largest slope.
Many and Few Fields/Record
0
100
200
300
400
500
600
700
800
900
1000
1100
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 11000 12000 13000
40 Fields/Rec
4 Fields/Rec
Records
NETConductor returns around
4.380 larger records in a
second.
NETConductor returns
around 11.385 smaller
records in a second.
How fast is it?•We can therefore draw the conclusionsthat the NETConductor can return
• Ca. 5.000 large records / second• Ca. 10.000 smaller records / second
•Another result from this experiment is that the NETConductor can make
• Ca. 200 calls/secondinto NAV.
NB: These numbers depend heavily on the machineconfiguration and are shown as a reference only !
On to Invoker
Hope it was helpful !
Vesturgata 3, 101 Reykjavik, Iceland [email protected]: (+354) 414 5050 Fax: (+354) 414 5051