Unless websockets has some protocol sitting on top of standard TCP/IP communication, there shouldn't be an issue.


On 10/19/2017 2:29 PM, Kendall Shaw wrote:
  On 10/19/17, 10:54 AM, "Christian Grün" <christian.gr...@gmail.com> wrote:

     @Kendall:
> If I understood, it was connecting from mainframe to the BaseX server over a socket that was wanted (I assume that means TCP). I think that websockets don’t connect to TCP sockets, without HTTP on both sides to establish the connection. So, if using HTTP would require implementing HTTP (or parts of it) in assembly language, that is not trivial, possibly. Yes, exactly. @Marco: > not only browser clients but all other application (written in Java, nodeJS, Python ...) supporting websocket client libraries I suppose! ;-) Quite definitely! I’ll knock at your door once the first beta versions
     will be around. If you believe you can give some helpful input on the
     feature design in the GitHub issue, your feedback will be welcome.
Great, in general. But, if one side is on the mainframe unless there is a websocket library there the problem would be the same.

Kendall
> On 10/19/17, 10:15 AM, "basex-talk-boun...@mailman.uni-konstanz.de on behalf of Marco Lettere" <basex-talk-boun...@mailman.uni-konstanz.de on behalf of m.lett...@gmail.com> wrote:
     >
     >     Hi,
     >     not only browser clients but all other application (written in Java,
     >     nodeJS, Python ...) supporting websocket client libraries I suppose! 
;-)
     >     Waiting eagerly for it ...
     >     M.
     >
     >     On 19/10/2017 19:08, Christian Grün wrote:
     >     > Hi Dave,
     >     >
     >     > Kendall has already given you all relevant information (thanks!).
     >     >
     >     > Very early client bindings of BaseX provided support for 
bidirectional
     >     > connections. As the functionality was rarely used, and as only a 
few
     >     > bindings supported this part of the protocol, it was eventually
     >     > dropped. If you scan the history of our Wiki and the Github 
sources,
     >     > you will probably stumble upon the code snippets.
     >     >
     >     > The major reason is that most of today’s applications that are
     >     > interactive and are built on top of BaseX rely on HTTP. As soon as
     >     > WebSockets will be available [1], it will be possible to send data 
to
     >     > browser clients.
     >     >
     >     > Hope this helps,
     >     > Christian
     >     >
     >     > [1] 
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_BaseXdb_basex_issues_1449&d=DwIDaQ&c=DS6PUFBBr_KiLo7Sjt3ljp5jaW5k2i9ijVXllEdOozc&r=JgwnBEpN1c-DDmq-Up2QMq9rrGyfWK0KtSpT7dxRglA&m=HTzHEkqTVFJxI8dfoxQV2nh-Sx_PWJdIVZl7i7EiaAM&s=EE2LEkklhkn_5oQHObR67dH0aMbWgLwEP9Zcx5JHmYM&e=
     >     >
     >     >
     >     >
     >     > On Thu, Oct 19, 2017 at 7:01 PM, Dave Day 
<david....@duke-software.com> wrote:
     >     >> Hi Kendall,
     >     >>
     >     >>      Thanks for the response.
     >     >>
     >     >>      Seems to me there ought to be some way to get a Basex server 
to write  a
     >     >> data stream to a socket other than as the result of running a 
query or a
     >     >> command.
     >     >>
     >     >>      Maybe someone from the Basex developers group  will chime in 
here.
     >     >>
     >     >>      -- Dave
     >     >>
     >     >>
     >     >>
     >     >> On 10/18/2017 7:56 PM, Kendall Shaw wrote:
     >     >>> Someone can probably give a better answer. As far as I know 
there are no
     >     >>> xquery socket io functions provided with basex. You can write 
java to do
     >     >>> that or you can use an external process that communicates with 
the mainframe
     >     >>> and invoke that process from xquery, among other solutions. If 
you write
     >     >>> java you could look at the basex source to imitate how it uses 
sockets
     >     >>> and/or read about socket io in java. With that you could poll or 
send and
     >     >>> receive data to from the mainframe.
     >     >>>
     >     >>> To know if the mainframe connection is connected, I think you 
can use the
     >     >>> admin:sessions() function to see if it is connected or your 
program that
     >     >>> does the io could indicate that it is not connected if it can’t 
communicate.
     >     >>>
     >     >>> If you use xquery and RESTXQ to write the web application, and 
the same
     >     >>> basex instance is communicating with the mainframe then the 
xquery in your
     >     >>> application is already running in the basex server.
     >     >>>
     >     >>> For the second task it’s the same idea. You will need to read 
about how
     >     >>> updating works:
     >     >>>
     >     >>>    
https://urldefense.proofpoint.com/v2/url?u=http-3A__docs.basex.org_wiki_XQuery-5FUpdate&d=DwIDaQ&c=DS6PUFBBr_KiLo7Sjt3ljp5jaW5k2i9ijVXllEdOozc&r=JgwnBEpN1c-DDmq-Up2QMq9rrGyfWK0KtSpT7dxRglA&m=HTzHEkqTVFJxI8dfoxQV2nh-Sx_PWJdIVZl7i7EiaAM&s=_pSKI0JdH9q6EQwFZt5180gq24TDNk9RHCCCU9529v4&e=
     >     >>>
     >     >>> Or, reading this would tell you a lot:
     >     >>>
     >     >>> 
https://urldefense.proofpoint.com/v2/url?u=http-3A__docs.basex.org_wiki_Table-5Fof-5FContents&d=DwIDaQ&c=DS6PUFBBr_KiLo7Sjt3ljp5jaW5k2i9ijVXllEdOozc&r=JgwnBEpN1c-DDmq-Up2QMq9rrGyfWK0KtSpT7dxRglA&m=HTzHEkqTVFJxI8dfoxQV2nh-Sx_PWJdIVZl7i7EiaAM&s=d1UB9tyc9LKqvqvzoP9KPWE9x9Q2Va9Ge5qSYrTsEvA&e=
     >     >>>
     >     >>> Kendall
     >     >>>
     >     >>> On 10/18/17, 3:22 PM, 
"basex-talk-boun...@mailman.uni-konstanz.de on
     >     >>> behalf of Dave Day" <basex-talk-boun...@mailman.uni-konstanz.de 
on behalf of
     >     >>> david....@duke-software.com> wrote:
     >     >>>
     >     >>>       Greetings list,
     >     >>>                 I have an idea of how I want to use Basex, and 
would like
     >     >>> to know
     >     >>>       if what I am wanting to do will work.
     >     >>>                 My background is IBM mainframe, so the 
terminology I use is
     >     >>>       influenced by that.
     >     >>>                 I have a server running in an address space on a 
mainframe.
     >     >>> Within
     >     >>>       that address space are multiple tasks active.  I believe 
the term
     >     >>> task
     >     >>>       is equivalent to a thread in the distributed world.
     >     >>>                 I would like to have a task initialize when my 
server comes
     >     >>> up and
     >     >>>       establish a connection to an instance of a Basex server. 
This task
     >     >>> would
     >     >>>       be responsible for processing requests that come in from 
the Basex
     >     >>> server.
     >     >>>                 On a browser, I want to have a user connect to 
an instance
     >     >>> of the
     >     >>>       Basex HTTP server.  From the manual, it states that if the 
HTTP
     >     >>> server
     >     >>>       is started, the client server is started as well.  I don't 
know if
     >     >>> this
     >     >>>       is all one instance of a Basex, or if there are actually 
two
     >     >>> processes
     >     >>>       that get established.   The HTTP server will need to know 
if the
     >     >>>       connection has been established between the mainframe and 
the client
     >     >>>       server.  Is this possible, and if so, how would that be 
accomplished?
     >     >>>                 Assuming that the user on the browser needs some
     >     >>> information from
     >     >>>       my mainframe server, is there a mechanism in place to 
facilitate the
     >     >>>       HTTP server sending the request to the client server, and 
the client
     >     >>>       server sending the request to the mainframe.  Would the 
mainframe
     >     >>> have
     >     >>>       to do a poll of some kind to see if there was data, or can 
the client
     >     >>>       server push the request out across the connection?
     >     >>>                 If the above works, that is, Basex acting as a 
message
     >     >>> broker
     >     >>>       between a browser and the mainframe, I want to be able to 
create
     >     >>> another
     >     >>>       connection from another task on the mainframe to the Basex 
client
     >     >>> server
     >     >>>       as a result of a user request on a browser, have that 2nd 
task create
     >     >>> a
     >     >>>       new database, and start pushing xml across that 2nd 
connection.
     >     >>> While
     >     >>>       that new database is being updated from the mainframe, can 
the user
     >     >>> on
     >     >>>       the browser query the new database to get the most current 
data?
     >     >>>                 Regards,
     >     >>>                 -- Dave Day
     >     >>>
     >     >>
     >
     >
     >

Reply via email to