In addition to the reply from @Evgeny Shvarov :
INT is highly important to identify error locations.
eg. <DIVIDE>label+5^routinename refers to the location in routinename.INT
- Log in to post comments
In addition to the reply from @Evgeny Shvarov :
INT is highly important to identify error locations.
eg. <DIVIDE>label+5^routinename refers to the location in routinename.INT
Out of curiosity, I have built a more exotic solution that is easier to understand. (At least for me)
I don't like so much this protocol upgrade stuff and encrypting and simulation of a browser.
My personal workaround:
It works fine and is rather "classic CSP" style.
Great you confirmed my investigations !
OK.
I tried it and found: sock.Open( does not accept "/ws/v2/?&token=<token>" only the server name
Now you have the connection BUT no server to take care of it as you see:
Investigating the browser it became clear what's going on:
- you begin with HTTP to start your WebSocketServer
- an then initiate the WS connection.
This is the output from TcpTrace:
>>>>> GET /csp/samples/websocketdemo.csp HTTP/1.1 >> .......
>>>>> GET /csp/samples/Web.SocketTest.cls HTTP/1.1 >> ... >> Upgrade: websocket
That's my point:
With the actual approach starting the requres WS Server is missing.
To me, this looks like your port doesn't like WS as initial connection protocol but expect the switch from HTTPS -> WSS or the port is just wrong.
several suggestions for the investigation to get it moving:
#1) verify your server from a normal web page (e.g. based websocketdem.csp in Samples) especially the port !!!!
#2) If you have control over your server then skip SSL and get running over HTTP -> WS first. You can add this once it works.
#3) If you have no server just use Caché / SAMPLES /
I found it very useful to have control over both ends and now I own several variants for testing.
Staying tuned ![]()
YES! you can!
Just extend the method (just some example)
#1) if it is a Caché Backup you need an Installation of Caché to restore it.
#2) if it is a CACHE.DAT file you also need an installation of Caché and mount this as an additional DataBase.
Without the installation of Caché it's a thrilling exercise to high-level experts. Not really advisable.
try to have the same processor type { big / little endian :== (Intel/AMD) or not } as the original Caché instances. This saves some headache.
Forget about SQL Server. Caché is far more efficient and advanced technology!
#1)
You need to get %Net.HttpRequest in hands to set your property Content Type.
#2)
instead of PutURL(...) you have to use method SendFormDataURL(....) of EnsLib.HTTP.OutboundAdapter
more details in docs here:
$ZDATETIME($NOW(),3) should fit. You then have the Seconds too.
at first sight, I miss in this piece of code
ClassMethod GetPage() As %String) [ ZenMethod ]
{ quit %session.Data("currPage") }
and
var pageNo = zenPage.GetPage() ;
I'd personally prefer that $LB(var) also follows the elementary rules of COS.
Though I have no hope on any ProdLog on this subject
as pointed out by Alexander Koblov already:
you can create a $LB() od $LB(undefined) and it's all the same
set a=$LB() zzdump a
0000: 01or
write $d(undefined)
0
set a=$lb(undefined) zzdump a
0000: 01
Your coincidence of NULL, null, Null, nuLL, .... is just an optical eye-catcher without syntactical relevance in COS
You could use the feature that any Classmethod may also serve as Stored Procedure.
Like this:
And then you may call your Procedure like this: getting back
SELECT DEMO('hello WORLD')
getting back
Echo:hello WORLD
All you have to care for is to return something.
what happens inside your ClassMethod is up to you and doesn't need to be related.
As you have an installation of Caché you will also have the Documentation with it.
I recommend "Using Caché ObjectScript" to start with ObjectScript.
It is also public accessible https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GCOS
I also recommend having a look at the free online training library.
The link is in the header of this forum: LEARNING
Browse Catalog and search for O bjectScript Basics
All details on individual commands, functions, system variables are again in your local instance or in the
public reference on docs.intersystems.com
My personal preference is to a have a solution NOW.
And not wait for something that may take too long for me.
just the most simple example to solve your issue with a ClassMethod:
See details in NoSQL Methods for Global Nodes
Especially Get the Next Global Subscript: next() lets you iterate over first subscript ^Customer(id) 1, 2, 3, ...
next using Retrieve a Global Node: get() you access ^Customer(id, "Address", 1) and check if it is "London"
In your call, you get the full global. but you have to do the detail work yourself.
There is no such thing as SELECT ...... FROM GLOBAL WHERE .......
This is NoSQL.
But you may hide your functionality in a ClassMethod inCaché and use invoke_classmethod()
Hi Julius,
You got my point!
A Stream is a Stream and a String is a String and
they are different things with different handling.
The fact that they both (can) contain characters is of no importance.
Without offering a solution to develop this magic data type that Julius suggested
You should also define what datatype you plan to present for the SQL side.
And that is always taken from the Compiled Property definition.
All streams typically present themselves a CLOB or BLOB or similar and have no MAXsize
While a String presents itself as a VARCHAR with a MAXSIZE.
I see no way to manipulate this on the fly.
For object access, you may write a Setter and Getter that covers the real nature of your data:
For SQL access I see no chance at the moment.
Indexing is another issue. This would require another piece of magic.
My suggestion:
have a %String
have a %Stream
and have a calculated property of %String to decide which one to present.
like a centipede with a wooden leg: 99 times tic and 1 toc
the stream is then truncated and still requires extra coding.
Thanks! That solves my questions.
I just see close to me a situation that the upgrade to a higher version ( 16.2 to 18.1)
may trigger quite an effort on updating all developer's Studio. With all that "can never happen" ![]()
![]()
I was thinking about this issue from @Wolf Koelling
IRIS Quarterly Container only releases and Studio
"install some code on the target server" sounds to have the potential to work around his show stopper.
Hi John,
Would this include a certain level of independence between editing and Caché, Ensemble, IRIS version?
Especially a kind of "forward" compatibility as long as you don't go for new features?
Did you check it with Chrome or just the default browser ?
for similar reasons I have set my default browser to Chrome
I'm glad I could help the community with my answers and
I especially like to express my BIG THANK to my readers voting for me.
This clear and positive feedback is a strong motivation for me for the future years.
My interpretation of th eerror message is:
The JDBCdriver gets a request that it doesn't understand for a some reason but doesnt uncover the details.
The issue is to my understanding sowher in the Java part outside Caché.
I'd suggest to contact WRC as the know how to trace this and also understand the results.
You are right: LNX distrib + Win Distrib were the same build.
As far I remember from the version string "2018.1.1.643.0 " only "2018.1.1" is important.
And also the container should have $ZV to verify (No idea what's in there actually )
Hi Wolf,
I ran into a similar problem a few weeks ago: IRIS on Linux - no studio
My solution: Custom install on my local WIN10 desktop. Only the Studio (and ODBC drivers).
Nice side effect: the new IRIS-Studio also talks seamlessly to my local Caché.
My assumption: As it works for an isolated Linux it should work for Docker as well (if no firewall blocks you
)
HIVE docs on String Types shows me:
STRINGVARCHAR (Note: Only available starting with Hive 0.12.0)CHAR (Note: Only available starting with Hive 0.13.0and
Varchar types are created with a length specifier (between 1 and 65535), which defines the maximum number of characters allowed in the character string. If a string value being converted/assigned to a varchar value exceeds the length specifier, the string is silently truncated. Character length is determined by the number of code points contained by the character string.
Related to your ERROR that tells us that STRING has no size limit => it is a STREAM in our terms.
So if you don't convert a STRING to VARCHAR [ preferable VARCHAR(255) ] you won't be able to use an alphanumeric ID
You may, of course, add some artificial numbering of type BIGINT to be used as ID.
In any case, just with data type STRING I'd call this a rather a text file than an SQL usable table.
Without touching the original source you may need to write your own loader:
Using UUID is a .save way to have a UNIQUE Key.
And Open by Key is a stable way for access.
BUT be warned: replacing the default ID means locking you out from Bitmap indexing.
This might not be an issue with modestly sized tables.
With larger ones it may kill your query performance
After exercising this you may start to analyze how to run asynchronous web sockets also without additional JS stuff.
see more Using WebSockets (RFC 6455)
Jour problem is that morder**....js is not found in your CSP library structures.
Better start with the official example in namespace SAMPLES:
That one is really useful to start