Giter VIP home page Giter VIP logo

draw's People

Contributors

dumitracheadrian avatar mpoiriert avatar olarno avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

draw's Issues

Clean update test helper from DrawTesterBundle

The trait ServiceTesterTrait need to be deleted.

The AutowiredInterface is a better solution and if a service is deleted it's because it's not injected anywhere.

Also remove DrawTesterBundle::addServicesToTest and related code.

Generate a "man" from the application console

We want to be able to "export" a documentation for all the command available in a application.

A standard supported format easy to search would be great or a stand alone html.

If something already exists we could simply integrate it the the framework extra bundle.

Other wise it need to be in the console packages and integrate in the framework extra bundle.

Support pub/sub "messenger like"

We want to add a pub/sub component (on top of messenger ?) that would allow to "dispatch" a message and be consume by different "worker".

Goal is to broadcast a message to a cluster of server and all those server will execute it.

A use case could be to regenerate a file cache entry after something to change in a CMS.

One of the project is using a custom implementation base on "enqueue/enqueue" and we want to have something more resembling "symfony/messenger".

Enqueu is a bit too low level, using string/json a the message instead of using php object.

Best result would be to have a specif queue in messenger that way it would be completely seamless but have a different "component" that would have it's on configuration is ok if too complex/impossible to do in messenger.

Having redis as the first adapter and only adapter for now is ok.

Support jms serializer "enum" type via open-api extractors.

Base on that PR

schmittjoh/serializer#1448

Jms now support "enum" type in their documentation.

This should be done via a

Draw\Component\OpenApi\Extraction\Extractor\JmsSerializer\TypeHandler\TypeToSchemaHandlerInterface

It can be added to the

Draw\Component\OpenApi\Extraction\Extractor\JmsSerializer\PropertiesExtractor::getDefaultHandlers

Method

The integration test to adjust would be:

Draw\Component\OpenApi\Tests\Extraction\Extractor\JmsSerializer\PropertiesExtractorTest

Auto calculate the amount of concurrent process for the broker

The Draw\Component\Messenger\Broker\Comman\StartMessengerBrokerCommand require to pass the amount of concurrent process we want to start.

The amount of concurrent process is often base on the amount of CPU.

The calculation is done on a shell script before calling the broker.

This code is "copied" on all project using the broker.

We want to allow to specify the amount of process per core and the minimum so the StartMessengerBrokerCommand compute it.

Also the --concurent option should allow to receive 'auto' as the value to use the auto calculation of cpu.

Default value would be 1 process per core, and minimum process 1.

Note that the process per core need to be a float allowing to have less than a process per core (0.5).

para test is using this lib:

fidry/cpu-core-counter

Might be a good library to use.

Also we don't want to force the install of fidry/cpu-core-counter.

We could simply throw an exception stating it need to be installed if --concurent is set to auto and it's not present

Support cron configuration via database / messenger

We want to be able to configure cron via database and messenger queue.

Conjob entity must have those attributes:

id (int auto increment)
name: unique name 255 varchar (use for __toString) not null
active: boolean
string: command text not null (will contains the command to execute via the cron) it need to support container parameters
schedule: the cron expression for the schedule
time_to_live: time in seconds before the "message expires". The message handler should check if this time is pass and ignore the message
priority: int allowing (when supported by the transport adapter) to put a priority on the message
cronJobExecutions: One To many relationship with the CronJobExecution entity.

CronJobExecution Entity:

  • id auto increment
  • requestedAt: datetime_immutable
  • force: boolean (if true the active cronjob attribute will be ignored)
  • executionStartedAt: datetime_immutable
  • executionEndedAt: datetime_immutable
  • execution delay: time in seconds for the execution (denormalize data from delta of executionStartedAt and executionEndedAt)
  • exitCode: 0
  • error: json (json formmated data of the exception)

Will need to create a Command that will trigger the system to put required message in the queue.
This command will be executed every second (cron * * * * *) and will add required message.

Another command to execute a cronjob by it's name. This will set the execution->force to true.

A message "ExecuteCronjobMessage" will be dispatch via messenger to be executed. This message should contain the reference to the Execution entity. Do not use the Async*Interface, the routing will be configured manually.

The message handler need to dispatch an event before and after the processing of the cron job.
The Before event must have a way to "cancel" the cron job execution.

All of this will be put in the cron packages.

It will be configurable via the FrameworkExtracBundle (enable it or disabling it).

It must be also be integrated in SonataIntegrationBundle.

The integration need to have the admin for both Cronjob and CronJobExecution.

It must be possible to trigger an cronjob from the admin.

Use swoole or roadrunner http server solution in sandbox

This will increase performance allowing us to attain or goal for the response time.

Find the proper tech solution (Swoole and Roadrunner are just suggestion, maybe something else is better)
Setup docker for it.
Adjust any third party library we are using that are not compatible (if any), by doing PR, patch, fork or changing libraries.
Normally library are not compatible because we should just do a container reset so any library that have state in services will have problem.

Check symfony runtime, normally there is some integration (maybe by the community).

I think the best solution would be roadrunner when I looked a few months ago

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.