MiServer port
8 posts
• Page 1 of 1
MiServer port
Config\Server.xml:
The server responds to requests on port 8088. What's the significance in Server.Address of the reference to port 8080?
- Code: Select all
<Server>
<Name>MiServer Demo</Name>
<ClassName>DemoServer</ClassName>
<Lang>en</Lang> <!-- use English for this site, see http://www.w3schools.com/TAGS/ref_language_codes.asp for others -->
<Address>http://localhost:8080</Address>
<Port>8088</Port>
<IPVersion>IPv4</IPVersion>
The server responds to requests on port 8088. What's the significance in Server.Address of the reference to port 8080?
-
StephenTaylor - Posts: 31
- Joined: Thu May 28, 2009 8:20 am
Re: MiServer port
The <Address> element in Server.xml is intended to be the "external" address that a client would use to access the MiServer instance.
It's not currently used, to my knowledge, in the samples provided with MiServer.
The idea is that while your local address is localhost:8088, your external address would be something different (e.g. http://www.yourdomain.com:someportnumber).
The <Address> element gives you that external address to use to programmatically construct hyperlinks to reference your MiServer instance.
The ports specified in the <Port> and <Address> elements would generally be the same, and it's an oversight that they're not in the sample you provided and is likely due to the fact that I was running multiple MiServers and needed to change the port for one of them and didn't update the <Address> element (since I wasn't using it).
One instance case where the ports might be different is if you were using port forwarding on your router/gateway - MiServer could be listening on 8088, yet the port an external client uses to access MiServer could be something different.
It's not currently used, to my knowledge, in the samples provided with MiServer.
The idea is that while your local address is localhost:8088, your external address would be something different (e.g. http://www.yourdomain.com:someportnumber).
The <Address> element gives you that external address to use to programmatically construct hyperlinks to reference your MiServer instance.
The ports specified in the <Port> and <Address> elements would generally be the same, and it's an oversight that they're not in the sample you provided and is likely due to the fact that I was running multiple MiServers and needed to change the port for one of them and didn't update the <Address> element (since I wasn't using it).
One instance case where the ports might be different is if you were using port forwarding on your router/gateway - MiServer could be listening on 8088, yet the port an external client uses to access MiServer could be something different.
-
Brian|Dyalog - Posts: 120
- Joined: Thu Nov 26, 2009 4:02 pm
- Location: West Henrietta, NY
Re: MiServer port
The MiServer documentation keeps referring to Port 8080 not 8088, and the APL code
in #.Boot.Run refers to 8080:
∇ Run root;Config
AppRoot←root,(~(¯1↑root)∊'\/')/'/'
Load 1
:If #.Files.Exists AppRoot,'Config/Server.xml'
Config←(#.XML.ToNS #.Files.GetText AppRoot,'Config/Server.xml').Server
:Else
Config←⎕NS''
Config.(ClassName DefaultPage)←'MildServer' 'index'
:EndIf
Config.Port←Config Setting'Port' 1 8080
Having references to both PORT 8080 and 8088 is very confusing. Especially when the DOCUMENTED port 8080 is NOT correct.
in #.Boot.Run refers to 8080:
∇ Run root;Config
AppRoot←root,(~(¯1↑root)∊'\/')/'/'
Load 1
:If #.Files.Exists AppRoot,'Config/Server.xml'
Config←(#.XML.ToNS #.Files.GetText AppRoot,'Config/Server.xml').Server
:Else
Config←⎕NS''
Config.(ClassName DefaultPage)←'MildServer' 'index'
:EndIf
Config.Port←Config Setting'Port' 1 8080
Having references to both PORT 8080 and 8088 is very confusing. Especially when the DOCUMENTED port 8080 is NOT correct.
Ray Cannon
Please excuse any smelling pisstakes.
Please excuse any smelling pisstakes.
-
ray - Posts: 238
- Joined: Wed Feb 24, 2010 12:24 am
- Location: Blackwater, Camberley. UK
Re: MiServer port
While talking about documentation inaccuracies, the MyServer documentation talks about Start 'Demo' but the workspace has Start 'Intro'.
Both miserver/Demo and miserver/Intro folders get installed, but when I tried running
Start 'Demo'
I get a value error.
("Start 'Intro'" works fine, starting it on port 8088.)
Both miserver/Demo and miserver/Intro folders get installed, but when I tried running
Start 'Demo'
I get a value error.
("Start 'Intro'" works fine, starting it on port 8088.)
Ray Cannon
Please excuse any smelling pisstakes.
Please excuse any smelling pisstakes.
-
ray - Posts: 238
- Joined: Wed Feb 24, 2010 12:24 am
- Location: Blackwater, Camberley. UK
Re: MiServer port
Hi Ray -
Yeah, the 8088 slipped into the Server.xml configuration file at some point when we were testing while running multiple instances of MiServer. Each instance needs to listen on its own port.
You can set the port to any available port of your choosing. Further, when MiServer starts, it displays a message "MiServer started on port: XXXX".
The reference in #.Boot.Run merely sets the port to a default of 8080 in the absence of any setting from Server.xml.
The <Address> element in Server.xml isn't actually used by any MiServer code, but is available to the developer to insert a URL which refers back to the website. For instance, if you're using a router with port forwarding, MiServer could be listening on port 8088 but the URL and port visible to world might be something else entirely.
Sorry for the confusion that's ensued from this. We're segueing to use GitHub for the MiServer repository. When I commit the next round of updates, I'll bring the port number back in line with the documentation.
Yeah, the 8088 slipped into the Server.xml configuration file at some point when we were testing while running multiple instances of MiServer. Each instance needs to listen on its own port.
You can set the port to any available port of your choosing. Further, when MiServer starts, it displays a message "MiServer started on port: XXXX".
The reference in #.Boot.Run merely sets the port to a default of 8080 in the absence of any setting from Server.xml.
The <Address> element in Server.xml isn't actually used by any MiServer code, but is available to the developer to insert a URL which refers back to the website. For instance, if you're using a router with port forwarding, MiServer could be listening on port 8088 but the URL and port visible to world might be something else entirely.
Sorry for the confusion that's ensued from this. We're segueing to use GitHub for the MiServer repository. When I commit the next round of updates, I'll bring the port number back in line with the documentation.
ray wrote:The MiServer documentation keeps referring to Port 8080 not 8088, and the APL code
in #.Boot.Run refers to 8080:
∇ Run root;Config
AppRoot←root,(~(¯1↑root)∊'\/')/'/'
Load 1
:If #.Files.Exists AppRoot,'Config/Server.xml'
Config←(#.XML.ToNS #.Files.GetText AppRoot,'Config/Server.xml').Server
:Else
Config←⎕NS''
Config.(ClassName DefaultPage)←'MildServer' 'index'
:EndIf
Config.Port←Config Setting'Port' 1 8080
Having references to both PORT 8080 and 8088 is very confusing. Especially when the DOCUMENTED port 8080 is NOT correct.
-
Brian|Dyalog - Posts: 120
- Joined: Thu Nov 26, 2009 4:02 pm
- Location: West Henrietta, NY
Re: MiServer port
Unfortunately, the documentation for MiServer has lagged behind its development. But it also sounds like you're using an out of date version because miserver/Demo does not exist in version 2.1. Version 2.1 is currently available for download from http://tools.dyalog.com/library/.
To try and help people get started with MiServer, when you load the mserver workspace, it displays:
You should be able to just cursor up to that line, press Enter, and MiServer will start up (albeit on port 8088 for the nonce).
To try and help people get started with MiServer, when you load the mserver workspace, it displays:
Start 'Intro' ⍝ Run the MiServer demo site
You should be able to just cursor up to that line, press Enter, and MiServer will start up (albeit on port 8088 for the nonce).
ray wrote:While talking about documentation inaccuracies, the MyServer documentation talks about Start 'Demo' but the workspace has Start 'Intro'.
Both miserver/Demo and miserver/Intro folders get installed, but when I tried running
Start 'Demo'
I get a value error.
("Start 'Intro'" works fine, starting it on port 8088.)
-
Brian|Dyalog - Posts: 120
- Joined: Thu Nov 26, 2009 4:02 pm
- Location: West Henrietta, NY
Re: MiServer port
Thanks Brian for the quick response.
I do have the latest (2.1) version, I think the Demo folder must have been left over from an earlier download.
One other problem I had with the documentation: in Section 4.2 "Building a basic page...."
Following the instruction to the letter
"In the session, type:
)ed helloworld
In the editor window, enter this text:
:Class helloworld : MildPage ......"
causes the editor to create a FUNCTION not a CLASS and did so not like saving the class definition.
Eventually, (as a dinosaur who uses the mouse rather than the keyboard, and never uses )ed or ⎕EDIT, or Classes and hates scripts) I remembered that ")ed" can take an argument.
I finally found it via on-line help what I needed:
")ed ○helloworld"
(Having first failed to find it in my trusty V10.1 hard copy manuals, then using my "Introduction to OOP for APL programmers" I typed
")ed ∘helloworld"
using jot instead of circle.
These thing are just sent to try us. <grin>)
All is now working well under Development APL.
I have now got MiServer up and running, with my workspace creating a SVG web page with 10,000 polygons (an 100x100 array of different coloured hexagons).
However, trying to start MiServer under Dyalog RUNTIME (having made appropriate changes for Dyalogrt.exe) I get the message "MildServer not running".
Is there something in the process that explicitly requires Developer mode rather than Runtime? (SALT?)
(I am using the latest version 14.0 of Dyalog installed over the weekend.
I issue the commands to Start, Stop, Restart, and display the current Status via a pop-up menu.
As I say this is working without a problem under APL Development.)
I do have the latest (2.1) version, I think the Demo folder must have been left over from an earlier download.
One other problem I had with the documentation: in Section 4.2 "Building a basic page...."
Following the instruction to the letter
"In the session, type:
)ed helloworld
In the editor window, enter this text:
:Class helloworld : MildPage ......"
causes the editor to create a FUNCTION not a CLASS and did so not like saving the class definition.
Eventually, (as a dinosaur who uses the mouse rather than the keyboard, and never uses )ed or ⎕EDIT, or Classes and hates scripts) I remembered that ")ed" can take an argument.
I finally found it via on-line help what I needed:
")ed ○helloworld"
(Having first failed to find it in my trusty V10.1 hard copy manuals, then using my "Introduction to OOP for APL programmers" I typed
")ed ∘helloworld"
using jot instead of circle.
These thing are just sent to try us. <grin>)
All is now working well under Development APL.
I have now got MiServer up and running, with my workspace creating a SVG web page with 10,000 polygons (an 100x100 array of different coloured hexagons).
However, trying to start MiServer under Dyalog RUNTIME (having made appropriate changes for Dyalogrt.exe) I get the message "MildServer not running".
Is there something in the process that explicitly requires Developer mode rather than Runtime? (SALT?)
(I am using the latest version 14.0 of Dyalog installed over the weekend.
I issue the commands to Start, Stop, Restart, and display the current Status via a pop-up menu.
As I say this is working without a problem under APL Development.)
Ray Cannon
Please excuse any smelling pisstakes.
Please excuse any smelling pisstakes.
-
ray - Posts: 238
- Joined: Wed Feb 24, 2010 12:24 am
- Location: Blackwater, Camberley. UK
Re: MiServer port
I believe the current version of MiServer 2.x on GITHUB has been updated to allow running MiServer.DWS under a RUNTIME environment.
I was able to get it working.. although some of the advanced libraries such as SQAPL may need to reside in the same folder as the START IN for MiServer to "find them".
Cheers,
//W
I was able to get it working.. although some of the advanced libraries such as SQAPL may need to reside in the same folder as the START IN for MiServer to "find them".
Cheers,
//W
-
woody - Posts: 144
- Joined: Tue Dec 28, 2010 12:54 am
- Location: Atlanta, Georgia USA
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group