What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

can anyone point me at a doc / explain why spryker decided to use "glue -> client -> gateway -

2

Comments

  • Alberto Reyer
    Alberto Reyer Posts: 690 πŸͺ - Explorer

    @UK5DS29L2 > strongly depend on each other and are by no means separate applications

    That’s wrong. They are decoupled by using the transfer objects. You can deploy Yves + Client + Shared independently from Zed + Shared. We already do this for Glue and Zed when we build our docker containers.

    because Zed and Yves can request Zed/Yves namespaces

    While this is in general possible, it is prohibited by a code sniffer rule (https://github.com/spryker/code-sniffer/blob/master/Spryker/Sniffs/Namespaces/SprykerNoCrossNamespaceSniff.php).

    can I call Zed myself without using glue / yves ?

    You can with a little bit of work, but it’s highly discouraged as you would drop the benefit of having Zed running in a more secure network and in addition you will end up mixing applications. As long as you will never have different touchpoints then Yves, this could be ok, but I wouldn’t recommend it as one of the biggest feature of spryker is to easily add other touchpoints like an API (glue), or maybe a voice based touchpoint or one for direct sales, etc.

  • of course not ootb

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    I suppose we should be calling the same endpoints client does: the gateway?

  • since this is a custom concept, you might actually opt for a different naming to prevent confusion

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited September 2019

    if not ootb, then the answer is no ;]

  • that is corerct

  • and why would it?

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    to get rid of the client πŸ˜‰ that was the whole point of the discussion

  • can i? -> yes
    does it come ootb? -> no
    why? -> because the client is there for a reason

  • if you want to continue this chain of question i would refer to @UL6DGRULR’s explanation above

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    then if I need client to communicate between Zed and Yves....

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    then they are not independent (even though they are decoupled)

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    (not ootb at least)

  • the way the system comes configured with them as a tandem, yes

  • but that is like asking: can symfony use eloquent instead of doctrine? -> yes! does it work ootb? -> no! does that mean symfony depends on doctrine?

  • (apart from them living in different repos 😊)

  • let’s circle back to the original post

  • https://documentation.spryker.com/yves/client.htm?Highlight=client (though not amazing), says the following: The purpose of the client is to encapsulate the logic which runs the shop independent from the overlying application. So in case you want to use a different technology stack, you can reuse the client.

  • that adresses part one of the original post

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    ok, so I understand that the client is meant to keep stable/expected request-response validation between Yves/Glue and Zed (and it allows you to separate them to different domains later when the system grows up to need it)

  • partially right

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    which part is wrong here? the fact I mentioned Yves/Glue when it could be pretty much anything else?

    1. i would always advise to run the applications on isolated nodes
    1. the client decides for the source of the data, meaning the client does much more than just the yves/glue<>zed communication
  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    none of those prove my statement wrong

  • the client also communicates with the data stores (and potentially third parties)

  • that is correct

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited September 2019

    you said partially right, so you meant some part is not right, then which part isn't ? you have only added more to what I said

  • Alberto Reyer
    Alberto Reyer Posts: 690 πŸͺ - Explorer

    @UK5DS29L2 If you search for a decoupled frontend for any ecommerce suite I suggest taking a look at http://ongr.io/
    But I do not get what’s your point in complaining that a certain Spryker module for Yves only works with the related Zed code. It’s like complaining that you want to use your old tires from a hyundai i10 with your new porsche cayene.
    You can replace yves (the tires in my example) with some effort, but it still has to fit Zed. You could also replace Zed but IMO this is a pretty big effort which I wouldn’t do if there isn’t a really good reasond. And even if there is a good reason, than maybe a different ecommerce system better suites your needs.

    Maybe one assumption which could lead to this discussion is that the client layer not only provides access to Zed, but also to the search and the storage and every client decides if he has to do a Zed request or can get the prepared data from the storage/search already (which is a lot faster).
    If you do have some data which is only available in Zed, you can consider putting it into the storage (https://documentation.spryker.com/architecture_concepts/publish_and_synchronization/publish-and-synchronization.htm)

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    @UL6DGRULR I think you missing the point. please re-read before posting comments. my question was why do we use HTTP call instead of direct method call. Car parts comparison? let's be serious here πŸ™‚