World: r3wp
[!Cheyenne] Discussions about the Cheyenne Web Server
older newer | first last |
Dockimbel 28-Nov-2011 [10984x4] | Websocket support updated to hybi-10 revision. Websocket chat demo also upgraded: http://demo.cheyenne-server.org:8080/chat.html |
You would need at least one of these browser to use the new websockets support: Chrome 14, FF 8 or IE 10. | |
Janko: I have extended AUTH to be able to return an HTTP code in revision 157: FEAT: AUTH config keyword can now take an optional second parameter (HTTP code 4xx or 5xx) that will be returned to client instead of a redirection to the login URL. | |
The first parameter (a URL) is mandatory and should point to the resource where login happens (it's a pass-thru, every other URL will be redirected or will return a custom HTTP code, if specified). | |
Kaj 28-Nov-2011 [10988] | Chat demo works with Firefox 8.0.1 on Linux |
Dockimbel 28-Nov-2011 [10989x2] | Thanks for testing. |
Endo: I have pushed a few fixes for regressions in embedded mode support. I'm now looking into the possibility of encapping it that mode. | |
Endo 28-Nov-2011 [10991] | Thank you. I'll test tomorrow morning. |
Endo 29-Nov-2011 [10992x2] | encapped embed-demo.exe application gives the following error: ** Script Error: select expected series argument of type: series object port ** Where: get-cache ** Near: select cache file |
I tested on WinXP Pro SP3. Same error as in r151. | |
Dockimbel 29-Nov-2011 [10994x2] | I have added a few lines to embed-demo.r to show you how to prepare it for encapping with Cheyenne running in embedded mode: http://code.google.com/p/cheyenne-server/source/detail?r=161 |
At line 147, you should read "Comment the following line..." instead of "Comment this line..." (fixed in r162). | |
Endo 29-Nov-2011 [10996x2] | Fantastic! Thanks a lot Doc! Now I can make show to my manager for our next project :) |
I think it is also possible to include mod-embed.r file. Currently embed-demo.exe requires mods/mod-embed.r file (probably the other mods as well) | |
Dockimbel 29-Nov-2011 [10998] | You don't need to include any Cheyenne own files, %cheyenne.r takes care about all the required dependencies when encapping. |
Endo 29-Nov-2011 [10999x2] | I did not yet test but with this way we can easily write a websocket test server application. |
So, mod-embed.r should be external anyway? | |
Dockimbel 29-Nov-2011 [11001x3] | I don't understand what you mean by "external" there? |
websocket test server application : you already have it, just run cheyenne.exe and start writing your websocket app. | |
Btw, the embedded mode is for providing an HTTP server to an existing app, not a full-featured Cheyenne. If you want to make a GUI app in View for just a few simple interaction with Cheyenne, you can just #include your View code in %cheyenne.r. | |
Endo 29-Nov-2011 [11004] | I don't understand what you mean by external" there?" when I copy embed-demo.exe alone to outside cheyenne directory, it gives an error like "cannot find the file mods/mod-embed.r". So even encapped it requires that file and probably the other modules (.r) files. What I was thinking, when I use embed mode and encap the cheyenne, it already includes necessary mod files into encapped exe. |
Dockimbel 29-Nov-2011 [11005] | Strange, all the dependent files should be encapped in the executable. Testing locally... |
Endo 29-Nov-2011 [11006] | Here is the error: make object! [ code: 500 type: 'access id: 'cannot-open arg1: "/C/Documents and Settings/endo/mods/mod-embed.r" arg2: none arg3: none near: [do any [get-cache file file]] where: 'do-cache ] |
Dockimbel 29-Nov-2011 [11007] | Ok, I can reproduce it. The module is missing from the Cheyenne package list in %cheyenne.r |
Endo 29-Nov-2011 [11008] | I see, so its only for mod-embed.r not for other mods I think. |
Dockimbel 29-Nov-2011 [11009x2] | It was left out because I never tested encapping in embedded mode. |
I pushed a fix in the repo. | |
Endo 29-Nov-2011 [11011] | Ok, great. Let me test.. |
Dockimbel 29-Nov-2011 [11012x2] | Do not forget to run Cheyenne once after update your files to refresh the cache.efs file. |
update => updating | |
Endo 29-Nov-2011 [11014x2] | Sure |
Works great. Thank you! the embedded mode is for providing an HTTP server to an existing app, not a full-featured Cheyenne But I can use RSP, websockets and webapps I think, right? | |
Dockimbel 29-Nov-2011 [11016x2] | No, they are all disabled in embedded mode. From "Notes" header in %embed-demo.r: All the other modules will be disabled while mod-embed is active (current behaviour, it may change in the future). |
If you want a full-featured Cheyenne and integrate your own GUI app, you would have to make it the other way around, which is include your app in %cheyenne.r. | |
Endo 29-Nov-2011 [11018x3] | Oh but there a "testapp" in embed-demo.r? and its not plain HTML. |
Is it not RSP? | |
I mean its included in the application but still runs in RSP engine? | |
Dockimbel 29-Nov-2011 [11021x2] | No, it's the embed API, see 'publish-site and 'testapp specs in %embed-demo.r |
As the (long) note explains it, it's a special API for closely integrating Cheyenne HTTP server with an existing app. | |
Endo 29-Nov-2011 [11023] | Ok, now I got it. Thanks a lot. |
Dockimbel 29-Nov-2011 [11024] | You're welcome. |
Endo 9-Dec-2011 [11025] | Doc: When I use jobs section in httpd.cfg, the jobs are executed in Cheyenne or UniServe process or it uses Task Master? I mean the jobs can block Cheyenne or not? |
Dockimbel 9-Dec-2011 [11026x3] | It depends on the type of the "action" part of the job rule. Here's what does the scheduler by default (UniServe/libs/scheduler.r): url! [read action] block! [do action] file! [launch action] function! [do :action] word! [do get :action] |
(I remember having issues with LAUNCH, let me know if it works for you) | |
To answer your question, if the type of action is file!, it should not block Cheyenne, others will block. It should be possible to make the url! action not block by using an async HTTP query instead of READ (just adding the HTTP async client for UniServe should work). | |
Endo 9-Dec-2011 [11029x2] | hmm, there is no CALL option? |
oh sorry :) use CALL in a function :) | |
Dockimbel 9-Dec-2011 [11031x2] | LAUNCH %script = CALL on REBOL executable passing the script as argument. |
Yes, you can also use CALL in a function if you prefer. | |
Endo 9-Dec-2011 [11033] | Ok, I'm testing LAUNCH.. |
older newer | first last |