Comments (6)
@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.
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.
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.
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.
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.
@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)
- Set default value for Select HOT 7
- How gets list of lazarus components and his properties? HOT 1
- Try to open new Application - blank window
- *bars and other components HOT 6
- Cannot empty the view to build another page HOT 1
- Using InputFile for a single file HOT 1
- Does the library have keyboard events? HOT 1
- String Conversion in JSON HOT 1
- Dynamic Call on Pascal side with Rtti
- MacOS built only for 32bit?
- Sponsor link on README is broken
- README example doesn't change button text after clicking button HOT 1
- what is "function () use ($app) { ... }" HOT 11
- Is php-gui currently being supported/developed ? HOT 8
- 部分实例在7.2.23下无法正常运行么? HOT 1
- The Document Page can not open!
- Way to compile php file and create standalone .exe so others can execute HOT 4
- Create tag for composer
- Quotes in text field generate JSON Exception
- I want to know , how to do set background image、set components radius?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-gui.