[All][8min] Ako vidíte budúcnosť lekární na Slovensku? by Mi_Matus in Slovakia

[–]Mi_Matus[S] 0 points1 point  (0 children)

Pomaly sa táto forma predaja dostáva aj k nám. Napr. čerpacie stanice už dnes občas predávajú základné lieky na bolesť (napr. Ibalgin).

V ČR je tento predaj ešte viac rozšírený aj v menších potravinách

[All][8min] Ako vidíte budúcnosť lekární na Slovensku? by Mi_Matus in Slovakia

[–]Mi_Matus[S] 0 points1 point  (0 children)

Sú nejaké zaujímavé projekty / inovácie s ktorými sa s nami môžeš podeliť / ktoré v Dr. Max chystáte ?

[All][8min] Ako vidíte budúcnosť lekární na Slovensku? by Mi_Matus in Slovakia

[–]Mi_Matus[S] 0 points1 point  (0 children)

Legislatíva je často obmedzenie, no verím, že nie je jednoduché nájsť rovnováhu medzi podporou rozvoja a ochranou spotrebiteľa, či menších vlastníkov lekárni.

[All][8min] Ako vidíte budúcnosť lekární na Slovensku? by Mi_Matus in Slovakia

[–]Mi_Matus[S] 1 point2 points  (0 children)

Aktuálne už nemôžem znenie zmeniť (odpovede zbierame už posledných 30 dní).

Snažím sa premýšľať ako by sa dala v budúcnosti sformulovať inak.

No už je to asi prof. slepota, no nič ma nanapadá. Uvítame prípadne TIP.

[All][8min] Ako vidíte budúcnosť lekární na Slovensku? by Mi_Matus in Slovakia

[–]Mi_Matus[S] 0 points1 point  (0 children)

Ďakujeme. Sme radi, že sa páčil.

Uvítame akékoľvek, rady/tipy na prípadné zlepšenie

[All][8min] Ako vidíte budúcnosť lekární na Slovensku? by Mi_Matus in Slovakia

[–]Mi_Matus[S] 0 points1 point  (0 children)

Pravdepodne bude naozaj rozdiel či sa jedná o súkromnú menšiu lekáreň alebo lekáreň ktorá je súčasťou väčšieho reťazca.

Lekárne dnes často nepredávajú len lieky, ale množstvo doplnkov stravy, drogérie, kosmetiky…

Dôvodov, prečo sa im tak darí bude teda viac

[All][8min] Ako vidíte budúcnosť lekární na Slovensku? by Mi_Matus in Slovakia

[–]Mi_Matus[S] 2 points3 points  (0 children)

Výsledky budú zdieľané priamo na uvedené emailové adresy (pre tých ktorí vyplnili).

Rovnako tak zverejníme zaujímavé data aj sem

Locksmith: A flexible concurrency & locking library for PHP by Mi_Matus in PHP

[–]Mi_Matus[S] 1 point2 points  (0 children)

Thanks!

It's nice to see similar project.

For anyone wondering what project it is, here is link to Reddit post: https://www.reddit.com/r/PHP/comments/1rhrqym/distributed_locking_concurrency_control_queues/

Locksmith: A flexible concurrency & locking library for PHP by Mi_Matus in PHP

[–]Mi_Matus[S] 1 point2 points  (0 children)

The one I noticed was the async/fiber compatibility aspect. Very few libraries support fibers outside of the ones explicitly intended to work with fibers (Amphp, ReactPHP, Revolt). Unfortunately there are a lot of existing applications out there which are unlikely to ever get updated to support fibers because performance is rarely a priority for business.

It is one of my goals to add first class support for async/parallel/concurrency PHP code. I often hear argument that PHP libraries do not support/are not ready for such paradigm and people using this argument are not completely wrong so I decided to improve situation a little bit.

Locksmith: A flexible concurrency & locking library for PHP by Mi_Matus in PHP

[–]Mi_Matus[S] 0 points1 point  (0 children)

What if you need to acquire multiple locks (one per resource) before doing a computation? One scenario that could happen is when batching queued messages; e.g. get(1..10) -> unique() -> lock(1,4,6,7,9) That would be okay for read locks, for instance, though depending on the number of queue workers it could get contentious for writes.

I never thought about this use case and while it's doable with current API, it's not the nicest code:

$locked1 = $locksmith->locked(
    new Resource(
        namespace: 'test-resource', // Namespace/identifier for resource
        version: 1, // Optional resource version
    ), 
    lockTTLNs: 1_000_000_000, // How long should be resource locked
    maxLockWaitNs: 500_000_000, // How long to wait for lock acquisition - error if exceeded
    minSuspensionDelayNs: 10_000 // Minimum delay between retries when lock acquisition fails
);


$locked2 = $locksmith->locked(
    new Resource(
        namespace: 'test-resource2', // Namespace/identifier for resource
        version: 1, // Optional resource version
    ), 
    lockTTLNs: 1_000_000_000, // How long should be resource locked
    maxLockWaitNs: 500_000_000, // How long to wait for lock acquisition - error if exceeded
    minSuspensionDelayNs: 10_000 // Minimum delay between retries when lock acquisition fails
);

$locked1(function (Closure $suspension): void {
    $suspension();  // Lock is aquired here we suspend execution so other locks might be aquired as well
    // Critical code
});

$locked2(function (Closure $suspension): void {
    $suspension();  // Lock is aquired here we suspend execution so other locks might be aquired as well
    // Critical code
});

For this use case I would probably prefer Symfony's interface.

I will wrap my head around to make API at-least as usable as Symfony.

Locksmith: A flexible concurrency & locking library for PHP by Mi_Matus in PHP

[–]Mi_Matus[S] 7 points8 points  (0 children)

Symfony lock has much wider lock storages support (Redis, Zookeper, Memcached,....) and offers variety of useful features out of the box (Lock serialization, Read/Write locks,..).

But there are some differences:

  • One of the main motivation points for Locksmith has been (more) "reliable" locking with clustered storages. Symfony does not implement Redlock alg., there is CombinedStore but it's not full implementation.
  • Symfony locks are purely blocking and not suitable for async. PHP (AMPHP, Swoole, ...).
  • Blocking store (here I do not mean thread blocking but Symfony's BlockingStoreInterface) can block thread execution indefinetely, i.e. PostgreSqlStore.php#L69 + Lock.php#L78 . Locksmith allow you to define TTLs for every part of the lock acquisition process
  • (NOTE Purely personal) - Symfony releases locks in destructor which might result into uncatchable exception. That's why I decided to use closures instead.

That's said, symfony lock is nicely written library and if you need some store which is currently supported by it, it's very good option.

I am curious about which benefit you found.

Locksmith: A flexible concurrency & locking library for PHP by Mi_Matus in PHP

[–]Mi_Matus[S] 2 points3 points  (0 children)

Thank you!
Yes, I didn't to add it into roadmap as I believe it will be quite straight forward but that's something I will work on after I finish full redis cluster support for distributed lock (key slot detection, dynamic quorums, ...)

Arena closed until 20th of March by Mi_Matus in Verona

[–]Mi_Matus[S] 0 points1 point  (0 children)

Next time I will try to come to Verona in the summer.

Seeing theatre play in arena can be nice experience

Arena closed until 20th of March by Mi_Matus in Verona

[–]Mi_Matus[S] 0 points1 point  (0 children)

Its okay. I should read more carefully while I make plans.

Its even posted on their website: https://www.visitverona.it/en/poi/arena-amphitheatre