World: r3wp
[!Cheyenne] Discussions about the Cheyenne Web Server
older newer | first last |
Kaj 23-Nov-2011 [10936x2] | Judging by the documentation it should be able to do it, but I admit I usually mistrust such things |
It makes heavy requirements on the file locking of the operating system for that, and it does have a document section that explains how operating systems are buggy and badly documented, so that doesn't exactly instill confidence | |
Dockimbel 23-Nov-2011 [10938x3] | Reliable and efficient file locking is hard to achieve, I agree with that. That's why I went for a syslog-like solution for Cheyenne. |
http://www.sqlite.org/faq.html#q5 Multiple processes can have the same database open at the same time. Multiple processes can be doing a SELECT at the same time. But only one process can be making changes to the database at any moment in time, however. | |
When any process wants to write, it must lock the entire database file for the duration of its update However, client/server database engines (such as PostgreSQL, MySQL, or Oracle) usually support a higher level of concurrency and allow multiple processes to be writing to the same database at the same time. This is possible in a client/server database because there is always a single well-controlled server process available to coordinate access. If your application has a need for a lot of concurrency, then you should consider using a client/server database. | |
Pekr 23-Nov-2011 [10941x2] | Sounds good, no? |
Those locks last only a fraction of time imo. Shouldn't it be good for small stuff? | |
Dockimbel 23-Nov-2011 [10943] | Small stuff: probably, but if you ever need to scale up, better start right from the beginning. |
Dockimbel 24-Nov-2011 [10944] | Bad news for websocket support in REBOL: the new RFC requires that client encodes data sent to server using a basic XOR encryption algorithm: http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10#section-4.3 This is a bad news for us, because it requires to process all bytes received, one by one to decode the message. REBOL is very slow at processing big data in loops, so the overhead can be very significant for data frames of a few dozen KB and more. It could affect Cheyenne global performances drastically. However, it could have been worse, this encryption scheme is not required for data sent by server. So, as long as clients are sending small messages (up to a few KB), the overhead should be low. Fortunately, the usual client messages are queries to obtain data, so usually small. But if you have to move big amouts of data (like XML documents) back and forth through websockets, Cheyenne won't be able to cop with the load and it will most probably be a show-stopper. |
Geomol 24-Nov-2011 [10945] | Can it be solved by calling a routine from a dynamic linked library? |
Dockimbel 24-Nov-2011 [10946x2] | Yes, but in Cheyenne context, having to maintain a cross-platform C lib to that would be really annoying. It would be the end of Cheyenne as a one-file server. Also, it wouldn't run on Core anymore. |
to that = "for that" | |
Geomol 24-Nov-2011 [10948] | Make the C lib open source and let people, who want that functionality, maintain the lib. It shouldn't necessarily be your job. |
Dockimbel 24-Nov-2011 [10949x2] | In the end, the burden will fall on my shoulders if I want fixes and updates to be done in time (as usual). If someone makes such lib (just 3 lines of C, btw), maintains it (means provide binaries for target platforms), I can add an optional loader in Cheyenne to use it when present. As for myself, I prefer to switch to Red asap. |
I have pushed a preliminary implementation of the latest websocket RFC to Cheyenne SVN repo. It works only for text messages of size < 126 bytes. I will get back to it in the next day and complete it. | |
Kaj 24-Nov-2011 [10951] | Good luck with your presentation |
Dockimbel 24-Nov-2011 [10952] | Thanks, I'll publish my slides tomorrow afternoon on Cheyenne's site. |
Endo 25-Nov-2011 [10953x2] | when I encap embed-demo.r, embed-demo.exe gives this error: ** Script Error: select expected series argument of type: series object port ** Where: get-cache ** Near: select cache file Do I need to do something else? I uncommented "embed" in httpd.cfg. |
Did anyone tried Cheyenne in embeded mode? | |
Dockimbel 25-Nov-2011 [10955] | I am not sure I have ever tested encapping Cheyenne in embedded mode. I will test that this weekend, I will anyway spend some hours to complete the new websockets implementation. |
BrianH 25-Nov-2011 [10956] | Don't know if this has been discussed before, but have you looked into SPDY? |
Dockimbel 25-Nov-2011 [10957] | Not recently, but yes. |
Ryan 25-Nov-2011 [10958] | Excellent work on Cheyenne, Doc! The structure is mostly excellent for what I am doing. |
Dockimbel 25-Nov-2011 [10959] | I'm glad it's useful to someone. :-) |
Ryan 25-Nov-2011 [10960] | One thing I need to do is add encrypted script files. What do you think would be the most logical method, modifying source or making my own interpreter? |
Dockimbel 25-Nov-2011 [10961] | You mean you need to encrypt RSP files? |
Ryan 25-Nov-2011 [10962] | or just includes is fine |
Dockimbel 25-Nov-2011 [10963] | I guess yo would need to modify the RSP engine for that. The easiest way would probably be to create a custom 'include function able to decrypt your files. |
Ryan 25-Nov-2011 [10964] | Sounds easy enough. |
Dockimbel 25-Nov-2011 [10965] | I think that the cleanest way would be then to extend the existing INCLUDE function in RSP.r by adding a refinement (/with or /options) and use it to pass additional custom data to the INCLUDE function (like a 'decrypt word, followed by a key). |
Ryan 25-Nov-2011 [10966] | got it. thanks! |
Dockimbel 25-Nov-2011 [10967] | You would also need to patch the engine/add-file method where the RSP scripts are really loaded. |
Ryan 25-Nov-2011 [10968] | patch it to do what? |
Dockimbel 25-Nov-2011 [10969x3] | You could add a property to ENGINE object for controlling how files are loaded, and set/unset it depending on INCLUDE refinement. |
Loading and compilation of RSP scripts are done in ENGINE object, not by INCLUDE. | |
INCLUDE is just the user API front-end. | |
Ryan 25-Nov-2011 [10972x2] | I see it now. |
Where do I find engine? | |
Dockimbel 25-Nov-2011 [10974] | In handlers/RSP.r |
Ryan 25-Nov-2011 [10975] | I ended up replacing the read with one that determines if its encrypted by the filename. Decrypts rsp or includes. Works nice. Thanks for helping get started on that. |
Endo 28-Nov-2011 [10976] | about encap: I'll try to find the problem and if it's not difficult I try to fix it as well. I wanted to ask before spending time on it. Thank you. Doc: if you already done / test it please let me know. I'm planning to use it in a production. |
Dockimbel 28-Nov-2011 [10977x2] | I'll do a quick test on that just after finishing the websocket implementation. |
Should be in a an hour or two. | |
Pekr 28-Nov-2011 [10979] | Did the presentation to php audience already happen? What was the recpetion of Cheyenne? |
Dockimbel 28-Nov-2011 [10980x6] | See: http://cheyenne-server.org/blog.rsp?view=29 |
Btw, a RSS feed is available for the Cheyenne blog. | |
There was about 25 people in the audience, a lot moved to other, more PHP-focused, conferences at the same time. | |
Some were very interested by a simple, small and easily deployed web server that could run PHP code efficiently. | |
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. | |
older newer | first last |