Jump to content

Ron

uniGUI Subscriber
  • Posts

    375
  • Joined

  • Last visited

  • Days Won

    31

Everything posted by Ron

  1. I noticed there were some "/Handleevent" or whatever PATH_INFO coming in when it ran as localhost, but silent at HTTPCommand when running under ISAPI. It made me wonder - is the framework sending requests to itself through this interface, and what if that is blocked under ISAPI? Are we missing something?
  2. I wrote those few lines I needed in PHP, since I already have the apache server running. So no crisis at all, as there are many ways to Rome. But still curious
  3. Hi, Running as localhost I can easily catch the PATH_INFO part of a URI, like http://localhost:8077/test But not when using a DLL under Apache, only get HTTP Exception: "HTTP/1.1 302 Found" and invalid session if I try in the browser. Then trying to fish out the suggested Location info from the header, I got nothing. I am trying the format https://myserver.com/appfolder/app.dll/testuri- but not working. I had a rewrite for redirecting http to https, but removing that did not affect this. Using httpClient.HandleRedirects := True; did not affect the issue. Anyone had the same issue, or know about a fix? Update: tried on IIS 8.5, same thing. Only invalid session. Seems like it is not possible to trigger the OnHTTPCommand when running as ISAPI? Nobody ever tried that? This must be a URL rewrite issue...
  4. As far as I understand, Unigui is a multithreaded system, so you can sleep in all spawned threads, that is in uniMainModule and all forms which run under it. But in the ServerModule it is a different issue, and I would only use sleep in the OnHTTP events, which probably spawn a new thread. Sleeping elsewhere in the ServerModule will probably halt the server, in the sense that new threads/connections/sessions may not be started, but I have not tested this, and also I do not see the point of sleeping other places, like in Create or the other events. If doing HTTP longpolling, you have to sleep in the OnHTTP events, to keep the connection.
  5. Interesting, I will test this.
  6. Oliver Morsch is right, it is working nicely with long polling on the Unigui server, and then the connection will be outbound and no router/NAT issues at all. Attached is a simple setup illustrating this. Then it is all about making the local service run without a hitch - and that is not a Unigui problem I will also propose a namechange: - Uniguni UNIque Graphical User Networking Interface. A little tounge in cheek, of course, but also the chance to launch a press release and define a new term - everybody loves terms. Besides, it is easier to say...and can by time expand to UniGuniLuni, or whatever...the sky is the limit ! polling.zip
  7. I am talking outbound, and then you cannot use long polling without having an extra server on the host side, as the client is then local. Websockets - well only if you have a JS websocket server then, running in the browser, as for outbound you must have the client local. Websockets are basically TCP at the core, so the client-server model is still there. I do not want an extra server, as stability is all about reducing complexity.
  8. This is a classical problem due to the architecture, as the local machine is behind a firewall, difficult to approach. So the best solution is to not approach it. If you use the postbox method, the local service may poll a central db constantly, and this is outbound creating no problems. Except for network traffic - polling each second is not recommended. But if we can predict when the need comes, from user behaviour, we can reduce the polling frequency, to maybe once a minute, and then increase it for a while, expecting something to happen. Inbound is not good, and two live TCP connections and a TCP server is complex, even if outbound, and a websocket client would not solve this either, really. Variable frequency intelligent polling based on user behaviour predictions...
  9. A simple way to solve this would be to designate a couple of people as trustees, having access to the source code if something extraordinary happens. All that is needed is the contact information to these people. Or the complete source could be distributed but encrypted, and an automated password retrieval system could be automatically activated in case of the extraordinary, being dependent on continual extension of timeout, and requiring current account pw for login.
  10. Stateful and stateless refer to the software's ability to store and remember current state in a sequence of events, like being logged in or not. As I understand Unigui it is inherently stateful, in the sense that you always have to go through the creation of a mainModule which has a session object and all forms are created on the fly from the mainModule instance. So there is no isolated access to a form, as it always is a child of the mainModule, which stores state information. With Web Core there are only html, css and js, and you can access pages directly, not necessarily being dependent on the loading of some other layer or some other code already running. But even if Unigui works like this, it may behave pretty much stateless, as you can use parameters to direct the user to specific forms, and it is up to you if you want to have a login or not. And of course Web Core have stateful capabilities, like being able to save session data and keep track of logged in status etc. I have not checked this, but what is the point of making a stateless webapp, it is almost an oxymoron. The whole point of a webapp is to circumvent the stateless limitation of the http protocol, so we get closer to the traditional desktop functionality, but in a client/server environment.
  11. I use a local service on the client computer, which runs a webserver, and the unigui app has an http client which calls that webserver sending an event ID. The service then uses this ID to get the event from the event table and prints and opens the cash drawer, and stores the new event status in the db. So the service runs a webserver and has a db connection, and that works, only need to set NAT on the router on the port used. I am considering using a TCP connection instead, with a TCP client at the local PC, and a TCP server at the windows server, and a TCP client in the unigui app, to get a system where the initial connection is outbound, so I do not have to do the NAT. There are only two ways: either you connect from the outside, either to a process/service or the hardware directly, or you connect from the inside, outbound, and do TCP or websocket or http long polling, from a process/service.
  12. I agree that the trend is not looking too good. One solution is to include Unigui with Delphi. Sell it to them. Farshad, you should contact Embarcadero and start the negotiations. We would all benefit from that, as the user base would explode 100x in relatively short time. Just tell them that "You need this, and we only need to agree on the price."
  13. Let's say you have a form, catching some input, and then need to show a new form, showing that input. You then create a procedure in the new form, which takes a parameter, and there you call show or showmodal after having processed the parameter, to show the new form.
  14. Ron

    showmessage copy

    What about sending that error message to yourself, as it gets shown to the user?
  15. Any website you visit may store a cookie or three, and some website you visited then probably stored a GA cookie on your system.
  16. Delays should be around a few hundre milliseconds, and if not there is probabaly another issue, like check your local routing table.
  17. When running a hybrid application, you have two mainforms, one for each platform, and only one of them will be created and shown. So in onShow you can have code which controls the flow of the app, like for instance skipping login if a url parameter is used, and then hide the mainform and going to another form etc. Like if the user clicks on an email confirmation link, you can redirect to a confirmation page, by skipping login in the beforeLogin event if a url parameter is used. You can do the skipping login by really logging in as an anon user with no rights, which may change if the user later chooses to log in.
  18. Are you trying to download a file? See attached project. download.zip
  19. Ron

    include code

    Sure, just choose File->New->Unit - Delphi, and you will get a blank text-only unit file without a form. Give it a name and paste the code there, and then refer to that unit in the uses clause of other units, and you have access.
  20. On the click event of the grid you can save the chosen value, and then set modalResult:=mrOK, or mrCancel if the user cancels the form. In the mainform you use the showmodal with a callback function to show the form in the first place, and then in that callback function you do whatever with the saved value, depending on the modalresult.
  21. It uses the windows function FreeLibrary,and I use this on my apache server without a hitch, unloads, loads, all working fine.
  22. Can you use two providers, where one is always in a ready state?
  23. To be sure, you have to test it, so set up some simulation where you post a million emails to an offline SMTP server, and see what happens.
  24. Check the source of this project http://www.eggcentric.com/ISAPILoader.htm
  25. If you make a thread object and create the db connection and the SMTP client within that thread, triggering the thread create using an external timer, I think it should work out fine. The problem may arise if the thread is not finished before being triggered again, but you can check if the thread object exists, and wait some more. You can also drop the timer outside of the thread, and use a loop/delay inside, in the execute routine, to fetch emails from the db and send. In that case the thread should start as the app loads, and stay running until the app shuts down. But I rather make a separate application for such things, running it as a service, totally independent from Unigui, based on a thread object.
×
×
  • Create New...