Not so Static Assets with Laravel

Handling Laravel routing in ReactPHP, I missed a particular use case: managing the assets usually sitting in the public/ folder. Publishing a regular application with a regular web server it takes care to directly fetch and serve the files from the filesystem, but wrapping the application into a ReactPHP loop…

Routing ReactPHP with Laravel

As previously mentioned, I'm actually playing with asyncronous PHP and I'm trying to combine ReactPHP (which is the most popular framework for this kind of tasks, in PHP) and Laravel (which is the most popular "classic HTTP syncronous" framework).Today's challenge: run a ReactPHP HTTP Server, but still leveraging the…

Scaling Websockets in PHP

I have to implement some kind of sub-system for a larger platform, able to handle realtime communications (such as chat, notifications, and a few other things). And this means: websockets. And, as the platform itself is implemented in PHP/Laravel, this means: websockets in PHP.So I get back to…

Who is Who

Using Redis to store Laravel sessions is a good idea. But be sure to allocate an instance large enough, especially if you use it also for caching pourposes.AWS Elasticache graphs are not eloquent enough about you effective memory usage. Querying the instance with redis-cli seems to be more effective.…

Progressive PDF Loading

If you have large PDF documents to serve into a website, probably you don't want those are fetched entirely before showing to the user. And if you host them in AWS S3, you may also be concerned about bandwidth usage and costs. Mozilla's PDF.js handles progressive loading and handling,…

Cropping Videos

Today, for the second time, I've published something on Dribbble: a demostration of the previously mentioned scrollable calendar. And, as I encoutered the same problems occourred at the first time, here I take some note for the next one.As I've not (yet?) received an invite to the platform, I'm…

Scrollable Calendar

In a web application of mine I've added a simple calendar to display time-based informations. Classic month view, colored cells, implemented with FullCalendar.Then, a user asked to not limit the view to a month at a time, but just display the current week and the next three or four.…

Symbolic Links in FTP

Note for future myself: FTP doesn't supports symbolic linking, when you have to create a link in a folder just create a PHP file in the same folder as<?php symlink('original_file', 'link_file');and run it through the browser.…

Authenticating SPARQL

Recently I'm playing a lot with SPARQL and PHP, using Virtuoso as triple store and EasyRDF as client library. The only problem was that Virtuoso pretends (of course) some kind of authentication to write data into the store (this is not entirely true, you can also permit write operations on…

Teaching Moodle to Laravel

I had to integrate a Laravel application with a Moodle instance: certain users, under given circumstances, may generate a new course in Moodle, be enroled as teacher, and add other platform's users as students.The first step has been to setup a unified authentication, implementing a OAuth2 server in Laravel…