Ziverge
Ziverge
  • Видео 347
  • Просмотров 524 498
[PART 2] Don't Rewrite ALL The Code: Leveraging WebAssembly for Type-Safe High-Performance Workflow
Host: John De Goes
Guest: Cameron Smith
Recorded on: 7.19.2024
Watch all the parts:
Part 1 ruclips.net/video/vlVUMgfGvjQ/видео.html
Part 2 ruclips.net/video/rH4goxYNHOw/видео.html
Part 3 ruclips.net/video/1DNltQ6mv-k/видео.html
Welcome to Zymposium's series Building Better Open Source.
Using innovation, static types, and attention to pain points and developer experience, learn how to create award-winning open source that changes the way we build software!
In this episode, we try to answer the question:
Can WebAssembly support iterative transformation in an ecosystem dominated by dynamic interpreted scripting to static type-safety without rewriting everything from scratch?
Follow us on Twitter:
@ziver...
Просмотров: 45

Видео

[PART 3] Don't Rewrite ALL The Code: Leveraging WebAssembly for Type-Safe High-Performance Workflow
Просмотров 4418 часов назад
Host: John De Goes Guest: Cameron Smith Recorded on: 8.16.2024 Watch all the parts: Part 1 ruclips.net/video/vlVUMgfGvjQ/видео.html Part 2 ruclips.net/video/rH4goxYNHOw/видео.html Part 3 ruclips.net/video/1DNltQ6mv-k/видео.html Welcome to Zymposium's series Building Better Open Source. Using innovation, static types, and attention to pain points and developer experience, learn how to create awa...
[PART 1] Don't Rewrite ALL The Code: Leveraging WebAssembly for Type-Safe High-Performance Workflow
Просмотров 485Месяц назад
Host: John De Goes Guest: Cameron Smith Recorded on: 7.12.2024 Watch all the parts: Part 1 ruclips.net/video/vlVUMgfGvjQ/видео.html Part 2 ruclips.net/video/rH4goxYNHOw/видео.html Part 3 ruclips.net/video/1DNltQ6mv-k/видео.html Welcome to Zymposium's series Building Better Open Source. Using innovation, static types, and attention to pain points and developer experience, learn how to create awa...
Heroes of Ziverge: Leo Benkel (Experienced Engineer at Ziverge)
Просмотров 155Месяц назад
Ziverge is back with another episode of Heroes of Ziverge! Get an exclusive look into the minds shaping the future of software engineering at Ziverge. In this series, we connect with the brilliant engineers behind our innovative solutions, exploring their journeys, challenges, and visions for the tech landscape. In this episode, we interview Leo Benkel, one of Ziverge's key engineering talents....
Heroes of Ziverge: Jorge Vásquez (Senior Software Engineer at Ziverge)
Просмотров 4882 месяца назад
Ziverge is thrilled to launch its series: Heroes of Ziverge! Get an exclusive look into the minds shaping the future of software engineering at Ziverge. In this series, we connect with the brilliant engineers behind our innovative solutions, exploring their journeys, challenges, and visions for the tech landscape. In this episode, we interview Jorge Vásquez, one of Ziverge's key engineering tal...
Zymposium: Building Better Open Source (June 14th, 2024)
Просмотров 1892 месяца назад
Building Better Open Source with John De Goes! Follow @ZivergeTech on Twitter to stay up-to-date for future, weekly Zymposiums.
Zymposium: May 24th, 2024
Просмотров 1703 месяца назад
Zymposium: May 24th, 2024
Zymposium: May 17th, 2024
Просмотров 2153 месяца назад
Zymposium: May 17th, 2024
Zymposium: May 31st, 2024
Просмотров 1803 месяца назад
Zymposium: May 31st, 2024
Zymposium - Building Better Open Source series part II (April 5, 2024)
Просмотров 4674 месяца назад
Zymposium - Building Better Open Source series part II (April 5, 2024)
Zymposium - How to Build an OSS Library that Provides Golden Testing (April 12, 2024)
Просмотров 3174 месяца назад
Zymposium - How to Build an OSS Library that Provides Golden Testing (April 12, 2024)
Zymposium - Learn How to Build Better Open Source with John A. De Goes (March 22, 2024)
Просмотров 1,1 тыс.5 месяцев назад
Zymposium - Learn How to Build Better Open Source with John A. De Goes (March 22, 2024)
How To Catch Graphs With Linked Lists And Generics by Aleksandr Novikov at Functional Scala Conf
Просмотров 3116 месяцев назад
How To Catch Graphs With Linked Lists And Generics by Aleksandr Novikov at Functional Scala Conf
Exploring Language Design with 'Flappy' by Satoshi Ogasawara at Functional Scala Conference
Просмотров 1736 месяцев назад
Exploring Language Design with 'Flappy' by Satoshi Ogasawara at Functional Scala Conference
The Pain Of Engineering Management by Roksolana Diachuk
Просмотров 2256 месяцев назад
The Pain Of Engineering Management by Roksolana Diachuk
Releasing Kyo: When Performance Meets Elegance In Scala by Flavio Brasil
Просмотров 1,9 тыс.6 месяцев назад
Releasing Kyo: When Performance Meets Elegance In Scala by Flavio Brasil
Pathodental Complexity by Alexander Ioffe
Просмотров 3606 месяцев назад
Pathodental Complexity by Alexander Ioffe
Durable Computing For Scala by Adam Fraser
Просмотров 8076 месяцев назад
Durable Computing For Scala by Adam Fraser
Solid & Flexible: The Tour Of Temporal Workflows by Vitalii Honta
Просмотров 2446 месяцев назад
Solid & Flexible: The Tour Of Temporal Workflows by Vitalii Honta
Observability With ZIO-Telemetry by Pierangelo Cecchetto
Просмотров 2746 месяцев назад
Observability With ZIO-Telemetry by Pierangelo Cecchetto
The Ubiquity Of Functional Programming Concepts In Latest Tech by Afsal Thaj
Просмотров 4586 месяцев назад
The Ubiquity Of Functional Programming Concepts In Latest Tech by Afsal Thaj
Practical Codegen: Metaprogramming For Pragmatists by Devon Stewart
Просмотров 1476 месяцев назад
Practical Codegen: Metaprogramming For Pragmatists by Devon Stewart
Grandmaster: Multi-Modal Heterogeneous Build Tool For Scala by Pavel Shirshov
Просмотров 1016 месяцев назад
Grandmaster: Multi-Modal Heterogeneous Build Tool For Scala by Pavel Shirshov
Elevating API Design With Smithy: A Close Look At Smithy IDL And Smithy4s by Yisrael Union
Просмотров 2016 месяцев назад
Elevating API Design With Smithy: A Close Look At Smithy IDL And Smithy4s by Yisrael Union
FS 23 Zoom Samson Kamau Muiruri
Просмотров 996 месяцев назад
FS 23 Zoom Samson Kamau Muiruri
ZIO-HTTP In Comparison by Nabil Abdel-Hafeez
Просмотров 4266 месяцев назад
ZIO-HTTP In Comparison by Nabil Abdel-Hafeez
Letting Go Of Data Encapsulation: Unlocking New Possibilities by Michael Perucca
Просмотров 1526 месяцев назад
Letting Go Of Data Encapsulation: Unlocking New Possibilities by Michael Perucca
Using Testcontainers For Testing by Jasper van Zandbeek
Просмотров 1036 месяцев назад
Using Testcontainers For Testing by Jasper van Zandbeek
Harnessing The Power Of ZIO Schema: Beyond The Limits Of Common Techniques by Jaroslav Regec
Просмотров 2646 месяцев назад
Harnessing The Power Of ZIO Schema: Beyond The Limits Of Common Techniques by Jaroslav Regec
The Cross-Compile Challenge: Is It Still Worth The Effort? by Filip Michalski
Просмотров 2196 месяцев назад
The Cross-Compile Challenge: Is It Still Worth The Effort? by Filip Michalski

Комментарии

  • @MrDejvidkit
    @MrDejvidkit 13 дней назад

    is it still posible to signup?

    • @Ziverge
      @Ziverge 13 дней назад

      Yes! Register here: share.hsforms.com/1VeS7vcAdRyqme1TLriu-YA444dk Watch the live here: ruclips.net/video/RRet38EwSoo/видео.html Join us on Discord to ask any questions (and download the guide): discord.com/invite/c3esdEfywj We'll expect you at 1pm EDT tomorrow 👀

  • @jayshah5695
    @jayshah5695 13 дней назад

    Sum types and subtyping are similar right?

  • @Ziverge
    @Ziverge 17 дней назад

    Make sure to subscribe to our designated Durable Computing channel, where we talk more about Golem 💪 www.youtube.com/@DurableComputing

  • @yfjolne
    @yfjolne 18 дней назад

    Nice demo, congratulations on the 1.0 launch! During the demo Daniel says that it's impossible to update the worker under certain conditions: namely when interface changes (though it seems like in the demo only the implementation was changed?). That brings a more general questions of how to evolve worker states: e.g. how to migrate the state from test2 to test22 atomically during update? And is there a shortcut for common cases, e.g. adding a new field with default value to the State class?

    • @DanielVigovszky
      @DanielVigovszky 18 дней назад

      Thanks for the question! I might have been wrong in the live demo about not being able to use worker update in that particular case. It was hard to quickly think it through while not getting out of the planned schedule. Golem supports two ways to update a worker to a new component version. Automatic update basically replays the whole history of the worker using the new codebase. This potentially can fail, if there were "too big" changes in the codebase. If it fails, the worker is restored to its original version and it works as if nothing happened (and the failed update attempt is available in the worker metadata). So this means that you can change anything (including the external interface) that has not run yet, but if something ran, then the possibilities are limited to small fixes that do not change the (observable) outcome. For example if you invoked function A, and it returned a value, that value is persisted, and if the modified version would return a different value, that is a divergence and fails the update. But if the change only affects things that are not observable (persisted) then it's fine. Of course there are cases when you have to do such a change that cannot be applied to a worker automatically, but you still need to preserve your worker AND have the new version running. For this we support something we call manual update; in this case you have to implement a `save` function in the old version (if it was not there yet, it can be added and auto-updated as it's something never ran yet!) and a `load` function in the new version, and you have to serialize/restore your state manually from an arbitrary byte array. Once the functions are implemented, the process of running them as part of the update process is orchestrated by Golem.

    • @yfjolne
      @yfjolne 17 дней назад

      @@DanielVigovszky Thanks for the great response! Having two cases makes sense, but doesn't it mean that Golem has to store the history of all arguments of each interface function invocation in order to attempt automatic update? That seems to be quite demanding on storage: does Golem support remote object stores for such metadata? And even then, if the first version of the worker was launched say a month ago and actively used, wouldn't automatic update be prohibitively time-consuming for any change to that worker? Meaning that save/load implementations would rather be the default approach.

    • @DanielVigovszky
      @DanielVigovszky 17 дней назад

      @@yfjolne You are right that for automatic update we always need to use the full history, even if snapshots would be used to optimise recovery (which is by the way on the roadmap but not enabled right now). So this is a tradeoff the user can make between having to implement custom code, or use the built-in machinery. Both makes sense depending on your workers and their lifetime. So if we need to store the journal forever, how do we do it? It is stored in multiple layers, the primary layer is the one being written in live - that's currently a redis stream. There are (configurable number of) secondary layers, either further Redis streams, or S3 buckets, where old entries got moved in compressed chunks. The default configuration right now is 1 archive layer in Redis and 1 in S3. Eventually if you are not accessing a worker, it gets completely moved down to the bottom layer. We only have redis+s3 implementation now, but it's designed in a way that it should be easy to implement connectors for other data storages (just need to implement a keyvaluestore, an indexedstore and a blobstore interface) See more at learn.golem.cloud/docs/operate/persistence#oplog

    • @yfjolne
      @yfjolne 17 дней назад

      @@DanielVigovszky I see, thank you for the detailed reply.

  • @sadikmadanialaoui7690
    @sadikmadanialaoui7690 23 дня назад

    amazing interview indeed

  • @kostian8354
    @kostian8354 23 дня назад

    Great trolling, none of these are trully a problems of Rust, those are issues with Scala.

  • @mackler
    @mackler 27 дней назад

    Too good to be true?

  • @ZelenoJabko
    @ZelenoJabko 27 дней назад

    John, here it Goes

  • @Rockyzach88
    @Rockyzach88 Месяц назад

    I'm learning SCALA right now. Why does it need WASM?

  • @alex-su81
    @alex-su81 Месяц назад

    Since Java got lambdas and streams, Scala does provide very few advantages. And tones of complications.

  • @mrsoomo
    @mrsoomo Месяц назад

    Scala is great language. Thank you for supporting

  • @ramavishal8605
    @ramavishal8605 Месяц назад

    very nice detailed explanation for beginners

  • @jay-hinddoston8364
    @jay-hinddoston8364 2 месяца назад

    Its a must watch, thanks for this session

  • @CarlosSaltos
    @CarlosSaltos 2 месяца назад

    Why the fight when you can use Loom inside the ZIO or Kyo or Cats Effect one of these days !! 👍😎 ... This requires a heavy rewrite of these tools but it's possible or at least more productive than fighting 😅😇

  • @calvinfernandes1054
    @calvinfernandes1054 2 месяца назад

    Great video Yisrael ❤

  • @MrDejvidkit
    @MrDejvidkit 2 месяца назад

    Nice, I was waiting for next vide ;-=

  • @williamswaney2615
    @williamswaney2615 2 месяца назад

    It's no Clojure... I have had no end of issues with Scala and backwards compatibility. Even just simple version changes w/libraries. Not with Clojure. I like Scala, but I love Clojure.

  • @JohanLiebhart
    @JohanLiebhart 2 месяца назад

    If you have multiple instances, the STM cannot solve the transaction problem, right?

  • @Alex-xf8pl
    @Alex-xf8pl 3 месяца назад

    Hey John, really cool and comprehensive subject, thanks for your contributions to the Scala community and to helping improve engineers. I would have a suggestion for a topic for your open-source series, which would be open-sourcing a commercial project.

  • @TJ-hs1qm
    @TJ-hs1qm 3 месяца назад

    she got a glimpse into the Matrix sqeeze the people but not so much that they'll break

  • @TJ-hs1qm
    @TJ-hs1qm 3 месяца назад

    Difficult to follow due to the ambient room reverb. It's generally better to use a mic.

  • @joan38
    @joan38 3 месяца назад

    39:10 Isn't Scala.JS very much integrated in Scala?

  • @joan38
    @joan38 3 месяца назад

    34:10 scala-cli is probably much better than cargo

  • @budiardjo6610
    @budiardjo6610 3 месяца назад

    i am learn a lot from scala to understand rust

  • @mrdkyzmrdany8742
    @mrdkyzmrdany8742 4 месяца назад

    Dependency Injection Attacks [19:26] 😂🤣😂🤣

  • @MaxChistokletov
    @MaxChistokletov 4 месяца назад

    Scala value prop (for me at least): write reliable concurrent code on the JVM, easily.

  • @MrDejvidkit
    @MrDejvidkit 4 месяца назад

    This is great! I like seeing things process.

  • @Swoogles
    @Swoogles 4 месяца назад

    Excellent stuff, Nabil. I appreciate seeing the progression of the DSL and how it reached its awesome current state.

  • @carlosverdes
    @carlosverdes 4 месяца назад

    What you describe with "you say what you want to do" is actually a command on CQRS, as I said you can apply your Flows as an abstraction that behind the scenes use CQRS + ES (each flow step is one command that generates 1 to n events)

  • @carlosverdes
    @carlosverdes 4 месяца назад

    Some comments related with your comments on event sourcing: - you never retry events, you retry a command (and if the command fails 0 events are generated), events are always facts that happened in the past and hence there is no need to retry anything (commands are actions that produce events) - I do agree in most cases it's true using ES is accidental complexity and that is a new paradigm, but I dont agree that makes you change ALL your application. If you follow DDD it will only affect a part of your application, normally a bounded context where CQRS + ES is justified - Also you don't mention that once you have the events stored is super easy to reply them and create new views or feed other aggregates, in a super natural way compared with a traditional "store snapshot" approach with CRUD - Kafka is not a good fit for event sourcing as it doesn't have optimistic locks, I saw super good implementations using Postgres, event sourcing is NOT event streaming, it's a style of how you store your events - The example of the shopping cart is actually a good fit for event sourcing, for example when you need information for analytics it's super easy to replay all events from our users and create different views, but if you read from transactional tables you miss lot of information relevant for data science models - I actually think you can apply durable computing on top of event sourcing, they are compatible things solving different concerns, event sourcing is used to reflect business (it's linked to domain) where durable computing is about fixing non-functional issues like failures, hardware retries, etc. You can apply both together

  • @Datababble
    @Datababble 4 месяца назад

    Really enjoying this series - thank you both, Nabil and John!

  • @alphabeta3029
    @alphabeta3029 5 месяцев назад

    Probably the most convoluted implementation of tic tac toe I've ever seen 😅

    • @michaelperucca4707
      @michaelperucca4707 4 месяца назад

      Oh yeah. It definitely balloons when trying to be precise, and we’ve probably surpassed the point of “is it worth it?”

  • @Datababble
    @Datababble 5 месяцев назад

    Thanks Daniel, great session!

  • @MrDejvidkit
    @MrDejvidkit 5 месяцев назад

    Here he goes! 💪💪

  • @Heater-v1.0.0
    @Heater-v1.0.0 5 месяцев назад

    Pragmatist here: Correct me if I am wrong but as far as I can tell Scala has the following to learn from Rust: 1) It has to learn to work with out the JVM (or any kind of run-time system). Requiring the JVM implies bloat and poor performance. That excludes use of Scala from much of the work I do. 2) It has to learn to work without a garbage collector. A garbage collector introduces unpredictability in performance. It also excludes use of Scala from much of the work I do. 3) It has to learn to run in only kilobytes of code space on micro-controllers and the like. 4) It has to learn that maths is great and all, but maths is limited. Maths does not have a solution for the many body problem, for example. As for monoids, I had them surgically removed as a child.

  • @TJ-hs1qm
    @TJ-hs1qm 5 месяцев назад

    Scott Wlaschin - Designing with capabilities ruclips.net/video/RqlnWv6NZos/видео.html

    • @michaelperucca4707
      @michaelperucca4707 4 месяца назад

      Interesting video! One advantage of this over the capability approach is the ability to define the move validity at the method definition, forcing the implementer to check the game is in a valid state before applying a user’s request.

  • @kaktusdono
    @kaktusdono 5 месяцев назад

    My bald angel <3

  • @hubstrangers3450
    @hubstrangers3450 5 месяцев назад

    Thank you, truth was expressed!!!!

  • @MrDejvidkit
    @MrDejvidkit 5 месяцев назад

    why another parsing library?

    • @pdf5774
      @pdf5774 29 дней назад

      Because it's invertible.

  • @i-am-the-slime
    @i-am-the-slime 5 месяцев назад

    Thanks for the nice talk 😊. I have a question: What about doing the final approach with union types? I tend to favour polymorphic variants for type errors so you don't need to create useless wrappers for each error you want to "rethrow". Is that possible in Scala 3?

  • @mariobroselli3642
    @mariobroselli3642 5 месяцев назад

    What would you learn as First language for absolute Beginners? I found another functional lang called Racket.

  • @odiiibo
    @odiiibo 6 месяцев назад

    0:17 In this talk I’m going to cover a number of topics. Here is my short plan. First, I’m going to convince you that graphs are important. Next, I’ll present to you a data structure that I’ve come up with for graphs. In the end, you’ll see how a domain can be modeled using Scala generic types. I use this approach in my current project. 0:47 So, let’s begin. Why do I think graphs are important for us? 0:57 It's pretty obvious that we rely on associations in our mental processes. And associations build a sort of a graph. Our concepts too build an interconnected graph of definitions. Wikipedia is a vivid example of it. In communication though we transform internal representation into a sequence of sounds. 1:28 These boys are testing a new communication line. The boy on the right wants to pass a message to his friend. We can’t know what he is about to say. This information is present only in his mind. 1:49 Now he articulates some words. These words come sequentially, one after the other. The relations between words are hidden. They are encoded in a form that is specific to a particular natural language. 2:10 The boy on the left knows this language. That’s why he is able to decode the message. And a network of associations lights up in his mind. 2:24 So, what is the novelty of the project, that I’m working on? The goal is to keep and to send information in the form of a graph. 2:40 Here I listed the features of the project. 2:43 As I’ve shown you, the format is native to human mind. We sometimes borrow inventions of the nature, and it brings new, often unexpected, opportunities. In this project, we explore what we can get. 3:03 A crucial decision was to represent all connections explicitly. There is no need to reconstruct them on receiving a message. A machine can compare it to the graph it has already accumulated. 3:21 Multiple channels of perception get recorded in one go. Relations between their parts provide meaning to each channel over its bounds. It can solve the problem of naming one thing different names. 3:40 It is expected that the amount of data will grow gradually. Fresh data will emerge at a number of unrelated locations. And with time passing these scattered databases will begin contacting each other. There is no centralized board of experts creating an ontology that should be useful for everyone. 4:12 You would agree, the denser the connections between pieces of data the more value it gives us. Possible applications range from creating a new variety of sites on the Internet to robotics. 4:30 To illustrate what a multimodal graph is, I took textual modality and visual modality. 4:40 In this slide you encounter some text about a cat and a picture of this cat. In your mind you associate the letters in the word “cat” to the collection of pixels in the center of the image. In the multimodal graph below we find the word as a red vertex in a yellow pyramid. The collection of pixels is the vertex in a green pyramid. An explicit red edge connects both vertices. 5:23 What does a multimodal graph look like? As an example, let’s take the textual modality. This modality keeps connections between letters, words and phrases. 5:42 At the top, we have the root vertex of the binary layer. Its first edge means zero. Its second edge means one. The root vertex is the starting point when writing any word. Binary character codes spring off the root vertex. This layer of a graph is idempotent. Character codes don’t get duplicated. 6:07 At the bottom of the slide, we have a type vertex. All word clusters get connected to it. The type vertex helps when a vertex ID needs to be converted back into a string. IDs not connected here are not words and must not be processed. 6:18 I have drawn a blue line around clusters that represent the letter c. Its ASCII code is ninety-nine. In binary form it’s one, one. Then three zeros. And again one, one at the end. A binary cluster usually consists of two vertices. Zero is encoded by following the edge of the first vertex. One is encoded by following the edge of the second vertex. 6:54 This time, the blue line goes around the letter “a”. You might have noticed that the final digits zero and one are close to the root vertex. This arrangement of digits removes the need to reverse them on reading 7:13 The last letter of the word “cat” is “t”. Please have a look at the cluster located at the bottom. It still belongs to the binary layer of the graph. But it has three vertices instead of two. It’s because the cluster lies at the border of the binary layer. It needs an extra vertex to build a connection to the adjacent layer. 7:45 Here we are on the other side of the border that separates the two layers of the graph. This area is inhabited by words that consist of a single letter. 8:00 We climb the pyramid one level up and discover here words that have two letters. These words reference the simplest words we saw on the level below them. This way, we traverse actual letter combinations that were present in the texts that we cared to put into the graph. Comparing the pyramids enables detection of similar words. 8:22 One level up in the pyramid of words, we encounter words with three letters. It is not shown in the picture, but the cluster must actually have four vertices instead of three. An additional vertex is needed in order to build a connection to the layer of phrases. 8:44 Let's move on from this example to the operations that can be performed with multimodal graphs. 8:53 Multimodal graphs can be added. It is easy to do because they possess one special vertex where the process must start. The graph on the left gets missing vertices and edges from the graph on the right. But this doesn’t have be the end of the addition process, because new generalizing vertices may become apparent. 9:22 Multimodal graphs may be searched with a query. Overlapping vertices in the query and the original data produce a result. The algorithm for obtaining a result can get quite complex if it involves generalizations. 9:44 We have concluded the section on the significance of graphs. In the next section, we will discuss the relationship between graphs and linked lists. 9:58 Let’s compare drawing a graph and building a list. In the beginning, both sides are blank. We put the first vertex on the dark surface. It is also at the head of the list. We draw another vertex near the first one. It is at the head of the list now. We connect A and B with a directed edge. Into the list we put a record of it. Let’s add one more vertex to this graph. And one more edge. So, drawing graphs is inherently a sequential process. A list suits best for describing it.

  • @odiiibo
    @odiiibo 6 месяцев назад

    11:00 A graph should not only be created. It should also provide all vertices that are connected to a particular one that is of interest. And these edges are certain to be scattered in all possible places of a graph. Linked lists are notoriously not good for the task. A mutable array would be much faster, as it is most close to hardware. But because of its mutability it cannot be used within concurrent functional frameworks. What could be a solution? 11:41 One possible solution is to embed the list into a tree of vectors. It has all the good properties. Reads and updates by index are effectively constant time. This structure can increase or drop in size. It is immutable and can be put into concurrent frameworks. For example, into the Ref of ZIO. 12:10 Let’s now have a close look at the graph elements. 12:16 Let’s start with the vertices. Vertices of a graph are often called dots or nodes. As you see, a vertex has 6 parts. 12:31 On the left side you see two arrows. They point to the vertex and represent references from other elements of a graph. 12:42 The first part of a vertex contains its own address. It shows that next 5 parts belong to a vertex, and not to an edge. The address of this part serves as the identifier of a vertex for all client code. 13:01 The second part of a vertex references its neighbor within a cluster. Vertices of a cluster build a ring. 13:13 These two parts of a vertex count incoming and outgoing connections. These numbers are useful when checking if two vertices are already connected. 13:27 The last two parts of a vertex lead to incoming and outgoing edges. Each kind of edges forms a doubly linked list. 13:42 Now, let’s turn to edges. 13:46 An edge connects one source vertex to one target vertex. An edge is simultaneously present in two lists of edges. An edge has 6 parts. It’s as many as in a vertex. 14:03 Again, you see two arrows on the left. All references to an edge go to its first part. 14:11 The first three parts of an edge relate to its source vertex. 14:17 The last three parts of an edge relate to its target vertex. Traversing this list of edges one collects all sources leading to a target. 14:32 As I’ve already mentioned, vertices and edges occupy equal space in memory. They both consist of six parts. We can put them into a sequence like this. 14:50 The sequence can be split into six ones. Please note that the addresses have changed. 15:00 Each of the six sequences is an address store. It is called so because it keeps its own addresses as values. It is embedded into its own tree of vectors. A cursor tracks the next position that is available. 15:27 Let’s look at the operations that an address store offers. The append operation starts at the address zero. This address is reserved for metadata. It’s the only place with no restrictions. Any number can be written here. 15:50 Next, the cursor moves to the address one. This time we can’t write a number that is greater than the address. 16:00 When the cursor moves further, we have a broader choice of values. At address two, we can write zero, one or two. 16:10 This process can continue on and on. 16:14 Let’s now have a look at the update operation. Suppose we want to replace the value that is kept at the address one. We can place here zero, one or two. 16:30 Finally, we’ve come to the delete operation. The deleted element of an address store gets replaced with the last one. 16:41 The code implementing deletions is most intricate. It is roughly two thirds of the code base. 16:55 We have finished the section about the data structure and arrived at modeling it with Scala generic types. 17:05 I have devised a way of organizing Scala code. It is unusual but it has its merits. What is normally called a class occupies a whole directory. Class fields reside in a dedicated file. Each method has its own file too. 17:30 Every class of a business-domain is a generic type. Its type parameters define the field types. Here we’ve got a database entry. It contains some content. And it can be found on some path within a certain address store. 17:57 All methods are implemented as type classes. A concrete implementation is summoned at the call site. 18:06 The IsLoop method checks if an entry contains its own address. It is a class type with one function “f”. 18:18 Below it we find an implementation as a given. Methods of the content and the path are summoned from their respective companion objects. 18:34 One final ingredient is needed to make abstract types concrete. It’s a factory. It has lots of methods that create business objects of a domain. 18:46 Here we have one of such methods. It creates instances of type Content. The arrow shows how the type parameter is translated into a concrete type. 19:00 Such peculiar design allows writing tests a bit differently. 19:06 If a class is required in a test, it gets declared with just one line. Here we declare the class ContentStub. 19:17 And here we add a method to it by creating a given instance. An entry under test will call this method when it checks if there is a loop. 19:30 Now, that you’ve seen some code, I’d like to emphasize two advantages of this approach. 19:38 Test stubs are easy to create. No reflection is needed. You depend less on a testing library. 19:47 Another advantage is call-site driven development. It means a shift in focus when writing code. You do not create things that can perform certain actions. Instead, you discover actions that things you to have at hand must perform. 20:10 Finally we arrive at the end of the presentation. I believe that multimodal graphs will be used extensively in the future. And I hope that you can see the benefits besides those that I have mentioned.

  • @calvinfernandes1054
    @calvinfernandes1054 6 месяцев назад

    Amazing work Erik, thank you for pushing the boundaries and making all Kafka clients better ❤

  • @calvinfernandes1054
    @calvinfernandes1054 6 месяцев назад

    Amazon work Alex, I was on the edge of my seat till the very end

  • @MrDejvidkit
    @MrDejvidkit 6 месяцев назад

    Nice talk. I agree wiht scala-js. We use it for everything in the frontend. And it is soo useful and no context switching between backend and frontend.

    • @Nojipiz
      @Nojipiz 6 месяцев назад

      That sounds like a pretty good idea, i will try that in my new project!

  • @mariobroselli3642
    @mariobroselli3642 6 месяцев назад

    I guess it will be F# then😮

  • @slack128
    @slack128 6 месяцев назад

    These are well made slides, very interesting talk

  • @AginPeriera
    @AginPeriera 6 месяцев назад

    I have never seen that much tech in 1 talk ! AI, webassembly, frontend backend, java, haskell, Rust! Inspiring, and out of words! Really useful!