Giter VIP home page Giter VIP logo

Comments (6)

gabrielrcouto avatar gabrielrcouto commented on August 27, 2024 2

@trowski thank you for the recommendation, amphp is an amazing project. After your comment, I made some tests and, as @cubiclesoft said, the EXE shim solves the problems, but adds one more process to control, and the Lazarus continues to be a problem, really unstable using pipes.

Well, your comment made me to refocus on this project, and after 2 days of working, I did the migration of all the IPC communication using TCP socket, you can see on https://github.com/gabrielrcouto/php-gui/tree/feature/socket. I tested on Mac, if you can help me testing on other platforms, I'll appreciate 😄 (you'll need to compile for testing). On Mac, php-gui with socket is really stable.

@reisraff could you test on Linux? \o/

from php-gui.

gabrielrcouto avatar gabrielrcouto commented on August 27, 2024

Wow, this is one of the best issue descriptions which I've read on my projects, thank you very much @cubiclesoft for your time.

I agree with everything you said. Initially, I used the stdin/stdout to enable easy SSH tunneling (you execute the PHP side on a server, and the Lazarus side on your computer, something like a thin client, but yes, you can do this using TCP/IP), but, as you said, non-blocking I/O on Windows pipes are too complicated to get working stable, and I was thinking to change to TCP/IP a few days before your comment. Probably using something like JSON-RPC on top of TCP/IP will make things easier, and this will enable other backends (not only PHP) to create graphical user interfaces using this project. The way you described the TCP/IP port "negotiation" was perfect.

About the storage problem, I need to create a "post install" step for composer, to download the release zip file (with all binaries) and keep simple the use of this project. Well noted ;-)

Just out of curiosity, what project did you find to solve your problem?

from php-gui.

cubiclesoft avatar cubiclesoft commented on August 27, 2024

I tend to do a lot of research first before writing any code. Haven't settled on anything yet. I have been working on a major project for the last 8 months now so research for future projects and lightweight dev work is mostly all I can spare for brief distractions.

from php-gui.

trowski avatar trowski commented on August 27, 2024

amphp/process supports non-blocking I/O on process pipes on Windows. Amp also has the amphp/parallel package that may make IPC even easier.

@gabrielrcouto I'd be curious to know your thoughts of switching to Amp for process management. Note that Amp is compatible with any ReactPHP packages, so that may help ease the transition for users.

from php-gui.

cubiclesoft avatar cubiclesoft commented on August 27, 2024

The code for setting up socket communications should happen in the Lazarus process itself so that sockets are used across all platforms. The EXE shim is a hack to solve process I/O blocking on Windows, which adds an extra process to the mix but isn't needed when control over the target process already exists.

from php-gui.

reisraff avatar reisraff commented on August 27, 2024

@gabrielrcouto it had worked perfect, obviously that we need do a double check and find for bugs, ant things like that, but, you gotcha 👍

from php-gui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.